我需要在 latex 中用 itemize 编写内联方程。我做了以下操作:
\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}
第一个项目符号未居中,如下图所示:
答案1
你只是想要\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}