![「未定義の制御シーケンス。[\end{flalign*}]」エラーを修正できないようです](https://rvso.com/image/347935/%E3%80%8C%E6%9C%AA%E5%AE%9A%E7%BE%A9%E3%81%AE%E5%88%B6%E5%BE%A1%E3%82%B7%E3%83%BC%E3%82%B1%E3%83%B3%E3%82%B9%E3%80%82%5B%5Cend%7Bflalign*%7D%5D%E3%80%8D%E3%82%A8%E3%83%A9%E3%83%BC%E3%82%92%E4%BF%AE%E6%AD%A3%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E3%82%88%E3%81%86%E3%81%A7%E3%81%99.png)
実際には同じ行に 2 回エラーが発生します。原因がわかりません。私のコード:
\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
オプションはテキスト ブロックの周囲の細い線を担当します。製品バージョンではコメントします。