我希望脚注标记在文本主体中上标(例如脚注标记²),但在脚注中以正常大小显示,如下所示:
________________
2. Some footnote text
另外,如果标记出现在左边距,那就太好了,就像
________________
2. Some footnote text
(Bringhurst 在他的印刷风格的元素)
答案1
使用scrextend
包(的一部分KOMA-script
)自定义脚注。请参阅文档有关宏的KOMA-script
详细信息\deffootnote
。
\documentclass{article}
\usepackage{scrextend}
\deffootnote{0em}{1.6em}{\thefootnotemark.\enskip}
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\blindtext\footnote{\blindtext}
\end{document}
答案2
我已经找到了解决这个问题的方法,这是我通过反复试验找到的...我只是不知道这是否是最好的方法:
\makeatletter
\renewcommand\@makefntext[1]{%
\hspace*{-2em}
\parindent 0em
\noindent
\hb@xt@ 1.8em{\hss % There's the option of putting \hss before
\@thefnmark. }% or after \@thefnmark, aligning the footnote
#1}% marks to the right or to the left, respectively
\makeatother
\deffootnote
我尝试查看了中的定义scrextend.sty
,但它似乎比这复杂得多......
无论如何,@lockstep 提出的解决方案比这个简单得多,尽管这个解决方案可能对课程作者有用。希望它能有所帮助。
答案3
这是一种 TeX 方法,不需要包。我一直使用它。也许代码可以改进:
\documentclass{article}
\makeatletter
\newlength{\fnBreite}
\renewcommand{\@makefntext}[1]{%
\settowidth{\fnBreite}{\footnotesize\@thefnmark.i}
\protect\footnotesize\upshape%
\setlength{\@tempdima}{\columnwidth}\addtolength{\@tempdima}{-\fnBreite}%
\makebox[\fnBreite][l]{\@thefnmark.\phantom{}}%
\parbox[t]{\@tempdima}{\everypar{\hspace*{1em}}\hspace*{-1em}\upshape#1}}
\makeatother
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
\blindtext\footnote{\blindtext}
\end{document}
答案4
我发现使用scrextend
自定义脚注的软件包可能会引发问题(例如,在节标题中包含脚注时会隐藏脚注标记)。因此,这里有一个不依赖于scrextend
:
为了防止脚注标记在脚注文本中上标,您可以使用以下内容。我发现此代码不会造成将很长的脚注拆分到多页上的问题。
\documentclass{article}
\newlength{\templength}
\newlength{\textparindent}
\setlength{\textparindent}{\parindent}
\makeatletter
\let \@makefntextorig \@makefntext
% Saving the original definition so we can reuse it if necessary.
\newcommand{\@makefntextcustom}[1]{%
\parindent 2\textparindent%
\hspace{-\textparindent}%
\settowidth{\templength}{0}%
\ifnum\value{footnote}<10 \hspace{\templength}\else\fi%
\thefootnote.\enskip #1%
}
\renewcommand{\@makefntext}[1]{\@makefntextcustom{#1}}
\makeatother
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs.\par A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}
\end{document}
为了将脚注标记移到页边距(Bringhurst 样式),下面是上述内容的变体:
\documentclass{article}
\newlength{\templength}
\newlength{\textparindent}
\setlength{\textparindent}{\parindent}
\makeatletter
\let \@makefntextorig \@makefntext
% Saving the original definition so we can reuse it if necessary.
\newcommand{\@makefntextcustom}[1]{%
\parindent \textparindent%
\hspace{-\textparindent}\hspace{-100pt}\makebox[100pt][r]{\thefootnote.\enskip}%
#1%
}
\renewcommand{\@makefntext}[1]{\@makefntextcustom{#1}}
\makeatother
\usepackage[english]{babel}
\usepackage{blindtext}
\begin{document}
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote. A~\emph{long} test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs.\par A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs. A~\emph{very long} test footnote including two paragraphs.}\par
Some text.\footnote{A~test footnote.}\par
Some text.\footnote{A~test footnote.}\par
\setcounter{footnote}{0}
\makeatletter
\renewcommand{\@makefntext}[1]{\@makefntextorig{#1}}
\makeatother
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
Some text.\footnote{A~footnote after switching back to the original definition.}
\end{document}