我看到了这个优秀的答案Beamer 中的左对齐脚注,我很好奇如何修改它以删除脚注上的左缩进。我尝试添加\parindent=0pt
以及更改\footnotesep
为零\z@
空间,但无济于事。
注意如何删除脚注中的缩进?不适用于 Beamer。
% how to get rid of indent?
\documentclass{beamer}
\makeatletter
\renewcommand<>\beamer@framefootnotetext[1]{%
\global\setbox\beamer@footins\vbox{%
\hsize\framewidth
\textwidth\hsize
\columnwidth\hsize
\unvbox\beamer@footins
\reset@font\footnotesize
\@parboxrestore
\protected@edef\@currentlabel
{\csname p@footnote\endcsname\@thefnmark}%
\color@begingroup
\uncover#2{\@makefntext{%
\rule\z@\footnotesep\ignorespaces\parbox[t]{.9\textwidth}{#1\@finalstrut\strutbox}\vskip1sp}}%
\color@endgroup}%
}
\makeatother
\begin{document}
\begin{frame}
Some text\footnote{This is a footnote spanning more than one line, that now after some modifications is aligned left.}
Some other text\footnote{This is another footnote spanning more than one line, that is also aligned left.}
\end{frame}
\end{document}
答案1
您不需要重新定义脚注,只需执行类似操作即可\addtobeamertemplate{footnote}{\hskip -2em}{}
。
\documentclass{beamer}
\addtobeamertemplate{footnote}{\hskip -2em}{}
\begin{document}
\begin{frame}
Some text.\footnote{This is a footnote with indent removed.}
Some other text.\footnote{This is a subsequent footnote that is also not indented and spans more than one line.}
\end{frame}
\end{document}
答案2
插入负数,如下\hskip
所示\footnotesep
:
\hskip -1.5em
\color@begingroup
\uncover#2{\@makefntext{%
\rule\z@\footnotesep\ignorespaces\parbox[t]{.9\textwidth}{#1\@finalstrut\strutbox}\vskip1sp}}%
\color@endgroup}%
完整代码:
\documentclass{beamer}
\makeatletter
\renewcommand<>\beamer@framefootnotetext[1]{%
\global\setbox\beamer@footins\vbox{%
\hsize\framewidth
\textwidth\hsize
\columnwidth\hsize
\unvbox\beamer@footins
\reset@font\footnotesize
\@parboxrestore
\protected@edef\@currentlabel
{\noindent\csname p@footnote\endcsname\@thefnmark}%
\hskip -1.5em
\color@begingroup
\uncover#2{\@makefntext{%
\rule\z@\footnotesep\ignorespaces\parbox[t]{.9\textwidth}{#1\@finalstrut\strutbox}\vskip1sp}}%
\color@endgroup}%
}
\makeatother
\begin{document}
\begin{frame}
Some text\footnote{This is a footnote spanning more than one line, that now after some modifications is aligned left.}
Some other text\footnote{This is another footnote spanning more than one line, that is also aligned left.}
\end{frame}
\end{document}