1

I am using biblatex with style=apa for my master thesis. In my bibliography I have some sources, that my professor wants me to cite by their shorttitle instead of the author. In most cases these sources are laws, that have a common abbreviation like the "GDPR".

I have been able to built a new citecommand e.g. for \parencite. Now I need an equivalent for the \textcite. In detail it should look like:

According to GoBD (Rzn. 136) ...

To achieve this, I copied the \textcite command from the apa.cbx file and modified it. Sadly the output currently is not how I want it to look like:

According to GoBD, Rzn. 136 ...

The Problem now is, that the parentheses around the detailed source (page, etc.) are missing, and the comma needs to be removed. I did try to modify the textcite bibmacro, but was not able to create something that compiled.

Hopefully somebody of you can help me :)

Here is my MWE:

\documentclass[a4paper,13pt]{scrartcl}

\usepackage{geometry}
\geometry{left=3.5cm, right=2cm, top=2.5cm, bottom=2cm}

\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{filecontents}
%\usepackage{hyperref}

%-------------------------------------------------------------------
% Bibliography with bibLaTeX                                        
%-------------------------------------------------------------------
\usepackage[style=apa]{biblatex}
\bibliography{literatur}

\DeclareCiteCommand{\textciteshorttitle}
{\usebibmacro{cite:init}%
    \usebibmacro{prenote}}
{\usebibmacro{citeindex}%
    \printtext[bibhyperref]{\printfield[cite]{shorttitle}}}
{}
{\usebibmacro{textcite:postnote}%
    \usebibmacro{cite:post}}

\begin{filecontents}{literatur.bib}
@misc{GoBD,
    author = {{Bundesministerium der Finanzen}},
    title = {Grunds{\"a}tze zur ordnungsm{\"a}{\ss}igen F{\"u}hrung und Aufbewahrung von B{\"u}chern, Aufzeichnungen und Unterlagen in elektronischer Form sowie zum Datenzugriff (GoBD)},
    version = {IV A 4 - S 0316/13/10003},
    year = {2014},
    shorttitle = {GoBD}
}
\end{filecontents}

\begin{document}
    \section{Ein Kapitel}
    Gemäß \textciteshorttitle[Rzn. 136]{GoBD} ...

    %-------------------------------------------------------------------
    % Literaturverzeichnis
    %-------------------------------------------------------------------
    \setcounter{secnumdepth}{0} %% no numbering
    \printbibliography[title=Literaturverzeichnis]

\end{document}

Example of the new textcite command

1 Answer 1

1

\textcite macros are often quite tricky. The following will hopefully work as expected.

Unlike in standard \textcite where the parentheses are always present no matter if there is a postnote argument or not, we need an explicit check for the presence of the postnote (pseudo-)field.

\documentclass[a4paper,13pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{filecontents}

\usepackage[style=apa]{biblatex}

\newbibmacro*{textciteshorttitle}{%
  \ifbool{cbx:parens}
    {\bibcloseparen\global\boolfalse{cbx:parens}}
    {}%
  \setunit{\compcitedelim}%
  \printfield{shorttitle}%
  \iffieldundef{postnote}
    {}
    {\ifnumequal{\value{citecount}}{\value{citetotal}}
       {\printunit{\global\booltrue{cbx:parens}\addspace\bibopenparen}}
       {}}}

\DeclareCiteCommand{\textciteshorttitle}
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{textciteshorttitle}}
  {}
  {\usebibmacro{textcite:postnote}%
   \usebibmacro{cite:post}}

\begin{filecontents}{\jobname.bib}
@misc{GoBD,
  author     = {{Bundesministerium der Finanzen}},
  title      = {Grundsätze zur ordnungsmäßigen Führung
                und Aufbewahrung von Büchern, Aufzeichnungen und
                Unterlagen in elektronischer Form sowie zum
                Datenzugriff (GoBD)},
  version    = {IV A 4 - S 0316/13/10003},
  year       = {2014},
  shorttitle = {GoBD},
}
@misc{DSGVO,
  author       = {{Europäische Union}},
  title        = {Verordnung (EU) 2016/679 des Europäischen Parlaments
                  und des Rates vom 27.~April 2016 zum Schutz
                  natürlicher Personen bei der Verarbeitung
                  personenbezogener Daten, zum freien Datenverkehr
                  und zur Aufhebung der Richtlinie 95/46/EG
                  (Datenschutz-Grundverordnung): DSGVO},
  url          = {https://eur-lex.europa.eu/eli/reg/2016/679/oj},
  pagination   = {article},
  journaltitle = {Abl. (Amtsblatt der Europäischen Union)},
  version      = {ABl. L 119 vom 4.5.2016, S. 1--88},
  year         = {2016},
  shorttitle   = {DSGVO},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  Gemäß \textciteshorttitle[Rzn. 136]{GoBD} ...

  Gemäß \textciteshorttitle{GoBD,DSGVO} ...

  Gemäß \textciteshorttitle[12]{GoBD,DSGVO} ...

  \printbibliography[title=Literaturverzeichnis]
\end{document}

Gemäß GoBD (Rzn. 136) ...//Gemäß GoBD, DSGVO ...//Gemäß GoBD, DSGVO (S. 12) ...

2
  • Thank you! I forgot to mention, that I use hyperref for shortlinks. I replaced \printfield{shorttitle}% by \printtext[bibhyperref]{\printfield{shorttitle}}% It does work as far as I can see. Do you think I am missing something?
    – The Shadow
    May 9, 2019 at 12:47
  • 1
    @TheShadow \printfield[bibhyperref]{shorttitle}% should give the same result and is shorter, but \printtext[bibhyperref]{\printfield{shorttitle}}% should also be fine.
    – moewe
    May 9, 2019 at 16:10

You must log in to answer this question.

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