I'm getting this problem and I can't find a fix for it. Tried searching but still couldn't find a solution. Here's how the file begins:

% !TEX encoding = UTF-8 Unicode


I've added the first 3 "usepackages" because I'm writing in portuguese and need the "´~`" symbols and I keep getting the "LaTeX Error: Option clash for package inputenc".

How can I fix this?

thanks in advance!

  • 4
    you have input inputenc twice with different options, just don't do that. Either your file is in utf8 or the legacy apple encoding, it can not be in both at the same time. – David Carlisle Oct 15 '14 at 22:16
  • Thanks for the fast reply! I removed the apple usepackage, but now I'm getting this "! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX." – Pedro Oct 15 '14 at 22:31
  • For portability, you should stick to utf8 anyway. But don't forget to configure your editor accordingly, for the last problem. Perhaps, also, you now have a mix of both encodings. – Bernard Oct 15 '14 at 22:32
  • Either you are using a character that is not set up by default or, most likely your file is not in utf-8 encoding. make sure your editor is saving the file in utf-8 – David Carlisle Oct 15 '14 at 22:37
  • I'm using TeXshop and I'm selecting utf8, but for some reason it keeps in macosroman.. Do you guys know any good editor for this? – Pedro Oct 15 '14 at 22:41

I faced the same issue (for Portuguese language) and solved as follows:

  1. The reported issue occurred to me only when a non-Latin character appeared in an input TeX file (e.g., chapter1.tex, chapter2.tex, etc.) called in main TeX file (e.g., thesis.tex). Note that for the main TeX file the package \usepackage[latin1]{inputenc} was working properly;
  2. It must be mentioned that I'm using WinEdt 9.0 editor;
  3. So, I set the "document mode" of main file (e.g., thesis.tex) as "TeX" and its "Document Format" as "ANSI - 0 Default ANSI code page";
  4. Similarly, I set the "document mode" of auxiliary files (e.g., chapter1.tex, chapter2.tex, etc.) as "TeX" and their "Document Format" as "ANSI - 0 Default ANSI code page".

In summary: before, each file was configured in different input modes. So, MikTex was unable to compile all them with "latin1" codification. Standardize all files to TeX and ANSI and call the inputenc package just once.

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.