簡體   English   中英

如何在 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}$

兆瓦

\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}

Output:

輸出

注意:您應該使用\[<some equation>\]而不是$$<some equation>$$作為display style 你可以在這里找到原因。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM