3

My university has some special format-rules for the bibliography:

The bib-items have no period at the end. Only the VERY LAST one has to end with a period!

This is how it should look like: enter image description here)

I changed the finentrypoint with \renewcommand{\finentrypunct}{} - that works fine. But how do I get the period after the very last entry then??

I use biber.

Does any one have suggestions for me?

  • 3
    Welcome to TeX.SX! Every day we learn new peculiar formatting rules. ;-) I can find no sense in such a direction, do you? You have all my sympathy. – egreg Feb 28 '14 at 12:00
  • 2
    Would you mind telling us what style you use. Ideally, you would post a MWE. – moewe Feb 28 '14 at 12:28
2

You can redefine \defbibenvironment{bibliography} to include the final period. Note that this will most likely cause problems with empty bibliographies.

Keep \renewcommand{\finentrypunct}{}.

Take the definition of \defbibenvironment{bibliography} and add \addperiod to the line reading {\endlist}, so it reads {\addperiod\endlist}. You can find the definition of \defbibenvironment{bibliography} in the .bbx file to your bibliography style.

For numeric that is

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\addperiod\endlist}%<---- here
  {\item}

For authoryear it's

\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\addperiod\endlist}%<---- here
  {\item}

MWE

\documentclass[a4paper,12pt]{article}%
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}
\renewcommand{\finentrypunct}{}
\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
    \printfield{prefixnumber}%
    \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\addperiod\endlist}%<---- here
  {\item}

\begin{document}
  \nocite{wilde,cicero,knuth:ct:a}
  \printbibliography
\end{document}

enter image description here

  • moewe, THANK YOU, THANK YOU!!!! It work´s perfect. Amazing! – Jonas Feb 28 '14 at 12:59
2

The output of the bibliography is done done inside an environment defined by

% {<name>}{<start code>}[<end code>]{<item code>}

\newrobustcmd*{\defbibenvironment}[4]{%
  \long\csdef{blx@env@#1}{#2}%
  \long\csdef{blx@endenv@#1}{#3}%
  \long\csdef{blx@item@#1}{#4}}

Every style uses this definition of modify the environment. So for your needs you have to make sure that the final period is set at blx@endenv@#1. This can be globally achieved by:

\cspreto{blx@endenv@bibliography}{\addperiod}

Here the complete MWE:

\documentclass[]{article}
\usepackage[T1]{fontenc}
\usepackage[]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareFieldFormat{labelnumberwidth}{#1.}
\renewcommand{\finentrypunct}{}
\cspreto{blx@endenv@bibliography}{\addperiod}
\begin{document}
\cite{companion,knuth:ct:a,angenendt}
\printbibliography
\end{document}

enter image description here

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.