October 18, 2011

Collaborate better with Latex

I have found the \input command in LaTeX to be quite useful. I started using this while writing my Masters' thesis. It proved to be a great tool in organizing and managing text that spanned over 70 pages. Instead of having all the text go into one large TeX file, this command helped break down the different sections of my thesis and allocate a file for the text in each section. This made organizing and managing the text easier and efficient.

Over time, I also found this command useful in collaborations with multiple authors since it provides an isolated environment for each section and reduces conflicts.

Here is a sample template:

\begin{document}

 \input{section1.tex}
 \input{section2}
 \input{/home/article/section3.tex}
 \input{../article/section3.tex}

\end{document}

The \input command takes an argument that specifies the TeX file name (which can be given without its .tex extension as shown in the second \input invocation) containing the text to that section. The argument here can also specify the absolute/relative path of the TeX file. 

No comments:

Post a Comment