Math & ScienceUsing equation inside "itemize"

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
fifinho
Posts: 3
Joined: Mon Dec 21, 2009 8:03 pm

Using equation inside "itemize"

Post by fifinho »

Dear All..

I would like to know if anybody can help me with this problem. How can i put af number on af formula while the formula is "inside" itemize. I have the following code:

Code: Select all

\begin{itemize}
\item $k(t) = \sqrt{\frac{\pi \cdot \rho \cdot c_{p}}{750 \cdot \lambda \cdot t}}$
\item $\theta_{1}$ er temperaturen, og kan ikke ikke regnes mindre en 20 $\degreeC$  [${0}^C$]
\item x er afstanden fra overfladen på den brandeksponeret side [m]
\item t er tiden. [min]
\end{itemize}
I want the formula k(t) to have a number like all other equations in my document.

Hoping somebody know. :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
yoyoimut
Posts: 120
Joined: Mon Oct 19, 2009 6:58 am

Using equation inside "itemize"

Post by yoyoimut »

Actually I don't understand well what your need is.
It might be what you want.

Code: Select all

\documentclass{article}
\usepackage{array}
\usepackage{pifont}
\begin{document}
\newcolumntype{C}{@{}>{\ding{232}}r@{}}
\newcolumntype{M}{>{\begin{equation}}m{7cm}<{\end{equation}}}
\begin{tabular}{CM} 
& \sin x \\
& \cos x \\
& \int_a^b f(x)\, dx = F(b) - F(a) \\
\end{tabular}
\end{document}
Thanks.
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Using equation inside "itemize"

Post by josephwright »

I'm really not sure what you want. The following is a slightly tidied-up version of your original. Please modify if to show the problem/effect.

Code: Select all

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{itemize}
  \item $k(t) = \sqrt{\frac{\pi \rho c_{\text{p}}}{750 \lambda t}}$
\item $\theta_{1}$ er temperaturen, 
  og kan ikke ikke regnes mindre en \SI{20}{\degreeCelsius}  
    [\si{\degreeCelsius}]
\item $x$ er afstanden fra overfladen p{\aa} den brandeksponeret side 
  [\si{\metre}]
\item $t$ er tiden [\si{\minute}]
\end{itemize}
\end{document}
Joseph Wright
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Using equation inside "itemize"

Post by Juanjo »

Try the following code, which includes the improvements by josephwright:

Code: Select all

\documentclass{article}
\usepackage{siunitx,amsmath}

\newcommand{\itemEq}[1]{%
        \begingroup%
        \setlength{\abovedisplayskip}{0pt}%
        \setlength{\belowdisplayskip}{0pt}%
        \parbox[c]{\linewidth}{\begin{flalign}#1&&\end{flalign}}%
        \endgroup}

\begin{document}
\begin{itemize}
  \item Some text here
  \item \itemEq{a+b+c=d+e}

  \item \itemEq{k(t) = \sqrt{\frac{\pi \rho c_{\text{p}}}{750 \lambda t}}}

  \item $\theta_{1}$ er temperaturen, og kan ikke ikke regnes mindre en 
        \SI{20}{\degreeCelsius} [\si{\degreeCelsius}]
  \item $x$ er afstanden fra overfladen p{\aa} den brandeksponeret side
        [\si{\metre}]
  \item $t$ er tiden [\si{\minute}]
\end{itemize}
\end{document}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
fifinho
Posts: 3
Joined: Mon Dec 21, 2009 8:03 pm

Re: Using equation inside "itemize"

Post by fifinho »

Thanks for the great answers. Normally when you write a equation in latex it looks like this:

\begin{equation}
\frac{a}{b}+c
\end{equation}

the out becomes:

a/b + c ------------------------(1)

so the formula is displayed and "equation number" is added as well. I can choose to remove the equation number my adding * like this:

\begin{equation*}
\frac{a}{b}+c
\end{equation*}


That was what i meant.. i already knew the answer so stupid to ask. But thanks anyways.

Have a nice holiday.. :D
vickie
Posts: 3
Joined: Mon Jul 01, 2013 12:12 pm

Re: Using equation inside "itemize"

Post by vickie »

Dear Juanjo,

If I use your commands, is there a way I could remove the equation numbers please?

Thanks
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Using equation inside "itemize"

Post by Juanjo »

If you don't want equation numbers, just don't use the \itemEq command defined in my previous post and write directly in math mode. Alternatively, if you have used \itemEq several times and you want to remove the number in a particular item, you can add \notag at the end (i.e. \itemEq{some math here\notag}).
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
vickie
Posts: 3
Joined: Mon Jul 01, 2013 12:12 pm

Re: Using equation inside "itemize"

Post by vickie »

Thanks a lot! seems to have worked! I had a slightly different situation with an array in itemization and spent so much time trying to get what I wanted! Thanks again!
Post Reply