
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\title{\sc Homework 1}
\author{\sc by Me}
\date{\sc January 2017}
\begin{document}
\maketitle
\noindent 1) Show that $\sqrt{2} \in \mathbb{R} $
\vspace{1pc}
We will define two sequences, $A_k$ and $B_k$.
Let $A_k = a_1.a_2a_3a_4\dots a_k$, and ${A_k}^2 > 2$ but decreasing the last digit, $a_k$,
by 1 will result ${A_k}^2 < 2$.
\end{document}
(フォント) <10.95> 入力行12。! 未定義の制御シーケンス。l.12 \noindent 1) $\sqrt{2} \in \mathbb {R} $ であることを示す。
これをコンパイルしようとすると、このエラーが発生します。 希望どおりに PDF 出力は得られますが、なぜこのエラーが表示されるのかがまだ気になります。 amsmath、amstext パッケージを含めてみましたが、エラーは修正されませんでした。
答え1
上記の形式のエラー メッセージは判読できません。TeX エラーを表示するときは、常に行末を保持する必要があります。
あなたの文書のエラーは
! Undefined control sequence.
l.12 \noindent 1) Show that $\sqrt{2} \in \mathbb
{R} $
? h
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
?
ヘルプ テキストで明確に示されているように、メッセージ内の改行の位置によって、\mathbb
定義されていない問題のあるコマンドが示されます。
TeX自体は定義されていないことしか教えてくれず、定義方法は教えてくれませんが、そのコマンドをGoogleで検索すれば、パッケージが必要であることがすぐにわかるはずです。amsfonts
追加
\usepackage{amsfonts}
ドキュメントにエラーは発生しませんが、TeX マークアップには多くの問題があります。
「2 文字」のフォント コマンドは、latex2e では推奨されていません (既定では定義されていません)。通常は、latex コマンドを使用する方が適切です。\scshape
ただし、この場合は、一般に、ドキュメント内でのフォント コマンドの使用は避けてください。特に、やなどの構造コマンドでは避けてください\title
。これらのコマンドのポイントは、データを含むプレーン テキストのみを持ち、スタイルはドキュメント クラスに依存することです。同様の理由で、やや、などの明示的な番号付けも\author
避けてください。\vspace
\noindent
1)
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\makeatletter
% \@maketitle copied from article.cls, woth \ascshape added
\renewcommand\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\scshape
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\large \@date}%
\end{center}%
\par
\vskip 1.5em}
\makeatother
\title{Homework 1}
\author{by Me}
\date{January 2017}
\begin{document}
\maketitle
\begin{enumerate}
\item Show that $\sqrt{2} \in \mathbb{R} $
\bigskip
We will define two sequences, $A_k$ and $B_k$.
Let $A_k = a_1a_2a_3a_4\dots a_k$, and
% You could use {A_k}^2 if you really need to stress the order
% bit it makes the 2 float off and normally the more compact
% form is used (and understood)
$A_k^2
> 2$
but decreasing the last digit, $a_k$,
by
% math mode!
$1$
will result
% as above
$A_k^2
< 2$.
\end{enumerate}
\end{document}