%% %% Der LaTeX-Begleiter, zweite Auflage (September 2005) %% %% Beispiel 2-4-6 von Seite 77. %% %% Copyright (C) 2005 Frank Mittelbach, Michel Goossens, %% Johannes Braams, David Carlisle, and Chris Rowley %% %% Uebersetzung: Copyright (C) 2005 Claudia Krysztofiak, %% Rebecca Stiels und Frank Mittelbach %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% %% See http://www.latex-project.org/lppl.txt for details. %% \documentclass{lb2exa} \pagestyle{empty} \setcounter{page}{6} \setlength\textwidth{75.26308pt} \setlength\textheight{11\baselineskip} \sloppy \pagestyle{origplain} \StartShownPreambleCommands \usepackage[ngerman]{varioref} \usepackage{ifthen} \newcommand\veqns[2]{% \vrefpagenum\firstnum{#1}% \vrefpagenum\secondnum{#2}% die Gleichung% \ifthenelse{\equal\firstnum\secondnum}% {en \ref{#1}}% { \ref{#1}\vpageref{#1}}% \space und \ref{#2}\vpageref{#2}} \StopShownPreambleCommands \begin{document} Test: \veqns{A}{B} \par Test: \veqns{A}{C} $$a=b+c \label{A}$$ $$b=a+c \label{B}$$ \newpage Test: \veqns{A}{B} \par Test: \veqns{A}{C} \newpage $$c=a+b \label{C}$$ \end{document}