I'm writing a LaTeX document and everything works fine, but as I try to split the document chapters in different .tex files, I receive several errors related to the characters in the document (and with the encoding, I suppose). In the document I use a lot of accented letters with direct insertion, such as ì or è. I used


to let this work and it do work as long as the chapter are all together in the main file. But as I try to copy the first chapter in a separate file and use \input or \include in the main file, I get a series of errors related to the characters. Why does that happens?

  • What gives you the error: some latex processor ? which one ? or you editing environment / syntax checker ? And please don't refer to errors without actually specifying them here. – arkascha Jul 28 '12 at 9:12
  • You can use \include only at the top level. Any nesting of \include isn't allowed. – Marco Daniel Jul 28 '12 at 11:24
  • no I receive errors when I compile the .tex file, errors such as "Missing $ inserted" when it founds an "ì", or "Package inputenc Error: Keyboard character used is undefined in inputencoding 'latin1'" when it founds "È", ecc... The problem is that I do not get these errors if I just directly write the chapter content instead of using \input – Tommy39 Jul 28 '12 at 12:00

Obviously the new files you are trying to input are not latin1 encoded. Probably you/your editor chose utf8 as encoding for them. Either reencode the file to latin1 or tell LaTeX that the files use another encoding by loading the utf8-definitions and adding \inputencoding{utf8} at the start of the file:


\input{....} %utf8 encoded file 

\inputencoding{latin1} %back to latin1 

| improve this answer | |
  • whoa, it worked just perfect! it seems like it was actually the problem! thanks a lot dude :D – Tommy39 Jul 28 '12 at 16:35

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.