8

I use some packages with require utf8. Here is the main file:

\documentclass[a4paper,titlepage]{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=alphabetic]{biblatex}
\addbibresource{refs.bib}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc]
\end{document}

And here is the reference file:

@MISC{Example,
    author = {Author with spec\'{\i}al character},
    title = {Title}
}

I have no issues with composing special characters like \H{o} (ő) or \k{a} (ą). However, when I try to compose \'{\i} (í), I get the following inputenc error: "not set up for use with LaTeX". It seems like double compositions are not allowed. A solution is to use \'{i} instead, but not removing the dot is ugly. Surely there must be a better way?

Note: I have tried to add \DeclareUnicodeCharacter{00ED}{\'{\i}} to the preamble, but it doesn't help either.

10

Since day 1 of LaTeX2e, when the font encoding is T1, one can get “í” with \'i; the same has been possible with OT1 since May 2001; here's the excerpt from ltoutenc.dtx:

%    Here we are adding some more composite commands to the |OT1|
%    encoding.  This makes the use of certain accents with |i|
%    compatible with their use with the |T1| encoding; this
%    enables them to become true \LaTeX{} internal representations.
%    However, it will make these accents work a little less fast since
%    a check will always be made for the existence of a composite.
%
% \changes{v1.93}{2001/05/28}{Added composites for compatibility with
%                             T1, pr/3295}
% \changes{v1.94}{2001/06/05}{Text composite Commands need kludges for
%                               `,' -- see tlb1903.lvt}
%    \begin{macrocode}
\DeclareTextComposite{\.}{OT1}{i}{`\i}
\DeclareTextComposite{\.}{OT1}{\i}{`\i}
\DeclareTextCompositeCommand{\`}{OT1}{i}{\@tabacckludge`\i}
\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
\DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
\DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
%    \end{macrocode}

In the same file we find

\DeclareTextComposite{\'}{T1}{i}{237}
\DeclareTextComposite{\'}{T1}{\i}{237}

(with no particular annotation, so they were present from the beginning).

This means that, since 2001, the input can and should be \'i with any (Latin) font encoding such as OT1 and T1.

Unfortunately, some guides still insist that \'i (or the equivalent but more awkward \'{i}) leave the dot over the ‘i’, which simply isn’t true.

If you change the entry into

@MISC{Example,
    author = {Author with spec\'ial character},
    title = {Title}
}

you'll see that Biber has no problem with it.

If you plan to use the .bib file with BibTeX, remember to use

spec{\'i}al

Since Biber would remove the braces anyway, probably it is best to use this syntax.

  • In newer versions of Biber, no braces are stripped from spec{\'i}al. But of course, unlike BibTeX, Biber does not need the braces for sorting. (I'd actually prefer if Biber stripped the braces, but since braces can also be used to protect from case change the entire business of stripping or not stripping is a bit complicated). – moewe Jan 10 at 14:29
11

This is an issue in Biber: it's turning \'\i into two codepoints, ı and ́, rather than the single codepoint í. (The 'correct' Unicode outcome here is a single í.) As LaTeX says, the combining character is not set up for use: combining chars come out the 'wrong way around' to work the 'LaTeX way'. You have a couple of options if you don't want to use \'i:

  • Input í directly
  • Use the --output-safechars option when running Biber, which will retain the LICR form (\'{\i})

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.