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 drafting cycle involving multiple authors (we use GitHub to synchronize and maintain a paper trail), the locations in manuscript.pdf as generated using lineno keep on changing. While I can use things like \pageref{} inside the same document, how do we reference locations in another document? The expected sentence at the end of each response in response.tex has to read like: "We have made the aforementioned additions at line number (line number) on page (page number), and column (col number) of the manuscript.". Currently, we are manually making changes after looking at generated PDFs, and this is highly error-prone.

I have looked at suggested package xr (which now includes the capabilities of xcite). I have defined \externaldocument[main:]{manuscript} in the preamble of response.tex. \ref{main:q1} works, but citations (\cite{main:c1}) do not resolve.

I am using the defined prefix (main:) for all \ref and \cite commands in response.tex to keep things unambiguous.

  • Also related: tex.stackexchange.com/questions/15926/…
    – cabohah
    Jan 24 at 7:40
  • @cabohah Thanks. This should help. How do I refer to specific column and line number in the manuscript.pdf? I can get page number using \pageref. Jan 24 at 8:21
  • 1
    This would be another question and should be asked as a new one (in maybe in case of this duplicate by editing this one), with a proper minimal working example. However, before asking such a question, please read section 5 of the lineno user manual.
    – cabohah
    Jan 24 at 9:16
  • Actually, this is not a duplicate since citations do not resolve with xr. Jan 24 at 12:14
  • @user2751530 To quote the xr documentation "As first suggested in Enrico Gregorio’s xcite package, the current version also allows \cite to reference \bibitem in the external document. For com- patibility with xcite, \externalcitedocument is made available as an alias for \externaldocument" If cites don't work for you, you should make a minimal (non-)working example, which allows us to reproduce the problem Jan 25 at 10:55


Browse other questions tagged .