여백을 초과하는 텍스트 및 수식 조합을 해결하는 방법

여백을 초과하는 텍스트 및 수식 조합을 해결하는 방법

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}

관련 정보