Text FormattingEnumerating Equations

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
ccook
Posts: 2
Joined: Sat Aug 29, 2009 5:52 pm

Enumerating Equations

Post by ccook »

Hello, I would like to enumerate a few equations without a preceding line return. In the following TeX

Code: Select all

\begin{enumerate}[a)]
  \item \begin{equation*} y=f(x) \end{equation*}
\end{enumerate}
the item counter "a)" is above the centered equation. How may i get it on the same line? Also, the equation is large enough that an inline equation doesn't work out well.

Thank you in advance

ccook

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Enumerating Equations

Post by gmedina »

Hi,

you can use \vspace* to move vertically your equation (upwards if the length used as argument is negative and downwards if it is positive):

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}

\begin{document}

\begin{enumerate}[label=\alph*)]
  \item \rule{0pt}{1pt}\vspace*{-12pt}
    \begin{equation*} 
      y=f(x) 
    \end{equation*}
\end{enumerate}

\end{document}
Please notice that to customize the labels I used the enumitem package instead of the enumerate package, but the solution works in both cases.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
ccook
Posts: 2
Joined: Sat Aug 29, 2009 5:52 pm

Re: Enumerating Equations

Post by ccook »

Thank you! This works great, and the hspace is equally useful!
mavzolej
Posts: 4
Joined: Tue May 31, 2011 9:36 am

Re: Enumerating Equations

Post by mavzolej »

Does anybody have better ideas?
I have to correct value in the \vspace everytime...
Post Reply