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'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?

share|improve this question

migrated from stackoverflow.com Jul 28 '12 at 11:21

This question came from our site for professional and enthusiast programmers.

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
up vote 4 down vote accepted

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 

share|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 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.