13

I have a large equation in nested itemize-environments, which creates a lot of indention for the equation, such the equation is only placed on the right side of the page. It would look nicer if the equation was centered w.r.t. to the text area and disregard the base indention from the itemize-environments. Is it possible to somehow disable the indention for one equation?

MWE:

\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}

3 Answers 3

8
\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}
4

The cumulative list indentations are given by \leftmargini+\leftmarginii+\leftmarginiii - one for each of the lists:

enter image description here

\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
  • This technique seems to also work for align*, which I didn't ask for but also need.
    – user51122
    Commented Jun 18, 2014 at 14:36
  • I am trying to make this work for align*, but it only works if I put the hspace* on every line. Is there a more elegant way?
    – mimuller
    Commented Apr 9 at 10:00
  • I ended up defining \newenvironment{nolistindent}{\hspace*{\dimexpr-\leftmargini-\leftmarginii-\leftmarginiii}\begin{minipage}{\textwidth} }{\end{minipage}} in the preamble. Then I can just put the align* inside the `nolistindent`` environment
    – mimuller
    Commented Apr 9 at 10:06
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\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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .