- Questo topic ha 4 risposte, 4 partecipanti ed è stato aggiornato l'ultima volta 16 anni, 9 mesi fa da .
-
Topic
-
Salve a tutti,
sto scrivendo una documentazione per un’azienda in Latex. Il documento iniziando ad essere molto lungo ho pensato di spezzarlo in piu’ parti con l’uso dei comandi include o input.
Per capire come funzionano questi comandi ho fatto una prova a parte con due semplici file: quello principale (ciao1) e quello da inserire (ciao2).IL CODICE DI CIAO1 E’:
\documentclass[a4paper, 11pt]{report}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}\begin{document}
\include{ciao2}
\end{document}
IL CODICE DI CIAO2 E’:
\documentclass[a4paper, 11pt]{report}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}\begin{document}
Testo da inserire
\end{document}
Il compilatore da questo errore:
This is e-TeX, Version 3.141592-2.2 (MiKTeX 2.4)
entering extended mode
(ciao1.tex
LaTeX2e <2003/12/01>
Babeland hyphenation patterns for english, dumylang, nohyphenation, ge
rman, ngerman, french, loaded.
(C:\texmf\tex\latex\base\report.cls
Document Class: report 2004/02/16 v1.4f Standard LaTeX document class
(C:\texmf\tex\latex\base\size11.clo)) (C:\texmf\tex\latex\base\inputenc.sty
(C:\texmf\tex\latex\base\latin1.def)) (C:\texmf\tex\generic\babel\babel.sty
(C:\texmf\tex\generic\babel\italian.ldf (C:\texmf\tex\generic\babel\babel.def)Package babel Warning: No hyphenation patterns were loaded for
(babel) the language `Italian’
(babel) I will use the patterns loaded for \language=0 instead.)) (ciao1.aux (ciao2.aux)) (C:\texmf\tex\generic\babel\lgrcmr.fd) (ciao2.tex
! LaTeX Error: Can be used only in preamble.
See the LaTeX manual or LaTeX Companion for explanation.
Type Hfor immediate help.
…l.1 \documentclass
[a4paper, 11pt]{report}
?Mi potete aiutare a risolvere questo errore del compilatore (WinEdt) ?
Grazie
Ps: nel forum ho trovato altre discussioni che trattavano di input e include ma non sono riuscito a risolvere ugualmente il problema.
- Devi essere connesso per rispondere a questo topic.