11

I get this error message, during compiling my .tex-document.

line 234 - ! Package inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX.See the inputenc package documentation for explanation.Type H <return> for immediate help.... \cleardoublepage

I am writing my thesis right now and I am very confused about this error message, since it seems to be connected to a special character, which I do not use in my manuscript. The solution up to now was the reloading of an older version of my manuscript...after some hours of work and after several times of successful compiling this error suddenly occurs again. I don't get it why, since I just write some text, add some figures and nothing more...

any suggestions, how I can solve that issue? I have no idea, what kind of MWE I should post here :( where does this comment "line234" refer to. Line 234 is normal text in my manuscript...

  • Check out the comments on this question here. There might be something in there that could solve your issue. In particular using \'e for accented characters. – Flexo013 Jul 24 '18 at 13:31
  • I kind of solved the problem for now by using \DeclareUnicodeCharacter{0301}{\'{e}} before \begin{document}. Well, I am happy about it, but I am still not understand, what the actual problem was. Why do I have to declare some unicode and some not??? – Marius Knapp Jul 24 '18 at 13:48
  • @MariusKnapp That's wrong: U+0301 is a combining character; if you have the combination U+0065 U+0301, your definition would produce . – egreg Jul 24 '18 at 15:02
11

If you copy/paste some source, it may happen that é had been coded as

U+0065 U+0301

which in Unicode aware environments is rendered as expected. Unfortunately pdflatex is not Unicode aware and cannot deal with combining characters, which are placed after the character they refer to.

The only method that gives correct results is to change the combination into the non composed character.

Doing \DeclareUnicodeCharacter{0301}{\'{e}} is wrong. Here's an example:

\documentclass{article}

\DeclareUnicodeCharacter{0301}{\'{e}}

\begin{document}

é % non composed character U+00E9
é % composed character U+0065 U+0301
ú % composed character U+0075 U+0301

\end{document}

enter image description here

You're removing the error message, but the output is completely off.

Note Copying from the above will not show the precomposed characters, because either my OS or this site does normalization.

| improve this answer | |
  • 1
    @MariusKnapp Find the offending characters and retype the correct ones. – egreg Jul 25 '18 at 8:38
  • Use xelatex to complie and works fine. – zack Nov 26 '19 at 17:31
21

I do this:

\DeclareUnicodeCharacter{0301}{*************************************}

and look into the pdf which char produces this and delete/correct it.

| improve this answer | |
  • Excellent method to locate the culprit! :) – Denis Bitouzé Feb 10 at 19:54
  • Works like a charm! – felice Feb 26 at 10:28
  • I don't understand what the asterisks represent? The entire LaTeX source code? – Tom Jun 12 at 15:02
  • The line of asterisks is just here so you can easily find in the resulting pdf where is annoying unicode char... but you can use whatever char you want ;-). – Felix Jun 15 at 7:45
  • This is awesome – Jako Jul 27 at 16:56
-1

Compiling with XeTeX works for me, maybe because it works better with unicode.

Here a found some clarifications.

| improve this answer | |
  • Welcome to TeX.SE! Please do not use a link to an external page, describe in your own words what you think is the solution here. From the accepted answer changing the engine seems not to be a solution here for the OP ... – Mensch Aug 25 '19 at 22:22
  • Ok, thanks for your help. I edited my answer following your advice. – Fredy Gabriel Ramírez V. Aug 26 '19 at 1:31
-1

I had a very similar problem: Error: Unicode char ́ (U+0301)(inputenc) not set up for use with LaTeX …

and it seems the problem was not in my body text but in my .bib file ... I have a citation in the line in which my compilation says I had the mistake, and checking this reference inside the .bib file it had several different accented vowels in curly brackets. I changed the vowel in curly brackets by the corresponding "normal accented" vowel (I mean, with the vowel accented using my keyboard) and the problem went away…

It solved the problem… sorry I am a newby with latex and everything related

| improve this answer | |

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.