I'm writing up a paper in number theory, and there are a few number theorists from India whose work is relevant to it, and which I would hence like to reference to. Yet, even though I've managed to enable the Devanagari script by switching to the XeLaTeX enginge, I've been unable to make BibTeX get the initials right.

I've been able to make it work for the cyrillic script by using the xecyr package. So there has to be a way. I'd be grateful for a hint.

EDIT: I can't get Biber to work, so I'd be very interested in understanding the techniques used in xecyr.

And here is a bit of sample code:

    author = "\hi{श्रीनिवास} \hi{ऱामानूजन}",
    series = "Notebooks",
    volume = 4,
    year = 1920

along with


and the "alpha" bibliography style.

  • can't you use biblatex? – Ulrike Fischer May 30 at 16:07
  • I had been unaware of biblatex, but it might certainly work. I'll try it now. – AlgebraicsAnonymous May 30 at 16:25
  • Apparently, I can't make it work on my computer. So I'd be very interested in an alternative. – AlgebraicsAnonymous May 30 at 16:42
  • sorry but you didn't provide any code for testing. – Ulrike Fischer May 30 at 16:44
  • 3
    this is not something I can run directly and I have neither the time nor the will to extend this to a full document. – Ulrike Fischer May 30 at 16:54

Not an answer.

I do not know the "alpha" style.

There is nothing special about xecyr: it just uses the usual Unicode-aware packages and compilation method.

xecyr works by using (1) the article documentclass: (2) the packages polyglossia, fontspec, and natbib; (3) a font with Cyrillic glyphs: (4) and compiling with xelatex.

See the file rubibtex-ex-x.tex in the xecyr document folder. (Do texdoc xecyr for documentation.)

Swapping over to package biblatex instead of natbib required changing 3 lines of code in a 7-codeline file.

So: mapping the changes to Hindi (and making Russian not the main language any more) gives:


I put a title= field in, to show its location, borrowed a Russian bibentry from another question for comparison, and arbitrarily selected an authortitle style (initials can be set via the package options - see the manual).

Biblatex also auto-detects language settings from polyglossia and from babel, so hard-coding font switching in is not required.

This can be used as the starting point of your question, if you like.

If you use bibtex with its lack of ability, you will quickly find (if I may call it so) a "plethora" of convolutions waiting to greet you.

Whichever process you chose as the optimal path to the solution for your requirements, either bibtex or biblatex, will depend on constraints that you have not (yet) surfaced to anyone in a position to help.


    author = {श्रीनिवास ऱामानूजन},
    title={no title},
    series = {Notebooks},
    volume = {4},
    date = {1920},
address = {Санкт-Петербугр},
author = {Баранов, Николай А},
title = {{Эволюция взглядов}},
year = {2001},
%  hyphenation={russian},



\setmainfont{Noto Serif}
\newfontfamily\russianfont{Noto Serif}

\setotherlanguages{hindi, russian}



Text text \parencite[14]{ramanujan} and \parencite[pp 15-16]{Baranov2001}.

| improve this answer | |
  • The styles are named differently in BibTeX and BibLaTeX. What I use corresponds to "alphabetic" in BibLaTex. (I'll now go though your answer and see if the information there can make me resolve the issue.) – AlgebraicsAnonymous Jun 1 at 17:16
  • I now believe that the "problem" is that I need to change the language in order to display the glyphs. Luckily, my font does support the Cyrillic alphabet, because I shall have the occasion to reference a Russian paper as well (as I indicated in my post). Yet, it does not support Devanagari. Thus, if I had the ability to put everything into a single font, I might be successful. The thing is: I wouldn't want to use the Noto font, because I quite like the Gentium font that I'm using at this moment. – AlgebraicsAnonymous Jun 1 at 17:19
  • By the way, do I understand you correctly if I assume that all that xecyr does when processing a command like "\cyra" is to replace it by the unicode sign it's supposed to represent? – AlgebraicsAnonymous Jun 1 at 17:26
  • I've tried to emulate this, but now my XeLaTeX compiler says that there was a "forbidden control sequence" in my bibitem. Now the question would be: Why are the Russian glyphs allowed, but my own forbidden? – AlgebraicsAnonymous Jun 1 at 17:35
  • 1
    @AlgebraicsAnonymous xecyr.sty provides babel definitions and loads xunicode package, then defines macros: %%% Cyrillic letters defined as a continuous stretch %%% in Unicode and most common 8-bit encodings which define them: \DeclareUTFcharacter[\UTFencname]{x0410}{\CYRA} % А \DeclareUTFcharacter[\UTFencname]{x0430}{\cyra} % а etc. It is much easier these days to type in directly абвгकखगघ and use unicode fonts. natbib is from 1993-2010, which explains why xecyr was using it in the example files. biiblatex is a complete re-write of the citation/bib mechanism. – Cicada Jun 2 at 7:39

The issue has been resolved by doing the following two things:

A) Using the answer given in

How can I use ucharclasses to change the font for a special script and then restore to what it was before?

EXCEPT for the important amendment that [Script=Devanagari] was added to the "hindifont" line


B) Emulating the xecyr package by using the commands



along with

    author = "{\desha}{\decon}{\dera}{\deii}\hi{निवास} {\derha}{\dea}{\dem}\hi{नूजन}",
    series = "Notebooks",
    volume = 4,
    year = 1920

Thanks a lot to @JavierBezos and all the others who helped clarifying the issue, including @Cicada and @moewe.

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.