summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/anch-pgr.mkiv47
-rw-r--r--tex/context/base/anch-pos.lua12
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4071 -> 4069 bytes
-rw-r--r--tex/context/base/context-version.pngbin106448 -> 104792 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/pack-box.mkiv8
-rw-r--r--tex/context/base/status-files.pdfbin23978 -> 23976 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin169719 -> 169720 bytes
-rw-r--r--tex/context/base/supp-box.mkiv45
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
13 files changed, 71 insertions, 51 deletions
diff --git a/tex/context/base/anch-pgr.mkiv b/tex/context/base/anch-pgr.mkiv
index d957bb6dd..4a9bf6ee3 100644
--- a/tex/context/base/anch-pgr.mkiv
+++ b/tex/context/base/anch-pgr.mkiv
@@ -41,7 +41,7 @@
%D Anchors:
\def\dopresetpositionanchors % also mkii
- {\bgroup
+ {\begingroup
\!!dimena\ifdim\topskip>\strutht\topskip\else\strutht\fi
\!!dimenb\dimexpr\MPy\textanchor+\MPh\textanchor-\!!dimena\relax
\!!dimenc\dimexpr\MPy\textanchor+\strutdp\relax
@@ -49,7 +49,7 @@
\!!dimene\MPw\textanchor
\replacepospxywhd\headanchor\realfolio\!!dimend\!!dimenb\!!dimene\!!dimena\strutdp
\replacepospxywhd\tailanchor\realfolio\!!dimend\!!dimenc\!!dimene\strutht \strutdp
- \egroup}
+ \endgroup}
\def\presetpositionanchors% compatibility hack (still needed?)
{\ifpositioning
@@ -167,28 +167,33 @@
\let\MPanchornumber\realfolio
-\def\positionoverlay#1% the test prevents too many redundant positions
+\def\positionoverlay % the test prevents too many redundant positions
{\ifpositioning % in (not used) text* position layers
- \vbox to \overlayheight
- {\doifpositionactionelse{#1::\MPanchoridentifier}%
- {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}%
- \edef\MPanchor##1{\MPpos{\MPanchorid}}%
- \the\everyinsertpositionaction
- \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}%
- \hpos
- {#1::\MPanchoridentifier:\MPanchornumber}%
- % this is ok
- %{\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}}%
- % but this one prevents cyclic runs due to
- % rounding errors
- {\setbox\scratchbox\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}%
- \ht\scratchbox\overlayheight
- \dp\scratchbox\zeropoint
- \box\scratchbox}}%
- {\hbox to \overlaywidth{\hss}}%
- \vfill}%
+ \expandafter\positionoverlayindeed
+ \else % also \iftrialtypesetting test here?
+ \expandafter\gobbleoneargument
\fi}
+\def\positionoverlayindeed#1% the test prevents too many redundant positions
+ {\vbox to \overlayheight
+ {\doifpositionactionelse{#1::\MPanchoridentifier}%
+ {\edef\MPanchorid{#1::\MPanchoridentifier:\MPanchornumber}%
+ \edef\MPanchor##1{\MPpos{\MPanchorid}}%
+ \the\everyinsertpositionaction
+ \copyposition{#1::\MPanchoridentifier}{#1::\MPanchoridentifier:\MPanchornumber}%
+ \hpos
+ {#1::\MPanchoridentifier:\MPanchornumber}%
+ % this is ok
+ %{\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}}}%
+ % but this one prevents cyclic runs due to
+ % rounding errors
+ {\setbox\scratchbox\hbox to \overlaywidth{\dopositionaction{#1::\MPanchoridentifier}\hss}%
+ \ht\scratchbox\overlayheight
+ \dp\scratchbox\zeropoint
+ \box\scratchbox}}%
+ {\hbox to \overlaywidth{\hss}}%
+ \vfill}}
+
\unexpanded\def\startpositionoverlay#1%
{\iftrialtypesetting % we don't want redundant entries in the list
\@EA\gobbleuntil\@EA\stoppositionoverlay
diff --git a/tex/context/base/anch-pos.lua b/tex/context/base/anch-pos.lua
index 34fc46209..bd766fa2b 100644
--- a/tex/context/base/anch-pos.lua
+++ b/tex/context/base/anch-pos.lua
@@ -87,20 +87,12 @@ end
function jobpositions.page(id)
local jpi = collected[id] or tobesaved[id]
- if jpi then
- return jpi[1]
- else
- return 0
- end
+ return jpi and jpi[1] or 0
end
function jobpositions.x(id)
local jpi = collected[id] or tobesaved[id]
- if jpi then
- return jpi[2]
- else
- return 0
- end
+ return jpi and jpi[2] or 0
end
function jobpositions.y(id)
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 91f661c53..8bfd21551 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.12.19 00:49}
+\newcontextversion{2011.12.19 01:47}
%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 f06d41d2d..6a479880b 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.12.19 00:49}
+\newcontextversion{2011.12.19 01:47}
%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
index f1a7d7efe..7307dd017 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 5e89d54f7..2b2d5e9f0 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 51adcf0a0..ed241ddcf 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.12.19 00:49}
+\edef\contextversion{2011.12.19 01:47}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 35cc7f31b..74a765c4e 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.12.19 00:49}
+\edef\contextversion{2011.12.19 01:47}
%D For those who want to use this:
diff --git a/tex/context/base/pack-box.mkiv b/tex/context/base/pack-box.mkiv
index 7469a55f8..90abcf497 100644
--- a/tex/context/base/pack-box.mkiv
+++ b/tex/context/base/pack-box.mkiv
@@ -37,14 +37,10 @@
\def\internaltextoverlay#1% will become more generic and installable
{\startoverlay % i.e. probably an overlay by itself
- {\positionoverlay{\v!text#1}} % see later
- {\composedlayer {\v!text#1}}
+ {\positionoverlay{\v!text#1}}% see later
+ {\composedlayer {\v!text#1}}%
\stopoverlay}
-%\def\internaltextoverlay#1%
-% {\hbox to \zeropoint{\positionoverlay{\v!tekst#1}\hss}%
-% \composedlayer{\v!tekst#1}}
-
% todo: share info, so that tuo will be smaller
\defineoverlay[\v!text-2][\internaltextoverlay{-2}]
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 47193ae79..ccf9141f5 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index fa85f0670..385b4ccb3 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv
index 40aec18e0..55a0a10b0 100644
--- a/tex/context/base/supp-box.mkiv
+++ b/tex/context/base/supp-box.mkiv
@@ -1843,20 +1843,47 @@
%D The next macro gobble boxes and is for instance used for
%D overlays. First we show the general handler.
+% we cannot use \futurelet here as we want to skip spaces between
+% boxes (see startoverlay for an example usage)
+
+% \newbox\processbox % public : this is the one where \nextbox's end up in
+%
+% \unexpanded\def\processboxes#1%
+% {\bgroup
+% \def\boxes_process_indeed{#1}% #1 can be redefined halfway
+% \setbox\processbox\emptybox
+% \afterassignment\boxes_process
+% \let\nexttoken}
+%
+% \def\boxes_process
+% {\ifx\nexttoken\bgroup
+% \expandafter\boxes_process_yes
+% \else
+% \expandafter\boxes_process_nop
+% \fi}
+%
+% \def\boxes_process_yes
+% {\dowithnextboxcs\boxes_process_content\normalhbox\bgroup}
+%
+% \def\boxes_process_content
+% {\removeunwantedspaces
+% \boxes_process_indeed % takes \nextbox makes \processbox
+% \afterassignment\boxes_process
+% \let\nexttoken}
+%
+% \unexpanded\def\boxes_process_nop
+% {\removeunwantedspaces
+% \box\processbox
+% \nexttoken % messy as we are still in the group
+% \egroup}
+
\newbox\processbox % public : this is the one where \nextbox's end up in
\unexpanded\def\processboxes#1%
{\bgroup
\def\boxes_process_indeed{#1}% #1 can be redefined halfway
\setbox\processbox\emptybox
- \futurelet\nexttoken\boxes_process}
-
-\def\boxes_process
- {\ifx\nexttoken\bgroup
- \expandafter\boxes_process_yes
- \else
- \expandafter\boxes_process_nop
- \fi}
+ \doifnextbgroupelse\boxes_process_yes\boxes_process_nop}
\def\boxes_process_yes
{\dowithnextboxcs\boxes_process_content\normalhbox}
@@ -1864,7 +1891,7 @@
\def\boxes_process_content
{\removeunwantedspaces
\boxes_process_indeed % takes \nextbox makes \processbox
- \futurelet\nexttoken\boxes_process}
+ \doifnextbgroupelse\boxes_process_yes\boxes_process_nop}
\unexpanded\def\boxes_process_nop
{\removeunwantedspaces
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 4917f63f4..74a8d9027 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 : 12/19/11 00:49:41
+-- merge date : 12/19/11 01:47:29
do -- begin closure to overcome local limits and interference