余白を超えるテキストと数式の組み合わせを解決する方法はありますか

余白を超えるテキストと数式の組み合わせを解決する方法はありますか

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}

関連情報