2

I have a LaTex document using biblatex and the verbose-trad2 style, here is a MWE:

\documentclass[chapterprefix,twoside,12pt,DIV=12,appendixprefix=true,headings=onelineappendix]{scrbook}
\KOMAoptions{headsepline=true, chapterprefix=true}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[main=french,english]{babel}
\usepackage[backend=biber,style=verbose-trad2,url=false,citepages=omit,dateabbrev=false,singletitle=true]{biblatex}
\DefineBibliographyStrings{french}{
  pages = {pp\adddot},
  page = {p\adddot},
  editors = {(dir.),},
  in = \iffieldequalstr{entrytype}{article}{}{dans},
  opcit = \iffieldequalstr{entrytype}{article}{art\adddotspace cit\adddot}{op\adddotspace cit\adddot}
}

\begin{filecontents}{testbibliography.bib} @incollection{kraatzOrganizationalImplicationsInstitutional2008, title = {Organizational {{Implications}} of {{Institutional Pluralism}}}, booktitle = {The {{SAGE Handbook}} of {{Organizational Institutionalism}}}, author = {Kraatz, Matthew and Block, Emiliy}, editor = {Greenwood, Royston and Oliver, Christine and Suddaby, Roy and Sahlin, Kerstin}, date = {2008}, pages = {243--275}, publisher = {{SAGE Publications Ltd}}, location = {{London}}, url = {https://sk.sagepub.com/reference/hdbk_orginstitution}, urldate = {2020-11-14}, langid = {english} } @article{krackhardtPredictingNetworksNonparametric1988, title = {Predicting with Networks: {{Nonparametric}} Multiple Regression Analysis of Dyadic Data}, shorttitle = {Predicting with Networks}, author = {Krackhardt, David}, date = {1988-12}, journaltitle = {Social Networks}, shortjournal = {Social Networks}, volume = {10}, pages = {359--381}, url = {http://www.sciencedirect.com/science/article/pii/0378873388900044}, urldate = {2016-03-02}, langid = {english}, number = {4} } \end{filecontents} \addbibresource{testbibliography.bib}

\DeclareAutoCiteCommand{footnote}{\smartcite}{\smartcites} \ExecuteBibliographyOptions{autocite=footnote}

\renewcommand{\newunitpunct}[0]{\addcomma\addspace} \renewcommand*{\intitlepunct}{\space}

\DeclareNameAlias{sortname}{last-first} \renewcommand*{\revsdnamepunct}{}

% op cit avec une seule oeuvre \renewbibmacro*{cite:title}{% \printtext[bibhyperlink]{% \ifsingletitle{}{\printfield[citetitle]{labeltitle}}% \setunit{\nametitledelim}% \bibstring[\mkibid]{opcit}}}

% numéro de revue entre parenthèse \renewbibmacro{volume+number+eid}{% \printfield{volume}% % \setunit{\adddot}% DELETED \setunit*{\addnbspace}% NEW (optional); there's also \addnbthinspace \printfield{number}% \setunit{\addcomma\space}% \printfield{eid}} \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

% comma after journal \renewbibmacro{journal+issuetitle}{% \usebibmacro{journal}% \setunit{\addcomma\space}% \iffieldundef{series} {} {\newunit \printfield{series}% \setunit{\addspace}}% \usebibmacro{volume+number+eid}% \setunit{\addspace}% \usebibmacro{issue+date}% \setunit{\addcolon\space}% \usebibmacro{issue}% \newunit} % paranthèse date \renewbibmacro{issue+date}{% \setunit{\addcomma\space}% NEW % \printtext[parens]{% DELETED \iffieldundef{issue} {\usebibmacro{date}} {\printfield{issue}% \setunit{\addspace}% % \usebibmacro{date}}}% DELETED \usebibmacro{date}}% NEW \newunit}

% remettre le nom de l'auteur en première note de page, pas ibidem \renewbibmacro*{cite}{% \usebibmacro{cite:citepages}% \global\togglefalse{cbx:fullcite}% \global\togglefalse{cbx:loccit}% \bibhypertarget{cite\the\value{instcount}}{% \ifciteseen {\iffieldundef{shorthand} {\iffirstonpage% NEW {\usebibmacro{cite:name}% NEW \usebibmacro{cite:title}}% NEW {\ifciteibid {\usebibmacro{cite:ibid}} {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}} {\usebibmacro{cite:idem}} {\usebibmacro{cite:name}}% \usebibmacro{cite:title}}% % \usebibmacro{cite:save}}% DELETED \usebibmacro{cite:save}}}% NEW {\usebibmacro{cite:shorthand}}} {\usebibmacro{cite:full}% \usebibmacro{cite:save}}}}

\begin{document}

\mainmatter test\autocite{krackhardtPredictingNetworksNonparametric1988} and test\autocite{kraatzOrganizationalImplicationsInstitutional2008}

\end{document}

This code gives me this result: enter image description here

As you can see, a double space is added right before the journal title for articles. The issue comes from this line:

  in = \iffieldequalstr{entrytype}{article}{}{dans},

By removing the "in" before the journal title, it leaves the two spaces before and after the in. How can I avoid this?

mhr
  • 79

1 Answers1

2

I think the best way to suppress the "in:" for @article entries is to use a style of my biblatex-ext bundle and the articlein=false option. See also Suppress "In:" biblatex.

It is almost never a good idea to make a bibstring empty (even more so conditionally empty), because biblatex may think it printed something when it did not actually print anything.

The biblatex-ext styles also make your other modifications of the @article output much easier.

\documentclass[chapterprefix, twoside, 12pt, DIV=12,
  appendixprefix=true, headings=onelineappendix]{scrbook}
\KOMAoptions{headsepline=true, chapterprefix=true}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[main=french,english]{babel}
\usepackage[
  backend=biber,
  style=ext-verbose-trad2,
  url=false,
  citepages=omit,
  dateabbrev=false,
  singletitle=true,
  articlein=false,
]{biblatex}

\DefineBibliographyStrings{french}{ pages = {pp\adddot}, page = {p\adddot}, in = {dans}, opcit = \iffieldequalstr{entrytype}{article} {art\adddotspace cit\adddot} {op\adddotspace cit\adddot}, }

\DeclareAutoCiteCommand{footnote}{\smartcite}{\smartcites} \ExecuteBibliographyOptions{autocite=footnote}

\renewcommand{\newunitpunct}[0]{\addcomma\addspace} \renewcommand*{\intitlepunct}{\space}

\DeclareNameAlias{sortname}{family-given} \renewcommand*{\revsdnamepunct}{}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}} \DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareFieldAlias{translatortype}{editortype} \DeclareDelimAlias{translatortypedelim}{editortypedelim}

% op cit avec une seule oeuvre \renewbibmacro*{cite:title}{% \printtext[bibhyperlink]{% \ifsingletitle{}{\printfield[citetitle]{labeltitle}}% \setunit{\nametitledelim}% \bibstring[\mkibid]{opcit}}}

\renewcommand*{\volnumdelim}{\addnbspace} \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}

\renewcommand*{\jourvoldelim}{\addcomma\space}

\DeclareFieldFormat{issuedate}{#1}

% remettre le nom de l'auteur en première note de page, pas ibidem \renewbibmacro*{cite}{% \usebibmacro{cite:citepages}% \global\togglefalse{cbx:fullcite}% \global\togglefalse{cbx:loccit}% \bibhypertarget{cite\the\value{instcount}}{% \ifciteseen {\iffieldundef{shorthand} {\iffirstonpage% NEW {\usebibmacro{cite:name}% NEW \usebibmacro{cite:title}}% NEW {\ifciteibid {\usebibmacro{cite:ibid}} {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}} {\usebibmacro{cite:idem}} {\usebibmacro{cite:name}}% \usebibmacro{cite:title}}% % \usebibmacro{cite:save}}% DELETED \usebibmacro{cite:save}}}% NEW {\usebibmacro{cite:shorthand}}} {\usebibmacro{cite:full}% \usebibmacro{cite:save}}}}

\begin{filecontents}{\jobname.bib} @incollection{kraatzOrganizationalImplicationsInstitutional2008, title = {Organizational Implications of Institutional Pluralism}, booktitle = {The SAGE Handbook of Organizational Institutionalism}, author = {Kraatz, Matthew and Block, Emiliy}, editor = {Greenwood, Royston and Oliver, Christine and Suddaby, Roy and Sahlin, Kerstin}, date = {2008}, pages = {243--275}, publisher = {SAGE Publications Ltd}, location = {London}, url = {https://sk.sagepub.com/reference/hdbk_orginstitution}, urldate = {2020-11-14}, langid = {english}, } @article{krackhardtPredictingNetworksNonparametric1988, title = {Predicting with Networks}, subtitle = {Nonparametric Multiple Regression Analysis of Dyadic Data}, author = {Krackhardt, David}, date = {1988-12}, journaltitle = {Social Networks}, shortjournal = {Social Networks}, volume = {10}, pages = {359--381}, url = {http://www.sciencedirect.com/science/article/pii/0378873388900044}, urldate = {2016-03-02}, langid = {english}, number = {4}, } \end{filecontents} \addbibresource{\jobname.bib} \begin{document}

\mainmatter test\autocite{krackhardtPredictingNetworksNonparametric1988} and test\autocite{kraatzOrganizationalImplicationsInstitutional2008} \end{document}

David Krackhardt, « Predicting with Networks, Nonparametric Multiple Regression Analysis of Dyadic Data », Social Networks, 10 (4) décembre 1988, pp. 359-381.//Matthew Kraatz et Emiliy Block, « Organizational Implications of Institutional Pluralism », dans The SAGE Handbook of Organizational Institutionalism, sous la dir. de Royston Greenwood et al., London : SAGE Publications Ltd, 2008, pp. 243-275.

moewe
  • 175,683