I'm doing graphics using PStricks, writing each figure in it's own sub-file. I would like to order two of these figure vertically with a symbol in between.

To that end, I've tried using a tabular and arrays environments. This, however, produces and error, even when the sub-file is empty.

For PStricks, I compile using xelatex on Ubuntu.

A minimal working example is


\include{test} & b & c\tabularnewline


Here, the error is produced at \end{frame}. test.tex is empty and is in the same folder as the main file.

Is there away to solve this problem?


Use \input{test} instead of \include{test}. The former gives the same as typing the contents of test.tex into your main file, while the latter inserts \clearpage before and after, as well as doing some trickery to write a separate .aux file for each included file.

\include is useful for e.g. the case where you divide a text into chapters, with one chapter in each file, but for cases such as this, where you want to put the code for a pstricks drawing in a separate file, \input should be used.

For more details see When should I use \input vs. \include?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.