In the answers to this question, it is explained how "Ref." can automatically be added before any citation. However, I would like to have an automatic "Ref." or "Refs." depending on whether I \cite
one reference or more than one reference, respectively. Is there any way to achieve this?
A simple example:
\documentclass{report}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
% This is what I would like to achieve without manually adding "Ref.~" and "Refs.~":
This is a reference: Ref.~\cite{biba}
These are two references: Refs.~\cite{biba,bibb}
\begin{thebibliography}{}
\bibitem{biba}
Entry 1
\bibitem{bibb}
Entry 2
\end{thebibliography}
\end{document}
The output document reads:
This is a reference: Ref. [1] These are two references: Refs. [1,2]
I would like to achieve exactly this result, but without manually having to add "Ref.~" or "Refs.~" before every citation.
Ideally, I would prefer a solution without biblatex
.
natbib
or any other non-biblatex
package related to\cite
?