参考书目中的句号后的脚注标记

参考书目中的句号后的脚注标记

我需要在某些参考文献的pagesaddendum字段中添加脚注。由于我无法控制在这些字段末尾附加的句点,因此脚注标记将出现在句点之前,这很丑陋。请参阅此 MWE:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{KandR,
  AUTHOR    = {Kernighan, Brian W. and Ritchie, Dennis M.},
  TITLE     = {{The C Programming Language Second Edition}},
  PUBLISHER = {Prentice-Hall, Inc.},
  YEAR      = {1988},
  ADDENDUM  = {An Addendum$^{\dagger}$}
}
\end{filecontents*}

\documentclass{article}
\usepackage[%
  backend=bibtex   % use BibTeX
% backend=biber    % Use biber
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
Hello \cite{KandR}. How are you?
\printbibliography
\end{document}

我正在使用 BibLaTeX 按参考书目进行处理。

答案1

在你的序言中添加以下几行:

\renewbibmacro*{addendum+pubstate}{%
 \iffieldundef{addendum}
 {\renewcommand{\finentrypunct}{\addperiod}}%
 {\renewcommand{\finentrypunct}{}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}}

检查字段是否addendum已定义。如果已定义,则删除条目末尾的句点。

显然,您必须在addendum字段中手动插入句点。

梅威瑟:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@BOOK{KandR,
  AUTHOR    = {Kernighan, Brian W. and Ritchie, Dennis M.},
  TITLE     = {{The C Programming Language Second Edition}},
  PUBLISHER = {Prentice-Hall, Inc.},
  YEAR      = {1988},
  ADDENDUM  = {An Addendum.$^{\dagger}$}
}
@BOOK{Book,
  AUTHOR    = {Author A.},
  TITLE     = {A title},
  PUBLISHER = {A publisher},
  YEAR      = {1988}
}
\end{filecontents*}

\documentclass{article}
\usepackage[%
  backend=bibtex   % use BibTeX
% backend=biber    % Use biber
]{biblatex}

\renewbibmacro*{addendum+pubstate}{%
 \iffieldundef{addendum}
 {\renewcommand{\finentrypunct}{\addperiod}}%
 {\renewcommand{\finentrypunct}{}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}}

\addbibresource{\jobname.bib}
\begin{document}
Hello \cite{KandR}. How are you?\cite{Book}
\printbibliography
\end{document} 

输出:

在此处输入图片描述

答案2

也许还有其他更简单的方法,但您可以直接在 bibtex 文件中指定一些字距调整。例如:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
    @BOOK{KandR,
        AUTHOR    = {Kernighan, Brian W. and Ritchie, Dennis M.},
        TITLE     = {{The C Programming Language Second Edition}},
        PUBLISHER = {Prentice-Hall, Inc.},
        YEAR      = {1988},
        ADDENDUM  = {An Addendum\kern.1em$^{\dagger}$\kern-.6em},
    }
\end{filecontents*}

\documentclass{article}
\usepackage[%
backend=bibtex   % use BibTeX
%backend=biber    % Use biber
]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
    Hello \cite{KandR}. How are you?
    \printbibliography
\end{document}

Bibtex 文件 + 字距调整

相关内容