Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!samsung!crackers!m2c!ulowell!hawk!pmaresch From: pmaresch@hawk.ulowell.edu (Pierre Mareschal) Newsgroups: comp.text.tex Subject: LaTeX complex cross reference macro wanted Keywords: cross references, \ref, \pageref, macros Message-ID: <1621@ulowell.ulowell.edu> Date: 18 Dec 90 19:57:09 GMT Sender: news@ulowell.ulowell.edu Reply-To: pmaresch@dragon.cpe.ulowell.edu.UUCP (Pierre Mareschal) Distribution: na Organization: CPE/ULowell - Lowell, Ma. Lines: 25 Followup-To: (La)TeX Gurus, Given an entry generated in the .aux file by a LaTeX command like: \label{ex} I would like to find a macro (let's call it \pref) that would produce the following outputs: - If the label is on the same page as the reference, it would just use the \ref{ex}: Example: Figure~\pref{ex} generates Figure~\ref{ex} i.e. Figure 2.1. (If the reference is on a left page and the figure on a right page, (or vice-versa), it should only produce this simple output too.) - If the label is on a different page, it would generate a more complex output: Example: Figure~\pref{ex} generates Figure~\ref{ex} (\pageref{ex}) i.e. Figure 2.1 (page 69). Thanks a lot. :- Pierre Mareschal