# Move periods inside quotes in bibliography

I'm writing an article in Norwegian, and the guidelines specify that articles should be quoted in the bibliography as follows:

John Doe. 2005. "My article." A Cool Journal 16.

My impression is that this is the default style in Norway. Abstracting away from other issues (which I can fix) I'm not able to replicate the quote style with csquotes. Using style = norwegian will use bottom quotes and put the period after the quotes. Using style = american gets me somewhat closer, but the period is still after the quotes. There's something in the biblatex manual under §3.10.1 about moving the periods inside the quotes, but I don't understand the documentation on this point.

With style = norwegian:

\documentclass{article}
\usepackage{filecontents}
\usepackage[nynorsk]{babel}
\usepackage[style = norwegian, norwegian = quotes]{csquotes}
\usepackage[style = authoryear-comp, language = nynorsk]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
YEAR = "2005"}
\end{filecontents}
\begin{document}
\nocite{myarticle}
\printbibliography
\end{document}


With style = american:

\documentclass{article}
\usepackage{filecontents}
\usepackage[nynorsk]{babel}
\usepackage[style = american, norwegian = quotes]{csquotes}
\usepackage[style = authoryear-comp, language = nynorsk]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
YEAR = "2005"}
\end{filecontents}
\begin{document}
\nocite{myarticle}
\printbibliography
\end{document}


• As a last resort, you can add a period at the end of the title in the .bib file. This will suppress the period after the quotes. Feb 3 '14 at 20:01
• @Bernard I don't think it's a good idea to change the .bib file depending on the style sheet in question. Feb 3 '14 at 20:06
• 'twas only a suggestion as a last resort. Feb 3 '14 at 20:24
• I added a solution using xpatch. Feb 5 '14 at 18:04

You simply have to tell biblatex to use the "American punctuation" for the nynorsk language, that is add the following lines in your preamble:

\DefineBibliographyExtras{nynorsk}{%
\uspunctuation%
}


MWE:

\documentclass{article}
\usepackage{filecontents}
\usepackage[nynorsk]{babel}
\usepackage[style = american, norwegian = quotes]{csquotes}
\usepackage[style = authoryear-comp, language = nynorsk]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
YEAR = "2005"}
\end{filecontents}

\DefineBibliographyExtras{nynorsk}{%
\uspunctuation%
}

\begin{document}
\nocite{myarticle}
\printbibliography
\end{document}


Output:

I think you might be able to do this using biblatex's \uspunctuation command (see sec. 4.7.5 p. 194 of the manual). This adds just one line to your code:

\documentclass{article}
\usepackage{filecontents}
\usepackage[nynorsk]{babel}
\usepackage[style = american, norwegian = quotes]{csquotes}
\usepackage[style = authoryear-comp, language = nynorsk, backend = biber]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
YEAR = "2005"}
\end{filecontents}

\begin{document}
\nocite{myarticle}
\uspunctuation
\printbibliography
\end{document}


Obviously, move this earlier in the document if necessary. It does seem to need to follow \begin{document}, however. (I'd almost given up on getting something to work when I decided to try this command in the body of the document.) I assume something is getting run at \begin{document} which overrides settings configured in the preamble. (I guess to do with the document's primary language.)

Here is a solution, patching the title bibmacro – but it should be thoroughly tested for side effects, as there is after the modified fragment a \printfield{titleaddon}, for which I do not know whether this patch would be problematic. Also the title bibmacro is used for other types of entry, and in other bibmacros, so I included a test to see if we are in an article entry, but if it's OK for all types of entry that use "title", this test can be deleted.

\documentclass{article}
\usepackage{filecontents}
\usepackage[nynorsk]{babel}
\usepackage[style = american, norwegian = quotes]{csquotes}
\usepackage[style = authoryear-comp, language = nynorsk]{biblatex}

\usepackage{xpatch}
\xpatchbibmacro{title}{\printfield[titlecase]{subtitle}}%
{}{}%

\begin{filecontents}{\jobname.bib}
@article{myarticle,
AUTHOR = "John Doe",
TITLE = "My article",
JOURNALTITLE = "A Cool Journal",
VOLUME = "16",
YEAR = "2005"}
\end{filecontents}