7

I want to highlight (more precisely make bold) a specific author name in bibliography using bibtex. There are several answers to this question, like this, this, this, this or this one. However, I'm using the babelbib package, and the previous solutions hack the plain style. I think that the solution that is closer to what I try to do is this one, however I'm not familiar with the language used to write bst files, in order to properly modify it.

For other reasons I have patched the babunsrt-lf style to show only the author initials and I the author name I want to highlight has the form Lastname, {\relax Th}eo

The patched version of FUNCTION {format.names} is taken from here.

Edit: Adding a MWE after @uT5r asked

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@CONFERENCE{CB:EPS36,
author      = {\textbf{Lastname, {\relax Th}eo} and Coauthor, John},
title       = {Some poster},
booktitle   = {36 Conference},
address     = {City},
year        = {2009},
pages       = {1015-1018},
}
\end{filecontents}

\documentclass{article}
\usepackage{filecontents}
\usepackage[francais,greek,english]{babel}
\usepackage{babelbib}
\selectbiblanguage{english}
\setbtxfallbacklanguage{english}
\begin{document}
bla
\bibliographystyle{bababbrv-lf}
\bibliography{\jobname}
\nocite{*}
\end{document}
3

This is quite the manual, and simply, solution, but would it be possible simply to manually open your .bib file and do a find and replace?

Say you want to make ``Bleeker, Marjo'' bold. You simply open your .bib file, search for Bleeker, Marjo, replace it with \textbf{Bleeker, Marjo}, and compile your .tex.

\textbf{Bleeker, Marjo}

\begin{filecontents}{\jobname.bib}
@article{janssen1996evaluation,
  title={Evaluation of the DNA fingerprinting method AFLP as a new tool in bacterial taxonomy},
  author={Janssen, Paul and Coopman, Renata and Huys, Geert and Swings, Jean and \textbf{Bleeker, Marjo} and Vos, Pieter and Zabeau, Marc and Kersters, Karel},
  journal={Microbiology},
  volume={142},
  number={7},
  pages={1881--1893},
  year={1996},
  publisher={Soc General Microbiol}
}
@article{vos1995aflp,
  title={AFLP: a new technique for DNA fingerprinting},
  author={Vos, Pieter and Hogers, Rene and \textbf{Bleeker, Marjo} and Reijans, Martin and Van de Lee, Theo and Hornes, Miranda and Friters, Adrie and Pot, Jerina and Paleman, Johan and Kuiper, Martin and others},
  journal={Nucleic acids research},
  volume={23},
  number={21},
  pages={4407--4414},
  year={1995},
  publisher={Oxford Univ Press}
}
\end{filecontents}

\documentclass{article}
\usepackage[style=authoryear, maxcitenames=2, maxbibnames=100, natbib=true, backend=bibtex]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

\noindent 
\citet[1229]{vos1995aflp} has argued that $y$. Second, \citep[1229]{janssen1996evaluation} also show $m$ and $x$ \citet{vos1995aflp,janssen1996evaluation}.

\printbibliography
\end{document}
| improve this answer | |
  • 1
    thank you for your answer. I tried this it works as in your example. However, when using a style with initials as first name, this solution keeps the whole name. I also tried different combinations of \textbf as \textbf{Bleeker}, \textbf{Marjo}, \textbf{Bleeker}, \textbf{M}arjo, \textbf{Bleeker, \textbf{M}\textbf{arjo}, but nothing worked. I also noticed that you use biblatex, which does not seem to work with babelbib... The only solution I see now is to edit the .bst file itself... – Theo Feb 21 '15 at 19:45
  • @Theo, would it be possible for you to post a minimal working example? – uT5r Feb 21 '15 at 20:30
1

Since you can use the highlight command in *.bib source file. However I was able to highlight specific parts of the citation by adding \hl{} command to every single line of the citation information:

@article{StephenPark,
  title={\hl{Integration of biological kinetics and computational fluid dynamics to model the growth of Nannochloropsis salina in an open channel raceway}},
  author={\hl{Park, Stephen and Li, Yebo}},
  journal={\hl{Biotechnology and bioengineering}},
  volume={\hl{112}},
  number={\hl{5}},
  pages={\hl{923--933}},
  year={\hl{2015}},
  publisher={\hl{Wiley Online Library}}
}

which gives the following result: enter image description here

you can remove the \hl{} command from any of the citation parts.

| improve this answer | |
  • 1
    As fa i understand question, your answer doesn't help OP. – Zarko Apr 25 '16 at 17:23
  • This would have serious impact on the sorting of authors. – egreg Apr 25 '16 at 17:32
  • I haven't had any problems in sorting the authors names. Whay would it impact that? – Hossein Apr 26 '16 at 14:18
  • I wanted to highlight a reference paper on .bib file, and I got your answer with an example. Thanks a lot. – santobedi Jan 16 '19 at 2:19
0

I'm often trying to do the same thing and what's just occurred to me is that as I have a separate .bib file for my publications and one for general references, I could define a command like "\authoremph" that does the kind of highlighting whatever powers-that-be want, e.g., with \textbf or \underline, and make sure every time my name appears, have it as \authoremph{me} in my .bib file.

If \authoremph isn't defined, then use \newcommand\authoremph[1]{#1} in the document preamble or \newcommand\authoremph[1]{\textbf{#1}} if I'm, e.g., writing a grant...

Testing it out - works beautifully! (Ok I know, I have to now have an extra line in my preamble in everything, but I use Sublime Text 3 and I can just put it in my "paper" template.

| improve this answer | |
  • 2
    It would be helpful if you could post a working (minimal) example that highlights what you achieve. It's far better than describing it. – Werner May 15 '17 at 3:16

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.