1

It has been two years since I have started using Latex (on a Mac), and up to now I have written my text without worrying about the possible output (as if it was a WYSIWYG), and at the moment of compiling, I searched all the accented characters and replaced them. It is boring and decided to reattack the problem.

So here is my input (the encoding is in UTF-8):

\documentclass[a4paper,11pt]{book}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} 

\begin{document}
Cet été, dans une forêt française, j’ai ouï un très grand cri.
\end{document}

And the output is:

Undefined control sequence ...

(followed by the text where the accented (+cedille) characters are replaced by their unicode name). I have updated TexShop, tried all the possible compatible pairings of encoding and option of inputenc (isolatin, applemac) without success, and I don't understand where the problem could came from.

Does someone have any idea? Thank you very much in advance.

faero
  • 11
  • 3
    Welcome to TeX.SX! Your example runs for me. Are you sure your editor is using utf8 actually? –  Feb 14 '16 at 16:26
  • 4
    Please when showing error messages always show the exact multi-line message from ! to ? hard to debug when only show a fragment of the message. I would guess that your file is not saved in UTF-8 format. – David Carlisle Feb 14 '16 at 16:33
  • 2
    The short MWE in your question works absolutely fine for me. Make sure your document is really encoded in UTF-8. Maybe an update of your TeX distribution might help. – moewe Feb 14 '16 at 16:35
  • In german, but the pictures should help anyway: http://texwelt.de/wissen/fragen/2656/wie-uberprufe-ich-die-standardeingabekodierung-in-meinem-editor – Johannes_B Feb 14 '16 at 16:46
  • 4
    In a terminal you can do file filename.tex and the output tells you what encoding your file was saved with. – Johannes_B Feb 14 '16 at 16:47
  • 2
    The default file saving format for TeXShop is (unfortunately) MacRoman. So you need to change your TeXShop preferences to save files as UTF-8. For existing files you can open them and the use Save As (which for recent OS versions is option-Save) and then choose UTF-8 as the encoding for the resaved file. – Alan Munn Feb 14 '16 at 17:05
  • Many comments! Thank you! I don't know what else I could do in TexShop, except choosing UTF8 in the preferences and at the moment I save the file. I provide you with screenshots of : the preferences, the encoding of the file and the console printing the errors. http://imgur.com/L5n7elV http://imgur.com/3BzMDh9 http://imgur.com/VsWBU6j – faero Feb 14 '16 at 17:37
  • Show the log-file. – Ulrike Fischer Feb 14 '16 at 17:43
  • Here it is : https://dl.dropboxusercontent.com/u/27592511/Untitled1.log – faero Feb 14 '16 at 17:48
  • It stops before the error. Don't kill latex, end it by hitting "x" and "enter". – Ulrike Fischer Feb 14 '16 at 18:00
  • I uploaded the new version : https://dl.dropboxusercontent.com/u/27592511/Untitled1.log – faero Feb 14 '16 at 21:04
  • 1
    TeXshop converts internally your input and inserts commands like Cet \UTF {00E9}. Deactivate this "feature", see http://tex.stackexchange.com/questions/193872/texshop-diacritic-encoding and http://tex.stackexchange.com/questions/292904/rendering-a-unicode-en-dash-in-xelatex – Ulrike Fischer Feb 14 '16 at 21:53
  • Indeed the box was checked, but even unchecked, the problem remains. – faero Feb 14 '16 at 22:52
  • You may have to rid your code of the garbage which was previously inserted. To check your settings are correct, copy the code from your question into a new .tex file. If you still get an error, post the lot in your question. (Not on an external site.) – cfr Feb 15 '16 at 03:20
  • Probably you can open and save-as existing files to correct the encoding. – cfr Feb 15 '16 at 03:22

0 Answers0