0

I don't understand why the output of write2latex OpenOffice addon makes this kind of list:

This is in the preamble:

\newcommand\liststyleLii{%
\renewcommand\theenumi{\Roman{enumi}}
\renewcommand\theenumii{\Roman{enumii}}
\renewcommand\theenumiii{\Roman{enumiii}}
\renewcommand\theenumiv{\Roman{enumiv}}
\renewcommand\labelenumi{\theenumi.}
\renewcommand\labelenumii{\theenumii.}
\renewcommand\labelenumiii{\theenumiii.}
\renewcommand\labelenumiv{\theenumiv.}
}

And this is in the document:

\section{Binomische Formeln}
  \liststyleLii
    \begin{enumerate}
      \item \begin{align*} (a+b)^2=a^2+2ab+b^2 \end{align*}
      \item \begin{align*} (a-b)^2=a^2-2ab+b^2 \end{align*}
      \item \begin{align*} (a+b)(a-b)=a^2-b^2 \end{align*}
    \end{enumerate}

the outpus is:

the Lii list

and I would like to have the "II" on one line with the "(a-b)..."

Actualy all the bullets on one line with the equation. I don't know which package is enabling that liststyle

2
  • By inserting the mathematical environment \begin{align} ... \end{align}` you are inserting a skip of white space before the equation, which leads to the distortion. Just use a inline math environment. Please, insert a full MWE (Minimal Working Example) from \documentclass} to \end{document}. It'll save us the typing burden.
    – Jan
    Jan 27, 2017 at 8:56
  • although use of a display environment here, where the equations are each only one line is incorrect, there is a mechanism to make this work. see Equations inside enumerate aligned on item's number. (possible duplicate?) Jan 27, 2017 at 13:59

1 Answer 1

0

The mathematical environment \begin{align*} ... \end{align*} inserts white space above the environment. This breaks the alignment, you are after. Take a normal inline mathematical environment as for example $...$.

This should do the trick:

\documentclass[a4paper, 11pt]{article} 

\usepackage[german]{babel} 
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} 

\newcommand\liststyleLii{%
\renewcommand\theenumi{\Roman{enumi}}
\renewcommand\theenumii{\Roman{enumii}}
\renewcommand\theenumiii{\Roman{enumiii}}
\renewcommand\theenumiv{\Roman{enumiv}}
\renewcommand\labelenumi{\theenumi.}
\renewcommand\labelenumii{\theenumii.}
\renewcommand\labelenumiii{\theenumiii.}
\renewcommand\labelenumiv{\theenumiv.}
}
\liststyleLii

\begin{document}
\section{Binomische Formeln}
    \begin{enumerate}
      \item $(a+b)^2=a^2+2ab+b^2 $
      \item $(a-b)^2=a^2-2ab+b^2 $
      \item $(a+b)(a-b)=a^2-b^2  $
    \end{enumerate}
\end{document}

Here is the result:

Binomische Formeln

You must log in to answer this question.

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