
\begin{enumerate}
\item[1.] Choose $N\sim \text{Poisson}(\xi)$.
\item[2.] Choose $\theta \sim \text{Dir}(\alpha)$.
\item[3.] For each of the $N$ words $w_n$:
\begin{enumerate}
\item[(a)] Choose a topic $z_n \sim \text{Multinomial}(\theta)$.
\item[(b)] Choose a word $w_n$ from $p(w_n | z_n, \beta)$, a multinomial probability conditioned on the topic $z_n$.
\end{enumerate}
\end{enumerate}
위의 코드를 사용하여 일부 방정식을 생성하면 다음과 같은 오류가 발생합니다.
Undefined control sequence. \item[1.] Choose $N\sim \text
Undefined control sequence. \item[2.] Choose $\theta \sim \text
Undefined control sequence. \item[(a)] Choose a topic $z_n \sim \text
이러한 오류의 원인이 무엇인지 이해하지 못합니다. 누구든지 도와줄 수 있나요? 감사해요.
답변1
enumitem
수동으로 입력한 내용을 기본값으로 사용하는 enumerate를 사용하는 더 간단한 방법을 추가하겠습니다 .
\documentclass{article}
\usepackage{showframe}
\renewcommand{\ShowFrameLinethickness}{0.3pt}
\usepackage{enumitem}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}[ wide = 0pt, leftmargin = *]
\item Choose $N\sim \text{Poisson}(\xi)$.
\item Choose $\theta \sim \mathrm{Dir}(\alpha)$.
\item For each of the $N$ words $w_n$:
\begin{enumerate}[wide = 0pt]
\item Choose a topic $z_n \sim \mathrm{Multinomial}(\theta)$.
\item Choose a word $w_n$ from $p(w_n \,|\, z_n, \beta)$, a multinomial probability conditioned on the topic $z_n$.
\end{enumerate}
\end{enumerate}
\end{document}