josephwright / biblatex-ieee

A biblatex implementation of the IEEE bibliography style
LaTeX Project Public License v1.3c
47 stars 14 forks source link

Error using quotation marks in title when using ngerman babel option #41

Closed mpolitze closed 6 years ago

mpolitze commented 6 years ago

When using the ngerman option of babel, biblatex-ieee fails to compile bibliographies that display quotation marks (\textquotedbl). It works fine when using the numric style though.

This likely has to do with babel using " to produce umlauts like "a is rendered as ä. It works fine using the numericor authoryear styles.

Please also see the following example demonstrating the issue:

% !TeX TXS-program:bibliography = txs:///biber
\documentclass{scrbook}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}

%\usepackage[english]{babel} % works as expected with ieee and default style
\usepackage[ngerman,english]{babel} % compilation fails with ieee style
%\usepackage[ngerman]{babel} % compilation fails with ieee style

\usepackage{csquotes}
\usepackage{filecontents}
\begin{filecontents}{b.bib}
% This file was created with Citavi 6.0.0.2

@article{Muster,
 author = {Muster, Max},
 title = {{The Project {\textquotedbl}Projectname{\textquotedbl} is nice}}
}

\end{filecontents}
\usepackage[style=ieee]{biblatex} % fails with "Argument of " has an extra }" if babel includes option ngerman
%\usepackage{biblatex} % works with all options of babel
\addbibresource{b.bib}

\begin{document}
\cite{Muster}
\printbibliography
\end{document}

As a workaround I found that setting the option shorthands=off of the babel package allows compiling the document.

Any help on this topic would be greatly appreciated.

josephwright commented 6 years ago

I've taken a look at this. The problem is that the ieee style needs to apply sentence casing to the title. I'm tracking down why, but for some reason the title is being passed as

{The Project {"}Projectname{"} is nice}

not as

{The Project {\textquotedbl}Projectname{\textquotedbl} is nice}

and it's that which causes the problem.

josephwright commented 6 years ago

This is a biblatex core issue ... I'll have to take up there.