biblatex icon indicating copy to clipboard operation
biblatex copied to clipboard

Option to automatically use sequens, sequentis in postnote

Open ghost opened this issue 12 years ago • 1 comments

Biblatex currently has an option to compress ranges of pages in backrefs to use the sequens and sequentis strings where appropriate. An option to do the same for postnotes in citations seems to make sense.

E.g. \autocite[34, 35]{Chomsky1957} would produce Chomsky (1957, pp. 34 sq.)

ghost avatar Mar 10 '14 11:03 ghost

Idea courtesy of Ulrike Fischer at https://golatex.de/viewtopic,p,108275.html#108275

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authortitle, backend=biber]{biblatex}
\DeclareFieldFormat{postnote}{\mkpageprefix[pagination][\mkcomprange]{#1}}

\makeatletter
\def\blx@comprange@end{%
  \numdef\blx@tempb\blx@tempb
  \ifnum\blx@tempe>\c@maxcomprange\relax
    \numdef\blx@tempc\blx@tempc
  \else
    \numdef\blx@tempc\blx@tempd
  \fi
  \begingroup
  \edef\blx@tempb{\endgroup
    \blx@range@out@value{%
      \expandonce\blx@range@out@item@process{\blx@tempb}%
       \psq%\noexpand\bibrangedash
      %\expandonce\blx@range@out@item@process{\blx@tempc}
        }}%
  \blx@tempb
  }

\addbibresource{biblatex-examples.bib}

\begin{document}
Test.\footcite[380]{sigfridsson}

Test.\footcite[380-381]{sigfridsson}

Test.\footcite[380\psq]{sigfridsson}

\printbibliography
\end{document}

moewew avatar Sep 13 '19 05:09 moewew