11

I have a document with Cyrillic, English and German. All worked well so far. But now I need a special Character in the bibliography.bib file. Its an \.{E}

If I just put that in there it gives me the following error:

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

Here's a sample code that reproduces that behavior:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsthm,amssymb,amsfonts}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[english,russian,ngerman]{babel}

\usepackage[backend=biber,bibencoding=utf8]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{onebook.bib}
@book{eichenbaum,
author={{\.{E}}jchenbaum},
title={Wie Gogol's \enquote{Mantel} gemacht ist},
}
\end{filecontents}
\addbibresource{onebook.bib}
\nocite{*}

\begin{document}

\.{E}jchenbaum

Гоголь

Münze

\printbibliography

\end{document}

If I put a regular E in that .bib file, I get the following (and correct encoding as I want it outside the bibliography):

without special character in .bib

If I put that \.{E} in the .bib file and I comment out the line: % \usepackage[utf8]{inputenc} Then I get the following:

with special char in .bib file

So the funny thing is, I can get the bibliography interact with my document file at the cost of losing encoding of regular text in there ...

As always, I appreciate any kind of help! Thanks!

  • 2
    \usepackage{newunicodechar} and \newunicodechar{Ė}{\.{E}} should do. – egreg Apr 25 '14 at 15:17
  • Ha! :insane laughter: So fast! So working! Thanks an awful lot! – fourreux Apr 25 '14 at 15:24
  • With XeLaTeX and fontspec (and a font that contains all the glyphs such as Minion Pro) I have no problem to compile. – Bernard Apr 25 '14 at 15:43
  • @ Bernard: I'll try that some day I have more time to look into it. Thanx. – fourreux Apr 25 '14 at 19:41
8

I wrote the newunicodechar just for solving similar problems, due to the fact that the Unicode support of inputenc is limited (but extendable).

You can do in two ways:

  1. Look up in the Unicode table to find that Ė is U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE and add to your preamble

    \DeclareUnicodeCharacter{0116}{\.{E}}
    
  2. Copy the offending character from the terminal output or log file and paste it in the first argument of \newunicodechar:

    \newunicodechar{Ė}{\.{E}}
    

Both ways should solve your problem.

  • Is there a difference between the two of them? – fourreux Apr 25 '14 at 15:37
  • @fourreux No, I just find the second way more readable. – egreg Apr 25 '14 at 15:43

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.