Questions tagged [output-routine]
{output-routine} is about questions regarding the output routine, a basic element of TeX processing which is automatically called at different occasions (e.g., at insertions like footnotes or floats) and finally makes up the contents of a page for shipout after a page break has occurred. Headers and footers as well as floats, margin paragraphs and footnotes are added here.
60
questions
3
votes
0
answers
49
views
What is a `galley` in source2e?
More recent versions of source2e, refer to galley, without providing a definition, as to its meaning. I am aware of past efforts to restructure the ouput routine with xgalley, but at a stage it was ...
2
votes
2
answers
128
views
weird error (again) in plain TeX
Sorry all... the "missing number, treated as zero" error again. I can usually find it and fix it, but this time I need help.
I have a macro \twoup to produce output consisting of two A5 ...
0
votes
1
answer
62
views
Recovering discarded items in the output routine
A problem I had with TeX years ago was that discardable items (glue items, kerns, and penalties) are not recoverable in the output routine. This would be quite useful for complex multi-column pages ...
0
votes
0
answers
50
views
LaTeX: Insert tokens or vbox at the top of the next new column or page?
I'd like to be able to add material to the top of a new column or page. I want to insert this material into the body causing the next column to reflow. (The problem I'm trying to solve is continuing ...
1
vote
1
answer
22
views
Correct timing for temporary vertical adjustments?
\documentclass[a4paper]{article}
\begin{document}
page 1 - textheight shall be normal and is ok.
\newpage
\begingroup
\textheight=5cm
page 2 - textheight shall be 5cm but is normal.
\newpage
page 3 - ...
3
votes
0
answers
2k
views
How do I solve the Output routine didn't use all of \box255. \newpage ...prevdepth \fi \fi \vfil \penalty -\@M error?
I am currently writing my thesis and am using MikTex to do so. I have not updated MikTex in a whole year of time and it was running fine till I did today. Today I updated the MikTex to the latest ...
2
votes
1
answer
95
views
Some strange shipout behaviors (plain tex)
I was trying to understanding how the size of a page is determined in terms of TeX primitives. As first attempt, I've tried to occupy completely the page with a simple header (a line) , a footer (in ...
1
vote
2
answers
2k
views
How to correct the error: Output loop dead cycles on MDPI latex template
I was trying to format my submission paper to MDPI journal on Overleaf. I found that the last template for the journal dates to 16 Dec 2020. If I compile the template I found no error, but when adding ...
1
vote
2
answers
61
views
Issuing a full-page figure manually before (not after) the current one
Usually, when there is too much pending floating material (figures, tables and such), LaTeX just gives up on placing it on the current page and generates a “float page” containing only floats before ...
1
vote
0
answers
396
views
Autonum package yields "Output routine didn't use all of \box255." error
I have been getting an "Output routine didn't use all of \box255." error in all of my documents. I was able to track the problem down to the autonum package. Even in the MWE
\documentclass{...
4
votes
0
answers
148
views
LaTeX3 output routine
In the source and documentation of the dblfloatfix package there is a line that states
When the new output routine for LATEX3 is done, this package will be obsolete.The sooner the better...
Are ...
9
votes
2
answers
904
views
Why has the “zero topskip” bug in LaTeX not been fixed over 30 years? Or should zero topskip indeed be taboo? [closed]
Setting \topskip to 0pt confuses LaTeX's \clearpage command and results in an extra blank page. This has been known since forever. Apparently some think that
there's no reason to set \topskip to 0pt, ...
0
votes
0
answers
574
views
How to Add/Insert Some Text to Body at Every New Page, As If It Was Input Directly
Is there any way to add some text to body (not to header or footer) at every new page, as if it was input directly?
I want to do like following:
Input body text in normaly way;
This is line 1.
\par
...
2
votes
1
answer
117
views
Is there a difference between \unvbox and \unvbox inside \output?
By writing an output routine for grid typesetting I discoverd an inconsistency. Look at sequence of spaces in \specialoutput and at the end of the document. The same sequence of spaces obeys the grid ...
1
vote
2
answers
111
views
Three identical copies of a page
I need to print one page three times. Is it possible, in plain TeX, to output two exact copies of the last page without incrementing the page number?
4
votes
1
answer
273
views
How can I change the margins of a page depending on its number with luatex?
For some reasons, I have a 100+ pages LaTeX document that I'm required to format the following way:
if \thepage = 1 (modulo 4) then margins must be set to 5cm;
if \thepage = 2 (modulo 4) then margins ...
7
votes
2
answers
344
views
PlainTeX: Float(s) lost with custom output routine
I use PlainTex because I like its simplicity and because I understand almost all lines of its code. When I look at the output routine of LaTeX I only understand a little bit.
So I trie to add floats ...
1
vote
0
answers
125
views
Defining a figure* equivalent for Plain TeX in multicolumn output
Some time ago I tried to define something like figure* for Plain TeX. This resulted in wrong column heights.
(See: Wide figure in twocolumn output in Plain TeX)
There was a hint to memorioze the ...
0
votes
0
answers
167
views
How to know the height of the footnotes?
I tried to use the following code to get the height of the footnote box :
\documentclass{article}
\begin{document}
Example\footnote{A footnote}. Height : \the\ht\footins.
\end{document}
However, I ...
4
votes
2
answers
271
views
Reliably detect space left on the last page
I would like to reliably detect how much space is left on the last page of the document. Preferably, this should be accessible in a \AtEndDocument or similar hook, so that I can write this information ...
0
votes
1
answer
203
views
Go back to "mark" in LaTeX to update something
Say you have some command in a part of the code. I want to execute that command at a later point, so that it can be set at a later point. E.g. a header, and you want to set the margin after some other ...
2
votes
1
answer
383
views
Why does \openout produce output in plain tex when it does not in latex?
This is a follow up question of this question. Why this plain code (from shreevatsar's answer)
\newwrite\outfile
\openout\outfile\jobname.out
\end
produce a page but this (equivalent) latex code ...
3
votes
1
answer
426
views
Table of contents with headings on every page when last page of TOC has a single item
Similar questions have been asked—and answered—a number of times (e.g. here, here, and here), but all the answers seem to have the following bug: if the final page of the table of contents ...
1
vote
1
answer
793
views
Page height is greater than `\textheight`
Sometimes, when a page is ended with a formula, it goes below the desired page border. For example, the following code
\documentclass{article}
\usepackage[showframe,
textwidth=4cm,
...
1
vote
1
answer
95
views
Interrupt Document with Ancillary Material
Suppose I want to create an in-class text. Suppose further that as a lecturer I want my copy of the text to have copious amounts of ancillary material (notes, solutions to exercises, blackboard ...
2
votes
0
answers
79
views
How to fix this (un)expected result from atbegshi
Please how to fix this?
\documentclass{article}
\usepackage{lipsum}
\usepackage{atbegshi}
\begin{document}
\section{Foo 1}
\lipsum[1-2]
\section{Foo 2}
\lipsum[1-2]
\section{Foo 3}
\...
8
votes
2
answers
272
views
Prevent \topinsert on chapter page (Plain TeX)
How to define chapter to prevent insertion of floating figures and tables (\topinsert) on chapter page. I would like to place an object at the top of the next page.
\def\chap#1{\vfil\break \vglue1cm
...
2
votes
1
answer
92
views
Does LuaTeX change the message in "Output Routines Part IV: Horizontal Techniques"?
In the excellent article "Output routines: examples and techniques Part IV: Horizontal techniques", David Salomon explores three techniques for dealing with communication from horizontal mode to the ...
10
votes
1
answer
310
views
Rearranging blocks (poetry) in OTR (Plain TeX)
I have a problem that I think would best be solved by an output routine. It seems like an act of moderate TeX wizardry so before I get stuck in the weeds on a wrong approach I thought I would describe ...
5
votes
1
answer
328
views
Test inside output routine
in order to provides new feature in eledpar, I would like to output somes notes only on odd page. I have a problem, as you could see with the following MWE
I have modified the output routine to add a ...
3
votes
2
answers
415
views
Figure content does not appear on even pages after introducing changes to the output routine
In a document with wide margins, I want to offer a figure environment which extends into the marginpar-area. Furthermore, I want the caption-text to be placed in this area, too, either above or below ...
5
votes
2
answers
435
views
Long footnote, newpage and output
In order to solve an issue in eledpar (letting long/many footnotes 'flow' over two pages (eledpar)), I need some help with the relation between insert, ouput and \newpage.
Let the (real) MWE :...
2
votes
0
answers
111
views
Can TeX produce an expanded TeX as an output format similar to PDF? [duplicate]
I am looking at TeX as an output format similar to PDF that describes the page sufficiently, but with all tokens resolved (more like going from Postscript to PDF).
This format should also indicate all ...
6
votes
2
answers
692
views
Typesetting Devanagari-manuscript-style "Pothi"/"Patravali" books
First of all, I am quite new to TeX - so practically a newbie. I am trying to typeset Devanagari books in the traditional "Pothi" format, which looks pretty much like the manuscript illustrated below. ...
5
votes
1
answer
144
views
What happens to fonts (and robust commands) in shipout?
The following example does not produce quite the output I expect:
\documentclass{article}
\let\origshipout\shipout
\def\shipout{\origshipout\vbox{
%\normalsize
\emph{hello}}\origshipout}
\begin{...
4
votes
1
answer
106
views
polyglossia + output routine = wrong expansion in file writing (???)
If I use the following custom class:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{upecha}[2014/09/21 v0.8 tibetan modern pecha class]
\input{size11.clo}
\def\@outputpage{\shipout\vbox{\box\@outputbox}}
...
29
votes
2
answers
15k
views
Is there a way to get at the value of \prevdepth from the main vertical list inside the output routine?
To motivate that (admittedly) strange question:
When TeX builds a vertical list it keeps track of the depth of the last box added in a special variable called \prevdepth which is used to calculate ...
21
votes
2
answers
5k
views
All about \shipout
While reading about packages that allow to hook macros to certain events, I came across this command, \shipout. Searching on the internet didn't help a lot but if I'm not so wrong it's somehow related ...
11
votes
1
answer
2k
views
Execute a command at the start of every page
Is there any way I can execute a command (\ifthenelse actually) at the start of every page?
I tried \AtBeginShipout (atbegshi) but that seem to get executed when the page is about to be rendered (...
3
votes
1
answer
208
views
Penalty inserted by output routine
I am using plain TeX (actually plain e-TeX) processed by a relatively recent version of MiKTeX (pdfTeX).
Consider the following fragment of code that can be processed with plain TeX:
\noindent
A\par
...
7
votes
0
answers
198
views
Replace paragraphs with boxes [closed]
I would like to replace the paragraphs of a compiled document with framed boxes. Although I read the /tex/latex/base documentations I have no idea how to tackle this problem.
In detail I want to ...
1
vote
0
answers
41
views
headlines are not shown with tikz input (plain TeX) [duplicate]
I'm usign plain TeX with custom headlines. If I load Tikz packages with
\input tikz
then headlines are blank. The following are my headlines (some commands don't belong to plain TeX, but I think ...
20
votes
3
answers
788
views
Strange behaviour with PGF/TikZ and Plain TeX output routine
I noticed a strange behavior when running PGF/tikZ with pdfTeX on my Debian box :
a simple session without tikz:
pdftex
**\relax
*Hello World
*\bye
do output the page number on the page footer.
On ...
9
votes
1
answer
604
views
Shipout line like Shipout page
In lineno package guide, I found:
Attaching line numbers after TeX has broken the paragraph into lines
is already quite a difficult job for TeX. Why? Because TeX does not
normally give you any ...
18
votes
1
answer
904
views
Flushbottom columns when \parskip has no stretchable glue
In the following example, the columns on page 1 and 3 "sit" perfectly on the frame, while on page 2 (with the large float) the columns end a bit above the frame. Does anyone have an idea what I could ...
5
votes
1
answer
323
views
Outputting a spread at a time
I think I remember Stephan Lehmke writing here somewhere in a comment about outputting a spread at a time instead of page.
That got me thinking; does that mean something like:
\output={\shipout\vbox ...
10
votes
2
answers
4k
views
Output routine and \box255
The \box255 referred to in this question applies only to the container of the latest chunk of the MVL, as cut by the page builder. Now the question: I read somewhere that
\setbox0=\vbox to \vsize{\...
24
votes
2
answers
3k
views
What is \box255?
I'm just reading the everyshi manual, and it says:
This package provides the hooks \EveryShipout and \AtNextShipout
whose arguments are executed after the output routine has constructed
\...
11
votes
2
answers
287
views
Can I detect whether a footnote has been split?
Title sez it all: Can I detect, hopefully by inspecting \box\footins, whether a footnote has been split at page-breaking?
I found the package fnbreak but it uses labels, which is much too delayed for ...
13
votes
2
answers
266
views
Can I get at stuff in "current page" or "recent contributions"?
When I compile the following,
\documentclass[a4paper]{article}
\usepackage{atbegshi}
\AtBeginShipout{\showlists}
\showboxdepth\maxdimen
\showboxbreadth\maxdimen
\usepackage{lipsum}
\newcommand\...