如何将脚注与底边距对齐?

如何将脚注与底边距对齐?

我目前正在尝试将脚注最后一行的基线与页面底部边距对齐。换句话说,脚注的最后一行应该位于底部边距。我还想保留我的其他脚注格式设置。我尝试了多种解决方案,但每种解决方案都以重大失败告终。我在提供的 MWE 中演示了我的解决方案尝试。

在版本 1 中,脚注的最后一行超出了底部边距。

在此处输入图片描述

在版本 2 中,脚注的最后一行位于底部边缘(好!),但位置\@fnmark却放在了错误的位置(坏!)。

在此处输入图片描述

在版本 3 中,脚注后的空白太多。

在此处输入图片描述

我知道这个\maxdepth参数(最后一个框可以插入底部边距的最大允许距离),但不幸的是它将字母/字形的下降部分视为垂直距离的一部分。\maxdepth=0pt如果有办法忽略下降部分(字母低于基线的部分),就可以解决这个问题。

代码:

\documentclass{article}
\linespread{1.2}%Needed to test vertical spacing between footnotes.
\raggedbottom
%\maxdepth=0pt
\usepackage{calc}
\usepackage{blindtext}
\usepackage{stix2}
\usepackage[showframe,lmargin=1.75in,rmargin=1.75in]{geometry}
\usepackage[bottom]{footmisc}
%
\newlength{\fntextwidth}
\newlength{\fnleftmargin}\newlength{\fnrightmargin}
\setlength{\fnleftmargin}{0.1\textwidth}
\setlength{\fnrightmargin}{\fnleftmargin}
\setlength{\fntextwidth}{\textwidth-\fnleftmargin-\fnrightmargin}
%
%VERSION 1; footnote text sticks into bottom margin
%
%\setlength{\footnotesep}{1.2\footnotesep}%See: https://tex.stackexchange.com/questions/463542/spacing-between-footnotes-similar-to-spacing-in-footnote
%\makeatletter
%\renewcommand{\@makefntext}[1]{%
%   \makebox[\fnleftmargin][r]{%
%       \@thefnmark.%
%       \hspace{0.5em}%
%   }%
%   \parbox[t]{\fntextwidth}{%
%       \noindent%
%       #1%
%   }%
%}
%\makeatother
%
%VERSION 2; fixes issue, but misplaces \@thefnmark

%\setlength{\footnotesep}{1.2\footnotesep}%See: https://tex.stackexchange.com/questions/463542/spacing-between-footnotes-similar-to-spacing-in-footnote
%\makeatletter
%\renewcommand{\@makefntext}[1]{%
%   \makebox[\fnleftmargin][r]{%
%       \@thefnmark.%
%       \hspace{0.5em}%
%   }%
%   \parbox[b]{\fntextwidth}{%
%       \noindent%
%       #1%
%   }%
%}
%\makeatother
%
%VERSION 3; adds unnecessary vertical space at bottom of footnote text, also produces vfill warnings and errors in my other documents

\makeatletter
\renewcommand{\@makefntext}[1]{%
    \list{\@thefnmark.}{%
        \leftmargin=\fnleftmargin%
        \rightmargin=\fnrightmargin%
        \labelsep=0.5em%
        \topsep=1.2pt%
        \partopsep=0pt%
    }%
    \item%
    #1%
    \endlist%
}%
\makeatother
%
\begin{document}
\blindtext
\par
The quick brown fox jumps over the lazy dog.%
\footnote{%
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
}
%
\par
The quick brown fox jumps over the lazy dog.%
\footnote{%
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
}
%
\par
The quick brown fox jumps over the lazy dog.%
\footnote{%
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
    The quick brown fox jumps over the lazy dog.
}
\par
\Blindtext
\end{document}

相关内容