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
M T W T F S S
« Nov   Jan »
1234
567891011
12131415161718
19202122232425
262728293031

(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:

\usepackage{xr}
\externaldocument{chapterI}

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!