[OS X TeX] Setting project root

Tomas Jonsson tomas.jonsson at hum.gu.se
Wed Jun 19 05:22:04 EDT 2002



Use documentclass, preamble stuff, \begin{document} and \end{document} only in the root file and skip the .tex extension in the \include command.

Tomas J


>I'm starting my PhD Thesis and trying to work out setting up a multi-part
>document. A small test is causing problems:
>
>
>
>    \documentclass[12pt]{report}
>    \begin{document}
>        \include{Chapter1/one.tex}
>        \include{Chapter2/two.tex}
>        \include{Chapter3/three.tex}
>    \end{document}
>
>
>with
>
>
>    documentclass[12pt]{report}
>    \begin{document}
>        \chapter{Testing 123}
>        Well here's my chapter one!
>    \end{document}
>
>and the root appropriately set gives me this:
>
>    This is pdfTeX, Version 3.14159-1.00b-pretest-20020211 (Web2C 7.3.7)
>    (./test.tex{/usr/local/teTeX/share/texmf.local/pdftex/config/pdftex.cfg}
>    LaTeX2e <2001/06/01>
>    Babel <v3.7h> and hyphenation patterns for american, french, german,
>ngerman, nohyphenation, loaded.
>    (/usr/local/teTeX/share/texmf/tex/latex/base/report.cls
>    Document Class: report 2001/04/21 v1.4e Standard LaTeX document class
>    (/usr/local/teTeX/share/texmf/tex/latex/base/size12.clo)) (./test.aux)
>    No file Chapter1/one.tex.tex.
>    No file Chapter2/two.tex.tex.
>    No file Chapter3/three.tex.tex.
>    (./test.aux (./Chapter1/one.tex.aux) (./Chapter2/two.tex.aux)
>    (./Chapter3/three.tex.aux)) )
>    No pages of output.
>    Transcript written on test.log.
>
>
>
>But if I chop off the .tex's, as in:
>
>    \include{Chapter1/one}
>
>I get:
>
>    ...
>    (/usr/local/teTeX/share/texmf/tex/latex/base/report.cls
>    Document Class: report 2001/04/21 v1.4e Standard LaTeX document class
>    (/usr/local/teTeX/share/texmf/tex/latex/base/size12.clo)) (./test.aux
>    (./Chapter1/one.tex.aux) (./Chapter2/two.tex.aux)
>(./Chapter3/three.tex.aux))
>    (./Chapter1/one.tex
>
>    ! LaTeX Error: Can be used only in preamble.
>
>    See the LaTeX manual or LaTeX Companion for explanation.
>    Type  H <return>  for immediate help.
>    ...           
>
>
>What am I doing wrong?
>
>
>
>Cheers
>
>Sam
>

-- 

-----------------------------------------------------------------
Threaded list archives can be found at:
<http://www.masda.vxu.se/~pku/MacOSX_TeX/>
-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------




More information about the MacOSX-TeX mailing list