!["정의되지 않은 제어 순서. [\end{flalign*}]" 오류를 고칠 수 없는 것 같습니다.](https://rvso.com/image/347935/%22%EC%A0%95%EC%9D%98%EB%90%98%EC%A7%80%20%EC%95%8A%EC%9D%80%20%EC%A0%9C%EC%96%B4%20%EC%88%9C%EC%84%9C.%20%5B%5Cend%7Bflalign*%7D%5D%22%20%EC%98%A4%EB%A5%98%EB%A5%BC%20%EA%B3%A0%EC%B9%A0%20%EC%88%98%20%EC%97%86%EB%8A%94%20%EA%B2%83%20%EA%B0%99%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
실제로 같은 줄에서 오류가 두 번 발생합니다. 원인이 무엇인지 알 수 없습니다. 내 코드:
\documentclass{article}
\usepackage[left=1in, top=1in, bottom=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
\begin{flalign*}
\textbf{14c)} \quad & \text{Let } V(x,y) \text{ be "} x \text{ has visited } y \text{",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \{ \text{places} \} &\\
& \exists x (V(x, \text{Alaska}) \land \neg V(x, \text{Hawaii})) &\\
\textbf{d)} \quad & \text{Let } L(x,y) \text{ be "} x \text{ has learned at least } y \text{ programming languages",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \R &\\
& \forall x (L(x, 1)) &\\
\textbf{e)} \quad & \text{Let } T(x,y) \text{ be "} x \text{ has taken every course offered by } y \text{",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \{ \text{departments in this school} \} &\\
& \exists x,y (T(x,y))
\end{flalign*}
\end{document}
오류: 2.tex:80: 정의되지 않은 제어 시퀀스. [\end{flalign*}]
답변1
아마도 필요한 것일 것입니다( \R
이제 칠판 R로 정의됨).
\documentclass{article}
\usepackage[left=1in, top=1in, bottom=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\newcommand\R{\mathbb{R}}
\begin{document}
\begin{flalign*}
\textbf{14c)} \quad & \text{Let } V(x,y) \text{ be "} x \text{ has visited } y \text{",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \{ \text{places} \} &\\
& \exists x (V(x, \text{Alaska}) \land \neg V(x, \text{Hawaii})) &\\
\textbf{d)} \quad & \text{Let } L(x,y) \text{ be "} x \text{ has learned at least } y \text{ programming languages",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \R &\\
& \forall x (L(x, 1)) &\\
\textbf{e)} \quad & \text{Let } T(x,y) \text{ be "} x \text{ has taken every course offered by } y \text{",} &\\
& \text{where } x \in \{ \text{students in this class} \} \text{ and } y \in \{ \text{departments in this school} \} &\\
& \exists x,y (T(x,y))
\end{flalign*}
\end{document}
답변2
로그 파일에 보고된 오류 메시지는 다음과 같습니다.
! Undefined control sequence.
<argument> ...is class} \} \text { and } y \in \R
&\\ & \forall x (L(x, 1)) ...
l.17 \end{flalign*}
그러면 문제가 무엇인지 매우 명확해집니다. 명령에는 \R
기본적으로 정의가 없으며 다음과 같이 정의해야 합니다.
\newcommand{\R}{\mathbb{R}}
또는
\newcommand{\R}{\mathbf{R}}
귀하의 스타일 선호도에 따라.
번거로운 환경보다는 목록 사용을 고려해 볼 수도 있습니다 flalign
.
\documentclass{article}
\usepackage[
left=1in,
top=1in,
bottom=1in,
showframe,
]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{enumitem}
\newcommand{\R}{\mathbb{R}}
\begin{document}
\begin{enumerate}[
leftmargin=3.5em,
labelwidth=2.5em,
labelsep=1em,align=right,
]
\item[\bfseries 14c)]
Let $V(x,y)$ be ``$x$ has visited $y$'', where
$x \in \{ \text{students in this class} \}$
and $y \in \{ \text{places} \}$ \\*
$\exists x (V(x, \text{Alaska}) \land \neg V(x, \text{Hawaii}))$
\item[\bfseries d)]
Let $L(x,y)$ ``$x$ has learned at least $y$ programming languages'',
where $x \in \{ \text{students in this class} \}$ and $y \in \R$, \\*
$\forall x (L(x, 1))$
\item[\bfseries e)]
Let $T(x,y)$ be ``$x$ has taken every course offered by $y$'',
where $x \in \{ \text{students in this class} \}$ and
$y \in \{ \text{departments in this school} \}$ \\*
$\exists x,y (T(x,y))$
\end{enumerate}
\end{document}
이 showframe
옵션은 텍스트 블록 주위의 얇은 선을 담당하며 프로덕션 버전에 대해 주석을 달았습니다.