大家早上好,我是论坛新手,很少使用 Latex。如果问题很愚蠢,请见谅。我使用 tufte-book 类创建了一个文本,我喜欢它放置图像和旁注的方式,但我想放置一些脚注,不是放在侧面,而是放在经典的页脚位置。我发现 tufte-class 与 footmisc 不兼容。我该怎么办?谢谢
答案1
Tufte 课程的来源是这样的:
% Transform existing \footnotes into \sidenotes
% Sidenote: ``Where God meant footnotes to go.'' ---Tufte
这也解释了为什么tufte-book
与之不兼容footmisc
以及为什么它的脚注是侧注。
话虽如此,我们可以解决这个问题。但我要告诉你,这是一种卑鄙的打击。
\footnote
我们可以从中复制命令和相关项的定义latex.ltx
,并将其制作成一个包。然后只需将此包包含在您的 tufte-book 中,您就可以开始了。
包文件tuftefoot.sty
:
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{tuftefoot}[2018/02/27 v0.1 Footnotes for tufte-book class]
\newinsert\footins
\skip\footins=\bigskipamount % space added when footnote is present
\count\footins=1000 % footnote magnification factor (1 to 1)
\dimen\footins=8in % maximum footnotes per page
\def\TFfootnoterule{\kern-3\p@
\hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high
\@definecounter{footnote}
\def\TFthefootnote{\@arabic\c@footnote}
\@definecounter{mpfootnote}
\def\TFthempfootnote{{\itshape\@alph\c@mpfootnote}}
\def\TF@makefnmark{\hbox{\TF@textsuperscript{\normalfont\@thefnmark}}}
\DeclareRobustCommand*\textsuperscript[1]{%
\TF@textsuperscript{\selectfont#1}}
\def\TF@textsuperscript#1{%
{\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
\DeclareRobustCommand*\textsubscript[1]{%
\TF@textsubscript{\selectfont#1}}%
\def\TF@textsubscript#1{%
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}%
\def\TF@textsubscript#1{%
{\m@th\ensuremath{_{\mbox{\fontsize\sf@size\z@#1}}}}}
\newdimen\TFfootnotesep
\def\TFfootnote{\@ifnextchar[\TF@xfootnote{\stepcounter\TF@mpfn
\protected@xdef\@thefnmark{\TFthempfn}%
\TF@footnotemark\TF@footnotetext}}
\def\TF@xfootnote[#1]{%
\begingroup
\csname c@\TF@mpfn\endcsname #1\relax
\unrestored@protected@xdef\@thefnmark{\TFthempfn}%
\endgroup
\TF@footnotemark\TF@footnotetext}
\long\def\TF@footnotetext#1{\insert\footins{%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\TFfootnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth \@parboxrestore
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark
}%
\color@begingroup
\@makefntext{%
\rule\z@\TFfootnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}%
\def\TFfootnotemark{%
\@ifnextchar[\TF@xfootnotemark
{\stepcounter{footnote}%
\protected@xdef\@thefnmark{\TFthefootnote}%
\TF@footnotemark}}
\def\TF@xfootnotemark[#1]{%
\begingroup
\c@footnote #1\relax
\unrestored@protected@xdef\@thefnmark{\TFthefootnote}%
\endgroup
\TF@footnotemark}
\def\TF@footnotemark{%
\leavevmode
\ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
\TF@makefnmark
\ifhmode\spacefactor\@x@sf\fi
\relax}
\def\TFfootnotetext{%
\@ifnextchar [\TF@xfootnotenext
{\protected@xdef\@thefnmark{\TFthempfn}%
\TF@footnotetext}}
\def\TF@xfootnotenext[#1]{%
\begingroup
\csname c@\TF@mpfn\endcsname #1\relax
\unrestored@protected@xdef\@thefnmark{\TFthempfn}%
\endgroup
\TF@footnotetext}
\def\TF@mpfn{footnote}
\def\TFthempfn{\TFthefootnote}
我将所有实例重命名为\footnote
、\TFfootnote
为\footnotemark
等等\TFfootnotemark
,以避免冲突。
要使用它,只需将上面的代码保存为tuftefoot.sty
。使用起来非常简单:
\documentclass{tufte-book}
\usepackage{tuftefoot}
\begin{document}
Some dummy text.\TFfootnotemark
\TFfootnotetext{\label{fn1}With some footnote.}
More dummy text.\TFfootnote{\label{fn2}With more footnote.}
See footnotes~\ref{fn1} and~\ref{fn2}. They are important.
\end{document}