summaryrefslogtreecommitdiff
path: root/macros/luatex/generic/minim/minim-alloc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/luatex/generic/minim/minim-alloc.tex')
-rw-r--r--macros/luatex/generic/minim/minim-alloc.tex41
1 files changed, 37 insertions, 4 deletions
diff --git a/macros/luatex/generic/minim/minim-alloc.tex b/macros/luatex/generic/minim/minim-alloc.tex
index f83e043ad4..40e01f66a0 100644
--- a/macros/luatex/generic/minim/minim-alloc.tex
+++ b/macros/luatex/generic/minim/minim-alloc.tex
@@ -115,10 +115,10 @@
\ifdefined \documentclass
% latex has no \globcount etc.
\alloc:globoffset = 10
- \ifnum\count10<256 \count10=256 \fi
- \ifnum\count11<256 \count11=256 \fi
- \ifnum\count12<256 \count12=256 \fi
- \ifnum\count14<256 \count14=256 \fi
+ \ifnum\count10<256 \count10=300 \fi
+ \ifnum\count11<256 \count11=300 \fi
+ \ifnum\count12<256 \count12=300 \fi
+ \ifnum\count14<256 \count14=300 \fi
\else \ifdefined \globcount
% use global allocation (see etex.src)
\let\newcount = \globcount
@@ -189,6 +189,39 @@
\ifdefined\minim:uselanguagehook
\noexpand\minim:uselanguagehook{#1}\fi}
+% 1 hooks
+
+% the pre_shipout callback
+\newbox\minim:shipout:box \let\minim:shipout:orig = \shipout
+\def\minim:shipout:do{\minim:shipout:orig\box\minim:shipout:box}
+\protected\def\minim:shipout:new{\directlua{
+ tex.box[\the\minim:shipout:box] = token.scan_list()
+ require('minim-callbacks').call_callback('pre_shipout', \the\minim:shipout:box)
+ token.put_next(token.create('minim:shipout:do'))}}
+\let\shipout = \minim:shipout:new
+
+% invisibly adding to \everypar
+\let\minim:everypar = \everypar
+\newtoks\minim:ateverypar
+\newtoks\minim:atnextpar
+\newtoks\everypar \everypar\minim:everypar
+\minim:everypar\expandafter{\expandafter
+ \minim:changeparindent
+ % expansion makes this process repeatable
+ \expandafter\the\everypar
+ \the\minim:ateverypar
+ \minim:atnextpar\expandafter
+ {\expandafter}\the\minim:atnextpar}
+\let\minim:changeparindent = \relax % as of yet unused
+
+% There is presently no need for the following.
+
+%\let\minim:par = \par
+%\newtoks\minim:aftereverypar
+%\protected\def\par{\ifhmode \unskip
+% \the\minim:aftereverypar \fi \minim:par}
+
+
% 1 format file compatibility
% all other work is done at the lua end