在我的文档中,我使用了footmisc
包(带有\usepackage[splitrule,hang]
),并且我的脚注的外观如下
\deffootnote[1cm]{1cm}{0cm}{\makebox[1cm][l]{\thefootnotemark}}
现在我遇到了以下问题:我想在脚注中使用itemize
and/orenumerate
环境。如何实现数字和/或项目符号与脚注文本的开头对齐?
它看起来应该是这样的:
1 text text text
1. first item
2. second item
2 text text text
- first item
- second item
好的,这是 MWE:
% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = xelatex
\documentclass[]{scrbook}
\usepackage[left=1cm, right=1cm, top=1.5cm, bottom=2cm]{geometry}
\usepackage{polyglossia}
\usepackage[splitrule,hang]{footmisc}
\setdefaultlanguage[variant=american]{english}
\setmainfont[Mapping=tex-text]{Times New Roman}
\setsansfont[Mapping=tex-text]{Arial}
\setmonofont[Mapping=tex-text]{Courier New}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.25cm}
\newcommand{\einzug}{1cm}
\deffootnote[\einzug]{\einzug}{0cm}{\makebox[\einzug][l]{\thefootnotemark}}
\begin{document}
Here the first paragraph begins. Here is the first footnote\footnote{Lorem ipsum
color sit amet, consectetuer adipiscing elit.\begin{enumerate}
\item Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\item Curabitur dictum gravida mauris.
\end{enumerate}}. Here the first paragraph ends.
Here the second paragraph begins. Here is the second footnote\footnote{Nulla
alesuada porttitor diam.\begin{itemize}
\item Donec felis erat, congue non, volutpat at, tincidunt tristique, libero.
\item Vivamus viverra fermentum felis.
\end{itemize}}. And here the second paragraph ends.
If you look closely at the footnotes you will see that the item texts are not aligned
with the main footnote text right before them. I would like to see the
following: The numbers in the enumerate environments and the bullet points in the
itemize environments should be exactly aligned with the main footnote text
right before them!
\end{document}
答案1
您可以使用enumitem
包来实现此目的。
\documentclass[]{scrbook}
\usepackage[left=1cm, right=1cm, top=1.5cm, bottom=2cm]{geometry}
\usepackage[splitrule,hang,marginal]{footmisc}
\usepackage{enumitem}
%------------------------------------------------------------
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.25cm}
\newcommand{\einzug}{1cm}
\deffootnote[\einzug]{\einzug}{0cm}{\makebox[\einzug][l]{\thefootnotemark}}
%------------------------------------------------------------
\begin{document}
Here the first paragraph begins. Here is the first footnote\footnote{Lorem ipsum
color sit amet, consectetuer adipiscing elit.\begin{enumerate}[labelindent=1cm,leftmargin=*] %<--------------------------------------here
\item Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.
\item Curabitur dictum gravida mauris.
\end{enumerate}}. Here the first paragraph ends.
Here the second paragraph begins. Here is the second footnote\footnote{Nulla
alesuada porttitor diam.\begin{itemize}[labelindent=1cm,leftmargin=*]%<-----------------here
\item Donec felis erat, congue non, volutpat at, tincidunt tristique, libero.
\item Vivamus viverra fermentum felis.
\end{itemize}}. And here the second paragraph ends.
If you look closely at the footnotes you will see that the item texts are not aligned
with the main footnote text right before them. I would like to see the
following: The numbers in the enumerate environments and the bullet points in the
itemize environments should be exactly aligned with the main footnote text
right before them!
\end{document}