# How to use sections from other tex files?

I have 8 files which I am serially listing in my main.tex file.

All 8 files contain one chapter.

Now I have created a diagrams.tex file which has 10-12 diagrams using tikz.

I am not including this file in my main.tex file.

But I still want diagrams to show up in my main.pdf, as well keep the chapters manageable.

Can I simply import the figures from diagrams.tex using one or two line commands in my chapter .tex files so that the relevant figures show up where I want to?

-
You may write your diagrams in separate files, and then include/input them as needed –  Lionel MANSUY Feb 21 '13 at 12:41

You can use standalone class to create your TikZ diagramas. With

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}
...
\end{tikzpicture}
\begin{tikzpicture}
...
\end{tikzpicture}
\end{document}


each figure will be drawn cropped and placed on a different page. Then you can use \includegraphics[page=1]{diagrams} where you want to include each one of them.

-