1

How do I remove the period from the end of a book title, and put a comma at the end of an article title? This is the sort of thing I am working with:

\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@book{mhra2013,
    Address = {London},
    Author = {{Modern Humanities Research Association}},
    Publisher = {Modern Humanities Research Association},
    Title = {{MHRA} style guide: A handbook for authors and editors},
    Year = {2013},
}

@article{wage2012,
    Author = {Eric-Jan Wagenmakers and Ruud Wetzels and Denny Borsboom and Han L. J. van der Maas, and Rogier A. Kievit},
    Journal = {Perspectives on psychological science},
    Number = {6},
    Pages = {632-638},
    Title = {An agenda for purely confirmatory research},
    Volume = {7},
    Year = {2012},
}
\end{filecontents}
\begin{document}
\cite{mhra2013} \cite{wage2012}
\printbibliography
\end{document}

This is what it currently produces; the bits I want to change are highlighted.enter image description here

  • 1
    That's the standard \newunitpunct, which is also used after the year. You can change it, but it means that if you want to keep the period after the year you have to adapt every driver. Is is worth your time? – Ulrike Fischer Jul 21 '16 at 14:34
  • I need the period after the year as I am trying to follow MHRA style. (Which doesn't have parentheses around the year, but that's another issue I think.) – Gareth Walker Jul 21 '16 at 15:18
1
\documentclass{article}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
    @book{mhra2013,
        Address = {London},
        Author = {{Modern Humanities Research Association}},
        Publisher = {Modern Humanities Research Association},
        Title = {{MHRA} style guide: A handbook for authors and editors},
        Year = {2013},
    }

    @article{wage2012,
        Author = {Eric-Jan Wagenmakers and Ruud Wetzels and Denny Borsboom and Han L. J. van der Maas, and Rogier A. Kievit},
        Journal = {Perspectives on psychological science},
        Number = {6},
        Pages = {632-638},
        Title = {An agenda for purely confirmatory research},
        Volume = {7},
        Year = {2012},
    }
\end{filecontents}

\DeclareFieldFormat[article]{title}{#1\addcomma}
\DeclareFieldFormat[book]{title}{#1\nopunct}

\begin{document}
    \cite{mhra2013} \cite{wage2012}
    \printbibliography
\end{document}

enter image description here

  • That deals with the commas after the article title, but also puts a comma after books. To follow MHRA style (which is my aim) there needs to be no punctuation at the end of book titles. Publisher and location will be in parentheses to set those things off from the title. – Gareth Walker Jul 21 '16 at 15:22
  • @GarethWalker See the edit. Is this what you want? – user36296 Jul 21 '16 at 15:27
  • Yes - great edit. That seems to work. Now on to the next problem! – Gareth Walker Jul 21 '16 at 15:32
  • @GarethWalker BTW, do you know github.com/cyocum/biblatex-mhra? I have now idea, if its good, just what google brought up. – user36296 Jul 21 '16 at 15:34
  • Thanks. Yes, I did know about that, but it seems to implement only a small number of the features. If anyone knows of a complete (or more complete) MHRA style, I'd love to hear about it. – Gareth Walker Jul 21 '16 at 15:51

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.