I have a problem with the following character
ẽ: e with tilde
I am using UTF-8 encoding and I get the following error
! Package inputenc Error: Unicode char \u8:ẽ not set up for use with LaTeX.
I am aware of this solution: \~e
but the problem is that the ẽ
that concerns me is the name of an author that is inside a bibtex that is automatically generated by mendeley…
I could, however, modify it in mendeley and cahnge ẽ
for \~e
, but is not a very elegant solution…
Anyway, I can let go this and simply replace it for e
if there is no solution. I am just curious as to why UTF-8 does not handle this? I thougth UTF-8 handled every possible character.
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
This does not work: ẽ
This works: \~e
\end{document}
Best Answer
The range of Unicode characters is quite large. Therefore
utf8.def
limits itself to the characters that can be displayed using one of the font encodings that are loaded. The disadvantage that some characters, that can be constructed via accents can slip through. Therefore\DeclareUnicodeCharacter
allows to add these characters:Addition (see egreg's comment):
Package
newunicodechar
provides\newunicodechar
that declares the character without specifying its explicit code number:Also version 1.3 of package
selinput
(updated on CTAN with next bundle release,.dtx
is attached and the.sty
file extracted by running plaintex
on the.dtx
file) provides this feature via\DeclareInputUnicodeChar
. The following example adds a key value interface for setting the Unicode characters, making it easier to type, if lots of additional Unicode character declarations are needed:The new version 1.12 of
inputenx
will add support for these characters by