\raggedright 在脚注中带有悬挂缩进

\raggedright 在脚注中带有悬挂缩进

这个答案多行脚注的布局展示了如何在脚注中获得悬挂缩进(如果你问我,这非常丑陋,但编辑想要的是编辑想要的)。

\documentclass{article}
\usepackage{lipsum}
\makeatletter
    \renewcommand\@makefntext[1]{\leftskip=2em\hskip-2em\@makefnmark#1}
\makeatother
\begin{document}
\lipsum[1]\footnote{\lipsum[2]}
\end{document}

在此处输入图片描述

现在我还需要使脚注右侧不齐整。我尝试过只\raggedright在上面的代码中添加: ,或者通过添加{\leftskip=2em\hskip-2em\raggedright\@makefnmark#1}来使用。这两种方法都无法使脚注右侧不齐整并带有悬挂缩进。我该如何实现?footmisc\renewcommand{\footnotelayout}{\raggedright}

答案1

\documentclass{article}
\usepackage{lipsum}
\makeatletter
    \renewcommand\@makefntext[1]{\raggedright\leftskip=2em\hskip-2em\@makefnmark#1}
\makeatother
\begin{document}

\null\vfill% just for the example

\lipsum*[1]\footnote{\lipsum[2]}

\end{document}

在此处输入图片描述

或者使用ragged2e

\documentclass{article}
\usepackage{ragged2e}
\usepackage{lipsum}
\makeatletter
    \renewcommand\@makefntext[1]{\RaggedRight\leftskip=2em\hskip-2em\@makefnmark#1}
\makeatother
\begin{document}

\null\vfill% just for the example

\lipsum*[1]\footnote{\lipsum[2]}

\end{document}

在此处输入图片描述

相关内容