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{document}
This should appear on \emph{page two}.
\end{document}
When run, this produces a verso page containing the text ‘hello’, and recto page with ‘This should appear on page two’ – that's fine.
However I would also expect the ‘hello’ to be emphasised, but it instead appears in the same (?) upright face as the recto page. In the real problem case, of which this is a reduction, I also see hard-to-interpret but broadly consistent problems with maths fonts. If I uncomment the \normalsize
, then the verso page contains instead ‘1012hello’, which I take to be the \@xpt \@xiipt
in the expansion of \normalsize
to \@setfontsize \normalsize \@xpt \@xiipt ...
.
(The real case uses the ‘everyshi’ package; that neither fixes nor causes the problem)
So I'm perplexed: looking at latex.ltx
, I can't see anything relevant in \output
or in \@outputpage
; the \@outputpage
macro itself uses \normalsize
(meaning it's not for some reason disabled); I can't see anything which disables \@setfontsize
at any point; inserting \normalfont
/\reset@font
doesn't magically make things better. Indeed I can't see anything obviously relating to fonts in \output
or \@outputpage
– presumably there is something non-obvious there.
The corresponding Plain document:
\let\origshipout\shipout
\def\shipout{\origshipout\vbox{{\it hello}}\origshipout}
This should appear on {\it page two}.
\bye
works as expected (so I'm not going mad).
What am I missing?
\tracingall
in your box, and then think about how\protect
works :-)