About this blog
We present the latest IT news and tips, and information about our IT courses. Brought to you by Dr. Daniel Wong and Mr. Jude How
Latest news and events
December 2011
« Nov   Jan »
facebook like box

(for those who are not aware of TeX and LaTeX, LaTeX is a more user friendly version of TeX, and both TeX and LaTeX are popular software for writing scientific documents, especially when equations are involved. Equations in TeX/LaTeX look far more beautiful than those produced with Microsoft Word’s Equation Editor, for example)

When I am writing, especially in my personal notes, I sometimes would have written about a particular topic in another document and just like to be able to refer to that other document rather than rewrite or copy and paste those paragraphs into the current document. I could always mention the name of that other document, but to be more precise, I would like to refer to specific sections, equations, etc., in that other document. Is it possible to do that in LaTeX? Yes, it is, with the “xr” package!

You might write something like:


as explained in http://tex.stackexchange.com/questions/14364/cross-reference-between-files-in-latex. One thing to add: often, the other LaTeX document is in another directory/folder. In particular, “xr” looks for the “.aux” file. In that case, you would write \externaldocument{[path of external file]} where [path of external file] is the path of the external file. I can verify that it works for relative paths, at least. Enjoy!


Post to Twitter



Powered by Facebook Comments

Leave a Reply