Montag, 15. April 2024
{\'\i}
Sometimes LaTeX is an asshole. This time I had a very reluctant error in my source. I kept getting this message:

> Package inputenc Error: Unicode character ́ (U+0301)

It means there is an illegal character. It had to be either the .tex file or the .bib one. I found these tips how to locate it.

With this command I found a few illegal characters

> cat filename | grep -n -P "[^|a-zA-Z\{\}\s%\./\-:;,0-9@=\\\\\"'\(\)_~\$\!&\`\?+#\^<>\[\]\*]"

but the same error message continued to inhebit the compilation.

With a bit more of experimenting I was sure it had to be the bibliography - but I simply could not find any remaining invalid character.

It took me a while until I checked the .bbl file. It contained many special characters which were introduced by biber (essentially diacritic/accents) - but there were also two instances of unicode 0301. The person from whom I received the source used

> \'\i instead of \'i

to generate an accent on an i. I could not find it because the code itself generated the illegal character.

To make things worse, overleaf seems to filter out such issues. The person writing the source compiled on overleaf - but locally it did not work.


Update (17.4.2024): It seems like people copy bibtex-entries from google-scholar and it creates these \'\i which in my oppinion are not good latex. Could some please clarify.