有什麼辦法可以解決文字和公式組合超出邊距

有什麼辦法可以解決文字和公式組合超出邊距

在LaTeX中,當編寫包含公式和文字的段落時,它超出了邊距。因此,我必須手動對齊它。這非常耗時,而且結果也不合理。有什麼辦法可以自動控制嗎?

\documentclass{article} 
   \usepackage{amsmath} 
   \begin {document}
       \begin{align*}
            &\text {Setup(}\lambda \text{).
            Generate system public parameters and master secret key. 
            Two generators } \\ &g \in G_{1} \text{and h} \in G_{2}, 
            \text {are randomly selected as well as a secret value} 
            \gamma \leftarrow Z_{p} \text {.Choose a}\\ &
            \text {number and the equation has the following properties} g_{1}\\ 
        \end{align*} 
   \end{document} 

答案1

在此輸入影像描述

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\section*{Setup}

Generate system public parameters and master secret key. Two generators
$g \in G_{1}$ and $h \in G_{2}$,
are randomly selected as well as a secret value
$\gamma \leftarrow Z_{p}$.
 Choose $a$

\end{document}

相關內容