将脚注标记在脚注中右对齐

将脚注标记在脚注中右对齐

我的脚注是合理的悬挂脚注,效果很好,但我想多一点:

由于脚注编号占用可变空间,具体取决于它是一位数还是两位数,所以我希望将脚注编号刷新到其自己的“空间”内,即仍然缩进 8pt,但脚注编号将“增长”到右侧,从而与脚注文本的首字母保持一致。

代码示例:

\documentclass[10pt,english]{book}
\usepackage{charter}
\usepackage{babel}
\usepackage[unicode=true] {hyperref}

\usepackage[bottom,hang]{footmisc}
\setlength\footnotemargin{8pt}
\setlength{\footnotesep}{10pt}
\setlength{\skip\footins}{7mm}
\interfootnotelinepenalty=10000

\begin{document}

Footnotes with flush align left of their footnote marks\footnote{first footnote}.
But I want them aligned right on their marks\footnote{second footnote .... OOO}
Simple sentences talking about attenuators and\footnote{Available somewhere}
bearing a lot of footnotes\footnote{yet another footnote}
bla bla bla bla bla bla\footnote{it's getting boring}
attenuator is useful\footnote{yes, right}
attenuator is beautiful\footnote{oh, yeah ...} and
bla bla bla\footnote{we are almost there} bla bla bla bla
and is also cheap\footnote{not all of them}.
But I want to save money\footnote{Who does not??}
and I will build one... or two\footnote{here we are}.
That's it\footnote{last footnote}, now we have more than 10 footontes!

\end{document}

答案1

我不确定这是否正是您想要的,但可能很接近。您可以重新定义\thefootnote,使其位于其自己的小框内,然后使用以下命令将数字推到右侧:

\renewcommand\thefootnote{\hbox to 6pt{\hss\arabic{footnote}}}

现在给出了如下脚注:

在此处输入图片描述

完整代码如下:

\documentclass[10pt,english]{book}
\usepackage{charter}
\usepackage{babel}
\usepackage[unicode=true] {hyperref}

\usepackage[bottom,hang]{footmisc}
\setlength\footnotemargin{8pt}
\setlength{\footnotesep}{10pt}
\setlength{\skip\footins}{7mm}
\interfootnotelinepenalty=10000
\renewcommand\thefootnote{\hbox to 6pt{\hss\arabic{footnote}}}

\begin{document}

Footnotes with flush align left of their footnote marks\footnote{first footnote}.
But I want them aligned right on their marks\footnote{second footnote .... OOO}
Simple sentences talking about attenuators and\footnote{Available somewhere}
bearing a lot of footnotes\footnote{yet another footnote}
bla bla bla bla bla bla\footnote{it's getting boring}
attenuator is useful\footnote{yes, right}
attenuator is beautiful\footnote{oh, yeah ...} and
bla bla bla\footnote{we are almost there} bla bla bla bla
and is also cheap\footnote{not all of them}.
But I want to save money\footnote{Who does not??}
and I will build one... or two\footnote{here we are}.
That's it\footnote{last footnote}, now we have more than 10 footontes!

\end{document}

答案2

更改脚注标记在脚注中的放置方式。代码确实

\hbox to \footnotemargin{\@makefnmark\hss}

所以可以说

\hbox to \footnotemargin{\hss\@makefnmark\hspace{4pt}}

稍微放大后\footnotemargin;我将其设置为 12pt。根据自己的喜好调整长度。

\documentclass[10pt,english]{book}
\usepackage{charter}
\usepackage{babel}
\usepackage[bottom,hang]{footmisc}
\usepackage{etoolbox}
\usepackage[unicode=true]{hyperref}

\setlength\footnotemargin{12pt}
\setlength{\footnotesep}{10pt}
\setlength{\skip\footins}{7mm}
\interfootnotelinepenalty=10000

\makeatletter
\patchcmd{\@makefntext}
  {\@makefnmark\hss}
  {\hss\@makefnmark\hspace{4pt}}
  {}{}
\makeatletter

% just to show all text and footnotes without a wide white space
\setlength{\textheight}{10cm} 

\begin{document}

Footnotes with flush align left of their footnote marks\footnote{first footnote}.
But I want them aligned right on their marks\footnote{second footnote .... OOO}
Simple sentences talking about attenuators and\footnote{Available somewhere}
bearing a lot of footnotes\footnote{yet another footnote}
bla bla bla bla bla bla\footnote{it's getting boring}
attenuator is useful\footnote{yes, right}
attenuator is beautiful\footnote{oh, yeah ...} and
bla bla bla\footnote{we are almost there} bla bla bla bla
and is also cheap\footnote{not all of them}.
But I want to save money\footnote{Who does not??}
and I will build one... or two\footnote{here we are}.
That's it\footnote{last footnote which is very long and splits across lines,
  just to see what's the effect. This should be long enough}, now we have 
more than 10 footnotes!

\end{document}

在此处输入图片描述

相关内容