2

I want change the biblatex postnote behavior for the numeric style. Combining the numeric style with a lot of numbers in a postnote makes it really confusing to read IMO. The postnote for the \autocite command should appear behind the square brackets inside round brackets like this:

enter image description here

I'm not sure what the correct approach is regarding breakable spaces and so on. I've tried to solution of this question but it did not work for \autocite.

MWE:

\documentclass{scrartcl}
\usepackage{filecontents}
\begin{filecontents}{test.bib}
    @book{mdr,
      title = {Verordnung (EU) 2017/745 \"uber Medizinprodukte},
      author = {{N. N.}},
      date = {2017},
      location = {{Europ\"aisches Parlament, Br\"ussel}}
    }
\end{filecontents}

\usepackage[backend=biber, style=ext-numeric, citestyle=numeric-comp, autocite=inline,]{biblatex}
\addbibresource{test.bib}

\begin{document}

\autocite[Kapitel II, Art. 5, Abs. 3]{mdr}

Desired output: [1](Kapitel II, Art. 5, Abs. 3)

\end{document}

1 Answer 1

2

You can redefine both \cite and \parencite from their original

\DeclareCiteCommand{\parencite}[\mkbibbrackets]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \usebibmacro{postnote}}

to

\DeclareCiteCommand{\parencite}
  {\bibopenbracket
   \usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \bibclosebracket
   \usebibmacro{postnote}}

which means that the brackets close before the postnote. Then it's just a matter of changing postnotedelim and the postnote format.

Note that these definitions are style-specific and the code here is designed to work with (cite)sytle=numeric-comp. For other styles the code would be slightly tweaked.

\documentclass{scrartcl}
\usepackage[backend=biber,
  bibstyle=ext-numeric, citestyle=numeric-comp,
  autocite=inline,]{biblatex}

\DeclareCiteCommand{\cite}
  {\bibopenbracket
   \usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \bibclosebracket
   \usebibmacro{postnote}}

\DeclareCiteCommand{\parencite}
  {\bibopenbracket
   \usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}%
   \bibclosebracket
   \usebibmacro{postnote}}

\DeclareDelimFormat{postnotedelim}{}
\DeclareFieldFormat{postnote}{\mkbibparens{\mkpageprefix[pagination][\mknormrange]{#1}}}

\begin{filecontents}{\jobname.bib}
@book{mdr,
  title        = {Verordnung (EU) 2017/745 über Medizinprodukte},
  author       = {{N. N.}},
  date         = {2017},
  organization = {Europäisches Parlament},
  location     = {Brüssel},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

\autocite[Kapitel~II, Art.~5, Abs.~3]{mdr}

Desired output: [1](Kapitel II, Art. 5, Abs. 3)

\end{document}

[1](Kapitel II, Art. 5, Abs. 3)

1
  • 1
    I only just saw the linked tex.stackexchange.com/q/458439/35864, but I'm quite happy to see that past me agrees with the approach. (With the slight difference that postnodelim is a context-sensitive delimiter now.)
    – moewe
    Commented Apr 30, 2020 at 15:53

You must log in to answer this question.

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