# [texhax] output routine question: index "continued" lines

Philip Taylor (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Mon Jun 7 10:34:43 CEST 2010


Stan wrote:
> I'm trying to set up a basic output routine that will handle automatic
> insertion of "continued" lines at the top of pages where appropriate.

Let me address your final example first (I have to leave shortly) --

> All of my attempts have resulted in the same type of error that results,
> for example, from changing
>
> \output={\plainoutput}
>
> to
>
> \output={\plainoutput!}
>
> In other words, pages were ejected until some limitation was hit. (In my
> case, I got a "TeX capacity exceeded, sorry [main memory size=2500000]"
> message.)

Because every time \output is threaded, it tries to append
a shriek marker to the current page; you would want to
look into the guts of \plainoutput to see how you could
intercalate additional  material without causing this
infinite loop.  A simple example is as follows; this
shews the simplest output routine, followed by one that
append a single line containing "!".

\output = {\shipout \box 255 }
Now is the time \eject
for all good men \eject
to come to the aid \eject
of the party.
\end

\output = {\setbox 255 = \vbox {\unvbox 255 \centerline {!}}\shipout \box 255 }
Now is the time \eject
for all good men \eject
to come to the aid \eject
of the party.
\end