Questions tagged [xr]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

Import a table and figure from another tex file

Is it possible to include the whole content of the table and figure in another tex file? Let's say we have A.tex \documentclass{article} \begin{document} write something here. \begin{table}[tbp] ...
0 votes
0 answers
16 views

Use wildcard in xr's externaldocument command?

Is it possible to somehow tell the xr package's externaldocument command to use wildcards? Instead of: \externaldocument{ch_A/figures/a} \externaldocument{ch_A/figures/b} \externaldocument{ch_A/...
0 votes
2 answers
48 views

macro in aux file

I will show two similar files. First file \documentclass{amsart} \begin{document} \def\Site{left} \section{Left Space} \label{s:\Site Space} \begin{equation} \label{product from \Site} a=bC \end{...
0 votes
0 answers
26 views

Referring to line numbers and citations in another document [duplicate]

In revisions to a manuscript, we need to make references to where some text has been added in the main document (manuscript.tex), in our response document (response.tex). As can be expected in ...
  • 1,080
0 votes
2 answers
25 views

cleveref referencing figures from current and external documents

Here is the setup: In doc2.tex, I have: \documentclass{article} \usepackage{xr-hyper} \usepackage{hyperref} \usepackage{cleveref} \begin{document} \begin{figure} \caption{figure there} \label{fig:...
  • 183
0 votes
1 answer
39 views

Two files cross-referencing each other with xr while using latexmk

This question is related to another unanswered one. Mine is not specific to Overleaf, and I provide an MWE. I have the following two files: % file_a.tex \documentclass{article} \usepackage{xr} \...
1 vote
1 answer
39 views

Can \subref and xr work together?

With xr I can cross-reference labels in another document. With subcaption I can refer to subfigures (or similar). But if I try to combine them both, it seems they don't recognise each other: a.tex: \...
  • 3,161
0 votes
0 answers
383 views

Cross referencing from a different Overleaf project

I have two Projects, lets call them Project_A and Project_B in Overleaf. Project_A in overleaf has many tex files and so does Project_B. Could a cross reference be made in Project_A such that we could ...
0 votes
2 answers
45 views

`\nvrightarrow` causes an error when it is used in the title of a definition and is referenced from another file

The following code is saved in test.tex: \documentclass{scrartcl} \usepackage{unicode-math,xr-hyper,hyperref,cleveref} \newtheorem{definition}{Definition} \begin{document} \begin{definition}[$\...
  • 10.7k
0 votes
1 answer
90 views

Referencing across files using xr-hyper fails

I saved the following LaTeX code in test.tex. \documentclass{scrartcl} \newtheorem{theorem}{Theorem} \begin{document} \begin{theorem}[My 1st Theorem]\label{thm} A \end{theorem} \end{document} I ran ...
  • 10.7k
0 votes
1 answer
385 views

How can I enforce creation of *.aux files?

I want to write a thesis using subfiles and xr for external references. I use subfiles because that allows me to compile chapters separately without having to compile the whole thesis. My problem is ...
  • 1
1 vote
1 answer
151 views

siunitx version v3.0.2 with xr-hyper

I am typeset the multivolume book. Simplest form looks like: main file for volume one (vol01.tex) \documentclass{scrbook} \usepackage{xr-hyper} \usepackage{siunitx} \usepackage{graphicx} ...
  • 3,702
2 votes
0 answers
233 views

Include bibliography of xr (xcite) citations, that only contains the relevant entries

Short description of my Question: I am using the xr or xcite package in my derivative project supplementary.tex to give references/citations the same number that they already have in an external ...
  • 723
0 votes
0 answers
135 views

Issues in hyperlink to an external document

I have two latex files: one for the actual paper and one for the appendix. In the paper, I want to refer to section of the appendix. I follow what I found around on referring to external dcouments but ...
  • 307
1 vote
0 answers
17 views

Sub file references main file, but references do not appear when compiling main file

I am trying to write a large document, and for the sake of organized editing, it makes sense to have each chapter as a standalone document. I am using the standalone package to accomplish this. I have ...
  • 111
0 votes
0 answers
66 views

Latex and file management: chained \include{...} and reference to active directory

For each chapter of a document I am working on I have a separate folder, and all folders are contained in a common superfolder, together with a file main.tex which should put them all together. ...
  • 101
0 votes
0 answers
56 views

Save a version of .aux file

I want to use a specific version of the .aux file. So I want to save this version for an eventual use with the xr package. Is there a way to do this task ? Note that the origin of this problem is from ...
1 vote
1 answer
331 views

Warning in REVTeX 4.2 for references to an external document: "... has been referenced but does not exist, replaced by a fixed one"

First, I build the following external document, ExternalDoc.tex file, 3+ times. \documentclass[prl,aps,10pt]{revtex4-2} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{thm}{Theorem} \...
0 votes
1 answer
429 views

Can Overleaf accommodate pre-fixes for xr-hyper (e.g, \myexternaldocument[ext1-]{path...})

Short version: when using xr or xr-hyper on Overleaf, is it possible to add prefixes to external documents to avoid multiple defined labels (as defined here)? Longer version: I'm drafting a review ...
  • 103
0 votes
1 answer
114 views

Package xr prints ref number then label

Here's my MWE. \documentclass[12pt]{article} \usepackage[T1]{fontenc} \usepackage[margin=2.4cm]{geometry} \usepackage{% amsmath, amsfonts, amsthm, mathpazo, tgbonum, xr, ...
  • 1,359
0 votes
0 answers
86 views

How to use -cd label in latexmkrc when "No file C1.aux LABELS NOT IMPORTED." error occured

I just get No file C1.aux LABELS NOT IMPORTED. error when I try to use \usepackage[subpreambles=true]{standalone} and \externaldocument{C1} commands, in order to quote from another latex files. I'm ...
2 votes
0 answers
1k views

xr package not working properly

I'm trying to use the xr package, and I'm having problems. My document is \documentclass[11pt,a4paper]{article} \usepackage{xr} \externaldocument{ch04} \begin{document} Exercice - Page \pageref{ex3....
  • 237
-1 votes
1 answer
764 views

reference external figures from supplementary inside overleaf [closed]

I try to reference external figures from the supplementary information inside the main text. How to reference figures that are in the supplementary content in main text? describes an approach I try to ...
1 vote
1 answer
293 views

Deactivating Hyperlinks to External Documents with Cleveref

My question is quite similar to the one asked here. Also, I found a solution using \ref here. I couldn't find a solution for \cref however. The setting: I have large file with many chapters, which ...
  • 111
1 vote
0 answers
584 views

Getting xr and xr-hyper to ignore the bibliographies

Now that xr and xr-hyper allow \cite to refer to \bibitems in the external document, is there a way to get these packages to ignore the \bibitems of the external document? In other words, is there an ...
  • 2,652
0 votes
0 answers
194 views

hyperref external reference

I want to reference external documents using hyperref on the files test1 and test2 below. Presumably for security reasons, the links don't work. With MacOs Preview nothing happens and Adobe Reader in ...
1 vote
0 answers
118 views

Standalone class and Cross referencing

Is the standalone package compatible with the crossref (xr) package? This has been asked before, but the answer does not work for me. MWE: main.tex \documentclass[]{article} \usepackage{standalone} \...
  • 43
0 votes
0 answers
27 views

Referencing my own .tex-files

I am trying to reference doc1.tex in doc2.tex inside the same project on overleaf. I have seen several posts here, but they were all not detailed enough for me. I am very new to LateX. So far I have ...
1 vote
0 answers
167 views

Configure latexmk to work recursively with files living in different folders

This is a follow up on How to configure latexmk to work recursively? (PDF Thumbnails) and latexmk with external references. Let me first say what I'm trying to achieve. I have a latex project that ...
  • 167
1 vote
2 answers
3k views

"Package xr warning: No file file4.aux LABELS NOT IMPORTED" – What's wrong?

I'm working on an article with tons of appendices that we need a cross referencing system for. Since we user hyperref, I gave the xr-hyper package a try. After MANY attempts, I got it to work with ...
5 votes
2 answers
6k views

Using the xr package and - missing aux file? "Warning: No file SupplementalMaterial.aux LABELS NOT IMPORTED"

I'm using Overleaf to write a paper with supplementary material and have been having substantial trouble with separating out Supplemental Material while maintaining references. My MWE is as follows - ...
  • 195
1 vote
1 answer
311 views

{}\edef \Hy@tempb {cite.\XR@prefix error when citing same bibtex entry in \externaldocument

I have the following .tex file in a folder main.tex --- \documentclass[11pt]{article} \usepackage{hyperref} \title{} \author{} \begin{document} \maketitle \cite{entry} \bibliography{bib}{} \...
  • 161
2 votes
0 answers
52 views

xr package and pgfplots/tikz

I'm using tikz/pgfplots to draw my figures. Usually, my figure is a standalone file that I compile and in my main file, I simply import the pdf with \includegraphcis. I now want to refer to curve in ...
2 votes
0 answers
51 views

Use text passages including references of one .tex file in another .tex file

I (teacher at university) plan to create a questionnaire based on the following MWE questionnare.tex. The important point is that some of the questions refer to each other. \documentclass[DIV=12]{...
  • 21
5 votes
1 answer
1k views

How do I reference sections in other subfiles?

I cannot figure out how in the world I am suppose to reference other sections in subfiles. I have prepared a simple example below: main \documentclass[12pt,letterpaper]{article} \usepackage[utf8]{...
  • 261
1 vote
1 answer
571 views

Unable to reference figure from one subfile to another subfile when compiling ONLY the subfile

I have the following files in Overleaf: main.tex in root directory: \documentclass[conference]{IEEEtran} \usepackage{xr} \usepackage{subfiles} \begin{document} \section{Methodology} \label{...
  • 139
3 votes
1 answer
423 views

Avoiding expansion of referenced captions when cross-referencing external documents with TeX4ht

This is a follow-up question to another question. The selected answer proposes the use of zref-xr, which works fine for PDF output, but has its limitations when using TeX4ht: the configuration via \...
  • 350
2 votes
1 answer
1k views

Handling main text and supplementary information crossreferencing each other on arXiv

A typical example when writing a paper is that you have a main document main.tex and a document containing supplementary information si.tex. Both documents are stand-alone in the sense that they ...
1 vote
1 answer
1k views

Cross-reference with `xr` package and final PDF combination?

So I have been using cross-references so far in Overleaf using this idea from StackExchange, which was adapted in Overleaf itself here. My question is, when I am finally combining main.tex and SI.tex ...
  • 111
0 votes
2 answers
299 views

How to number labeled equations with different files?

I have a file main.tex \documentclass{article} \usepackage{xr-hyper} \usepackage{hyperref} \usepackage{mathtools} \mathtoolsset{showonlyrefs} \begin{document} \begin{equation}\label{sec:mytitle} 1 +...
1 vote
1 answer
602 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 ...
  • 1,299
0 votes
0 answers
131 views

in subfile: name{theorem.0.1} has been referenced but does not exist, replaced by a fixed one

since I was not able to find a solution online, which fixed this problem, so I hope someone here can help me :) Here is my main.tex file: \documentclass[a4paper,12pt,headsepline]{article} \...
2 votes
1 answer
224 views

fontspec and xr package incompatible in Overleaf

I am trying to use the xr package in Overleaf and set a custom font in the referenced file. However, as soon as I load the fontspec package in the referenced file, the xr package does not recognize ...
  • 345
0 votes
1 answer
50 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?
1 vote
1 answer
65 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 ...
1 vote
0 answers
352 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 ...
  • 133
3 votes
1 answer
252 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
0 answers
93 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 ...
  • 383
0 votes
1 answer
154 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\...
  • 11.5k
-1 votes
1 answer
679 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 ...
  • 424