3 >Synopsis: \pageref in second/third argument of \ifthenelse
4 >Arrival-Date: Thu Jun 22 11:41:05 2000
5 >Originator: oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)
6 >Release: LaTeX2e <1999/12/01> patch level 1
9 \@TeXversion: undefined (Standard setting for TeX3.141 and later)
11 \input@path: undefined (Standard setting)
14 For the first argument of \ifthenelse \pageref has to be
15 redefined, in order to make it expandible. But the
16 redefinition of \pageref does also have an effect in the
17 second and third argument of \ifthenelse. Here \pageref
18 should have its normal meaning.
22 \documentclass{article}
25 \FORMAT{LaTeX2e<1999/12/01>}
27 \AUTHOR{oberdiek@ruf.uni-freiburg.de (Heiko Oberdiek)}
29 \PACKAGE[german]{babel}
33 \usepackage[german]{babel}
35 \setbox0=\hbox{#1}\showbox0}
38 \showboxbreadth=50\showboxdepth=50
40 \testit{See \pageref{first:one}} % works
42 \testit{\ifthenelse{\equal{a}{a}}{See \pageref{first:one}}{}}
43 % did not work, because of wrong meaning of \pageref
45 \typeout{* Before nested \string\ifthenelse: \meaning\pageref}
46 \testit{See \pageref{first:one}}% works
48 \testit{\ifthenelse{\equal{a}{a}}{%
49 \ifthenelse{\equal{b}{b}}{}{}%
52 \typeout{* After nested \string\ifthenelse: \meaning\pageref}
53 See \pageref{first:one}
55 % because \pageref has now the meaning