2

I may need some assistance again as I'm trying to omit the title in my citations. The title must not be omitted in the bibliography.

Back in 2014 @moewe suggests to use \AtEveryCitekey{\clearfield{title}}.[1] That post was updated 2018. Unfortunately this doesn't work for me. The functions seem not to be obsolete regarding to the biblatex manual. Nevertheless, using the following code I get "Bock, Strafrecht Besonderer Teil." instead of just "Bock.".

\documentclass[]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}

\usepackage[backend=biber,%
    autocite=footnote,%
    bibstyle=ext-authortitle,%
    citestyle=ext-authortitle,%
]{biblatex}

\begin{filecontents}{\jobname.bib}
@book{Bock.2018,
 author = {Bock, Dennis},
 year = {2018},
 title = {Strafrecht Besonderer Teil},
 address = {Berlin, Germany},
 publisher = {{Springer Nature}},
 isbn = {978-3-662-54790-8},
 series = {Springer-Lehrbuch}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\AtEveryCitekey{\clearfield{title}}

\begin{document}
Cite\autocite{Bock.2018}
\end{document}
4
  • 2
    Welcome to TeX.se and thanks for including a minimal document with your question. The ext-authortitle-terse does most of what you want: it will only print the title if there is more than one work by the same author. Perhaps this will suffice? It seems that otherwise you end up with ambiguous citations, which is presumably never what you want to have.
    – Alan Munn
    Nov 26, 2020 at 19:46
  • That's almost exactly what I want. I'd like to print a short form of the title if there is more than one work from one author. That would be perfect.
    – disjunkt
    Nov 26, 2020 at 20:05
  • \AtEveryBibitem{\clearfield{title}} works as it removes the title from the bibliography but not from the citation.
    – disjunkt
    Nov 26, 2020 at 20:26
  • 1
    \AtEveryCitekey{\clearfield{title}} doesn't work in the example, because the citations don't print the title field directly. Instead they print the labeltitle field, which is generated from several title-like fields (shorttitle is given precedence over title). In the example the value of the title field is copied over to the labeltitle field, so deleting the title field after that has no effect. You can try \AtEveryCitekey{\clearfield{labeltitle}} for the effect you probably intended to achieve, but that leaves a comma dandling. Alan's answer is much better.
    – moewe
    Nov 27, 2020 at 7:46

1 Answer 1

2

The ext-authortitle-terse (or authortitle-terse) style does exactly what you want. So long as the shorttitle field exists in the relevant entries, it will be printed in cases where there is more than one work by the same author; otherwise just the author will be printed. I've adapted your sample .bib file to show two different shortauthor fields.

\documentclass[]{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{csquotes}

\usepackage[backend=biber,%
    autocite=footnote,%
    bibstyle=ext-authortitle,%
    citestyle=ext-authortitle-terse,%
]{biblatex}

\begin{filecontents}[overwrite]{\jobname.bib}
@book{Bock.2018,
 author = {Bock, Dennis},
 year = {2018},
 title = {Strafrecht Besonderer Teil},
 shorttitle = {Stafrecht},
 address = {Berlin, Germany},
 publisher = {{Springer Nature}},
 isbn = {978-3-662-54790-8},
 series = {Springer-Lehrbuch}
}
@book{Bock.2018B,
 author = {Bock, Dennis},
 year = {2018},
 title = {Strafrecht Besonderer Teil},
 shorttitle = {Besonderer},
 address = {Berlin, Germany},
 publisher = {{Springer Nature}},
 isbn = {978-3-662-54790-8},
 series = {Springer-Lehrbuch}
}
\end{filecontents}

\addbibresource{\jobname.bib}



\begin{document}
Cite\autocite{Bock.2018,Bock.2018B}
\end{document}

output of code

4
  • That's pretty nice. Thanks! I already tried some stuff with ext-authortitle-terse or ext-authortitle-ticomp as that woult fit my needs better. But there is a downside in this one. I need to have just one author to be printed. Therefore I use the option maxcitenames=1. Unfortunately this leads to exactly the same output for two books when both of them have the same first author because only the first author and no title get printed. That's already far away from the original question. But maybe you have an answer in this case.
    – disjunkt
    Nov 26, 2020 at 20:54
  • @disjunkt So do you always want to use shorttitle to disambiguate those cases as opposed to adding more authors? Because in the latter case you can change the values of the uniquename and uniquelist options. But using one author no matter what and then adding the shorttitle to disambiguate isn't anything that the styles do out of the box, I don't think.
    – Alan Munn
    Nov 26, 2020 at 21:42
  • I did something wront in the first place. After deleting all automatically generated files an rerunning latex and biber I got a propper result. When two books have the same first author a second autor ist printet. That's not exactly what I was looking for but still acceptable for now. I found the \ifuniqueprimaryauthor test. Maybe this can lead to a solution next time.
    – disjunkt
    Nov 27, 2020 at 0:18
  • @disjunkt You may want to look at the uniquelist and nohashothers options. I don't fully understand what you have right now and what you want to achieve, but it sounds like those options might be helpful.
    – moewe
    Nov 27, 2020 at 6:34

You must log in to answer this question.

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