diff options
author | Marius <mariausol@gmail.com> | 2011-11-23 20:20:15 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-11-23 20:20:15 +0200 |
commit | ae4e7c1b2b58b4b089b5eff6e8f41371a309a538 (patch) | |
tree | 09d92389e47365408a57367fb597d49aab54d69c | |
parent | 795d92e8b019a53568afbcdf5517b0db6f14b99c (diff) | |
download | context-ae4e7c1b2b58b4b089b5eff6e8f41371a309a538.tar.gz |
beta 2011.11.23 18:58
-rw-r--r-- | tex/context/base/anch-pos.mkiv | 36 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4067 -> 4075 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 106411 -> 106394 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/math-int.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/page-bck.mkiv | 58 | ||||
-rw-r--r-- | tex/context/base/phys-dim.lua | 173 | ||||
-rw-r--r-- | tex/context/base/phys-dim.mkiv | 85 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24005 -> 23996 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 168562 -> 167932 bytes | |||
-rw-r--r-- | tex/context/base/tabl-xtb.lua | 9 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
15 files changed, 153 insertions, 220 deletions
diff --git a/tex/context/base/anch-pos.mkiv b/tex/context/base/anch-pos.mkiv index 62439e9cb..57e8808dc 100644 --- a/tex/context/base/anch-pos.mkiv +++ b/tex/context/base/anch-pos.mkiv @@ -100,37 +100,6 @@ %D \dosetpositionplus {identifier} {width} {height} {depth} {list} %D \dosetpositionpapersize {width} {height} %D \stoptyping -%D -%D Positions are either generated at a delayed write time -%D (in \PDFTEX), or derived from the dvi file. The actual -%D method is implemented in a special driver. If needed, the -%D driver can fall back on the following macros. - -% \def\dolazysaveposition #1#2#3#4{\normalexpanded{\ctxlatelua{_ptbs_['#1']={#2,"#3","#4"}}}} -% \def\dolazysavepositionwhd #1#2#3#4#5#6#7{\normalexpanded{\ctxlatelua{_ptbs_['#1']={#2,"#3","#4","#5","#6","#7"}}}} -% \def\dolazysavepositionplus#1#2#3#4#5#6#7#8{\normalexpanded{\ctxlatelua{_ptbs_['#1']={#2,"#3","#4","#5","#6","#7","#8"}}}} -% \def\dosaveposition #1#2#3#4{\normalexpanded{\ctxlua {_ptbs_['#1']={#2,"#3","#4"}}}} -% \def\dosavepositionwhd #1#2#3#4#5#6#7{\normalexpanded{\ctxlua {_ptbs_['#1']={#2,"#3","#4","#5","#6","#7"}}}} -% \def\dosavepositionplus #1#2#3#4#5#6#7#8{\normalexpanded{\ctxlua {_ptbs_['#1']={#2,"#3","#4","#5","#6","#7","#8"}}}} -% -% \def\lastsavedpositionx {\the\dimexpr\pdflastxpos\scaledpoint\relax} -% \def\lastsavedpositiony {\the\dimexpr\pdflastypos\scaledpoint\relax} -% \let\savecurrentposition\pdfsavepos -% -% \def\dosetposition#1% will become commands.setposition -% {\savecurrentposition -% \normalexpanded{\ctxlatelua{_ptbs_['#1']={% -% \noexpand\realfolio,"\noexpand\lastsavedpositionx","\noexpand\lastsavedpositiony"}}}} -% -% \def\dosetpositionwhd#1#2#3#4% -% {\savecurrentposition -% \normalexpanded{\ctxlatelua{_ptbs_['#1']={% -% \noexpand\realfolio,"\noexpand\lastsavedpositionx","\noexpand\lastsavedpositiony","#2","#3","#4"}}}} -% -% \def\dosetpositionplus#1#2#3#4#5% -% {\savecurrentposition -% \normalexpanded{\ctxlatelua{_ptbs_['#1']={% -% \noexpand\realfolio,"\noexpand\lastsavedpositionx","\noexpand\lastsavedpositiony","#2","#3","#4","#5"}}}} \def\dosaveposition #1#2#3#4{\normalexpanded{\ctxlua {_plib_.setall("#1",\number#2,\number\dimexpr#3,\number\dimexpr#4)}}} \def\dosavepositionwhd #1#2#3#4#5#6#7{\normalexpanded{\ctxlua {_plib_.setall("#1",\number#2,\number\dimexpr#3,\number\dimexpr#4,\number\dimexpr#5,\number\dimexpr#6,\number\dimexpr#7)}}} @@ -155,13 +124,10 @@ % 0 = don't relocate page origin 1 = relocate page origin once -\setnewconstant\positionanchormode\plusone +\setnewconstant\positionanchormode\plusone % not used %D Sometimes we want to trick the position handler a bit: -% \def\replacepospxywhd#1#2#3#4#5#6#7% -% {\ctxcommand{replacepospxywhd('#1',\number#2,"\the\dimexpr#3\relax","\the\dimexpr#4\relax","\the\dimexpr#5\relax","\the\dimexpr#6\relax","\the\dimexpr#7\relax")}} - \def\replacepospxywhd#1#2#3#4#5#6#7% {\ctxcommand{replacepospxywhd('#1',\number#2,\number\dimexpr#3,\number\dimexpr#4,\number\dimexpr#5,\number\dimexpr#6,\number\dimexpr#7)}} diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 30e8e3c4c..ba80f1b11 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.11.23 16:20} +\newcontextversion{2011.11.23 18:58} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index a3eb8d694..cd0cb09b3 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.11.23 16:20} +\newcontextversion{2011.11.23 18:58} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 81add2f72..d62417df9 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex 4a1c23de2..297460688 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 4c0e453e6..683a629ee 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.11.23 16:20} +\edef\contextversion{2011.11.23 18:58} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index cfd8fcd56..4f64155ba 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.11.23 16:20} +\edef\contextversion{2011.11.23 18:58} %D For those who want to use this: diff --git a/tex/context/base/math-int.mkiv b/tex/context/base/math-int.mkiv index 6ad089bf6..97fd48214 100644 --- a/tex/context/base/math-int.mkiv +++ b/tex/context/base/math-int.mkiv @@ -54,7 +54,7 @@ \letvalue{\??mo::\v!integral::limits}\plustwo \appendtoks - \mathintlimitmode\executeifdefined{\??mo::\v!integral::limits}\zerocount + \mathintlimitmode\executeifdefined{\??mo::\v!integral::\@@mointegral}\zerocount \to \everysetupmathematics \setupmathematics diff --git a/tex/context/base/page-bck.mkiv b/tex/context/base/page-bck.mkiv index fd1dff885..2608ee828 100644 --- a/tex/context/base/page-bck.mkiv +++ b/tex/context/base/page-bck.mkiv @@ -70,45 +70,6 @@ %D (On the 824 pages maps bibliography runtime went down from %D 309 to 299 seconds.) -% \let\currentotrbackground\empty -% -% \def\@@docheckbackground#1#2% -% {\ifcsname\currentotrbackground#1\endcsname -% \edef\!!stringa{\csname\currentotrbackground#1\endcsname}\ifx\!!stringa#2\!!doneatrue\fi -% \fi} -% -% \def\@@nocheckbackground#1#2% -% {\ifcsname\currentotrbackground#1\endcsname -% \edef\!!stringa{\csname\currentotrbackground#1\endcsname}\ifx\!!stringa#2\else\!!doneatrue\fi -% \fi} -% -% \def\checkbackground#1% -% {\edef\currentotrbackground{\??ma#1}% -% \begingroup -% \!!doneafalse -% \if!!donea\else\@@nocheckbackground\c!background \empty -% \if!!donea\else\@@docheckbackground\c!frame \v!on -% \if!!donea\else\@@nocheckbackground\c!foregroundcolor\empty -% \if!!donea\else\@@docheckbackground\c!leftframe \v!on -% \if!!donea\else\@@docheckbackground\c!rightframe \v!on -% \if!!donea\else\@@docheckbackground\c!topframe \v!on -% \if!!donea\else\@@docheckbackground\c!bottomframe \v!on \fi\fi\fi\fi\fi\fi\fi -% \if!!donea -% \endgroup\setusage \currentotrbackground -% \else -% \endgroup\resetusage\currentotrbackground -% \fi} -% -% \def\ifsomebackgroundfound#1% -% {\ifusage{\??ma#1}} -% -% \def\doifsomebackgroundelse#1% -% {\ifusage{\??ma#1}% -% \expandafter\firstoftwoarguments -% \else -% \expandafter\secondoftwoarguments -% \fi} - \let\currentotrbackground\empty \def\@@docheckbackground#1#2% @@ -159,17 +120,6 @@ %D macro. This means that all normal frame and overlay %D features can be used. -% \def\addsomebackground#1#2#3#4% area box width height / zero test added -% {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint -% \ifcsname\??ma#1\c!setups\endcsname % to be done -% \doprocesslocalsetups{\csname\??ma#1\c!setups\endcsname}% should not produce funny spaces ! -% \fi -% \setbox#2\vbox\fastlocalframed % maybe \superfastlocalframed{tag}{w}{h} -% [\??ma#1]% -% [\c!component=#1,\c!width=#3,\c!height=#4]% are width and height used? -% {\dp#2\zeropoint\box#2}% -% \fi\fi\fi} - \def\addsomebackground#1#2#3#4% area box width height / zero test added {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint \ifcsname\??ma#1\c!setups\endcsname % to be done @@ -235,14 +185,6 @@ \newdimen\pageoffset % bleed \newdimen\pagedepth -% \def\setbackgroundboxes -% {\showmessage\m!layouts8\empty -% \setbackgroundbox\leftbackground\relax -% \ifdoublesided -% \setbackgroundbox\rightbackground\doswapmargins -% \fi -% \doifnot\@@mastatus\v!herhaal{\global\newbackgroundfalse}} - %D We need a bit more clever mechanism in order to handle %D layers well. This means that we cannot calculate both %D background at the same time since something may have diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua index cdc7541a2..0a271852d 100644 --- a/tex/context/base/phys-dim.lua +++ b/tex/context/base/phys-dim.lua @@ -16,68 +16,71 @@ if not modules then modules = { } end modules ['phys-dim'] = { local V, P, S, R, C, Cc, Cs, matchlpeg, Carg = lpeg.V, lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.match, lpeg.Carg local format, lower = string.format, string.lower local appendlpeg = lpeg.append - local mergetable, mergedtable, keys, loweredkeys = table.merge, table.merged, table.keys, table.loweredkeys -local allocate = utilities.storage.allocate +physics = physics or { } +physics.patterns = physics.patterns or { } + +local variables = interfaces.variables +local v_reverse = variables.reverse +local allocate = utilities.storage.allocate -physics = physics or { } -physics.patterns = physics.patterns or { } +local trace_units = false +local report_units = logs.reporter("units") -local variables = interfaces.variables -local v_reverse = variables.reverse +trackers.register("physics.units", function(v) trace_units = v end) -- digits parser (todo : use patterns) -local digit = R("09") -local sign = S("+-") -local power = S("^e") -local digitspace = S("~@_") -local comma = P(",") -local period = P(".") -local semicolon = P(";") -local colon = P(":") -local signspace = P("/") -local positive = P("++") -- was p -local negative = P("--") -- was n -local highspace = P("//") -- was s -local padding = P("=") -local plus = P("+") -local minus = P("-") -local space = P(" ") - -local digits = digit^1 - -local ddigitspace = digitspace / "" / context.digitsspace -local dcommayes = semicolon / "" / context.digitsfinalcomma -local dcommanop = semicolon / "" / context.digitsseparatorspace -local dperiodyes = colon / "" / context.digitsfinalperiod -local dperiodnop = colon / "" / context.digitsseparatorspace -local ddigit = digits / context.digitsdigit -local dfinalcomma = comma / "" / context.digitsfinalcomma -local dfinalperiod = period / "" / context.digitsfinalperiod -local dintercomma = comma * #(digitspace) / "" / context.digitsseparatorspace - + comma / "" / context.digitsintermediatecomma -local dinterperiod = period * #(digitspace) / "" / context.digitsseparatorspace - + period / "" / context.digitsintermediateperiod -local dsignspace = signspace / "" / context.digitssignspace -local dpositive = positive / "" / context.digitspositive -local dnegative = negative / "" / context.digitsnegative -local dhighspace = highspace / "" / context.digitshighspace -local dsomesign = plus / "" / context.digitsplus - + minus / "" / context.digitsminus -local dpower = power / "" * ( - plus * C(digits) / context.digitspowerplus - + minus * C(digits) / context.digitspowerminus - + C(digits) / context.digitspower - ) -local dpadding = padding / "" / context.digitszeropadding -- todo - -local dleader = (dpositive + dnegative + dhighspace + dsomesign + dsignspace)^0 -local dtrailer = dpower^0 -local dfinal = P(-1) + #P(1 - comma - period - semicolon - colon) -local dnumber = (ddigitspace + ddigit)^1 -local dtemplate = ddigitspace^1 +local digit = R("09") +local sign = S("+-") +local power = S("^e") +local digitspace = S("~@_") +local comma = P(",") +local period = P(".") +local semicolon = P(";") +local colon = P(":") +local signspace = P("/") +local positive = P("++") -- was p +local negative = P("--") -- was n +local highspace = P("//") -- was s +local padding = P("=") +local plus = P("+") +local minus = P("-") +local space = P(" ") + +local digits = digit^1 + +local ddigitspace = digitspace / "" / context.digitsspace +local dcommayes = semicolon / "" / context.digitsfinalcomma +local dcommanop = semicolon / "" / context.digitsseparatorspace +local dperiodyes = colon / "" / context.digitsfinalperiod +local dperiodnop = colon / "" / context.digitsseparatorspace +local ddigit = digits / context.digitsdigit +local dfinalcomma = comma / "" / context.digitsfinalcomma +local dfinalperiod = period / "" / context.digitsfinalperiod +local dintercomma = comma * #(digitspace) / "" / context.digitsseparatorspace + + comma / "" / context.digitsintermediatecomma +local dinterperiod = period * #(digitspace) / "" / context.digitsseparatorspace + + period / "" / context.digitsintermediateperiod +local dsignspace = signspace / "" / context.digitssignspace +local dpositive = positive / "" / context.digitspositive +local dnegative = negative / "" / context.digitsnegative +local dhighspace = highspace / "" / context.digitshighspace +local dsomesign = plus / "" / context.digitsplus + + minus / "" / context.digitsminus +local dpower = power / "" * ( + plus * C(digits) / context.digitspowerplus + + minus * C(digits) / context.digitspowerminus + + C(digits) / context.digitspower + ) +local dpadding = padding / "" / context.digitszeropadding -- todo + +local dleader = (dpositive + dnegative + dhighspace + dsomesign + dsignspace)^0 +local dtrailer = dpower^0 +local dfinal = P(-1) + #P(1 - comma - period - semicolon - colon) +local dnumber = (ddigitspace + ddigit)^1 +local dtemplate = ddigitspace^1 -- probably too complex, due to lookahead (lookback with state is probably easier) @@ -93,7 +96,7 @@ local p_c_number = (dcpinternumber)^0 * (dpcfinalnumber)^0 * ddigit + dfallb local c_p_number = (dpcinternumber)^0 * (dcpfinalnumber)^0 * ddigit + dfallback -- 000,000,000.00 -- ony signs before numbers (otherwise we get s / seconds issues) --- + local p_c_dparser = dleader * p_c_number * dtrailer * dfinal local c_p_dparser = dleader * c_p_number * dtrailer * dfinal @@ -147,6 +150,11 @@ local long_prefixes = { Exbi = [[Ei]], -- binary Zebi = [[Zi]], -- binary Yobi = [[Yi]], -- binary + + Degrees = [[°]], + Degree = [[°]], + Deg = [[°]], + ["°"] = [[°]], } local long_units = { @@ -203,7 +211,6 @@ local long_units = { Angstrom = [[Å]], Gauss = [[G]], Rad = [[rad]], - Deg = [[°]], RPS = [[RPS]], RPM = [[RPM]], RevPerSec = [[RPS]], @@ -262,24 +269,24 @@ local short_prefixes_to_long = { } local short_units_to_long = { -- I'm not sure about casing - m = "Meter", - Hz = "Hertz", - hz = "Hertz", - u = "Hour", - h = "Hour", - s = "Second", - g = "Gram", - n = "Newton", - v = "Volt", - - l = "Liter", - -- w = "Watt", - W = "Watt", - -- a = "Ampere", - A = "Ampere", - - Litre = "Liter", - Metre = "Meter", + m = "Meter", + Hz = "Hertz", + hz = "Hertz", + u = "Hour", + h = "Hour", + s = "Second", + g = "Gram", + n = "Newton", + v = "Volt", + + l = "Liter", + -- w = "Watt", + W = "Watt", + -- a = "Ampere", + A = "Ampere", + + Litre = "Liter", + Metre = "Meter", } local short_operators_to_long = { @@ -289,6 +296,10 @@ local short_operators_to_long = { [":"] = "OutOf", } +-- local connected = table.tohash { +-- "Degrees", +-- } + short_prefixes = { } for k, v in next, short_prefixes_to_long do short_prefixes [k] = long_prefixes [v] end short_units = { } for k, v in next, short_units_to_long do short_units [k] = long_units [v] end short_operators = { } for k, v in next, short_operators_to_long do short_operators[k] = long_operators[v] end @@ -371,6 +382,7 @@ local unitsU = context.unitsU local unitsS = context.unitsS local unitsO = context.unitsO local unitsN = context.unitsN +local unitsC = context.unitsC local unitsNstart = context.unitsNstart local unitsNstop = context.unitsNstop @@ -389,7 +401,10 @@ l_units .test = { Meter = "meter", Second = "second" } l_operators.test = { Solidus = " per " } local function dimpus(p,u,s,wherefrom) ---~ print(p,u,s,wherefrom) + if trace_units then + report_units("w: [%s], p: [%s], u: [%s], s: [%s]",wherefrom or "?",p or "?",u or "?",s or "?") + end + -- local c = connected[u] if wherefrom == "" then p = prefixes[p] or p u = units [u] or u @@ -417,6 +432,8 @@ local function dimpus(p,u,s,wherefrom) if u ~= "" then if s ~= "" then unitsUS(u,s) + -- elseif c then + -- unitsC(u) else unitsU(u) end @@ -433,7 +450,9 @@ local function dimspu(s,p,u,wherefrom) end local function dimop(o,wherefrom) ---~ print(o,wherefrom) + if trace_units then + report_units("w: [%s], o: [%s]",wherefrom or "?",o or "?") + end if wherefrom == "" then o = operators[o] or o else diff --git a/tex/context/base/phys-dim.mkiv b/tex/context/base/phys-dim.mkiv index b64865776..a093466d0 100644 --- a/tex/context/base/phys-dim.mkiv +++ b/tex/context/base/phys-dim.mkiv @@ -131,9 +131,9 @@ \newconstant\c_digits_method \newconstant\c_digits_sign % we has sized (text script scriptscript) -\def\setdigitmethod#1{\c_digits_method #1\relax} -\def\setdigitsign #1{\c_digits_sign #1\relax} -\def\setdigitorder #1{\c_digits_order #1\relax} +\unexpanded\def\setdigitmethod#1{\c_digits_method #1\relax} +\unexpanded\def\setdigitsign #1{\c_digits_sign #1\relax} +\unexpanded\def\setdigitorder #1{\c_digits_order #1\relax} \let\setdigitmode\setdigitmethod % compatibility @@ -161,24 +161,25 @@ \expandafter\high \fi} -\def\digitszeropadding {\zeroamount} -\def\digitsnegative {\digits_normalized{0}{\digits_raised{\textminus}}} -\def\digitspositive {\digits_normalized{0}{\digits_raised{\textplus}}} -\def\digitsnegative {\digits_normalized{0}{\mathematics{\negative}}} -\def\digitspositive {\digits_normalized{0}{\mathematics{\positive}}} -\def\digitsminus {\digits_normalized{0}{\mathematics{-}}} -\def\digitsplus {\digits_normalized{0}{\mathematics{+}}} -\def\digitsspace {\hphantom{0}} -\def\digitsseparatorspace{\hphantom{.}} -\def\digitssignspace {\hphantom{\digitsminus}} -\def\digitshighspace {\hphantom{\digitspositive}} -\def\digitspower {\digits_raised} -\def\digitspowerplus #1{\digits_raised{\digitsplus#1}} -\def\digitspowerminus #1{\digits_raised{\digitsminus#1}} -\def\digitsdigit #1{#1} - -\def\normaldigitscommasymbol {,} -\def\normaldigitsperiodsymbol {.} +\unexpanded\def\digitszeropadding {\zeroamount} +\unexpanded\def\digitsnegative {\digits_normalized{0}{\digits_raised{\textminus}}} +\unexpanded\def\digitspositive {\digits_normalized{0}{\digits_raised{\textplus}}} +\unexpanded\def\digitsnegative {\digits_normalized{0}{\mathematics{\negative}}} +\unexpanded\def\digitspositive {\digits_normalized{0}{\mathematics{\positive}}} +\unexpanded\def\digitsminus {\digits_normalized{0}{\mathematics{-}}} +\unexpanded\def\digitsplus {\digits_normalized{0}{\mathematics{+}}} +\unexpanded\def\digitsspace {\hphantom{0}} +\unexpanded\def\digitsseparatorspace{\hphantom{.}} +\unexpanded\def\digitssignspace {\hphantom{\digitsminus}} +\unexpanded\def\digitshighspace {\hphantom{\digitspositive}} +\unexpanded\def\digitspower {\digits_raised} +\unexpanded\def\digitspowerplus #1{\digits_raised{\digitsplus#1}} +\unexpanded\def\digitspowerminus #1{\digits_raised{\digitsminus#1}} +\unexpanded\def\digitsdigit #1{#1} + +\unexpanded\def\normaldigitscommasymbol {,} +\unexpanded\def\normaldigitsperiodsymbol{.} + \let\normaldigitsseparatorspace\digitsseparatorspace \letvalue{digit_c_0}\normaldigitscommasymbol @@ -209,14 +210,14 @@ \letvalue{digit_p_6}\normaldigitsperiodsymbol \letvalue{digit_s_6}\thickspace -\def\digitscommasymbol {\csname digit_c_\number\c_digits_method\endcsname} -\def\digitsperiodsymbol {\csname digit_p_\number\c_digits_method\endcsname} -\def\digitsseparatorspace {\csname digit_s_\number\c_digits_method\endcsname} +\unexpanded\def\digitscommasymbol {\csname digit_c_\number\c_digits_method\endcsname} +\unexpanded\def\digitsperiodsymbol {\csname digit_p_\number\c_digits_method\endcsname} +\unexpanded\def\digitsseparatorspace {\csname digit_s_\number\c_digits_method\endcsname} -\def\digitsfinalcomma {\digitscommasymbol } % more for tracing -\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing -\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing -\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing +\unexpanded\def\digitsfinalcomma {\digitscommasymbol } % more for tracing +\unexpanded\def\digitsfinalperiod {\digitsperiodsymbol} % more for tracing +\unexpanded\def\digitsintermediatecomma {\digitscommasymbol } % more for tracing +\unexpanded\def\digitsintermediateperiod {\digitsperiodsymbol} % more for tracing %D The user macro: @@ -355,12 +356,12 @@ % [ \unit {micro ohm}]\par % space before unit % [\unit{10 micro ohm}]\par % space before unit -\def\unitssmallspace {\thinspace} -\def\unitsmediumspace{\medspace} -\def\unitsbigspace {\thickspace} -\def\unitsbackspace {\negthinspace} +\unexpanded\def\unitssmallspace {\thinspace} +\unexpanded\def\unitsmediumspace{\medspace} +\unexpanded\def\unitsbigspace {\thickspace} +\unexpanded\def\unitsbackspace {\negthinspace} -\def\installunitsseparator#1#2% +\unexpanded\def\installunitsseparator#1#2% {\setvalue{\??un:1:#1}{#2}} \unexpanded\def\dounitsseparator @@ -375,7 +376,7 @@ \installunitsseparator\v!small {\unitssmallspace} \installunitsseparator\v!none {} -\def\installunitsspace#1#2% +\unexpanded\def\installunitsspace#1#2% {\setvalue{\??un:2:#1}{#2}} \unexpanded\def\dounitsspace @@ -473,6 +474,7 @@ \unexpanded\def\unitsS #1{\units_start{}\unitsraise{#1}\c_units_state \plusone} % suffix \unexpanded\def\unitsO #1{\units_start#1\c_units_state \plustwo} % operator \unexpanded\def\unitsN #1{\units_start#1\c_units_state \plusfive} % number +\unexpanded\def\unitsC #1{\units_next#1\c_units_state \plussix} % connected \setelementnature[unit] [mixed] \setelementnature[quantity][mixed] @@ -547,19 +549,20 @@ {\ifcase\c_units_state % start \ifconditional\c_units_dospace % \ifdim\lastskip=\zeropoint - \dounitsspace % \unitsbigspace + \dounitsspace % \else % % too tricky ... we could remove and add % \fi \fi - \or % suffix + \or % 1: suffix {\dounitsseparator}% - \or % operator - \or % unit + \or % 2: operator + \or % 3: unit {\dounitsseparator}% - \or % prefix - \or % number - \dounitsspace % \unitsbigspace + \or % 4: prefix + \or % 5: number + \dounitsspace + \or % 6: symbol (connected) \fi \setfalse\c_units_dospace \units_start} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex dc1f41f54..4d659188f 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 22c578196..915145f56 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/tabl-xtb.lua b/tex/context/base/tabl-xtb.lua index 82cf38ad3..b753560c6 100644 --- a/tex/context/base/tabl-xtb.lua +++ b/tex/context/base/tabl-xtb.lua @@ -62,12 +62,15 @@ local v_width = variables.width local v_repeat = variables["repeat"] local v_max = variables.max -xtables = { } -- maybe in typesetters +local xtables = { } +typesetters.xtables = xtables -local trace_xtable = false trackers.register("xtable.construct", function(v) trace_xtable = v end) +local trace_xtable = false +local report_xtable = logs.reporter("xtable") -local report_xtable = logs.reporter("xtable") +trackers.register("xtable.construct", function(v) trace_xtable = v end) +local null_mode = 0 local head_mode = 1 local foot_mode = 2 local more_mode = 3 diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index a497302bf..2be7de33c 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 11/23/11 16:20:27 +-- merge date : 11/23/11 18:58:55 do -- begin closure to overcome local limits and interference |