6

I've a problem with one of my literature entrys. The author name is Itō with the macron letter ō. The corresponding Latex-Code would be \={o}, but I know that Biblatex has a special issue with the parenthesis, so that the right code should be {\=o}, but it doesn't work. However, if I change the code for sake of demonstration into {\"o} then I generate the umlaut ö, what I expected. So, umlauts works but macrons did not.

The error is

Package inputenc Error: Unicode char \u8:ō not set up for use with LaTeX. \end

Here is a minimal example (encoded in utf-8)

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}

\bibliography{literature.bib}

\begin{document}
  It\={o} \cite{ito1944}
  \printbibliography
\end{document}

The literature.bib file contains

@Article{ito1944,
  Author = {It{\=o}, K.}
}
  • If I delete the line \usepackage[utf8]{inputenc} the error disappears, but the literature entry is still wrong, because the macron letter is missing. – Daniel Stahl Dec 12 '15 at 23:02
  • 3
    It works in latex release 2016/01/01 but if you can't wait for that add \DeclareUnicodeCharacter{014D}{\=o} after inputenc – David Carlisle Dec 12 '15 at 23:03
  • @DavidCarlisle - So, is this an out-and-out bug in (pdf)LaTeX that the OP has stumbled over? (His example compiles fine under LuaLaTeX is the fontspec package is loaded (and, of course, inputenc and fontenc are not loaded). – Mico Dec 12 '15 at 23:09
  • @Mico no. Not a bug at all. – David Carlisle Dec 12 '15 at 23:09
  • 3
    @Mico the inputenc utf8 option can in principle be used to define pdftex compatible behaviour for any unicode character but as documented it does not do every character for space reasons, if you use other characters you need to define them, which is what the error says. last century space reasons meant that the initial set was restricted to the pre-composed characters in T1 encoding (so no \=o) but just the other day we decided that more space was available and I added all the accented latin characters that I could plausibly construct for the 2016 release – David Carlisle Dec 12 '15 at 23:15
7

Letters like ō were one of the reasons why I wrote newunicodechar: a friend of mine was tired of typing \={o} or \u{o} when writing prosodic marks in Latin.

\begin{filecontents*}{\jobname.bib}
@Article{ito1944,
  Author = {It{\=o}, K.},
  title = {Title},
  journal = {Journal},
  year = 2015,
}
\end{filecontents*}
\documentclass{scrartcl} % to get the output in one page

\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\usepackage{newunicodechar}

\newunicodechar{ō}{\=o}

\addbibresource{\jobname.bib}

\begin{document}

It\={o} Itō \cite{ito1944}

\printbibliography

\end{document}

enter image description here

This may become unnecessary in a future release of LaTeX.

Note that

\DeclareUnicodeCharacter{014D}{\=o}

is fully equivalent to \newunicodechar{ō}{\=o} (which however doesn't require looking up the entry in the Unicode table).

  • what do you mean by "a future version of LateX"? This will be "hard-coded" somewhere? – pluton Dec 12 '15 at 23:40
  • @pluton As David Carlisle says in a comment to the question, some new character equivalents will be added in the next release (not version). – egreg Dec 12 '15 at 23:42

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.