[tex-eplain] Page xref - increment?

Michael Talbot-Wilson mtw at view.net.au
Mon Apr 15 10:02:15 CEST 2013


Thanks to Karl for trying to help, but it hasn't penetrated.  I need
to increment the page xref.

What I'm doing is scanning full A4 pages:

$ scanimage -d 'epson2:libusb:001:005' --mode=gray --depth=8 \
--format=pnm --resolution=360 --brightness=-1 --sharpness=2 \
-x209 -y295 > page$1.pgm

$ pnmmargin -black 2 page$1.pgm >tmp.pgm

$ pnmtops --equalpixels -noturn tmp.pgm >page$1.ps

(Yes, I know the resolution is too high.)

Then I'm inserting those full-page images (slightly reduced) with
visible paper texture into the final document:


\def\epsfsize#1#2{0.7#1}
\setbox\imbox=\hbox{\epsffile{.../page1.ps}}
\box\imbox

I want to do that without interrupting the text, so if there is a page
break in the middle of a paragraph I'm doing a \vadjust{} on the last
line of the page.  So the page break is unchanged, but now there is a
full page image between the two pages.

But if I do

"This \vadjust{\xrdef{gick}
\def\epsfsize#1#2{0.7#1}
\setbox\imbox=\hbox{\epsffile{.../page1.ps}}
\penalty0\box\imbox
}} may or may not please you."

then (or before it) "dated 28 April 2008 (depicted at \xref{gick})
expressing lack of concern as to whether this pleases you."

gives the page number before the image page because the \vadjust{} was
on the page before.  Same if the page break's between paras and
there's no \vadjust{}, just an \epsffile{...}.

So, I need to increment the \xrdef number.

Maybe that's easy to do and obvious to you bright guys.  Hope so.  If
so, please let me know, because I can't see it.

-- Mike


More information about the tex-eplain mailing list