Text FormattingFormula on the different level then enumeration

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Rustam
Posts: 22
Joined: Fri Nov 02, 2012 5:15 pm

Formula on the different level then enumeration

Post by Rustam »

Good time of the day!
Here is a piece Latex code:

Code: Select all

\begin{enumerate}[(1)]
\item 
\begin{flalign*}
&p_t(x) \defeq \frac{e^{-x^2/2t}}{(2\pi t)^{d/2}}&
\end{flalign*}
\end{enumerate}
and I get following picture:
latex1.gif
latex1.gif (4.2 KiB) Viewed 4074 times
But I would like to have formula for $p_t(x)$ in the same line as $(1)$.
try_toc.tex
(6.33 KiB) Downloaded 299 times
Last edited by cgnieder on Sat Mar 30, 2013 12:23 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Formula on the different level then enumeration

Post by cgnieder »

Why are you using {enumerate} instead of the standard equation numbering? If you want the numbers to the left instead of right use the package option leqno:

Code: Select all

\documentclass[leqno]{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
 p_t(x) &= \frac{e^{-x^2/2t}}{(2\pi t)^{d/2}}
\end{align}

\end{document}
Regards
site moderator & package author
Rustam
Posts: 22
Joined: Fri Nov 02, 2012 5:15 pm

Re: Formula on the different level then enumeration

Post by Rustam »

Thank you, but I want numbered list with numbers
(1), (2) and so on.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Formula on the different level then enumeration

Post by localghost »

An environment for displayed equations won't help here. It will require in-line math mode. Perhaps something like this.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«
\usepackage{xfrac}       % nice fractions
\usepackage{enumitem}    % customized lists
\usepackage{lmodern}     % Latin Modern fonts

\begin{document}
  \begin{enumerate}[label={(\arabic*)}]
    \item \( p_t(x) = \dfrac{e^{\sfrac{-x^2}{2t}}}{(2\pi t)^{\sfrac{d}{2}}} \)
    \item
      \(
        \begin{aligned}[t]
          (a+b)^2 &= a^2+2ab+b^2 \\
          (a-b)^2 &= a^2-2ab+b^2 \\
          (a+b)(a+b) &= a^2-b^2
        \end{aligned}
      \)
  \end{enumerate}
\end{document}
By the way, the enumerate package is obsolete.


Thorsten
Post Reply