6

My problem is as follows: I composed my thesis using the thesis template provided by Matthias Pospiech (http://www.matthiaspospiech.de/latex/vorlagen/) He used the biblatex package for bibliographies.

OK, now I had a look at the specifications of my faculty regarding styles and co. And according to these guidelines I have to use parentheses for the citations in the text, e.g., (42) rather then brackets, e.g., [42].

Now that all my writing is done I want to make as little changes as possible. I thought about using

\renewcommand{\mkbibbrackets}[1]{\mkbibparens{#1}}

Good news is: It works and all my references are now cited in parentheses. However, I'd like to know if this is some kind of quick'n'dirty hack and if there is a more elegant way to get parentheses (for the next time...).

  • 1
    For reference, this answer gives a good solution if nested parentheses are needed. It achieves the opposite effect, turning parentheses into brackets, but I suspect it can be modified fairly easily. – René B. Christensen Dec 22 '15 at 9:52
5

Writing these lines in your preamble should do the trick:

\DeclareCiteCommand{\cite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}
  • 1
    Thx, indeed it does... However, I'd like to know, what's the benefit of this solution compared to \renewcommand... ? – hatze Dec 22 '15 at 12:11
  • 3
    It replaces bib brackets with parentheses only for citations. \mkbibbrackets is also used in other contexts, where you may not want any replacement. – Bernard Dec 22 '15 at 12:45
  • 2
    @hatze While this solution might be longer code-wise it is certainly cleaner from a semantic perspective. You don't want all square brackets to be round brackets, you just want your citations to be wrapped in round brackets. Of course a modification of \textcite will require a bit more code (it is still quite straightforward, though). – moewe Dec 22 '15 at 13:01
  • 1
    Thx for the explanations. I agree and will use @Bernard's solution. – hatze Dec 22 '15 at 13:04
  • @hatze If you want your bibliography list to use round brackets, you might want to add \DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}} and maybe even \DeclareFieldFormat{shorthandwidth}{\mkbibparens{#1}} as well. – moewe Dec 22 '15 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.