diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-extref.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-extref.html | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-extref.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-extref.html new file mode 100644 index 00000000000..c38d4bf0af9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-extref.html @@ -0,0 +1,72 @@ +<head> +<title>UK TeX FAQ -- question label extref</title> +</head><body> +<h3>Referring to labels in other documents</h3> +<p/>When producing a set of inter-related documents, you’ll often want to +refer to labels in another document of the set; but LaTeX, of its +own accord, doesn’t permit this. +<p/>So the package <i>xr</i> was written: if you say +<blockquote> +<pre> +\usepackage{xr} +\externaldocument{volume1} +</pre> +</blockquote><p> +will load all the references from <i>volume1</i> into your present +document. +<p/>But what if the documents both have a section labelled +“<code>introduction</code>” (likely enough, after all)? The +package provides a means to transform all the imported labels, so you +don’t have to change label names in either document. For example: +<blockquote> +<pre> +\usepackage{xr} +\externaldocument[V1-]{volume1} +</pre> +</blockquote><p> +loads the references from <i>volume1</i>, but prefixes every one with +the string <code>V1-</code>. So you would refer to the introduction to volume 1 +as: + +<blockquote> +<pre> +\usepackage{xr} +\externaldocument[V1-]{volume1} +... +... the introduction to volume1 (\ref{V1-introduction})... +</pre> +</blockquote><p> +To have the facilities of <i>xr</i> working with +<i>hyperref</i>, you need <i>xr-hyper</i>. For simple +hyper-cross-referencing (i.e., to a local PDF file you’ve just +compiled), write: +<blockquote> +<pre> +\usepackage{xr-hyper} +\usepackage{hyperref} +\externaldocument[V1-]{volume1} +... +... the \nameref{V1-introduction})... +</pre> +</blockquote><p> +and the name reference will appear as an active link to the +“introduction” chapter of <i>volume1.pdf</i>. +<p/>To link to a PDF document on the Web, for which you happen to +have the .aux file, write: +<blockquote> +<pre> +\usepackage{xr-hyper} +\usepackage{hyperref} +\externaldocument[V1-]{volume1}[http://mybook.com/volume1.pdf] +... +... the \nameref{V1-introduction})... +</pre> + +</blockquote><p> +<dl> +<dt><tt><i>xr.sty</i></tt><dd>Distributed as part of <a href="ftp://cam.ctan.org/tex-archive/macros/latex/required/tools.zip">macros/latex/required/tools</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/required/tools.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/required/tools/">browse</a>) +<dt><tt><i>xr-hyper.sty</i></tt><dd>Distributed with <a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/hyperref.zip">macros/latex/contrib/hyperref</a> (<a href="ftp://cam.ctan.org/tex-archive/macros/latex/contrib/hyperref.tar.gz">gzipped tar</a>, <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/hyperref/">browse</a>) +</dl> +<p/> +<p/><p/><p/><p/><p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=extref">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=extref</a> +</body> |