Article View: comp.text.tex
Article #1984Re: How to test the page value of a float?
From: Donald Arseneau
Date: Wed, 02 Sep 1992 11:24
Date: Wed, 02 Sep 1992 11:24
20 lines
1422 bytes
1422 bytes
In article <2SEP199202472416@reg.triumf.ca>, I wrote:
>Use \pageref and it should work on the second pass through LaTeX.
But \pageref does not produce a pure number as it has definitions
of \@tempa and such in it. So it is better to steal parts of the
\pageref definition.
I came up with
% Assign unique label for float:
\edef\@tempa{\noexpand\label{F*\the\c@figure;T*\the\c@table}}\@tempa
% get page number of this float: {}{number} or \relax
\edef\@tempa{\csname r@F*\the\c@figure;T*\the\c@table\endcsname}%
\edef\thispage{\expandafter\@cdr\@tempa\@nil\space}%
\ifx\thispage\space\def\thispage{0 }\fi % use 0 if unknown
Then the test \ifnum\thispage=xxx will work, but always giving
\thispage=0 on the first pass through the document.
Donald Arseneau asnd@reg.triumf.ca
Technical Details
Message-ID:
<2SEP199204243745@reg.triumf.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!reg.triumf.ca!asndReferences:
<1992Sep1.150736.5707@irisa.fr> <2SEP199202472416@reg.triumf.ca>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!reg.triumf.ca!asnd From: asnd@reg.triumf.ca (Donald Arseneau) Subject: Re: How to test the page value of a float? Message-ID: <2SEP199204243745@reg.triumf.ca> Summary: steal parts of the \pageref definition News-Software: VAX/VMS VNEWS 1.41 Sender: news@unixg.ubc.ca (Usenet News Maintenance) Nntp-Posting-Host: reg.triumf.ca Organization: TRIUMF: Tri-University Meson Facility References: <1992Sep1.150736.5707@irisa.fr> <2SEP199202472416@reg.triumf.ca> Date: Wed, 2 Sep 1992 11:24:00 GMT Lines: 20