[Tex/LaTex] Some citation numbers in bold, others not

bibliographiesbibtexboldciting

I am writing a proposal with lots of bibliographic references. What I would like is to cite my own papers in bold, others in plain style like so [2,11-13,14,15]. Is there any way to do this? At the moment, I have to do it like this [2,11-13,15][14], but that is ugly. A related question was answered before (Bold citation number), but makes all citations bold, which I do not want.

I am using \bibitem's at the end of the document.

\documentclass{article}
\usepackage{cite}
\begin{document}

Some text where I cite papers of which I have written one~\cite{refA, refB, refC, 
refD}\textbf{\cite{myPaper}}; I have to cite them in this awkward form. 

Instead I would like the citation to appear like [1-3,{\textbf 4},5]. No way to do 
that with the \texttt{$\backslash$cite} command?

\begin{thebibliography}{}
\bibitem{refA}
RefA
\bibitem{refB}
RefB
\bibitem{refC}
RefC
\bibitem{myPaper}
My Paper; I have written this one.
\bibitem{refD}
RefD
\end{thebibliography}

\end{document}

LaTeX output

Best Answer

Here a partial solution to the problem, which is too long and too formated to fit as a comment. Partial because it has the following drawbacks and undesired output formatting:

  • \bibitem should be replaced by \mybibitem for the citations number to be set in bold. (This is a drawback since probable the programm latex-bibitemstyler mentioned by Günter in the comments will no longer work. However, it is likely that this replacement can be made with sed)
  • Bold reference numbers come first
  • Bold reference numbers are not sorted
  • Bold reference numbers are not compressed

You latter three effects can be seen in the following image.

This having said. Here my definition for \mybibitem:

\newcommand{\mybibitem}[1]{\stepcounter{enumiv} \bibitem[\textbf{\arabic{enumiv}}]{#1}}

And for the sake of completeness the whole code to generate the above example:

\documentclass{article}
\usepackage{cite}

\newcommand{\mybibitem}[1]{\stepcounter{enumiv} \bibitem[\textbf{\arabic{enumiv}}]{#1}}      

\begin{document}

Bold reference numbers come first: \cite{refA, refB, refI, refD} 

Bold papers are not compressed: \cite{refD, refE, refF}

Bold reference numbers are not sorted: \cite{refF, refD, refE}

Combination of mentioned effects: \cite{refA, refF, refH, refD, refE,  refB, refC, refG, refI}

\begin{thebibliography}{}
\bibitem{refA} RefA
\bibitem{refB} RefB
\bibitem{refC} RefC
\mybibitem{refD} RefD
\mybibitem{refE} RefE
\mybibitem{refF} RefF
\bibitem{refG} RefG
\bibitem{refH} RefH
\bibitem{refI} RefI
\end{thebibliography}

\end{document}
Related Question