I replicated the Journal of Finance reference standard and when I have an article title with a question mark, I also get a comma after it in the references. However, I try to remove the comma if there is a question mark.
Here I created a simple example:
@article{examplesource,
title={Title of article with question mark?},
author={LastName1, FirstName1 and LastName2, FirstName2 and LastName3, FirstName3},
journal={Journal of Finance},
volume={40},
number={1},
pages={3--73},
year={2005}}
\documentclass{article}
\usepackage[style=ext-authoryear, backend=biber, giveninits=true, uniquelist = false, uniquename=init, isbn=false, maxcitenames=3, dashed=false, maxbibnames=999, doi=false, url=false,giveninits=false]{biblatex}
%Bibliography file with sources
\addbibresource{biblatex-examples.bib}
%Indent of following references rows
\setlength{\bibhang}{15pt}
\renewcommand*{\labelnamepunct}{\addspace}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1}
\DeclareFieldFormat{titlecase}{\MakeSentenceCase*{#1}}
%Article definition
\renewbibmacro*{in:}{%
\ifentrytype{article}
{\setunit{\addcomma\space}}
{\printtext{\bibstring{in}\intitlepunct}}}
%Title of Journal
\DeclareFieldFormat{journaltitlecase}{#1}
\renewbibmacro*{journal}{%
\ifboolexpr{
test {\iffieldundef{journaltitle}}and
test {\iffieldundef{journalsubtitle}}}{}
{\printtext[journaltitle]{%
\printfield[journaltitlecase]{journaltitle}%
\setunit{\subtitlepunct}%
\printfield[journaltitlecase]{journalsubtitle}}}}
%Article number, volume & page
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat[article,periodical]{volume}{{#1}}
\DeclareFieldFormat{pages}{#1}
%Parentheses instead of commas in text
\UndeclareInnerCiteDelims{parencite}
\DeclareInnerCiteDelims{parencite}{(}{)}
%Commas instead of parentheses for years in references
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}
\ExecuteBibliographyOptions{innamebeforetitle=true} \DeclareDelimFormat[bib]{nametitledelim}{\addcomma\space}
\begin{document}
\textcite{examplesource} lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.\\
\printbibliography
\end{document}
I get a comma after the question mark, but I want to only remove the comma in case the title includes a question mark.
Thanks a lot for the suggestions!
biblatex
with both optionsgiveninits=true
andgiveninits=false
. There's no real conflict, but be aware that later options overwrite earlier ones, sogiveninits=true
is redundant.