1

Similar to this example, I am using \usepackage{cite}. Now, I need all my citations are marked by Roman numerals. This is my minimal working example:

\documentclass{article}

\usepackage{cite}
\usepackage{filecontents}
\usepackage{hyperref}


\begin{filecontents}{test.bib}
    @Article{art1,
        author =   {Author, A. N.},
        title =    {Title One},
        journal =  {Journal},
        year =     2000
    }

    @Article{art2,
        author =   {Author, A. N.},
        title =    {Title Two},
        journal =  {Journal},
        year =     2008
    }
\end{filecontents}



\begin{document}

    Refering to second article\cite{art2} and then first article\cite{art1}

    \bibliographystyle{unsrt}
    \bibliography{test}
\end{document}

I have found several questions like this, such as 1, 2, 3; but all of them use biblatex.

How can I do that?

0

1 Answer 1

1

For the bibliography

\renewcommand*{\@biblabel}[1]{[\romannumeral 0#1]}

should work (of course within \makeatletter...\makeatother).

Without hyperref you could use

\renewcommand\citeform[1]{\romannumeral 0#1}

for the citations as suggested in the cite manual. Unfortunately, hyperref turns the argument of \citeform into an unexpandable link, so the formatting can't be applied at this late stage. With hyperref interfering I could get things to work by redefining \bibcite.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{cite}
\usepackage{filecontents}
\usepackage{hyperref}

\makeatletter
\def\bibcite#1#2{%
  \@newl@bel{b}{#1\@extra@binfo}{%
    \hyper@@link[cite]{}{cite.#1\@extra@b@citeb}{\romannumeral 0#2}%
  }%
}
\renewcommand*{\@biblabel}[1]{[\romannumeral 0#1]}
\makeatother

\begin{filecontents}{\jobname.bib}
@Article{art1,
  author  = {Author, A. N.},
  title   = {Title One},
  journal = {Journal},
  year    = 2000
}

@Article{art2,
  author  = {Author, A. N.},
  title   = {Title Two},
  journal = {Journal},
  year    = 2008
}
\end{filecontents}


\begin{document}
  Refering to second article\cite{art2} and then first article\cite{art1}

  \bibliographystyle{unsrt}
  \bibliography{\jobname}
\end{document}

As the eagle-eyed will have spotted the margin is off because the margin width calculation is done on the BibTeX side assuming arabic numerals.

Citations and bibliography show the number in lowercase Roman numerals.


The llncs.cls class you use redefines \@biblabel directly in its definition of thebibliography, we can only counter this by redefining the entire environment

\makeatletter
\renewenvironment{thebibliography}[1]
     {\section*{\refname}
      \renewcommand*{\@biblabel}[1]{[\romannumeral 0##1]}%
      \small
      \list{\@biblabel{\@arabic\c@enumiv}}%
           {\settowidth\labelwidth{\@biblabel{#1}}%
            \leftmargin\labelwidth
            \advance\leftmargin\labelsep
            \if@openbib
              \advance\leftmargin\bibindent
              \itemindent -\bibindent
              \listparindent \itemindent
              \parsep \z@
            \fi
            \usecounter{enumiv}%
            \let\p@enumiv\@empty
            \renewcommand\theenumiv{\@arabic\c@enumiv}}%
      \if@openbib
        \renewcommand\newblock{\par}%
      \else
        \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
      \fi
      \sloppy\clubpenalty4000\widowpenalty4000%
      \sfcode`\.=\@m}
     {\def\@noitemerr
       {\@latex@warning{Empty `thebibliography' environment}}%
      \endlist}
\makeatother
4
  • In the References, the bib items are still coming in Arabic. I am using splncs_src.bst [github.com/tvcutsem/es-lab/blob/master/doc/esop13/… with llncs. May be, that is causing the problem.
    – hola
    Sep 27, 2018 at 16:07
  • @pushpen.paul Where can I get llncs.cls? This should be caused by the document class and not by the .bst file?
    – moewe
    Sep 27, 2018 at 16:09
  • @pushpen.paul I have edited the answer with a workaround for llncs.cls from springer.com/de/it-informatik/lncs/…
    – moewe
    Sep 27, 2018 at 16:16
  • It took me half an hour figuring this. In a nutshell, if you don't use hyperref, use \renewcommand*{\@biblabel}[1]{[\romannumeral 0#1]} AND \renewcommand\citeform[1]{\romannumeral 0#1}. If you use hyperref, look at the complete code.
    – Gqqnbig
    Feb 28, 2022 at 13:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .