定义作者的格式会导致脚注错位

定义作者的格式会导致脚注错位

我正在写我的论文(法语),并使用 Biblatex历史作为脚注中定义引用的样式。

除了正常的脚注(通过 执行\footnote{})外,我还经常使用\footcite[][]{}它来引用文章/书籍。

geschichtsfrkl 样式在作者的 LastName 和 FirstName 之间添加了逗号。但是,由于我的大学要求它们之间不能有逗号,因此我使用以下代码更新了样式:

\DeclareNameFormat{author}{
\nameparts{#1}%
{\autorenschriftart%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\addspace}%
\namepartfamily
}%
\ifdefvoid{\namepartgiven}{}{\space%
\ifbool{bbx:nurinit}{\namepartgiveni}{\namepartgiven}}%
\isdot%
\ifthenelse{\value{listcount}<\value{liststop}}%
{\autorentrennzeichen\addspace}{}%
}%

但是,这样做会破坏脚注的对齐方式,并在作者姓名前添加一个额外的空格。请查看下图以了解问题所在(13 和 16 是引文,其他是普通脚注)。对齐问题只发生在引文中,而不会发生在普通脚注中。

在此处输入图片描述

我至今还没能解决这个问题。任何帮助我都会非常感激。提前感谢你的帮助 :)

以下是 MWE:

\documentclass[
    french,
    10 pt,              
    openright
]{article}              
\usepackage[utf8]{inputenc}
\usepackage[style=geschichtsfrkl,
backend=biber,
sorting=nyt]{biblatex}

\DeclareNameFormat{author}{
\nameparts{#1}%
{\autorenschriftart%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\addspace}%
\namepartfamily
}%
\ifdefvoid{\namepartgiven}{}{\space%
\ifbool{bbx:nurinit}{\namepartgiveni}{\namepartgiven}}%
\isdot%
\ifthenelse{\value{listcount}<\value{liststop}}%
{\autorentrennzeichen\addspace}{}%
}%

\addbibresource{\thesis.bib}
\usepackage{filecontents}

\begin{filecontents}{\thesis.bib}

@article{deroudille2019extraterritorialite,
  title={L’extraterritorialit{\'e} du RGPD dans le contexte du “Cloud Act”},
  author={Deroudille, Alexis and Fatah, Farid},
  journal={Revue du marche commun et de l'Union Europ{\'e}enne},
  number={630},
  pages={442--452},
  year={2019},
  publisher={{\'E}ditions Techniques et Economiques}
}

@article{decaux1987application,
  title={L'application extraterritoriale du droit {\'e}conomique},
  journal = {Cahiers du Centre de Droit International de Nanterre},
  number = {3},
  author={Decaux, Emmanuel},
  year={1987},
  publisher={JSTOR}
}

@article{lehmann_m_legal_2017,
    title = {Legal fragmentation, extraterritoriality and uncertainty in global financial regulation},
    volume = {37},
    issn = {0143-6503},
    %language = {English},
    number = {2},
    journal = {Oxford Journal of Legal Studies},
    author = {{Lehmann}, Matthias},
    pages = {406-434},
    year = {2017},
    note = {OCLC: 7086651768},
    pages = {406--434}
}

\end{filecontents}

\begin{document}

Some text\footcite[Sample Pre-text][Post-text]{lehmann_m_legal_2017}, then some more text without pre- and post-notes\footcite[][]{decaux1987application}, and now a normal footnote\footnote{Hello world!}. One more citation just in case\footcite[][]{deroudille2019extraterritorialite}.

\end{document}

答案1

大卫·卡莱尔已经在评论中指出了代码的问题:你%在第一行就遗漏了一个符号。\DeclareNameFormat{author}{应该读作\DeclareNameFormat{author}{%

我只想说,处理名称格式的方式geschichtsfrkl以及问题的重新定义也是非常不标准的。

使用以下更标准的方法可以获得类似的结果。

\documentclass[
    french,
    10pt,
    openright
]{article}
\usepackage[utf8]{inputenc}
\usepackage[style=geschichtsfrkl,
backend=biber,
sorting=nyt]{biblatex}

\DeclareNameAlias{author}{family-given}

\renewcommand*{\revsdnamepunct}{}

\renewcommand*{\mkbibnamefamily}[1]{{\autorenschriftart #1}}

\DeclareDelimFormat{multinamedelim}{\autorentrennzeichen\space}
\DeclareDelimAlias*{finalnamedelim}{multinamedelim}


\begin{filecontents}{\jobname.bib}
@article{deroudille2019extraterritorialite,
  title={L’extraterritorialit{\'e} du RGPD dans le contexte du “Cloud Act”},
  author={Deroudille, Alexis and Fatah, Farid},
  journal={Revue du marche commun et de l'Union Europ{\'e}enne},
  number={630},
  pages={442--452},
  year={2019},
  publisher={{\'E}ditions Techniques et Economiques}
}
@article{decaux1987application,
  title={L'application extraterritoriale du droit {\'e}conomique},
  journal = {Cahiers du Centre de Droit International de Nanterre},
  number = {3},
  author={Decaux, Emmanuel},
  year={1987},
  publisher={JSTOR}
}
@article{lehmann_m_legal_2017,
    title = {Legal fragmentation, extraterritoriality and uncertainty in global financial regulation},
    volume = {37},
    issn = {0143-6503},
    %language = {English},
    number = {2},
    journal = {Oxford Journal of Legal Studies},
    author = {{Lehmann}, Matthias},
    pages = {406-434},
    year = {2017},
    note = {OCLC: 7086651768},
    pages = {406--434}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Some text\footcite[Sample Pre-text][Post-text]{lehmann_m_legal_2017},
then some more text without pre- and post-notes\footcite{decaux1987application}, 
and now a normal footnote\footnote{Hello world!}.
One more citation just in case\footcite{deroudille2019extraterritorialite}.
\end{document}

脚注中不包含不必要的空格。

相关内容