summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/m-morse.mkiv256
-rw-r--r--tex/context/base/mult-cld.mkiv7
-rw-r--r--tex/context/base/supp-box.lua76
-rw-r--r--tex/context/base/supp-box.mkiv273
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
7 files changed, 398 insertions, 220 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index 105d85ad6..3be1fa545 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2010.12.10 15:15}
+\newcontextversion{2010.12.12 14:33}
%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.tex b/tex/context/base/context.tex
index a4e0f470b..1f10fc0e6 100644
--- a/tex/context/base/context.tex
+++ b/tex/context/base/context.tex
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2010.12.10 15:15}
+\edef\contextversion{2010.12.12 14:33}
%D For those who want to use this:
diff --git a/tex/context/base/m-morse.mkiv b/tex/context/base/m-morse.mkiv
new file mode 100644
index 000000000..b86895983
--- /dev/null
+++ b/tex/context/base/m-morse.mkiv
@@ -0,0 +1,256 @@
+%D \module
+%D [ file=m-morse,
+%D version=2010.12.10,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=Morse,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright=PRAGMA]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+% todo: act upon the node list
+% make it a buffer operation
+% nice in cld manual
+
+\startluacode
+
+moduledata.morse = moduledata.morse or { }
+local morse = moduledata.morse
+
+local utfcharacters, gsub = string.utfcharacters, string.gsub
+local ucchars, shchars = characters.ucchars, characters.shchars
+
+local codes = {
+
+ ["A"] = "·—",
+ ["B"] = "—···",
+ ["C"] = "—·—·",
+ ["D"] = "—··",
+ ["E"] = "·",
+ ["F"] = "··—·",
+ ["G"] = "——·",
+ ["H"] = "····",
+ ["I"] = "··",
+ ["J"] = "·———",
+ ["K"] = "—·—",
+ ["L"] = "·—··",
+ ["M"] = "——",
+ ["N"] = "—·",
+ ["O"] = "———",
+ ["P"] = "·——·",
+ ["Q"] = "——·—",
+ ["R"] = "·—·",
+ ["S"] = "···",
+ ["T"] = "—",
+ ["U"] = "··—",
+ ["V"] = "···—",
+ ["W"] = "·——",
+ ["X"] = "—··—",
+ ["Y"] = "—·——",
+ ["Z"] = "——··",
+
+ ["0"] = "—————",
+ ["1"] = "·————",
+ ["2"] = "··———",
+ ["3"] = "···——",
+ ["4"] = "····—",
+ ["5"] = "·····",
+ ["6"] = "—····",
+ ["7"] = "——···",
+ ["8"] = "———··",
+ ["9"] = "————·",
+
+ ["."] = "·—·—·—",
+ [","] = "——··——",
+ [":"] = "———···",
+ [";"] = "—·—·—",
+
+ ["?"] = "··——··",
+ ["!"] = "—·—·——",
+
+ ["-"] = "—····—",
+ ["/"] = "—··—· ",
+
+ ["("] = "—·——·",
+ [")"] = "—·——·—",
+
+ ["="] = "—···—",
+ ["@"] = "·——·—·",
+
+ ["'"] = "·————·",
+ ['"'] = "·—··—·",
+
+ ["À"] = "·——·—",
+ ["Å"] = "·——·—",
+ ["Ä"] = "·—·—",
+ ["Æ"] = "·—·—",
+ ["Ç"] = "—·—··",
+ ["É"] = "··—··",
+ ["È"] = "·—··—",
+ ["Ñ"] = "——·——",
+ ["Ö"] = "———·",
+ ["Ø"] = "———·",
+ ["Ü"] = "··——",
+ ["ß"] = "··· ···",
+
+}
+
+morse.codes = codes
+
+setmetatable(codes, { __index = function(t,k)
+ if k then
+ local u = ucchars[k]
+ local v = rawget(t,u) or rawget(t,shchars[u]) or false
+ t[k] = v
+ return v
+ else
+ return false
+ end
+end })
+
+local MorseBetweenWords = context.MorseBetweenWords
+local MorseBetweenCharacters = context.MorseBetweenCharacters
+local MorseLong = context.MorseLong
+local MorseShort = context.MorseShort
+local MorseSpace = context.MorseSpace
+local MorseUnknown = context.MorseUnknown
+
+local function tomorse(str,verbose)
+ if verbose then
+ str = gsub(str,"%s*+%s*","+")
+ str = gsub(str,"%s+"," ")
+ local done = false
+ for m in utfcharacters(str) do
+ if done then
+ MorseBetweenCharacters()
+ end
+ if m == "·" or m == "." then
+ MorseShort()
+ done = true
+ elseif m == "—" or m == "-" then
+ MorseLong()
+ done = true
+ elseif m == " " then
+ if done then
+ MorseBetweenCharacters()
+ end
+ done = false
+ elseif m == "+" then
+ MorseBetweenWords()
+ done = false
+ else
+ MorseUnknown(m)
+ end
+ end
+ else
+ local inmorse = false
+ for s in utfcharacters(str) do
+ local m = codes[s]
+ if m then
+ if inmorse then
+ MorseBetweenWords()
+ else
+ inmorse = true
+ end
+ local done = false
+ for m in utfcharacters(m) do
+ if done then
+ MorseBetweenCharacters()
+ else
+ done = true
+ end
+ if m == "·" then
+ MorseShort()
+ elseif m == "—" then
+ MorseLong()
+ elseif m == " " then
+ MorseBetweenCharacters()
+ end
+ end
+ inmorse = true
+ elseif s == "\n" or s == " " then
+ MorseSpace()
+ inmorse = false
+ else
+ if inmorse then
+ MorseBetweenWords()
+ else
+ inmorse = true
+ end
+ MorseUnknown(s)
+ end
+ end
+ end
+end
+
+morse.tomorse = tomorse
+
+function morse.filetomorse(name,verbose)
+ tomorse(resolvers.loadtexfile(name),verbose)
+end
+
+function morse.showtable()
+ context.starttabulate { "|l|l|" } -- { "|l|l|l|" }
+ for k, v in table.sortedpairs(codes) do
+ context.NC() context(k)
+ -- context.NC() context(v)
+ context.NC() tomorse(v,true)
+ context.NC() context.NR()
+ end
+ context.stoptabulate()
+end
+
+\stopluacode
+
+\unprotect
+
+% todo: \setupmorse, but probably it's not worth the trouble.
+
+\def\MorseWidth {0.4em}
+\def\MorseHeight {0.2em}
+%def\MorseShort {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=\dimexpr\MorseWidth]}
+%def\MorseLong {\dontleavehmode\blackrule[\c!height=\MorseHeight,\c!width=3\dimexpr\MorseWidth]}
+\def\MorseShort {\dontleavehmode\vrule\!!width \dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax}
+\def\MorseLong {\dontleavehmode\vrule\!!width3\dimexpr\MorseWidth\!!height\MorseHeight\!!depth\zeropoint\relax}
+\def\MorseBetweenCharacters {\kern\MorseWidth}
+\def\MorseBetweenWords {\hskip3\dimexpr\MorseWidth\relax}
+\def\MorseSpace {\hskip7\dimexpr\MorseWidth\relax}
+\def\MorseUnknown #1{[\detokenize{#1}]}
+
+\def\MorseCode #1{\ctxlua{moduledata.morse.tomorse(\!!bs#1\!!es,true)}}
+\def\MorseString #1{\ctxlua{moduledata.morse.tomorse(\!!bs#1\!!es)}}
+\def\MorseFile #1{\ctxlua{moduledata.morse.filetomorse("#1")}}
+\def\MorseTable {\ctxlua{moduledata.morse.showtable()}}
+
+\let\Morse \MorseString
+
+\protect
+
+\doifnotmode{demo}{\endinput}
+
+\starttext
+
+\MorseTable
+
+\startlines
+\MorseCode{—·—· ——— —· — · —··— —+—— —·— ·· ···—}
+\MorseCode{—·—· ——— —· — · —··— — + —— —·— ·· ···—}
+\Morse{ÀÁÂÃÄÅàáâãäå}
+\Morse{ÆÇæç}
+\Morse{ÈÉÊËèéêë}
+\Morse{ÌÍÎÏìíîï}
+\Morse{Ññ}
+\Morse{ÒÓÔÕÖòóôõö}
+\Morse{Øø}
+\Morse{ÙÚÛÜùúû}
+\Morse{Ýýÿ}
+\Morse{ß}
+\Morse{Ţţ}
+\stoplines
+
+\Morse{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z}
+
+\stoptext
diff --git a/tex/context/base/mult-cld.mkiv b/tex/context/base/mult-cld.mkiv
index 97b69b92e..3106941f3 100644
--- a/tex/context/base/mult-cld.mkiv
+++ b/tex/context/base/mult-cld.mkiv
@@ -26,9 +26,10 @@
\def\cldcontext #1{\directlua\zerocount{context(#1)}}
\def\cldcommand #1{\directlua\zerocount{context.#1}}
- \def\mkivflush #1{\directlua\zerocount{context._flush_f_(#1)}} % obsolete
+ \def\cldff #1{\directlua\zerocount{cldff(#1)}} % global (functions)
+ \def\cldfn #1{\directlua\zerocount{cldfn(#1)}} % global (nodes)
- \def\cldff #1{\directlua\zerocount{cldff(#1)}} % global
- \def\cldfn #1{\directlua\zerocount{cldfn(#1)}} % global
+ %\def\mkivflush #1{\directlua\zerocount{context._flush_f_(#1)}} % obsolete
+ \let\mkivflush \cldff
\protect \endinput
diff --git a/tex/context/base/supp-box.lua b/tex/context/base/supp-box.lua
index 49d16ed2a..6c53a4c5f 100644
--- a/tex/context/base/supp-box.lua
+++ b/tex/context/base/supp-box.lua
@@ -8,14 +8,19 @@ if not modules then modules = { } end modules ['supp-box'] = {
-- this is preliminary code
-local nodecodes = nodes.nodecodes
+local nodecodes = nodes.nodecodes
-local disc_code = nodecodes.disc
-local hlist_code = nodecodes.hlist
-local vlist_code = nodecodes.vlist
+local disc_code = nodecodes.disc
+local hlist_code = nodecodes.hlist
+local vlist_code = nodecodes.vlist
+local glue_code = nodecodes.glue
+local glyph_code = nodecodes.glyph
-local new_penalty = nodes.pool.penalty
-local free_node = node.free
+local new_penalty = nodes.pool.penalty
+local free_node = node.free
+local copynodelist = node.copy_list
+local copynode = node.copy
+local texbox = tex.box
function hyphenatedlist(list)
while list do
@@ -48,4 +53,61 @@ function commands.showhyphenatedinlist(list)
commands.writestatus("show hyphens",nodes.listtoutf(list))
end
--- processisolatedwords
+function checkedlist(list)
+ if type(list) == "number" then
+ return texbox[list].list
+ else
+ return list
+ end
+end
+
+local function applytochars(list,what,nested)
+ local doaction = context[what or "ruledhbox"]
+ local noaction = context
+ local current = checkedlist(list)
+ while current do
+ local id = current.id
+ if nested and (id == hlist_code or id == vlist_code) then
+ context.hbox()
+ context.bgroup()
+ applytochars(current.list,what,nested)
+ context.egroup()
+ elseif id ~= glyph_code then
+ noaction(copynode(current))
+ else
+ doaction(copynode(current))
+ end
+ current = current.next
+ end
+end
+
+local function applytowords(list,what,nested)
+ local doaction = context[what or "ruledhbox"]
+ local noaction = context
+ local current = checkedlist(list)
+ local start
+ while current do
+ local id = current.id
+ if id == glue_code then
+ if start then
+ doaction(copynodelist(start,current))
+ start = nil
+ end
+ noaction(copynode(current))
+ elseif nested and (id == hlist_code or id == vlist_code) then
+ context.hbox()
+ context.bgroup()
+ applytowords(current.list,what,nested)
+ context.egroup()
+ elseif not start then
+ start = current
+ end
+ current = current.next
+ end
+ if start then
+ doaction(copynodelist(start))
+ end
+end
+
+commands.applytochars = applytochars
+commands.applytowords = applytowords
diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv
index a66d7b97d..78fd93b12 100644
--- a/tex/context/base/supp-box.mkiv
+++ b/tex/context/base/supp-box.mkiv
@@ -1285,169 +1285,32 @@
\egroup}
%D \macros
-%D {processisolatedwords,
-%D betweenisolatedwords,nothingbetweenisolatedwords}
-%D
-%D References are often made up of one word or a combination
-%D of tightly connected words. The typeset text {\bf
-%D chapter~5} is for instance the results of the character
-%D sequence:
-%D
-%D \starttyping
-%D The typeset text \in{chapter}[texniques] is for instance
-%D \stoptyping
-%D
-%D When such words are made active in interactive texts, the
-%D combination cannot longer be hyphenated. Normally this is no
-%D problem, because \TEX\ tries to prevent hyphenation as best
-%D as can.
-%D
-%D Sometimes however we need a few more words to make things
-%D clear, like when we want to refer to {\bf \TEX\ by Topic}.
-%D The macros that are responsible for typesetting hyperlinks,
-%D take care of such sub||sentences by breaking them up in
-%D words. Long ago we processed words using the space as a
-%D separator, but the more advanced our interactive text became,
-%D the more we needed a robust solution. Well, here it is and
-%D it called as:
-%D
-%D \starttyping
-%D \processisolatedwords{some words}\someaction
-%D \stoptyping
-%D
-%D The second argument \type{someactions} handles the
-%D individual words, like in:
+%D {processisolatedwords,processisolatedchars}
%D
%D \startbuffer
-%D \processisolatedwords{some more words} \ruledhbox \par
-%D \processisolatedwords{and some $x + y = z$ math} \ruledhbox \par
+%D \processisolatedchars{some more words} \ruledhbox \par
+%D \processisolatedchars{and some $x + y = z$ math} \ruledhbox \par
+%D \processisolatedchars{and a \normalhbox{$x + y = z$}} \ruledhbox \par
+%D \processisolatedwords{some more words} \ruledhbox \par
+%D \processisolatedwords{and some $x + y = z$ math} \ruledhbox \par
%D \processisolatedwords{and a \normalhbox{$x + y = z$}} \ruledhbox \par
%D \stopbuffer
%D
-%D \typebuffer
-%D
-%D which let the words turn up as:
-%D
-%D \startvoorbeeld
-%D \getbuffer
-%D \stopvoorbeeld
-%D
-%D The macro has been made a bit more clever than needed at
-%D first sight. This is due to the fact that we don't want to
-%D generate more overhead in terms of interactive commands than
-%D needed.
-%D
-%D \startbuffer
-%D \processisolatedwords{see this \ruledhskip1em} \ruledhbox
-%D \processisolatedwords{and \ruledhskip1em this one} \ruledhbox
-%D \stopbuffer
-%D
-%D \typebuffer
-%D
-%D becomes:
-%D
-%D \startvoorbeeld
-%D \startlines
-%D \getbuffer
-%D \stoplines
-%D \stopvoorbeeld
-%D
-%D Single word arguments are treated without further
-%D processing. This was needed because this command is used in
-%D the \type{\goto} command, to which we sometimes pass very
-%D strange and|/|or complicated arguments or simply boxes
-%D whose dimensions are to be left intact.
-%D
-%D First we build a \type{\normalhbox}. This enables us to save the
-%D last skip. Next we fill a \type{\normalvbox} without hyphenating
-%D words. After we've tested if there is more than one word, we
-%D start processing the individual lines (words). We need some
-%D splitting, packing and unpacking to get the spacing and
-%D dimensions right.
-%D
-%D Normally the isolated words are separated by space, but
-%D one can overrule this separator by changing the next macros.
-%D
-%D When needed, spacing can be suppressed by \type
-%D {\nothingbetweenisolatedwords}.
-
-\newif\ifisolatedwords % public, e.g. used in core-ref
-
-\def\betweenisolatedwords
- {\hskip\currentspaceskip}
-
-%D In order to prevent problems with nested isolated words, we
-%D do process them, but only split at the outermost level.
-
-\newskip\isolatedlastskip
+%D \typebuffer \blank \getbuffer \blank
-\chardef\isolatedwordsmode=0 % no nesting
-
-\def\processisolatedwords#1#2% todo: vbox ipv hbox ivm afbreken!
- {\bgroup % todo: doloop
- \fakecompoundhyphen
- \dontcomplain
- \forgetall
- \nopenalties
- \ifcase\isolatedwordsmode
- \def\processisolatedwords##1##2{##2{##1}}% we split only once
- \fi
- \global\let\localbetweenisolatedwords\betweenisolatedwords
- \setbox0\normalhbox % we default to spaces, but from inside out
- {\normallanguage\minusone % needed for mkiv
- \ignorespaces#1% \localbetweenisolatedwords can be overruled
- \global\isolatedlastskip\lastskip}%
- \setbox2\normalvbox
- {%\hyphenpenalty10000 % this one fails in \url breaking,
- \lefthyphenmin\maxcard % but this trick works ok, due to them
- \righthyphenmin\maxcard % total>63, when no hyphenation is done
- \hsize\zeropoint
- \unhcopy0}% == #1
- \ifdim\ht0=\ht2
- \isolatedwordsfalse
- #2{\unhbox0}% == #2{#1} % was \unhcopy0
- \else
- \isolatedwordstrue
- \setbox0\normalhbox
- {\ignorespaces
- \loop
- \setbox4\normalhbox
- {\splittopskip\openstrutheight
- \vsplit2 to \baselineskip}%
- \normalhbox
- {\unhbox4\unskip % recently added
- \setbox4\lastbox
- \normalvbox % outer \normalhbox needed
- {\unvbox4 % for nested use
- \setbox4\lastbox
- \normalhbox{#2{\normalhbox
- {\unhbox4
- \unskip\unpenalty % remove end of line stuff
- \global\dimen1\lastkern}}}}}%
- \ifdim\ht2>\zeropoint\relax
- \ifdim\dimen1=\compoundbreakpoint
- \allowbreak
- \else
- \localbetweenisolatedwords
- \fi
- \repeat
- \unskip}%
- \unhbox0\unskip
- \ifzeropt\isolatedlastskip\else % added % \ifdim\isolatedlastskip=\zeropoint\else % added
- \hskip\isolatedlastskip
- \fi
- \fi
- \egroup}
-
-%D One can use the next macro to change the intersplit
-%D material. An example can be found in the \type {\url}
-%D macro. The innermost setting is used. In the url case, it
-%D means that either very small spaces are used or no spaces
-%D at all. So, the innermost settings are used, while the
-%D outermost split takes place.
+\def\processisolatedchars#1#2%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\normalhbox{#1}%
+ \ctxlua{commands.applytochars(\number\scratchbox,"\strippedcsname#2",true)}%
+ \endgroup}
-\def\setbetweenisolatedwords#1%
- {\gdef\localbetweenisolatedwords{#1}}
+\def\processisolatedwords#1#2%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\normalhbox{#1}%
+ \ctxlua{commands.applytowords(\number\scratchbox,"\strippedcsname#2",true)}%
+ \endgroup}
%D \macros
%D {sbox}
@@ -1514,8 +1377,7 @@
\def\topskippedbox
{\normalhbox\bgroup
\dowithnextbox
- {\edef\next
- {\ifdim\strutdepth=\nextboxdp\nextboxdp\the\nextboxdp\fi}%
+ {\edef\next{\ifdim\strutdepth=\nextboxdp\nextboxdp\the\nextboxdp\fi}%
\lower\topskip\normalhbox{\raise\strutheight\flushnextbox}%
\next
\egroup}%
@@ -1633,10 +1495,10 @@
{\bgroup
\dowithnextbox
{\setlocalhsize
- \setbox0\normalhbox{\vrule\!!width \zeropoint#1}%
- \setbox2\normalvbox{\hrule\!!height\zeropoint#1}%
- \ifzeropt\wd0\else\hsize\wd0\fi % \hsize\ifdim\wd0=\zeropoint\hsize\else\wd0\fi
- \ifzeropt\ht2\else\vsize\ht2\fi % \vsize\ifdim\ht2=\zeropoint\vsize\else\ht2\fi
+ \setbox\scratchbox\normalhbox{\vrule\!!width \zeropoint#1}%
+ \ifzeropt\wd\scratchbox\else\hsize\wd\scratchbox\fi
+ \setbox\scratchbox\normalvbox{\hrule\!!height\zeropoint#1}%
+ \ifzeropt\ht\scratchbox\else\vsize\ht\scratchbox\fi
\normalvbox to \vsize{\vss\normalhbox to \hsize{\hss\flushnextbox\hss}\vss}%
\egroup}%
\normalhbox}
@@ -2104,13 +1966,10 @@
\def\tbbox#1#2%
{\normalhbox\bgroup
\dowithnextbox
- {\scratchdimen\nextboxht
- \advance\scratchdimen\nextboxdp
- \advance\scratchdimen-#1\strutbox
+ {\scratchdimen\dimexpr\nextboxht+\nextboxdp-#1\strutbox\relax
#1\nextbox#1\strutbox
#2\nextbox\scratchdimen
- \setbox\nextbox\normalhbox
- {\lower\nextboxdp\flushnextbox}%
+ \setbox\nextbox\normalhbox{\lower\nextboxdp\flushnextbox}%
#1\nextbox#1\strutbox
#2\nextbox\scratchdimen
\flushnextbox
@@ -2238,70 +2097,70 @@
\def\rightbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
+ {\setbox\scratchbox\placedbox{#1}%
\global\boxhdisplacement\boxoffset
- \global\boxvdisplacement.5\ht0
- \global\advance\boxvdisplacement-.5\dp0
- \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+ \global\boxvdisplacement.5\ht\scratchbox
+ \global\advance\boxvdisplacement-.5\dp\scratchbox
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\scratchbox}}
\def\leftbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-\wd0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-\wd\scratchbox
\global\advance\boxhdisplacement-\boxoffset
- \global\boxvdisplacement.5\ht0
- \global\advance\boxvdisplacement-.5\dp0
- \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+ \global\boxvdisplacement.5\ht\scratchbox
+ \global\advance\boxvdisplacement-.5\dp\scratchbox
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\scratchbox}}
\def\topbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-.5\wd0
- \global\boxvdisplacement-\dp0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-.5\wd\scratchbox
+ \global\boxvdisplacement-\dp\scratchbox
\global\advance\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
\def\bottombox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-.5\wd0
- \global\boxvdisplacement\ht0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-.5\wd\scratchbox
+ \global\boxvdisplacement\ht\scratchbox
\global\advance\boxvdisplacement\boxoffset
- \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\scratchbox}}
\def\lefttopbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-\wd0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-\wd\scratchbox
\global\advance\boxhdisplacement-\boxoffset
- \global\boxvdisplacement-\dp0
+ \global\boxvdisplacement-\dp\scratchbox
\global\advance\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
\def\righttopbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
+ {\setbox\scratchbox\placedbox{#1}%
\global\boxhdisplacement\boxoffset
- \global\boxvdisplacement-\dp0
+ \global\boxvdisplacement-\dp\scratchbox
\global\advance\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
\def\leftbottombox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-\wd0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-\wd\scratchbox
\global\advance\boxhdisplacement-\boxoffset
- \global\boxvdisplacement\ht0
+ \global\boxvdisplacement\ht\scratchbox
\global\advance\boxvdisplacement\boxoffset
- \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\scratchbox}}
\def\rightbottombox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
+ {\setbox\scratchbox\placedbox{#1}%
\global\boxhdisplacement\boxoffset
- \global\boxvdisplacement\ht0
+ \global\boxvdisplacement\ht\scratchbox
\global\advance\boxvdisplacement\boxoffset
- \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\lower\boxvdisplacement\box\scratchbox}}
\let\topleftbox \lefttopbox
\let\toprightbox \righttopbox
@@ -2309,30 +2168,30 @@
\let\bottomrightbox\rightbottombox
\def\middlebox#1%
- {\normalhbox{\setbox0\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}}
+ {\normalhbox{\setbox\scratchbox\placedbox{#1}\boxoffset=-.5\wd\scratchbox\rightbox{\box\scratchbox}}}
\def\baselinemiddlebox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-.5\wd0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-.5\wd\scratchbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
\def\baselineleftbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
- \global\boxhdisplacement-\wd0
+ {\setbox\scratchbox\placedbox{#1}%
+ \global\boxhdisplacement-\wd\scratchbox
\global\advance\boxhdisplacement-\boxoffset
\global\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
\def\baselinerightbox#1%
{\normalhbox
- {\setbox0\placedbox{#1}%
+ {\setbox\scratchbox\placedbox{#1}%
\global\boxhdisplacement\boxoffset
\global\boxvdisplacement-\boxoffset
- \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box0}}
+ \boxcursor\hskip\boxhdisplacement\raise-\boxvdisplacement\box\scratchbox}}
%D \macros
%D {obox}
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 4fcd417a7..2f23f84ec 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 12/10/10 15:15:55
+-- merge date : 12/12/10 14:33:12
do -- begin closure to overcome local limits and interference