andere Tex-Datei einbinden

Neue Frage »

Vieta Auf diesen Beitrag antworten »
andere Tex-Datei einbinden
Hallo,

ich möchte ein längeres Dokument in Latex schreiben. Dazu möchte ich die einzelnen Abschnitte in eigene Dateien packen und dann in die Hauptdatei laden.
Die Hauptdatei liegt in einem Ordner. In dem Unterordner Theo liegt die Datei Theo.tex.

Hier mein Ansatz:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
\documentclass[a4paper, 12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\begin{document}
\tableofcontents
\newpage
\include{\Theo\Theo}
\end{document} 


Leider bekomme ich beim Erstellen des Dokuments 16 Fehler angezeigt, kann mir aber gerade nicht erklären, wo die herkommen:

Hier der Fehler:

! Undefined control sequence.
<argument> \Theo
\Theo
l.19 \include{\Theo\Theo}

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Ich bin mir ziemlich sicher, dass die Datei-und Ordnernamen richtig sind. Selbst wenn ich absolute Dateinamen benutze, bekomme ich denselben Fehler
kiste Auf diesen Beitrag antworten »

Versuche
\include{Theo/Theo.tex}
Calvin Auf diesen Beitrag antworten »

Es gibt übrigens einen Unterschied zwischen \input{...} und \include{...} http://de.wikibooks.org/wiki/LaTeX-Wörterbuch:_include

Ich persönlich bevorzuge \input{...}
Vieta Auf diesen Beitrag antworten »

Wenn ich anstelle von \include \input benutze, erhalte ich nur 8, anstelle von 16 Fehlern.

Hier ist mal die komplette log-Datei. Die Fehlermeldung ist aber noch diesselbe Vllt wird da jemand draus schlau...
code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9) (preloaded format=latex 2011.3.9)  22 MAR 2011 19:05
entering extended mode
**Arbeit.tex
(C:\Users\Tobias\Desktop\Arbeit\Arbeit\Arbeit.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic, 
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat
vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm
an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese, 
romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis
sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u
senglishmax, welsh, loaded.
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrartcl.cls
Document Class: scrartcl 2010/09/17 v3.07 KOMA-Script document class (article)
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrkbase.sty
Package: scrkbase 2010/09/17 v3.07 KOMA-Script package (KOMA-Script-dependent b
asics and keyval usage)

(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrbase.sty
Package: scrbase 2010/09/17 v3.07 KOMA-Script package (KOMA-Script-independent 
basics and keyval usage)

("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
\KV@toks@=\toks14
)
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrlfile.sty
Package: scrlfile 2009/03/25 v3.03 KOMA-Script package (loading files)

Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

)))
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\tocbasic.sty
Package: tocbasic 2010/09/14 v3.06a KOMA-Script package (handling toc-files)
)
Package tocbasic Info: omitting babel extension for `toc'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `toc' on input line 115.
Package tocbasic Info: omitting babel extension for `lof'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lof' on input line 116.
Package tocbasic Info: omitting babel extension for `lot'
(tocbasic)             because of feature `nobabel' available
(tocbasic)             for `lot' on input line 117.
Package scrartcl Info: You've used obsolete option `12pt'.
(scrartcl)             \KOMAExecuteOptions{fontsize=12pt} will be
(scrartcl)             used instead.
(scrartcl)             You may simply replace `12pt'
(scrartcl)             by `fontsize=12pt'.
Class scrartcl Info: File `scrsize12pt.clo' used to setup font sizes on input l
ine 1210.

(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\scrsize12pt.c
lo
File: scrsize12pt.clo 2010/09/17 v3.07 KOMA-Script font size class option (12pt
)
)
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\koma-script\typearea.sty
Package: typearea 2010/09/17 v3.07 KOMA-Script package (type area)

Package typearea, 2010/09/17 v3.07 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

\ta@bcor=\skip41
\ta@div=\count79
Package typearea Info: You've used standard option `a4paper'.
(typearea)             This is correct!
(typearea)             Internally I'm using `paper=a4'.
(typearea)             If you'd like to set the option with \KOMAoptions,
(typearea)             you'd have to use `paper=a4' there
(typearea)             instead of `a4paper', too.
\ta@hblk=\skip42
\ta@vblk=\skip43
\ta@temp=\skip44
Package typearea Info: These are the values describing the layout:
(typearea)             DIV  = 12
(typearea)             BCOR = 0.0pt
(typearea)             \paperwidth      = 597.50793pt
(typearea)              \textwidth      = 448.13095pt
(typearea)              DIV departure   = -6%
(typearea)              \evensidemargin = 2.4185pt
(typearea)              \oddsidemargin  = 2.4185pt
(typearea)             \paperheight     = 845.04694pt
(typearea)              \textheight     = 635.5pt
(typearea)              \topmargin      = -41.72441pt
(typearea)              \headheight     = 18.125pt
(typearea)              \headsep        = 21.75pt
(typearea)              \topskip        = 12.0pt
(typearea)              \footskip       = 50.75pt
(typearea)              \baselineskip   = 14.5pt
(typearea)              on input line 1134.
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\abovecaptionskip=\skip45
\belowcaptionskip=\skip46
\c@pti@nb@sid@b@x=\box26
\c@figure=\count86
\c@table=\count87
\bibindent=\dimen102
) ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.sty"
Package: babel 2008/07/06 v3.8l The Babel package

*************************************
* Local config file bblopts.cfg used
*
(C:\Users\Tobias\AppData\Roaming\MiKTeX\2.9\tex\latex\arabi\bblopts.cfg
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
 babel
)
("C:\Program Files\MiKTeX 2.9\tex\generic\babel\ngermanb.ldf"
Language: ngermanb 2008/07/06 v2.6n new German support from the babel system

("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def"
File: babel.def 2008/07/06 v3.8l Babel common definitions
\babel@savecnt=\count88
\U@D=\dimen103
)
\l@naustrian = a dialect from \language\l@ngerman 
Package babel Info: Making " an active character on input line 92.
))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\fontenc.sty"
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1enc.def"
File: t1enc.def 2005/09/27 v1.99g Standard LaTeX file
LaTeX Font Info:    Redeclaring font encoding T1 on input line 43.
))
("C:\Program Files\MiKTeX 2.9\tex\latex\base\inputenc.sty"
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks15
\inpenc@posthook=\toks16

("C:\Program Files\MiKTeX 2.9\tex\latex\base\latin1.def"
File: latin1.def 2008/03/30 v1.1d Input encoding file
))
(C:\Users\Tobias\Desktop\Arbeit\Arbeit\Arbeit.aux)
LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 13.
LaTeX Font Info:    ... okay on input line 13.
LaTeX Font Info:    Try loading font information for T1+cmss on input line 15.

("C:\Program Files\MiKTeX 2.9\tex\latex\base\t1cmss.fd"
File: t1cmss.fd 1999/05/25 v2.5h Standard LaTeX font definitions
)
(C:\Users\Tobias\Desktop\Arbeit\Arbeit\Arbeit.toc)
\tf@toc=\write3

! Undefined control sequence.
<argument> \Theo 
                 \Theo .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo \Theo 
                       .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo 
                 \Theo .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo \Theo 
                       .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo 
                 \Theo .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo \Theo 
                       .tex
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo 
                 \Theo .tex-@before
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo \Theo 
                       .tex-@before
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

("C:\Program Files\MiKTeX 2.9\tex\latex\tools\.tex" File ignored)
! Undefined control sequence.
<argument> \Theo 
                 \Theo .tex-@after
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

! Undefined control sequence.
<argument> \Theo \Theo 
                       .tex-@after
l.16 \input{\Theo\Theo.tex}
                           
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

[1

] (C:\Users\Tobias\Desktop\Arbeit\Arbeit\Arbeit.aux) ) 
Here is how much of TeX's memory you used:
 1809 strings out of 494054
 26093 string characters out of 3148624
 97884 words of memory out of 3000000
 5124 multiletter control sequences out of 15000+200000
 7006 words of font info for 19 fonts, out of 3000000 for 9000
 715 hyphenation exceptions out of 8191
 37i,6n,43p,247b,148s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on Arbeit.dvi (1 page, 292 bytes).
kiste Auf diesen Beitrag antworten »

Mein Tipp bleibt derselbe auch wenn du es mit input statt include machst.
Vieta Auf diesen Beitrag antworten »

Zitat:
Original von kiste
Mein Tipp bleibt derselbe auch wenn du es mit input statt include machst.


Habe ich auch schon probiert. Das zusätzlich angehängt .tex liefert mir zwei zusätzliche Fehler. Ich werde den ganzen Ordner mal an einen Kumpanen schicken und mich dann wieder melden.
 
 
kiste Auf diesen Beitrag antworten »

Das war nicht die einzige Änderung, die \ wurden auch durch / ersetzt!
Vieta Auf diesen Beitrag antworten »

Mit \input{./Theo/Theo} konnte ich einen fehlerfreien Durchlauf erzeugen.

Dabei müssen die Schrägstriche in der richtigen Richtung angeordnet sein und der Punkt vor dem Ordner darf nicht fehlen. Ob man an die Datei ein .tex dranhängt oder nicht, ist egal.

Dankeschön an alle smile
Calvin Auf diesen Beitrag antworten »

Der Punkt steht für das aktuelle Verzeichnis. Es ginge auch \input{Theo/Theo}
Neue Frage »
Antworten »



Verwandte Themen

Die Beliebtesten »
Die Größten »
Die Neuesten »