如何在 LaTeX 文本的同一行中键入方程组?

How do I type system of equations in the same line with text in LaTeX?

我想要这样的文档

(方程组与正文同行)不是这样的

有人可以帮帮我吗?这是我的第二张图片的代码:

\hspace{2ex} Theo hệ thức Viète, ta có:
    $$\begin{cases}  
        x_1 + x_2 = 2(m-1)\ 
        x_1 x_2 = -3-m
    \end{cases} $$

LaTeX中数学方程的排版方式有两种,分别是文本样式显示样式。您正在尝试编写一个文本样式的内联方程,但语法 $$<some equation>$$ 用于 显示样式 文本样式 的语法是$<some equation>$。所以你的代码应该是

\hspace{2ex} Theo hệ thức Viète, ta có:
    $\begin{cases}  
        x_1 + x_2 = 2(m-1)\ 
        x_1 x_2 = -3-m
    \end{cases}$

MWE:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
    \hspace{2ex} Theo hệ thức Viète, ta có:
    $\begin{cases}  
        x_1 + x_2 = 2(m-1)\ 
        x_1 x_2 = -3-m
    \end{cases}$
\end{document}

输出:

注意:对于显示样式,您应该使用\[<some equation>\]而不是$$<some equation>$$。你可能会找到原因 here.