[XeTeX] \include File

Ross Moore ross.moore at mq.edu.au
Sun Nov 21 21:37:56 CET 2010

Hi Anant,

Sent from my iPad

On 21/11/2010, at 10:10 AM, A u <akupadhyayula at gmail.com> wrote:

> Hello, 
> I want to keep all the \label{x.x.x} things in one TeX file and want to load and run but do not want it to print to the PDF file. 
> Once I load the file then I can use \nameref to call a particular item.

So what exactly is the problem?
You need to typeset the document at least twice, so that the cross-references can be resolved.

But a word of advice. If you need to reorder portions of your document — adding, removing or changing the order of sections, say — as is almost certainly the case, or you reuse portions of the same source in other documents, then you will probably come to regret labels of the form x.x.x with all the 'x's being numbers related to the structure of the surrounding document.
Symbolic labels are better chosen to be words that represent the nature of the data that they are labeling. This makes your content less dependent of how, and where, it is used. Also it can be easier to select the correct label to refer to within a cross-reference.  

> Thanks for your help
> Anant

Hope this helps,


> \documentclass[fleqn,12pt,a4paper]{article} % normal
> \usepackage{fontspec,xltxtra,xunicode}
> \usepackage{fancyhdr}
> \pagestyle{fancy}
> \usepackage{color}
> \usepackage{setspace}
> \usepackage{hyperref}
> %\usepackage{fontenc}
> %\usepackage{microtype}
> %\usepackage[utf8x]{inputenc}
> \usepackage{cmll}
> \usepackage{tabularx}
> \usepackage{pifont}
> \usepackage{amstext, amsmath}
> %\setmainfont[Script=Devanagari]{Sanskrit2003}
> \begin{document} 
> \section{Enter you equation here   8.1.1} \label{8.1.1}
> \section{Enter new equation Here  6.1.85} \label{8.1.2}
> $ \mbox{Roots}\xrightarrow{\mbox {\scriptsize{\nameref{8.1.1}}}} \mbox{Intermediate form} \xrightarrow{\mbox {\scriptsize{\nameref{8.1.2}}}} \mbox{Final word} $  \\
> \end{document} 
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
>  http://tug.org/mailman/listinfo/xetex

More information about the XeTeX mailing list