[texhax] First word of next page on the bottom

Arno Trautmann Arno.Trautmann at gmx.de
Fri Jul 22 09:52:29 CEST 2011


Hi all,

in some old books, the first word of the next page is printed at the 
bottom of a page (to increase the flow of reading, I guess). At least I 
found this in the book “Anweiſung zur Buchbinderkunſt”, printed 1762. 
Now I wondered how to reproduce this effect. The code below shows what I 
want, coded by hand. But of course an automated solution is needed. As I 
want to use LuaLaTeX, I thought of a process like:

Look at the last box of the output box just before shipout, then go to 
the next horizontal box using Lua code, search for the first word, add 
this as a horizontal box to the vertical list and output this.

However, I'm not able to do this on my own – could anybody give me some 
hints on how to put this together?
And, the next step: It is not always a whole word (as german words tend 
to become rather lengthy sometimes), but only one or two syllables of 
the word. So I need to read the word, hyphenate it and take the part 
before, say, the third hyphenation point, if such exists.

It would be great if someone could help me!
Here the code for an example:

\documentclass{minimal}
\usepackage[paperwidth=5cm,paperheight=7cm]{geometry}
\begin{document}
This is some text to fit on the first page. This is some text to fit on 
the first page. This is some text to fit on the first page. This is some 
text to fit on the first page. This is some text to fit on the first 
page. This is some text to fit on the first 
page.\llap{\raisebox{-2.5ex}{And}} And from here on, the second page.
\end{document}

cheers
Arno


More information about the texhax mailing list