\title{\sc Homework 1}
\author{\sc by Me}
\date{\sc January 2017}



\noindent 1) Show that $\sqrt{2} \in \mathbb{R} $

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$.


(Font) <10.95> on input line 12. ! Undefined control sequence. l.12 \noindent 1) Show that $\sqrt{2} \in \mathbb {R} $

I get this error when I try to compile this. I still get a PDF output as I want, but it still bothers me why this error is popping up. I tried including the package amsmath, amstext, but it didn't fix the error.

  • You're missing \usepackage{amsfonts} in your preamble -- \mathbb is defined in amsfonts And \sc is an outdated command. Use \textsc{Homework 1} etc.
    – user31729
    Jan 23, 2017 at 0:23
  • Thank you! Are there other packages I should always include in my tex file? Jan 23, 2017 at 0:24
  • What you should include always is a matter of application -- what do you really need at all? There is no general rule.
    – user31729
    Jan 23, 2017 at 0:26
  • Certainly amsmath, or even better, mathtools, since you have maths formulae.
    – Bernard
    Jan 23, 2017 at 0:26
  • 3
    you should not use \noindent or \sc or \vspace in most documents nor explicit numbering like 1) you seem to be missing most of the advantages of latex to keep such formatting separate from the document content. Jan 23, 2017 at 0:48

1 Answer 1


The error message in the format you have shown above is not readable, you should always preserve line endings when showing TeX errors.

The error on your document is

! 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.


Which as the help text makes clear shows, by the position of the line break in the message that \mathbb is the problematic command that has not been defined.

TeX itself can only tell you that it is not defined, not how to define it but google for that command should quickly tell you that you need the package amsfonts



makes the document error free, but there are rather a lot of issues with the TeX markup.

The "two letter" font commands are not recommended in latex2e (and not defined by default) it is usually better to use the latex commands, in this case \scshape however in general you should avoid font commands in the document and especially in structural commands like \title and \author as the whole point of those commands is that they just have plain text with the data and the styling depends on the document class. For similar reasons you should avoid \vspace and \noindent and explicit numbering such as 1).

enter image description here


% \@maketitle copied from article.cls, woth \ascshape added
  \vskip 2em%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
      \lineskip .5em%
    \vskip 1em%
    {\large \@date}%
  \vskip 1.5em}

\title{Homework 1}
\author{by Me}
\date{January 2017}



\item  Show that $\sqrt{2} \in \mathbb{R} $


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)
 > 2$
but decreasing the last digit, $a_k$, 
% math mode!
 will result
% as above
 < 2$.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .