我正在使用下面的代码,使用 manyfoot 包在页面底部实现脚注和脚注引用。
代码中使用的所有内容都可以在这里找到:Biblatex 仅引用一次脚注,并使用括号和Biblatex footcite:自定义 biblatex 和参考书目样式和如何删除 doi 字段中的前缀(如果存在)和消除由于 setspace 设置而导致的单个脚注(以及显示在页面底部的脚注)内不需要的垂直间距和如何水平对齐跨多行的较长脚注(以及显示在页面底部的脚注)内的文本
\documentclass[fontsize=11pt,DIV=11]{scrbook}
\usepackage[USenglish]{babel} % General language setting & Hyphenation; vor newpxtext laden!
\frenchspacing % Deaktiviert /Nonfrenchspacing von USenglish
\usepackage{newpxtext}
\usepackage{newpxmath}
\linespread{1.05}
\usepackage{setspace}
\setstretch{1.3}
\usepackage{xcolor}
\usepackage{manyfoot}
\usepackage[babel]{csquotes}
\usepackage[backend=biber,style=chem-angew,mcite,subentry]{biblatex}
\usepackage{hyperref}
\hypersetup{%
colorlinks,
linkcolor={red!0!black},
citecolor={blue!0!black},
urlcolor={blue!80!black}
}
\makeatletter
\long\def\MFL@fnoteplain#1#2#3{\NCC@makefnmark{#2}%
\MFL@insert#1{\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\hsize\MFL@columnwidth \@parboxrestore
\protected@edef\@currentlabel{\@thefnmark}%
\color@begingroup
\MFL@applyhook{#1}%
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#3\@finalstrut\strutbox}%
\color@endgroup
}%
}
\makeatother
\ExecuteBibliographyOptions{citetracker=true,sorting=none,maxcitenames=10,doi=false,url=false,isbn=false,hyperref=true,backref=false}
\DefineBibliographyStrings{ngerman}{
andothers = {\textit{et~al\adddot}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Citation footnotes: use \footnoteA
\SetFootnoteHook{%
\hangindent=1.8em\noindent}
\DeclareNewFootnote{A}
% Vanilla footnotes: use \footnoteB
\SetFootnoteHook{%
\hangindent=1.8em\noindent}
\DeclareNewFootnote{B}
% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\makeatletter
\newtoggle{cbx@togcite}
% Citation number superscript in brackets
\newcommand*{\cbx@makefntext}[1]{%
\hb@[email protected]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}}
{\@textsuperscript{\normalfont\@thefnmark}}%
\hss}%
#1%
\global\togglefalse{cbx@togcite}}
\renewcommand*{\@makefntext}{\cbx@makefntext}
% Citation number superscript in brackets (for babel french)
\ifdef{\@makefntextFB}
{\renewcommand\@makefntextFB{\cbx@makefntext}}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mostly verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{sfcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{sfcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\global\toggletrue{cbx@togcite}%
\noexpand\footnotetextA[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}\addperiod}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{\mkbibbrackets{#1}}%
\cbx@citehook%
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbibmacro{string+doiurlisbn}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
\iffieldundef{isbn}{%
\iffieldundef{issn}{%
#1%
}{%
\href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}%
}%
}{%
\href{http://books.google.com/books?vid=ISBN\thefield{isbn}}{#1}%
}%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{https://doi.org/\thefield{doi}}{#1}%
}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareFieldFormat{journaltitle}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[
fieldsource=doi,
match=\regexp{https?://(dx.)?doi.org/(.+)},
replace=\regexp{$2}%$
]
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents}[force]{\jobname.bib}
@article{Frank1953,
author = {Frank, F. C.},
title = {On spontaneous asymmetric synthesis},
journal = {Biochim. Biophys. Acta},
year = {1953},
volume = {11},
pages = {459-463},
doi = {http://dx.doi.org/10.1016/0006-3002(53)90082-1},
url = {http://www.sciencedirect.com/science/article/pii/0006300253900821},
}
@article{Kagan1986,
author = {Puchot, C. and Samuel, O. and Dunach, E. and Zhao, S.
and Agami, C. and Kagan, H. B.},
title = {Nonlinear effects in asymmetric synthesis. Examples in
asymmetric oxidations and aldolization reactions},
journal = {J. Am. Chem. Soc.},
year = {1986},
volume = {108},
number = {9},
pages = {2353-2357},
doi = {10.1021/ja00269a036},
}
@article{Soai1995,
author = {Soai, Kenso and Shibata, Takanori and Morioka, Hiroshi
and Choji, Kaori},
title = {Asymmetric autocatalysis and amplification of enantiomeric
excess of a chiral molecule},
journal = {Nature},
year = {1995},
volume = {378},
number = {6559},
pages = {767-768},
doi = {10.1038/378767a0}
}
@article{Brown2001,
author = {Blackmond, Donna G. and McMillan, Christopher R.
and Ramdeehul, Shailesh and Schorm, Andrea and Brown, John M.},
title = {Origins of Asymmetric Amplification in Autocatalytic
Alkylzinc Additions},
journal = {J. Am. Chem. Soc.},
year = {2001},
volume = {123},
number = {41},
pages = {10103-10104},
doi = {10.1021/ja0165133},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\chapter{Title}
\null\vfill\noindent
Vanilla footnote.\footnoteB{This is a very very very very very very very very very very very very very very very very very very long Vanilla footnote text.}
First citation.\sfcite{Frank1953} Some random text here.
First citation.\sfcite{Brown2001}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First ``multi'' citation.\sfcite{Frank1953,Brown2001,Soai1995}
\chapter{Title}
\null\vfill\noindent
Second citation.\sfcite{Frank1953}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
Second citation.\sfcite{Soai1995}
Second citation.\sfcite{Brown2001}\footnoteB{Vanilla footnote text.}
First citation.\sfcite{Kagan1986}
\printbibliography
\end{document}
moewe 的解决方案重新定义了 manyfoot 等效的 @footnotetext,使得页面底部的脚注部分能够实现良好、统一的间距。
现在我想稍微增加脚注内的垂直间距(即脚注之间和内部的均匀间距 (!))。增加行距\linespread{1.05}
不再影响脚注。使用\setstretch{1.3}
包也不会影响这些脚注。moewe 建议通过更改setspace
来尝试,但这只会改变脚注之间的间距(而不是跨多行的脚注内的间距)。\footnotesep
\setlength{\footnotesep}{2\footnotesep}
示例 1:\linespread{1.05}
和\setstretch{1.3}
示例 2:\linespread{2.00}
和\setstretch{2.0}
例 3:\linespread{1.05}
and \setstretch{1.3}
and\setlength{\footnotesep}{2\footnotesep}
如何均匀增加这些脚注内的垂直间距?
答案1
在消除由于 setspace 设置而导致的单个脚注(以及显示在页面底部的脚注)内不需要的垂直间距我们明确地将脚注切换回单倍行距,无论全局\setstretch
是什么。如果您还想\setstretch
应用于脚注,请删除。由于这首先\def\baselinestretch {\setspace@singlespace}%
是重新定义的全部目的,您可以\MFL@fnoteplain
消除整个街区
\makeatletter
\long\def\MFL@fnoteplain#1#2#3{\NCC@makefnmark{#2}%
\MFL@insert#1{\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\hsize\MFL@columnwidth \@parboxrestore
\protected@edef\@currentlabel{\@thefnmark}%
\color@begingroup
\MFL@applyhook{#1}%
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#3\@finalstrut\strutbox}%
\color@endgroup
}%
}
\makeatother
重新定义后,\setstretch
再次应用于脚注,并扩大行距(因此空间之内脚注被放大)。
空间之间脚注由 控制\footnotesep
,您可以轻松地将该长度乘以任何因子
\setlength{\footnotesep}{<factor>\footnotesep}
在 MWE 中,我选择了因子 2 来夸大效果,但您当然可以将这两个2
s 更改为1.3
。
\documentclass[fontsize=11pt,DIV=11]{scrbook}
\usepackage[USenglish]{babel} % General language setting & Hyphenation; vor newpxtext laden!
\frenchspacing % Deaktiviert /Nonfrenchspacing von USenglish
\usepackage{newpxtext}
\usepackage{newpxmath}
\usepackage{setspace}
\setstretch{2}
\setlength{\footnotesep}{2\footnotesep}
\usepackage{lipsum}
\usepackage{xcolor}
\usepackage{manyfoot}
\usepackage[babel]{csquotes}
\usepackage[backend=biber,style=chem-angew,mcite,subentry]{biblatex}
\usepackage{hyperref}
\hypersetup{%
colorlinks,
linkcolor={red!0!black},
citecolor={blue!0!black},
urlcolor={blue!80!black}
}
\ExecuteBibliographyOptions{citetracker=true,
sorting=none,
maxcitenames=10,
doi=false, url=false, isbn=false,
backref=false}
\DefineBibliographyStrings{ngerman}{
andothers = {\textit{et~al\adddot}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Citation footnotes: use \footnoteA
\SetFootnoteHook{%
\hangindent=1.8em\noindent}
\DeclareNewFootnote{A}
% Vanilla footnotes: use \footnoteB
\SetFootnoteHook{%
\hangindent=1.8em\noindent}
\DeclareNewFootnote{B}
% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\makeatletter
\newtoggle{cbx@togcite}
% Citation number superscript in brackets
\newcommand*{\cbx@makefntext}[1]{%
\hb@[email protected]{%
\iftoggle{cbx@togcite}
{\@textsuperscript{\normalfont[\@thefnmark]}}
{\@textsuperscript{\normalfont\@thefnmark}}%
\hss}%
#1%
\global\togglefalse{cbx@togcite}}
\renewcommand*{\@makefntext}{\cbx@makefntext}
% Citation number superscript in brackets (for babel french)
\ifdef{\@makefntextFB}
{\renewcommand\@makefntextFB{\cbx@makefntext}}
{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Mostly verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
{\usebibmacro{cite:init}%
\let\multicitedelim=\supercitedelim
\iffieldundef{prenote}
{}
{\BibliographyWarning{Ignoring prenote argument}}%
\iffieldundef{postnote}
{}
{\BibliographyWarning{Ignoring postnote argument}}}
{\usebibmacro{citeindex}%
\usebibmacro{sfcite}%
\usebibmacro{cite:comp}}
{}
{\usebibmacro{cite:dump}}
\newbibmacro*{sfcite}{%
\ifciteseen
{}
{\xappto\cbx@citehook{%
\global\toggletrue{cbx@togcite}%
\noexpand\footnotetextA[\thefield{labelnumber}]{%
\fullcite{\thefield{entrykey}}\addperiod}}}}
\newrobustcmd{\cbx@superscript}[1]{%
\mkbibsuperscript{\mkbibbrackets{#1}}%
\cbx@citehook%
\global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newbibmacro{string+doiurlisbn}[1]{%
\iffieldundef{doi}{%
\iffieldundef{url}{%
\iffieldundef{isbn}{%
\iffieldundef{issn}{%
#1%
}{%
\href{http://books.google.com/books?vid=ISSN\thefield{issn}}{#1}%
}%
}{%
\href{http://books.google.com/books?vid=ISBN\thefield{isbn}}{#1}%
}%
}{%
\href{\thefield{url}}{#1}%
}%
}{%
\href{https://doi.org/\thefield{doi}}{#1}%
}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareFieldFormat{journaltitle}{\usebibmacro{string+doiurlisbn}{\mkbibemph{#1}}}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[
fieldsource=doi,
match=\regexp{https?://(dx.)?doi.org/(.+)},
replace=\regexp{$2}%$
]
}
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{filecontents}[force]{\jobname.bib}
@article{Frank1953,
author = {Frank, F. C.},
title = {On spontaneous asymmetric synthesis},
journal = {Biochim. Biophys. Acta},
year = {1953},
volume = {11},
pages = {459-463},
doi = {http://dx.doi.org/10.1016/0006-3002(53)90082-1},
url = {http://www.sciencedirect.com/science/article/pii/0006300253900821},
}
@article{Kagan1986,
author = {Puchot, C. and Samuel, O. and Dunach, E. and Zhao, S.
and Agami, C. and Kagan, H. B.},
title = {Nonlinear effects in asymmetric synthesis. Examples in
asymmetric oxidations and aldolization reactions},
journal = {J. Am. Chem. Soc.},
year = {1986},
volume = {108},
number = {9},
pages = {2353-2357},
doi = {10.1021/ja00269a036},
}
@article{Soai1995,
author = {Soai, Kenso and Shibata, Takanori and Morioka, Hiroshi
and Choji, Kaori},
title = {Asymmetric autocatalysis and amplification of enantiomeric
excess of a chiral molecule},
journal = {Nature},
year = {1995},
volume = {378},
number = {6559},
pages = {767-768},
doi = {10.1038/378767a0}
}
@article{Brown2001,
author = {Blackmond, Donna G. and McMillan, Christopher R.
and Ramdeehul, Shailesh and Schorm, Andrea and Brown, John M.},
title = {Origins of Asymmetric Amplification in Autocatalytic
Alkylzinc Additions},
journal = {J. Am. Chem. Soc.},
year = {2001},
volume = {123},
number = {41},
pages = {10103-10104},
doi = {10.1021/ja0165133},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\chapter{Title}
\null\vfill\noindent
\lipsum
Vanilla footnote.\footnoteB{This is a very very very very very very very very very very very very very very very very very very long Vanilla footnote text.}
First citation.\sfcite{Frank1953} Some random text here.
First citation.\sfcite{Brown2001}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First ``multi'' citation.\sfcite{Frank1953,Brown2001,Soai1995}
\chapter{Title}
\null\vfill\noindent
Second citation.\sfcite{Frank1953}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
Second citation.\sfcite{Soai1995}
Second citation.\sfcite{Brown2001}\footnoteB{Vanilla footnote text.}
First citation.\sfcite{Kagan1986}
\printbibliography
\end{document}
如果你希望脚注中的行间距与正常文本中的行间距不同,你可以恢复重新定义\MFL@fnoteplain
并强制使用不同的值\baselinestretch
\makeatletter
\long\def\MFL@fnoteplain#1#2#3{\NCC@makefnmark{#2}%
\MFL@insert#1{\def\baselinestretch {4}%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\hsize\MFL@columnwidth \@parboxrestore
\protected@edef\@currentlabel{\@thefnmark}%
\color@begingroup
\MFL@applyhook{#1}%
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#3\@finalstrut\strutbox}%
\color@endgroup
}%
}
\makeatother