我怎样才能实现方程式与first thing
和在同一行开始second thing
?
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{mathbbol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{itemize}
\item first thing:
\begin{align*}
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{align*}
\item secong thing:
\begin{align*}
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{align*}
\end{itemize}
\end{document}
答案1
您可能需要这个小小的改进:使用该eqparbox
包,您可以让所有项目的方程式从同一点开始。
无关: 自 3.10 版本以来,的语言选项babel
应该与文档类一起加载,以确保所有语言相关文件都知道主文档语言。
\documentclass[a4paper,10pt, english]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{amsmath}
\usepackage{eqparbox}
\begin{document}
\begin{itemize}
\item \eqmakebox[things][l]{first thing: }
$ \begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned} $
\item \eqmakebox[things][l]{second thing: }
$ \begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned} $
\end{itemize}
\end{document}
答案2
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{mathbbol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{itemize}
\item $\displaystyle\begin{aligned}[t]
\text{first thing: } c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\item $\displaystyle\begin{aligned}[t]
\text{secong thing: } c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\end{itemize}
\end{document}
答案3
像这样?
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{mathbbol}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\begin{document}
\begin{itemize}
\item first thing: $
\begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\item secong thing: $
\begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\end{itemize}
\end{document}
答案4
以下示例使用aligned
内联数学环境而不是未编号的显示环境align*
:
\documentclass[a4paper,10pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item First thing:\\[.5ex]
$\displaystyle\begin{aligned}
c^2&=a^2+b^2\\
c^2&=a^2+b^2,
\end{aligned}$\\
where $c$ is real.
\item Second thing:\\[.5ex]
$\displaystyle\begin{aligned}
c^2&=a^2+b^2\\
c^2&=a^2+b^2\text{, where $c$ is real.}
\end{aligned}$
\end{itemize}
\end{document}
或者,如果第一个方程式应该在文本行中,则可选参数[t]
会有所帮助:
\documentclass[a4paper,10pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{itemize}
\item First thing:
$\begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\item Second thing:
$\begin{aligned}[t]
c^2&=a^2+b^2\\
c^2&=a^2+b^2
\end{aligned}$
\end{itemize}
\end{document}