0

I want to cite a law but it has a very long title. The thing I want to achieve is displaying the short title (e.g. "BDSG") in my footnote and the long title ("Bundesdatenschutzgesetz") in my bibliography.

I'm using Citavi for organizing my sources. That's why I can't override the .bib entry manually, it will be overwritten every time I start a Citavi export.

This is a code sample:

\usepackage[backend=biber,dashed=false,style=authortitle]{biblatex}
\bibliography{BIBFILE}
\begin{document}
Lorem ipsum\cite{BDSG}
\printbibliography[heading=bibintoc]
\end{document}

Cite in text should be "BDSG" and the name of the source in my bibliography "Bundesdatenschutzgesetz [MORE INFORMATION]".

Do you have any idea on how to achieve this?

2
  • You can make your question easier to answer if you give a proper MWE/MWEB that we can copy and compile directly. You are more than halfway there but missing the document class and the relevant .bib entry.
    – moewe
    Commented Jan 29, 2018 at 13:04
  • I guess you want shorttitle = {BDSG}, or shorthand = {BDSG}, (the second will substitute the whole citation).
    – gusbrs
    Commented Jan 29, 2018 at 13:04

1 Answer 1

1

You want the shorttitle or shorthand field. So ideally things should be as easy as

@online{bdsg,
  title      = {Bundesdatenschutzgesetz},
  shorttitle = {BDSG},
}

If you, however, can't modify the .bib file, you can let Biber do it for you. The following adds shorttitle = {BDSG}, to the entry with the key bdsg.

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@online{bdsg,
  title = {Bundesdatenschutzgesetz},
}
\end{filecontents*}


\documentclass[ngerman]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,dashed=false,style=authortitle]{biblatex}
\usepackage{hyperref}
\addbibresource{\jobname.bib}

\DeclareSourcemap{
  \maps{
    \map{
      \step[fieldsource=entrykey, match=\regexp{\A bdsg \Z}, final]
      \step[fieldset=shorttitle, fieldvalue=BDSG]
    }
  }
}

\begin{document}
\cite{bdsg}

\printbibliography
\end{document}
5
  • @Johannes Good. But really the solution is to use a citation manager that lets you export shorttitle or shorthand fields as well.
    – moewe
    Commented Jan 29, 2018 at 13:14
  • @Johannes Please check the edited answer. There was a massive bug in the earlier version.
    – moewe
    Commented Jan 29, 2018 at 13:19
  • What was the issue before adding "match=\regexp{\A bdsg \Z}, final"?
    – Johannes
    Commented Jan 29, 2018 at 13:39
  • @Johannes Without the final every entry got the BDSG which is obviously not right. \regexp{\A bdsg \Z} makes sure we really only match bdsg and not, say abdsgy
    – moewe
    Commented Jan 29, 2018 at 13:47
  • citavi lets you export shorthand and shorttitle, you just have to map the fields to each other correctly. For that, refer to citavi documentation of your version. btw, in citavi 6 beta 8, AuthorsAbbreaviation cannot have any export value (e.g. shortauthor). This is a known issue and the developers said they would fix it with the next beta version or final release.
    – thymaro
    Commented Jan 30, 2018 at 12:37

You must log in to answer this question.

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