General ⇒ How to cross-refer to objects in another file?
Re: How to cross-refer to objects in another file?
It seems that the numbering of objects drops to 1 from one file to another. So I think with package xr, the numbers are not followed from one file to another.
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Re: How to cross-refer to objects in another file?
Certainly it does. One single figure in an external document can only have the number "1". This can only work when putting all figures in one external document.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to cross-refer to objects in another file?
This is not practical because in my case the file containing all figures or tables will be very long.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to cross-refer to objects in another file?
Honestly spoken, this is what I started thinking some posts ago.carol wrote:This is not practical because in my case the file containing all figures or tables will be very long.
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to cross-refer to objects in another file?
What would you suggest? because for submitting a paper, some journals ask to submit each figure separately as a file (that's what I had done, creating a tex file for each figure). But if I put each figure in a separate file, I can't have figure numbering as continous for all figures in the text document referring to the figures. So that's why I put all figures in one file. Now I realize that if there is no compromise, I have to do both to submit figures as separate files and to put all figures in one file to be able to refer to them in the text document and list of figures section.
How to cross-refer to objects in another file?
Carol, it seems to me that you misunderstood the requirements for that journal submission or you are dealing with a very strange publisher indeed.carol wrote:What would you suggest? because for submitting a paper, some journals ask to submit each figure separately as a file (that's what I had done, creating a tex file for each figure). But if I put each figure in a separate file, I can't have figure numbering as continous for all figures in the text document referring to the figures. So that's why I put all figures in one file.
The requirement of figures in separate files refers to graphic files only (most of the time in eps format), not the whole figure with caption and label.
If you need further assistance, please tell us what are the exact requirements you have to comply with, so we don't have to guess what you really need.
Cheers,
Tomek
Re: How to cross-refer to objects in another file?
OK.
How to precede the labels of figures and tables that would go into supplemental file related to the main document? like Table S1, Table S2 ..., Figure S1, Figure S2, ...
Note that these labels will be referred in the main document So I don't know if \externaldocuments would be enough because these tables and figures won't be listed in the list of figures or any other section in the main document.
How to precede the labels of figures and tables that would go into supplemental file related to the main document? like Table S1, Table S2 ..., Figure S1, Figure S2, ...
Note that these labels will be referred in the main document So I don't know if \externaldocuments would be enough because these tables and figures won't be listed in the list of figures or any other section in the main document.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to cross-refer to objects in another file?
I suggest to continue the discussion in the new thread you opened for this issue [1]. That would be the better way to handle that.carol wrote:[...] How to precede the labels of figures and tables that would go into supplemental file related to the main document? like Table S1, Table S2 ..., Figure S1, Figure S2, [...]
[1] View topic: How to customize figure/table labels?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to cross-refer to objects in another file?
seems that nobody knows the answer in figure and table forum; i.e, nobody has submitted a journal paper in latex with floats (tables and figures) organization in the main document and supplemental file! It must be so usual, though!