我在嵌套环境中有一个大方程itemize
,这为方程创建了很多缩进,因此方程仅放在页面的右侧。如果方程相对于文本区域居中并忽略来自环境的基本缩进,看起来会更好。itemize
是否可以以某种方式禁用一个方程的缩进?
梅威瑟:
\documentclass{memoir}
\begin{document}
\begin{itemize}
\item Item 1
\begin{itemize}
\item Item 1.1
\begin{itemize}
\item Item 1.1.1
Text which should be indented
% this equation should be positioned just as if it was not contained in any itemize-environment
\[
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
\]
Text which should be indented
\end{itemize}
\end{itemize}
\end{itemize}
\end{document}
答案1
\documentclass{memoir}
\begin{document}
\begin{itemize}
\item Item 1
\begin{itemize}
\item Item 1.1
\begin{itemize}
\item Item 1.1.1
Text which should be indented
% this equation should be positioned just as if it was not contained in any itemize-environment
\[
\displayindent0pt
\displaywidth\textwidth
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
\]
Text which should be indented
\end{itemize}
\end{itemize}
\end{itemize}
\end{document}
答案2
累积列表缩进由以下公式给出\leftmargini+\leftmarginii+\leftmarginiii
- 每个列表一个:
\documentclass{memoir}
\usepackage{showframe}
\begin{document}
\begin{itemize}
\item Item 1
\begin{itemize}
\item Item 1.1
\begin{itemize}
\item Item 1.1.1
Text which should be indented
% this equation should be positioned just as if it was not contained in any itemize-environment
\[
\hspace*{\dimexpr-\leftmargini-\leftmarginii-\leftmarginiii}
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
\]
Text which should be indented
\end{itemize}
\end{itemize}
\end{itemize}
\end{document}
答案3
\documentclass{memoir}
\begin{document}
\begin{itemize}
\item Item 1
\begin{itemize}
\item Item 1.1
\begin{itemize}
\item Item 1.1.1
Text which should be indented\par
% this equation should be positioned just as if it was not contained in any itemize-environment
\hspace*{\dimexpr-\leftmargini-\leftmarginii-\leftmarginiii}\parbox{\linewidth}{%
\[
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
\]}\par
Text which should be indented
\end{itemize}
\end{itemize}
\end{itemize}
\[
1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
\]
\end{document}