如何更改脚注中的脚注标记,使其采用普通脚注字体并成为连续脚注文本的一部分?
我现在拥有的最小工作示例:
\documentclass[a4paper]{memoir}
\usepackage[side,marginal]{footmisc}
\usepackage[raggedrightboxes]{ragged2e}
\usepackage{marginfix}
\usepackage{xcolor}
\def\footnotelayout{\color{gray}}
\begin{document}
Text text text.\footnote{footnote text}
\end{document}
在此示例中,标记是上标、负缩进且为黑色。我希望它采用正常字体,没有缩进,后跟一个短划线,并且像脚注的其余部分一样为灰色。理想情况下,它看起来应该像这样:
任何帮助都将受到赞赏。
答案1
memoir
无需使用该包即可完成此操作footmisc
。
\documentclass{memoir}
\usepackage{xcolor}
\usepackage{lipsum}
\footmarkstyle{\color{gray}#1 -- } % color of marker
\setlength{\footmarkwidth}{0em} % don't indent marker
\setlength{\footmarksep}{0em} % don't indent text
\renewcommand{\foottextfont}{\color{gray}\footnotesize} % color and size of text
\footnotesinmargin % put footnotes in the margin
\begin{document}
Text text text.\footnote{First footnote}
\lipsum[1]
More text.\footnote{Another footnote with a text exceeding one line.}
\lipsum[2]
\end{document}
参见章节12 页笔记请参阅手册(> texdoc memoir
)以了解更多信息。
答案2
以下内容可能足够了;对脚注的处理方式进行了一些修补。更新包括
\footnote
- 存储脚注格式和脚注编号以供稍后在文本中使用;以及\@makefnmark
- 将脚注的常规设置方式(作为上标)改为内联。还更新了脚注标记的重叠性质。
\documentclass{memoir}
\usepackage[side,marginal]{footmisc}
\usepackage[raggedrightboxes]{ragged2e}
\usepackage{marginfix}
\usepackage{xcolor,etoolbox}
\def\footnotelayout{\color{gray}}
\makeatletter
\let\old@makefnmark\@makefnmark
\def\@makemarginfnmark{\hbox{\@thefnmark~--~}}% How footnote text numbers are formatted
\pretocmd{\@makefntext}{%
\let\@makefnmark\@makemarginfnmark% Remove superscript in footnote text
\protected@xdef\@thefnmark{\footnotelayout\thempfn}% Add footnote format to footnote text number
}{}{}
% Restore superscript formatting of footnote markers
\apptocmd{\@makefntext}{\let\@makefnmark\old@makefnmark}{}{}
% In-line formatting of of footnote text number
\patchcmd{\@makefntext}{\llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}}{\@makefnmark}{}{}
\makeatother
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec malesuada luctus
tortor eu vehicula.\footnote{This is the first footnote.} Suspendisse a quam eu
elit tristique ultricies. Suspendisse ut eros a odio fermentum scelerisque. Sed
dignissim sapien placerat felis euismod laoreet. Quisque eu tellus ac justo
volutpat fringilla. Aliquam elementum, odio in bibendum elementum, ante odio
dignissim enim, eu tincidunt justo sapien eu massa. Aenean nunc nunc, accumsan
rhoncus luctus ut, imperdiet quis leo. Etiam facilisis maximus leo, placerat
mollis dolor interdum in.\footnote{This is the second footnote, which runs multiple
lines to show that there is no indentation.} Pellentesque rutrum neque vitae
luctus aliquam. Quisque luctus fermentum ornare. Nam efficitur mauris mauris, ut
molestie eros laoreet sed. Etiam purus ex, porttitor at cursus ac, iaculis
fringilla leo.
\end{document}