Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [xr]

package implements a system for eXternal References (cross referencing to any `\label`s in external files)

0
votes
1answer
27 views

Add a document name, while using an external document reference

I'm using xr package for referencing to external documents. I want to add external document title to a reference. How it could be obtained?
2
votes
0answers
39 views

`xr` Cross-Reference: Change Colour for External References Only

I want to reference between two files, say Paper1 and Paper2. I'm using hyperref in each of the documents for internal references. So as to make clear which references are internal and which are ...
0
votes
1answer
20 views

Problem referencing labels with href

I am trying to reference certain sections with href in my index (not using the normal index because I wanted to make a custom one), but when clicking on them it just takes me to the top of the main ...
0
votes
0answers
22 views

latexmk with external references in both directions

I am aware of the question below about how to refer, in file1, to labels from file2. latexmk with external references However, I must also refer, in file2, to labels from file1. I am able to do it ...
2
votes
1answer
29 views

Doc-Start appearing when using xr package

I am trying to write up an article that uses the xr package (or maybe it needs to be zref) to reference labels in two different documents: an article and a beamer presentation. The references from ...
0
votes
0answers
11 views

Re-calling/re-printing a theorem from an external document [duplicate]

For a manuscript I need to include theorem proofs as supplementary material. So I mention the theorem in the main file and I need to re-print the theorem in the supplementary material with the same ...
0
votes
1answer
40 views

Incompatibility between xr-hyper and redefinition of \section

This is main.tex \documentclass[headings=optiontohead]{scrbook} \usepackage{subfiles, xparse, xr-hyper, hyperref} \externaldocument{main} % so that cross-references work in subfiles \let\oldsection\...
-1
votes
1answer
74 views

How to use \ref to refer to a \label in another document?

I have two documents and am trying to use the package xr to create a reference, in the second document, to a \label in the first. But ?? appears in the PDF instead. How do I enable the second to see ...
1
vote
1answer
44 views

xr-hyper package and \includegraphics

With the two following documents, I get a correct result: in the second document, the first chapter page from first document is included and the external link opens the correct page in the first ...
1
vote
0answers
45 views

Trick/Workaround for cross reference between files without xr

I have a main manuscript and a supplementary materials tex files. These are based on templates by the AGU journals, therefore it is not recommended to add any other packages, than those provided. I ...
0
votes
0answers
30 views

Using xr-hyper with Bibliography

Is there a way in xr-hyper to use \cite{<ref1>} in order to reference to the bibliography of the source file?
2
votes
1answer
34 views

Want naked links across files

I compile via pdflatex f01.tex. My preamble normally contains ... \usepackage{xr-hyper} \usepackage{hyperref} Suppose that I have f01.tex and f02.tex in the same directory, and (for example) f01....
0
votes
1answer
106 views

Use autofill for labels across many files in latextools with Sublime Text 3 with xr pakcage

I have three tex files: File 1. Main paper; File 2. Supplementary file; File 3. A referee report. As you can see there is no "master" file. However, I want to be able refer labels in one file in ...
0
votes
0answers
42 views

theorem's title with footnote AND xr package

Note. This is not the usual problem with theorem's title with footnote. This is the special situation where additionally the package xr (or in my case xr-hyper) is used If I put a footnote in the ...
3
votes
1answer
183 views

Cross-referencing and chemnum

I have two separated documents, compiled independently and residing in two completely different folders. I heavily rely on the chemnum package to assign numbers to the many molecules I have in both ...
0
votes
1answer
24 views

Reference across files is followed by unwanted text

