How to add a letter before the number of citation in the text?
2,172
Redefine \@bibitem
and \@biblabel
:
\documentclass[a4paper,12pt]{article}
\usepackage{cite}
\makeatletter
\renewcommand\@bibitem[1]{\item\if@filesw \immediate\write\@auxout
{\string\bibcite{#1}{A\the\value{\@listctr}}}\fi\ignorespaces}% <------------
\def\@biblabel#1{[A#1]}% <-------------------
\makeatother
\begin{document}
I cited the reference here \cite{ref1}, \cite{sec}.
\begin{thebibliography}{99}
\bibitem{ref1} name. 2017 Title of the reference.
\bibitem{sec} name. 2017 Title of the reference.
\end{thebibliography}
\end{document}
Related videos on Youtube
Author by
jsxs
Updated on August 01, 2022Comments
-
jsxs over 1 year
I want
\cite
to give me [A1] in the text. I cited the reference here\cite{ref1}
, which gives the reference as [1]. How to modify it to give me [A1] with A prefixing the number.\documentclass[a4paper,12pt]{article} \usepackage{cite} \begin{document} I cited the reference here \cite{ref1}, which gives the reference as [1]. How to modify it to give me [A1] with A prefixing the number. \begin{thebibliography}{99} \bibitem{ref1} name. 2017 Title of the reference. \end{thebibliography} \end{document}
-
José Carlos Santos over 6 yearsFor that specific reference? Or do you want all references to start with a A?
-
jsxs over 6 yearsHi, @ José Carlos Santos, all reference.
-
-
Axel Krypton about 5 yearsJust in case you loaded
hyperref
and you wonder why the links do not work as expected, you can have a look here.