7

I am using the apa6 class to write a meta-analysis. For bibliography I am using biblatex-apa. I want to mark all references with an asterisk (*) that are primary studies. The asterisk is to be in front of the lastname of the first author. My first attempt was adding the asterisks to the bibtex entries for author. This failed miserably, as the asterisks appear in the text as well :/

I found that the apacite package has a convenient \nocitemeta command, that just adds the asterisks in the Reference list. I do not want to switch to apacite as biblatex-apa is working fine otherwise. Is there an easy work-around in biblatex?

1

1 Answer 1

10

You could add the following to your preamble

\newtoggle{bib@asterisk}
\DeclareEntryOption{asterisk}[true]{\settoggle{bib@asterisk}{#1}}
\renewbibmacro*{begentry}{%
  \iftoggle{bib@asterisk}%
    {*}%
    {}%
}

This allows you to set an option asterisk on a per-type basis in the .bib file. If this option is set, an asterisk will be printed before the entry in the bibliography.

Use it like so

@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
  options       = {asterisk},
}

MWE

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{bohec,
  author        = {Le Bohec, Yann},
  title         = {Histoire militaire des guerres puniques},
  date          = {1996},
  location      = {Monaco},
  publisher     = {Rocher},
  isbn          = {2-268-02147-5},
  options       = {asterisk},
}
@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
  options       = {asterisk},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\newtoggle{bib@asterisk}
\DeclareEntryOption{asterisk}[true]{\settoggle{bib@asterisk}{#1}}
\renewbibmacro*{begentry}{%
  \iftoggle{bib@asterisk}%
    {*}%
    {}%
}

\begin{document}
  \cite{wilde,cicero,coleridge,vangennep,bohec,uthor}
  \printbibliography
\end{document}

If you prefer a more on-the-fly solution, try this.

We declare a new bibliography category asterisk.

\DeclareBibliographyCategory{asterisk}
\renewbibmacro*{begentry}{%
  \ifcategory{asterisk}%
    {*}%
    {}%
}

We can then use \addtocategory{asterisk}{uthor,bohec} in the document.

This will not print the entries in question, just mark them as requiring a star should they be printed.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{bohec,
  author        = {Le Bohec, Yann},
  title         = {Histoire militaire des guerres puniques},
  date          = {1996},
  location      = {Monaco},
  publisher     = {Rocher},
  isbn          = {2-268-02147-5},
}
@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\DeclareBibliographyCategory{asterisk}
\renewbibmacro*{begentry}{%
  \ifcategory{asterisk}%
    {*}%
    {}%
}

\begin{document}
  \addtocategory{asterisk}{uthor,bohec}
  \cite{wilde,cicero,coleridge,vangennep,bohec,uthor}
  \printbibliography
\end{document}

Both MWEs yield enter image description here


Using the second method,

\DeclareBibliographyCategory{asterisk}
\renewbibmacro*{begentry}{%
  \ifcategory{asterisk}%
    {*}%
    {}%
}

we can even define \nocitemeta via

\newcommand*{\nocitemeta}[1]{%
  \nocite{#1}%
  \addtocategory{asterisk}{#1}%
}

We can the use this command analogous to APAcite's \nocitemeta. Note that with this \nocitemeta even entries that were cited before get an asterisk if you perform a \nocitemeta on them.

\documentclass[american]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{bohec,
  author        = {Le Bohec, Yann},
  title         = {Histoire militaire des guerres puniques},
  date          = {1996},
  location      = {Monaco},
  publisher     = {Rocher},
  isbn          = {2-268-02147-5},
}
@book{uthor,
  author        = {Uthor, Arnold},
  title         = {A Book},
  date          = {2013},
  location      = {Place},
  publisher     = {P. Ublisher's \& Co.},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\DeclareBibliographyCategory{asterisk}
\renewbibmacro*{begentry}{%
  \ifcategory{asterisk}%
    {*}%
    {}%
}

\newcommand*{\nocitemeta}[1]{%
  \nocite{#1}%
  \addtocategory{asterisk}{#1}%
}

\begin{document}
  \nocitemeta{bohec,uthor}
  \cite{wilde,cicero,coleridge,vangennep,bohec}
  \printbibliography
\end{document}
1
  • Your answer was very useful to me :) I liked the second solution a bit better, as the asterisked references might not be asterisked in the next paper one writes.
    – Philipp
    Jan 31, 2014 at 15:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .