1

I take MWE from here Sort bibliography with same author and same year (biblatex)

\documentclass{article}
\usepackage{filecontents}
\usepackage[style=authoryear,sorting=nyt]{biblatex}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1972a,
AUTHOR = "John Lennon",
TITLE = "My music",
YEAR = "1972"}
@BOOK{lennon1972b,
AUTHOR = "John Lennon",
TITLE = "More of my music",
YEAR = "1972"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cites{lennon1972a}{lennon1972b}
\printbibliography
\end{document}

Is it possible to change 'a'...'b' to another alphabet for a given language alphabet? Let Say to Roman numbering

EDITED:

According to answer below I changed code as folllow:

\documentclass{article}
\usepackage{filecontents}
\usepackage{fontspec}
 \defaultfontfeatures{Ligatures=TeX}
\usepackage[russian]{babel}
\usepackage[style=authoryear,sorting=nyt]{biblatex}
\setmainfont{Dejavu Serif}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1972a,
AUTHOR = "John Lennon",
TITLE = "My music",
YEAR = "1972"}
@BOOK{lennon1972b,
AUTHOR = "John Lennon",
TITLE = "More of my music",
YEAR = "1972"}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
  \iffieldnums{labelyear}
 {\Asbuk{#1}}
{\mkbibparens{\Asbuk{#1}}}}
\usepackage{enumitem}
% Some other packages, not needed for MWE
 \AddEnumerateCounter{\Asbuk}{\@Asbuk}{Ы}
 \AddEnumerateCounter{\asbuk}{\@asbuk}{ы}
\renewcommand{\theenumi}{(\Asbuk{enumi})}
\renewcommand{\labelenumi}{\Asbuk{enumi})}
\begin{document}
\begin{enumerate}
\item Item A
\item Item B
\end{enumerate}
\cites{lennon1972a}{lennon1972b}
\printbibliography
\end{document}

As you can see Russian letters are outputed for enumitems, but there is an error for biblatex part

2

The extrayear field is just a number that you can format as you want.

The default definition (biblatex.def) is

\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
  \iffieldnums{labelyear}
    {\mknumalph{#1}}
    {\mkbibparens{\mknumalph{#1}}}}

For Roman numerals you can make that read

\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
  \iffieldnums{labelyear}
    {\Rn{#1}}
    {\mkbibparens{\Rn{#1}}}}

or \RN for uppercase Roman numerals instead of \Rn.

For Russian labels as printed by \asbuk we need \russian@alph

\makeatletter
\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
  \iffieldnums{labelyear}
    {\russian@alph{#1}}
    {\mkbibparens{\russian@alph{#1}}}}
\makeatother

(note the \makeatletter/\makeatother pair).

MWE

\documentclass{article}
\usepackage{filecontents}
\usepackage[style=authoryear,sorting=nyt]{biblatex}
\begin{filecontents}{\jobname.bib}
@BOOK{lennon1972a,
AUTHOR = "John Lennon",
TITLE = "My music",
YEAR = "1972"}
@BOOK{lennon1972b,
AUTHOR = "John Lennon",
TITLE = "More of my music",
YEAR = "1972"}
\end{filecontents}
\addbibresource{\jobname.bib}


\DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a'
  \iffieldnums{labelyear}
    {\Rn{#1}}
    {\mkbibparens{\Rn{#1}}}}

\begin{document}
\cites{lennon1972a}{lennon1972b}
\printbibliography
\end{document}
  • so just \Roman does not work right? see udated question – Levan Shoshiashvili Jan 26 '16 at 17:26
  • @LevanShoshiashvili As far as I can see, \Roman takes a counter (name) as argument, but we need a macro that can directly take a number. That is why I used \RN. – moewe Jan 26 '16 at 17:30
  • @LevanShoshiashvili One just needs to identify the function that actually creates the output from the numbers, in this case it is \russian@alph (or \russian@Alph). Try \makeatletter \DeclareFieldFormat{extrayear}{% = the 'a' in 'Jones 1995a' \iffieldnums{labelyear} {\russian@alph{#1}} {\mkbibparens{\russian@alph{#1}}}} \makeatother – moewe Jan 26 '16 at 17:35
  • Thank you very much...That works...How to define something like '\romannumeral' is different question....Can you give direction for this? – Levan Shoshiashvili Jan 26 '16 at 17:46
  • @LevanShoshiashvili I have added the comment to the answer. Those commands are pretty much straightforward, you might be able to find something on this site. (If not, feel free to ask a new question.) Or just have a look at the definition in russian.ldf. – moewe Jan 26 '16 at 17:49

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.