I am writing an errata for a book. In this errata, I need to cross-refer to the pages where changes have taken place. I use the package xr to achieve this: \documentclass[11pt]{article} \usepackage{...
1
vote
0answers
52 views

External document cross-referencing not working [duplicate]

I am having trouble getting cross-referencing to work. I am using the package xr-hyper. I have a 'main' file called main.tex and two subfiles called intro.tex (Introduction) and app.tex (Appendix A). ...
0
votes
1answer
82 views

Ignore a section or chapter when cross-referencing

I maintain a set of open calculus texts for our calculus sequence, which has four courses (Calculus I-IV). Each course has its own corresponding open text. Occasionally the text for a later course ...
1
vote
1answer
97 views

external cross-reference to a line number using lineno and xr-hyper

I try to reference a line number in source.tex from a dest.tex document. When (PdfLaTeX-)compiling dest, I get the following error. ! Extra \else. \@hyper@readexternallink ...#7\\{#3}{#2}{#7}\else ...
7
votes
1answer
2k views

Cross references and subfiles

I want to take references between subfiles for a big project, the main structure is for the main files is main.tex: \documentclass[12pt]{book} \usepackage{subfiles} \usepackage{xr} \...
2
votes
0answers
235 views

xr package + latexmkrc not working with includegraphics command?

I am trying to implement the trick described here for using the xr package to have latex references work across multiple files automatically. The technique works great, except if there is an ...
6
votes
2answers
688 views

Cross Reference problem

I have a problem when I use a cross-reference from other files. I have a folder in which there is a main.tex file and a subfolder (Chapter) containing Chapter1.tex and Chapter2.tex. In the main file, ...
2
votes
0answers
1k views

Cross-referencing between two files in overleaf

I have two files, SI.tex and main.tex. There is a subsection in main.tex that is labeled subsec:A. I want to reference this subsection from SI.tex. I'm doing this in overleaf, just in case that makes ...
3
votes
2answers
272 views

Cross-referencing between local files with \href

I am struggling with the creation of cross-references between different files. What I want to do is the following. I want to create two separate documents (books). One of the documents (doc1) will ...
2
votes
1answer
450 views

Failing to run xr package

I have created two LaTeX files: 1.tex and 2.tex. First file contains a figure and I want to make a reference to that figure in the second file. I run pdfLaTeX several times (2-3) for both files. Sadly ...
0
votes
1answer
1k views

xr can't find references in external document

I tried to use the xr package to get cross-references between files. My primary document is book.tex: \documentclass[a4paper,10pt]{scrbook} \usepackage{hyperref} \begin{document} \chapter{...
0
votes
0answers
479 views

Cross-referencing across folders

I have multiple documents which require cross-referencing from one another (I am the author of all of them). Each document lies in a separate folder. As an example, everything lives in a directory ...
2
votes
1answer
134 views

Using xr-hyper and hyperref - error when setting the page counter

I am trying to set the page counter of docB.tex based on the page of docA.tex that contains the label my-label. I'm using the packages xr-hyper and hyperref based on this example. docA.tex \...
2
votes
1answer
66 views

Carrying counters over to another file using zref

During my last experiences with cross-referencing on total counts between different files, a problem of carrying counters over to another file appears. Somehow there is an error when I use for these ...
1
vote
1answer
112 views

How to get a total number of literature references and save it to a user defined counter?

During my last experience with Cross-referencing on total counts between different files, which can be read here, a problem of saving the total number of literature references in a user defined ...
5
votes
1answer
256 views

Cross-referencing on total counts between different files

Suppose that we have three .tex files in one folder called PhDThesis.tex, Synopsis.tex and conclusion.tex. There is also one bib-file called my_bibio.bib In Synopsis we have a short description of ...
3
votes
0answers
204 views

Cross referencing line numbers between multiple documents with the pagewise option set

I am using the lineno package with pagewise numberings set. I would like to reference these line numbers from another file, so I am using the xr package. However, it doesn't seem to pick up on the ...
8
votes
1answer
485 views

Restate theorem in separate file

I state a theorem in the main body of a document and prove it in the appendix. I use thmtools's restatable environment to restate the theorem there. However, I now need to have my appendix in a ...
2
votes
2answers
58 views

How to get identical short and long chapter names in two documents?

Background I use memoir to typeset a textbook and a solution manual. For those chapters in the textbook that have problems, I have a corresponding chapter in the solution manual. Needless to say, I ...
2
votes
2answers
575 views

\pageref not working properly in main document with subfiles package and xr package

I have a main file setup with the subfiles package and the xr package. I am trying to make the \pageref command work properly for cross-references in the main file, but the page number it displays in ...
0
votes
1answer
503 views

'LaTeX Error: Can be used only in preamble' when using \externaldocument

I'm using 'xr' package for cross referencing across files. I have three files named 'main', 'file1' and 'file2' where all the packages are decalred in the main file. I'm including the files in the ...
3
votes
2answers
699 views

Failure to use bibliography in other tex file

I have two .tex files: reftest.tex which contains the main details: reference, figure, equation; and cross_ref.tex. In cross_ref.tex, I want to cross-reference citation of refernece in the reftest.tex ...
3
votes
1answer
545 views

\hyperref fails when cross-referencing between different files

I am working on a multi-volume project where different volumes contain hyperlinks to other volumes. I use a technique described on this web-site in a number of posts, see e.g., Cross-referencing ...
1
vote
1answer
161 views

Missing \endcsname with xr cross referencing

I searched a lot, but cannot figure out the following problem: I am trying to reference another document using the xr package. I also tried out zref but it does not matter regarding the error message. ...
5
votes
1answer
165 views

substitute a character from one script to another

I am working in XeLaTeX + Memoir, and I have two documents: one typeset in English and another typeset in Arabic. As the two documents are related, I am using the package xr to establish cross-...
12
votes
1answer
700 views

Can one safely redefine \jobname?

I want to access labels from an external document -- in general this is not a problem with the xr package. But in this case both documents are compiled on sharelatex, and there \jobname is always set ...
4
votes
3answers
5k views

cross reference with xr fails (ShareLatex)

I try to use xr for cross referencing, and I get question marks instead of the reference and a warning: Reference updateEq on page 1 undefined on input line 93 on the document i am referring to (...
5
votes
1answer
989 views

Correct ordering of xr-hyper, hyperref, and cleveref

I want to use \cref, external documents, and hyperrefs. Take the following file, label it main1.tex and compile it: \documentclass{article} \usepackage[capitalise,noabbrev]{cleveref} \crefname{...
4
votes
1answer
400 views

Special \cref display for \externaldocument

I am using cleveref pointing to equations within my document, as well as to a technical appendix in a separate file (loaded by \externaldocument) Setup Lets that the the first file was in main.tex, ...
4
votes
2answers
561 views

Using xr to refer to another document without hyperref

I have two documents A and B. I wish to refer to theorems and lemmas from A in B. To do this I am using the package xr in B. If I use the package hyperref in B then it's all fine. Otherwise, when I ...
1
vote
0answers
825 views

externaldocument references with standalone

I have a main document, /home/con/Documents/Thesis/thesis.tex, that loads a file /home/con/Documents/RNA/rna.tex with standalone. This works surprisingly well. However, there are 2 problems: 1. rna....
1
vote
0answers
65 views

external reference with lyx [duplicate]

I am attempting to reference labels in an external LyX document. I have found how to do this using the xr package in .tex files. However, I see no way of doing this in LyX without having to export to ....
2
votes
1answer
305 views

Including title of document in external reference

I'm currently using xr to reference external documents. It's good in as much as I get linked via hyperref to the relevant result, but it would be helpful if it displayed the title of the document ...
1
vote
1answer
341 views

Problem with xr-hyper and xepersian latex packages

I had a problem with xr package and xepersian package; when I use these packages, I can not use options for external document command. File A: \documentclass{report} \usepackage[nokeyprefix]{...
4
votes
1answer
174 views

Memoir's \NumToName doesn't work with cross-referenced items

I got external references to work with memoir and hyperref here: hyperref and xr-hyper break memoir's \titleref, but references to external documents don't work with memoir \NumToName: Chapter~\...