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?

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
| improve this answer | |

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.