Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I define the following \locallabels{} command to localize labels and references to a certain part of my document

\makeatletter \AtBeginDocument{%
  \let\origlabel@in@display\label@in@display
  \let\origref\ref \let\origpageref\pageref \let\origlabel\label
    \newcommand\locallabels[1]{%
    \renewcommand\label[1]{\origlabel{#1##1}}%
    \renewcommand\ref[1]{\origref{#1##1}}%
    \renewcommand\pageref[1]{\origpageref{#1##1}}%
    \renewcommand\label@in@display[1]{\origlabel@in@display{#1##1}}%
  }} \makeatother

See this thread for a MWE.

However, when I define the following command based on my custom \locallabels,

\newcommand{\refalien}[3]{\locallabels{#1}\ref{#2}\locallabels{#3}}

which I use to reference labels outside a particular locallabels region of my document, why does AucTex region preview, in my non-MWE document, output a DVI that has about 10× more pages with barely any characters on each page? Does this have to do with a preamble-caching issue?

thanks

share|improve this question
    
I think a MWE is in order, since I'm not sure what you mean by "interfere"... –  Werner Oct 3 '13 at 22:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.