7

I'm using natbib and bibtex, typesetting a document in Russian (with pdflatex) in chicago. For an entry like this:

@book{belyj1913,
Address = {Москва},
Author = {Андрей Белый},
Publisher = {Наука},
Title = {Петербург},
Year = {1981}}

while running it I get:

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

See the inputenc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.47 Белый, �.
                (1981).

And the first name's initial does not appear in the pdf.

The problem disappears if I use plainnat, which puts full first names in. However, I love certain things about chicago, and I wonder if this initials extraction problem can be overcome.

I use babel for Cyrillic, here's an excerpt from the preamble:

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
...
\usepackage{natbib}
\bibpunct[:]{(}{)}{;}{a}{}{,}

Latin references work just fine. Other local features, like hyphenation, work too.

The discussion in Cyrillic bibliographic entry using Biblatex and Polyglossia (initials broken) is for biblatex and polyglossia, neither of which I'm using.

  • What \bibliographystyle are you using? The problem seems to lie in the extraction of the initial. – egreg Jun 7 '14 at 20:02
  • I'm using chicago. Tried apa also, with no improvement. – Ivan Kapitonov Jun 8 '14 at 7:34
  • @egreg Yes, the contrast is between chicago (fails) and plainnat (works). I made an edit to the post. So can the extraction problem be helped? – Ivan Kapitonov Jun 8 '14 at 14:36
7

BibTeX is not really suited for UTF-8 encoding. In many cases it works, but it will definitely have problems with extraction of initials, because, for example, a Cyrillic ‘А’ is two bytes (0xD090) and only the first byte is selected.

You can work around this by using the internal representation of the Cyrillic letter:

@book{belyj1913,
  Address = {Москва},
  Author = {{\CYRA}ндрей Белый},
  Publisher = {Наука},
  Title = {Петербург},
  Year = {1981},
}

which will work independently whether only initials or full names are used.

However, sorting by author names is not really guaranteed to be correct. You should try biblatex and biber, which are UTF-8 compliant.

  • Thank you! That works. It's been a long time I'm thinking about switching to either of those, now I have another argument. – Ivan Kapitonov Jun 9 '14 at 7:39
  • I have the same problem just with a different Cyrillic letter. Is there a list of internal representation of the Cyrillic letters somewhere for reference? tex.stackexchange.com/questions/434986/… – user3780514 Jun 5 '18 at 16:29
  • @user3780514 You can look for the t2aenc.def file on your system. – egreg Jun 5 '18 at 16:35
3

For me, BibTeX works with natbib and russian by using UTF-8 compatible version of bibtex. Just run bibtexu instead of bibtex and it should work.

  • 1
    Thanks for the tip. I went into the command of TexMaker and made the change. It seems to have worked. Only now there are errors when compiling the .bib file. The output seems fine....Process started The 8-bit codepage and sorting file: 88591lat.csf The top-level auxiliary file: elsarticle-template.aux The style file: elsarticle-num.bst Database file #1: mybibfile.bib 6there is a error: U_ZERO_ERROR6there is a error: U_ZERO_ERROR6there is a error: U_ZERO_ERROR6there is a error: – user3780514 Jun 6 '18 at 14:36
2

For BibTeX, @egreg's answer does not help me, so I would like to leave my solution here:

  1. change encoding of your .bib file (suppose it is called references.bib) to CP-1251

  2. in the .tex file, change \bibliography{references} to

    \inputencoding{cp1251}
    \bibliography{references}
    \inputencoding{utf8}
    
  3. compile .bbl file with

    bibtex8 project.aux --csfile "cp1251.csf"
    

As for me, this is handier than @egreg's solution, since you don't have to change your cyrillic letters to {\cyrA}-like representation.

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.