0

I need to write an inline equation with itemize in latex. I did the following:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{dsfont}
\begin{document}
    The following two bullets:
    \begin{itemize}
        \item $\begin{aligned}
        \sum_{i=1}^{n}f_i(t)\cdot\hat{g}_{i}(t)&=\sum_{i=1}^{L}f_i(t)\cdot\left[g_{i}(t)/f_i(t)\right]\mathds{1}_{\{j\}}(i)\\&=g_{j}(t).
        \end{aligned}$
        \item $f_i(t)\leqslant g_i(t)$ for all $i$.
    \end{itemize}
\end{document}

The first bullet is not centred as the following figure shows:

enter image description here

1
  • 4
    Use \begin{aligned}[t]. By default, it is vertically centred.
    – Bernard
    Jun 18, 2018 at 16:32

1 Answer 1

2

You just want \begin{aligned}[t]:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{dsfont}

\begin{document}

The following two bullets:
\begin{itemize}
\item $\begin{aligned}[t]
      \sum_{i=1}^{n}f_i(t)\cdot\hat{g}_{i}(t)
      &=\sum_{i=1}^{L}f_i(t)\cdot[g_{i}(t)/f_i(t)]\mathds{1}_{\{j\}}(i)\\
      &=g_{j}(t).
      \end{aligned}$
\item $f_i(t)\leqslant g_i(t)$ for all $i$.
\end{itemize}

\end{document}

enter image description here

1
  • I never thought it was that easy! Thank you.
    – zdm
    Jun 18, 2018 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.