如何避免每章脚注编号从 1 重新开始?

如何避免每章脚注编号从 1 重新开始?

我有 3 个问题:

  • 每章的脚注编号从 1 重新开始,但我希望它按顺序不断增加。如何做到这一点?

  • 并且在脚注中,不是 [1],而是这样的:[Altiok, Tayfur; Melamed, Benjamin, 事故或无意伤害]。

  • 在参考书目中,引用信息前没有出现 [1],但我希望它出现。

我应该如何修正脚本以解决这些问题?(为了确保它适用于 partcite 和脚注引用,我保留了它们的脚本。)

    \documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[backend=bibtex,
            style=authortitle-comp,
            natbib=true,bibstyle=numeric
            ]{biblatex}
\usepackage{blindtext}
\makeatletter
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
\makeatother
\DeclareCiteCommand{\partcite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \mkbibbrackets{\usebibmacro{cite}}%
   \setunit{\addnbspace}
   \printnames{labelname}%
   \setunit{\labelnamepunct}
   \printfield[citetitle]{title}}%
  {\addsemicolon\space}
  {\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\partcites}{\partcite}{\addsemicolon\space}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Electronic{unintentional,
  Title                    = {Accidents or Unintentional Injuries},
  Author                   = {{Altiok, Tayfur; Melamed, Benjamin}},
  Url                      = {http://www.cdc.gov/nchs/fastats/accidental-injury.htm},
  Urldate                  = {2016-08-10}
}
@Book{HP,
  Title                    = {Harry Potter and the Philosopher's Stone},
  Author                   = {{Rowling,J. K. }},
  Date                     = {1997}
}

\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

\chapter{this is chapter 1}
Here is a test \footnote{\label{unintentional}\partcite{unintentional}
}

\blindtext

\chapter{this is chapter 2}

This is true. \footnoteref{unintentional}.

\blindtext  \footnote{\label{HP}\partcite{HP}
}
\printbibliography
\end{document}

答案1

使用

[...]
\usepackage{remreset}
\makeatletter
\@removefromreset{footnote}{chapter}
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
\makeatother
[...]

答案2

你可以做

\usepackage{chngcntr}
\counterwithout*{footnote}{chapter}

这是完整的例子,我修复了参考书目项目中的错误:作者之间必须用and;分隔,该字段中不能有双括号。

\documentclass[12pt]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{chngcntr}
\usepackage{csquotes}
\usepackage[
  %backend=bibtex,
  style=authortitle-comp,
  natbib=true,bibstyle=numeric
]{biblatex}
\usepackage{blindtext}

\makeatletter
\newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}\@footnotemark}
\makeatother
\DeclareCiteCommand{\partcite}
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \mkbibbrackets{\usebibmacro{cite}}%
   \setunit{\addnbspace}
   \printnames{labelname}%
   \setunit{\labelnamepunct}
   \printfield[citetitle]{title}}%
  {\addsemicolon\space}
  {\usebibmacro{postnote}}
\DeclareMultiCiteCommand{\partcites}{\partcite}{\addsemicolon\space}

\counterwithout*{footnote}{chapter}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Electronic{unintentional,
  Title                    = {Accidents or Unintentional Injuries},
  Author                   = {Altiok, Tayfur and Melamed, Benjamin},
  Url                      = {http://www.cdc.gov/nchs/fastats/accidental-injury.htm},
  Urldate                  = {2016-08-10}
}
@Book{HP,
  Title                    = {Harry {Potter} and the Philosopher's Stone},
  Author                   = {Rowling, J. K.},
  Date                     = {1997}
}

\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

\chapter{this is chapter 1}
Here is a test\footnote{\label{unintentional}\partcite{unintentional}}

\blindtext

\chapter{this is chapter 2}

This is true.\footnoteref{unintentional}

\blindtext\footnote{\label{HP}\partcite{HP}}

\printbibliography

\end{document}

相关内容