I'm tring to update my CV by using a .bib instead of writing everything. For that, everything's fine. But, I'd also like to highlight my name in every entry in the bibliography. I am using plainrevyr.bst and already tried This and That
Basically, following those two posts, I've added these functions to my .bst
FUNCTION {cv.author}
{ "Doe, John" }
FUNCTION {highlight}
{ duplicate$ empty$
{ pop$ "" }
{ "\textbf{\textsc{" swap$ * "}}" * }
if$
}
FUNCTION {highlight.cv.author}
{ duplicate$ purify$ cv.author purify$ =
{ highlight }
'skip$
if$
}
I've also added highlight.cv.author in the function format.names after format.name$ as required As I understand from the other examples I've found, my major issue comes from the function cv.author.
So, if I use :
FUNCTION {cv.author}
{ "Doe, John" }
Nothing happens (I've also tried "John Doe" as it is how a name appear in the biblio)
If I try instead :
FUNCTION {cv.author}
{ "Doe, John" nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ }
I got a error saying that John Doe is a string literal, not an integer. I agree with this error as nameptr is defined as an integer.
Here is format.names :
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}"
format.name$
highlight.cv.author 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "others" =
{ " et~al." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
How to make it work ?
Thank you !
EDIT
Here is how I call my biblio :
\documentclass{cv2}
\usepackage[francais]{babel}
\usepackage[T1]{fontenc} %% Pour la césure des mots accentués
\usepackage[utf8]{inputenc} %% les accents dans le fichier.tex
\usepackage{fullpage}
\usepackage[backref]{hyperref}
\begin{document}
\bibliographystyle{plainrevyr}
\nocite{*}
\bibliography{MyPapers}
\end{document}
And 2 Bibentries :
@article{Doe2014,
title = {{First title}},
year = {2014},
journal = {Phys. Chem. Chem. Phys.},
author = {Name1, Forename1 and Doe, John and Name2, Forename2 and Name3, Forename3},
number = {40},
pages = {22903--22912},
volume = {16},
url = {http://dx.doi.org/10.1038/C4CP03276D http://xlink.rsc.org/?DOI=C4CP03276D},
doi = {10.1038/C4CP03276D},
issn = {1462-9076}
}
@article{Doe2012,
title = {{MyTitle2}},
year = {2012},
journal = {Journal of Physical Chemistry C},
author = {Doe, John and Name4, Forename4 and Name2, Forename2 and Name5, Forename5 and Name1, Forename1},
number = {25},
pages = {13716--13724},
volume = {110},
isbn = {1932-7447},
doi = {10.1021/jp304525f},
issn = {19327457}
}
And Here the links to cv2 and plainrevyr
highlightdefinition contains\textbf{\textsc{" swap$ * "}}. It is possible that your font does not support bold small caps. You could check that to be the case by temporarily changing the\textscto\textrm. If that produced bold roman text, then the issue is one of your font not supporting bold small caps. – Steven B. Segletes Apr 11 '18 at 15:13\textscto only have\textbf{" swap$ * "}with no more success. I tried to replace\textscby\textrmas you suggested to test too, but no luck either. – Natantye Apr 11 '18 at 15:24.bblfile (or something equivalent) after you made that change to the.bstfile, so as to force a bibliography recompilation? – Steven B. Segletes Apr 11 '18 at 15:26bstfile ... – Mensch Apr 11 '18 at 15:56