TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to generate an appendix with hundreds of tables. I put several tables on a page, as an earlier question established. The first level consists of pure tables, created as \begin{tabular}...\end{tabular} blocks. Let's call 4 such primitive files ch1-{a,b,c,d}.tex, i.e. ch1-a.tex,ch1-b.tex, ... These four documents are emitted into a directory /tex/ch1/.

The second level, which I call 2x2-ch1-abcd.tex, is also a tabular, containing


-- it is generated in the same subdirectory, /tex/ch1/. So far so good. If I wrap 2x2-ch1-abcd.tex in a preamble, it compiles.

Now I need to assemble such level 2 aggregates into a thesis. I have the master document as /tex/thesis.tex. If I say, in it,


-- I get the no nested includes error. If I replace \include by \input, the second level cannot find the first level files anymore.

I'd like to avoid encoding first-level paths into second-level matrices, to keep paths only in the master document. Can it be achieved within LaTeX without external symlinks?

share|improve this question

I believe (untested) that you can solve the problem with the import package:


(where indentation denotes inclusion within the file above in the heirarchy). If you wish to \include the chapter file (rather than \input) it, use \subincludefrom instead of \subimport.

share|improve this answer
Thanks Will -- I decided to simply generate proper paths for each \input, but this is a very interesting path and yielded many more things on hierarchy, such as TEXINPUTS, security policy, etc. – Alexy Feb 4 '11 at 8:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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