3

Writing

\begin{enumerate}
\item $$math1$$
\item $$math2$$
\end{enumerate}

the math is not set exactly beside the numeration, but a bit lower instead. If I use

\begin{enumerate}
\item \begin{center}$math1$\end{center}
\item \begin{center}$math2$\end{center}
\end{enumerate}

instead, the the numeration is also centered and I don't want this. How can I set centered math beside the numeration? enter image description here

Karla
  • 31
  • 2
  • You should not use $$ to start display math environments, see Why is [ … ] preferable to $$ … $$?. If your only goal is to label/number equations, you might like \begin{equation} math1 \end{equation} or \begin{align} math1 \end{align} (the latter allows for multi-line equations, the generally not (i.e. requires some more work - split for example)) – moewe Sep 08 '15 at 09:30
  • Oh no... A gazillion lines are waiting to get corrected. – Karla Sep 08 '15 at 09:34
  • Related: http://tex.stackexchange.com/q/9394, http://tex.stackexchange.com/q/9383, http://tex.stackexchange.com/q/3109 – LaRiFaRi Sep 08 '15 at 09:34

2 Answers2

4

You could surround the inline math expressions with \hfil and \hfill directives.

enter image description here

\documentclass{article}
\begin{document}
\hrule  % just to illustrate width of textblock
\begin{enumerate}
\item \hfil$a^2+b^2=c^2$\hfill
\item \hfil$1+1=2$\hfill
\end{enumerate}
\end{document}

Remark: If you need the math expressions to be typeset in displaymath-style rather than in inline-math style, simply insert the instruction \displaystyle after the opening $ symbol.

Mico
  • 506,678
0

If you want it to be display math, you could do the following. Note that this will centre the equation in the free space between the numbers and the right border. This will appear a bit more to the right than normal equations.

% arara: pdflatex

\documentclass{article}
\usepackage{mathtools}
\newenvironment{itemequation}{\hfill$\begin{aligned}[t]}{\end{aligned}$\hfill\null}

\begin{document}
    \begin{equation*}
    \text{math0}
    \end{equation*} 
\begin{enumerate}
    \item \begin{itemequation}\text{math2}\end{itemequation}
    \item \begin{itemequation}\text{math2}\end{itemequation}
\end{enumerate}
\end{document}

Off-topic: You should not use $$\dots$$ in LaTeX. This is plain TeX.

LaRiFaRi
  • 43,807