I used to build my bibliographies with BibTeX and a bibliography style file spbasic3.sty. It provided exactly the bibliography style necessary for Springer publications. Now, I had to switch to Biblatex to be able to put the references at the end of each chapter, but I can no longer use a bibliography style. I tried more than one biblatex style, at the end I found "nature" that is probably one of the closest to what I need; still it looks terrible for my use. Then I removed ISSN and DOI passing the options isbn=false
and doi=false
, finally I got rid of the urk adding \renewbibmacro*{url+urldate}{}
to the preamble. Still, I have only the first author listed ("Lastname, FirstInitial et al."), but I generally needs all of them or, sometimes three or six. Is there a way to achieve a fine tuning af the bibliography style according to the publisher instruction like using a style file? Where can I find a complete list of the axailable Biblatetex styles (as apa-style, chicago-style and so on)?
Biblatex bibliography style
biblatexbibliographiesbibliographystyle
Related Solutions
if you can use the package biblatex, it is easy:
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{demo.bib}
@book{test,
author = {Herbert Voss},
title = {Me, I and myself},
year = 2010,
location = {Berlin},
url = {http://www.myirl.org},
urldate= {2010-03-04},
}
\end{filecontents*}
\usepackage[style=authoryear,firstinits,url=false]{biblatex}
\bibliography{demo}
\begin{document}
A reference to~\cite{test}.
\printbibliography
\end{document}
Edit Continuing updates for this methods are posted to https://tex.stackexchange.com/a/416416/35864.
The following solution automatically extracts the hashes for the given names. Everything else is based on the bit of the answer below.
Warning! The code will write a .bib
file called <your TeX file/\jobname>-boldnames.bib
, if it exists, it will be overwritten. You can change the name of that file by adjusting the value of \hlblx@bibfile@name
.
\documentclass{article}
\usepackage[backend=biber,style=numeric]{biblatex}
\makeatletter
\def\hlblx@bibfile@name{\jobname -boldnames.bib}
\newwrite\hlblx@bibfile
\immediate\openout\hlblx@bibfile=\hlblx@bibfile@name
\newcounter{hlblx@name}
\setcounter{hlblx@name}{0}
\newcommand*{\hlblx@writenametobib}[1]{%
\stepcounter{hlblx@name}%
\edef\hlblx@tmp@nocite{%
\noexpand\AfterPreamble{%
\noexpand\setbox0\noexpand\vbox{%
\noexpand\hlblx@getmethehash{hlblx@name@\the\value{hlblx@name}}}}%
}%
\hlblx@tmp@nocite
\immediate\write\hlblx@bibfile{%
@misc{hlblx@name@\the\value{hlblx@name}, author = {\unexpanded{#1}}, %
options = {dataonly=true},}%
}%
}
\AtEndDocument{%
\closeout\hlblx@bibfile}
\addbibresource{\hlblx@bibfile@name}
\newcommand*{\hlbxl@boldhashes}{}
\DeclareNameFormat{hlblx@hashextract}{%
\xifinlist{\thefield{hash}}{\hlbxl@boldhashes}
{}
{\listxadd{\hlbxl@boldhashes}{\thefield{fullhash}}}}
\DeclareCiteCommand{\hlblx@getmethehash}
{}
{\printnames[hlblx@hashextract][1-999]{author}}
{}
{}
\newcommand*{\addboldname}{\forcsvlist\hlblx@writenametobib}
\newcommand*{\resetboldnames}{\def\hlbxl@boldhashes{}}
\newcommand*{\mkboldifhashinlist}[1]{%
\xifinlist{\thefield{hash}}{\hlbxl@boldhashes}
{\mkbibbold{#1}}
{#1}}
\makeatother
\DeclareNameWrapperFormat{boldifhashinlist}{%
\renewcommand*{\mkbibcompletename}{\mkboldifhashinlist}%
#1}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{default}{boldifhashinlist}
\addboldname{{Silva, Carlos F. M.}}
\begin{filecontents}{\jobname.bib}
@incollection{Silva:2014a,
title = {Radio Resource Management for Device-to-Device
Communications in Long Term Evolution Networks},
author = {Carlos F. M. Silva and Silva, Jr., Jos\'{e} Mairton B.
and Tarcisio F. Maciel},
booktitle = {Resource Allocation and {MIMO} for {4G} and Beyond},
publisher = {Springer Science+Business Media},
year = 2014,
address = {New York, USA},
editor = {Francisco Rodrigo Porto Cavalcanti},
pages = {105-156},
doi = {10.1007/978-1-4614-8057-0_3},
isbn = {978-1-4614-8056-3},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\fullcite{Silva:2014a}
\resetboldnames\addboldname{{Silva, Jr., Jos\'{e} Mairton B.}}\printbibliography
\end{document}
We can use Audrey's approach to Make specific author bold using biblatex, but instead of string comparison we use the name hash produced by Biber.
\newcommand*{\boldnames}{}
\newcommand*{\mkboldifhashinlist}[1]{%
\xifinlist{\thefield{hash}}{\boldnames}
{\mkbibbold{#1}}
{#1}}
\DeclareNameWrapperFormat{boldifhashinlist}{%
\renewcommand*{\mkbibcompletename}{\mkboldifhashinlist}%
#1}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{default}{boldifhashinlist}
You can find out the hash
values for your name (and its versions) by looking at the .bbl
file produced by Biber, it will contain information for a cited entry like this
\entry{Silva:2014a}{incollection}{}
\name{author}{3}{}{%
{{hash=894de27062ab25d43f1d7b50fd923256}{%
family={Silva},
familyi={S\bibinitperiod},
given={Carlos\bibnamedelimb F.\bibnamedelimi M.},
giveni={C\bibinitperiod\bibinitdelim F\bibinitperiod\bibinitdelim M\bibinitperiod}}}%
{{hash=cc273ec4593222cb35c353d3f073214e}{%
family={Silva},
familyi={S\bibinitperiod},
given={José\bibnamedelimb Mairton\bibnamedelima B.},
giveni={J\bibinitperiod\bibinitdelim M\bibinitperiod\bibinitdelim B\bibinitperiod},
suffix={Jr.},
suffixi={J\bibinitperiod}}}%
{{hash=1f31fc59b1a438cdb6e7efa3f16611fe}{%
family={Maciel},
familyi={M\bibinitperiod},
given={Tarcisio\bibnamedelima F.},
giveni={T\bibinitperiod\bibinitdelim F\bibinitperiod}}}%
}
\name{editor}{1}{}{%
{{hash=3ac5e392f4edfbddb80549d1ccca0d11}{%
family={Cavalcanti},
familyi={C\bibinitperiod},
given={Francisco\bibnamedelimb Rodrigo\bibnamedelima Porto},
giveni={F\bibinitperiod\bibinitdelim R\bibinitperiod\bibinitdelim P\bibinitperiod}}}%
}
\list{location}{1}{%
{New York, USA}%
}
\list{publisher}{1}{%
{Springer Science+Business Media}%
}
\strng{namehash}{b4c654eecf5e554d731ed21594f20b31}
\strng{fullhash}{b4c654eecf5e554d731ed21594f20b31}
\strng{bibnamehash}{b4c654eecf5e554d731ed21594f20b31}
\strng{authorbibnamehash}{b4c654eecf5e554d731ed21594f20b31}
\strng{authornamehash}{b4c654eecf5e554d731ed21594f20b31}
\strng{authorfullhash}{b4c654eecf5e554d731ed21594f20b31}
\strng{editorbibnamehash}{3ac5e392f4edfbddb80549d1ccca0d11}
\strng{editornamehash}{3ac5e392f4edfbddb80549d1ccca0d11}
\strng{editorfullhash}{3ac5e392f4edfbddb80549d1ccca0d11}
\field{sortinit}{S}
\field{sortinithash}{c319cff79d99c853d775f88277d4e45f}
\field{labelnamesource}{author}
\field{labeltitlesource}{title}
\field{booktitle}{Resource Allocation and {MIMO} for {4G} and Beyond}
\field{isbn}{978-1-4614-8056-3}
\field{title}{Radio Resource Management for Device-to-Device Communications in Long Term Evolution Networks}
\field{year}{2014}
\field{pages}{105\bibrangedash 156}
\range{pages}{52}
\verb{doi}
\verb 10.1007/978-1-4614-8057-0_3
\endverb
\endentry
The hash for the relevant name is shown right before the name, for C. F. M. Silva is 894de27062ab25d43f1d7b50fd923256
, for J. M. B Silva Jr. it is cc273ec4593222cb35c353d3f073214e
. (Note that the value of this hash may change between Biber version: Check that the names highlight correctly after an update.)
Since the hash
is different for different name inputs (the hash
for "Donald E. Knuth" will not equal the one for "D. E. Knuth" or "Donald Knuth")
you will have to find the correct hash for all the variants you use of your name.
With the help of
\newcommand*{\detokenizelistadd}[2]{%
\listeadd#1{\detokenize{#2}}}
you can then add a list of hashes to the \boldnames
macro
\forcsvlist{\detokenizelistadd\boldnames}
{{894de27062ab25d43f1d7b50fd923256}}
MWE
\documentclass{article}
\usepackage[backend=biber,style=numeric]{biblatex}
\newcommand*{\boldnames}{}
\newcommand*{\mkboldifhashinlist}[1]{%
\xifinlist{\thefield{hash}}{\boldnames}
{\mkbibbold{#1}}
{#1}}
\DeclareNameWrapperFormat{boldifhashinlist}{%
\renewcommand*{\mkbibcompletename}{\mkboldifhashinlist}%
#1}
\DeclareNameWrapperAlias{sortname}{default}
\DeclareNameWrapperAlias{default}{boldifhashinlist}
\newcommand*{\detokenizelistadd}[2]{%
\listeadd#1{\detokenize{#2}}}
\renewcommand*{\boldnames}{}
\forcsvlist{\detokenizelistadd\boldnames}
{{894de27062ab25d43f1d7b50fd923256}}
\begin{filecontents}{\jobname.bib}
@incollection{Silva:2014a,
title = {Radio Resource Management for Device-to-Device
Communications in Long Term Evolution Networks},
author = {Carlos F. M. Silva and Silva, Jr., Jos\'{e} Mairton B.
and Tarcisio F. Maciel},
booktitle = {Resource Allocation and {MIMO} for {4G} and Beyond},
publisher = {Springer Science+Business Media},
year = 2014,
address = {New York, USA},
editor = {Francisco Rodrigo Porto Cavalcanti},
pages = {105-156},
doi = {10.1007/978-1-4614-8057-0_3},
isbn = {978-1-4614-8056-3},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\fullcite{Silva:2014a}
\printbibliography
\end{document}
The answer has been updated to reflect the changes needed for biblatex
>= 3.3 (see biblatex
3.3 name formatting). All mentions of last
in name macros are now family
and first
becomes given
. Refer to the edit history for the pre-3.3 code.
edited to use a more elegant version to format complete names. \DeclareNameWrapperFormat
and \mkbibcompletename
are only available in biblatex
v3.12 (2018-10-30) and v3.13 (2019-08-17), respectively. Please refer to the edit history if you are using an older version of biblatex
.
Best Answer
The best list of 'easily available' styles is probably the
biblatex
topic page on CTAN https://ctan.org/topic/biblatex.It isn't a simple list of all styles with style examples, though, and you'll have to click through to the separate bundles and styles to see what they look like.
Herbert Voß's "LaTeX Referenz" (in German, 4th ed. 2019, https://www.dante.de/dante-e-v/literatur/latex-referenz/) has a long list of
biblatex
style examples. I have the print version of that book, but I'm not sure if there is an ebook version.If you are planning to write your own style, I would usually recommend to base it on one of the standard styles. Some of the more advanced contributed styles (
biblatex-apa
,biblatex-chicago
) are very specialised, highly complex and were not written with customisability in mind.There are great many ways to customise a
biblatex
style. Some of the first steps one might take are shown in Guidelines for customizing biblatex styles.