\documentclass[12pt]{amsart}
% this is a comment
% the [12pt] is optional; default is 10 pt font
% other options for amsart (AMS article) include:
% article, book, memoir, seminar, beamer ...
% they put different presets on page layout

\usepackage{amsmath, amssymb, amsthm}
% these packages give access to extended symbols
% the last one allows for nice use of the theorem environment
% I'll explain in a later document.

% there's a lot you can do between \documentclass and
% \begin{document}; that sort of thing will follow in a later
% example document


% now open your document
\begin{document}

To get text in your document, simply type.  To start a new paragraph, leave a blank line in between your sentences.
Just line breaking will not produce a new paragraph.

LaTeX requires a blank in between; then it works as it is supposed to.

Note that leaving             extra              space in your lines will not affect the output - LaTeX treats all blank space as the same, unless there's an entire blank line.

Some incidentals: if you want longer dashes, LaTeX will combine individual dashes you type.  One gives a hyphen - two give an en-dash -- and three give an em-dash ---.  Quotation marks need a little adjustment.  If I simply use the double-quote key, "hello, world!", you can see the front quotation mark is backwards.  I need to use the single back-quote twice to get it right: ``hello, world!''  It is common to use two single quotes for the end, but the double quote key will do the end correctly.  One more incidental: if you want to put an abbreviation in the middle of a sentence, it might mess up the spacing.  If I simply put c.e. in the open, there is extra space in the sentence because LaTeX automatically puts an extra space after a period.  If I write c.e., with a comma, there's no problem.  Without the comma I need a backslash after the period to get c.e.\ to typeset with proper spaces.

Certain symbols are reserved for technical use.  These include ampersand, percent, dollar sign, backslash, and open and close curly braces.  To get these to appear in text, for the first three and last two just precede them with a backslash: \&, \%, \$, \{, \}.  If I type two backslashes, that causes a line break \\ so I have a different command for that: $\backslash$  The dollar signs indicate I've entered ``math mode'', which is also necessary to get less-than or greater-than signs.  For some reason, Donald Knuth decided the less-than and greater-than keys should give Spanish punctuation <, >, so to get them to show up as they are on the keyboard we put them in math mode: $<$, $>$.

More on math mode momentarily.  For now, a few more environments that start with ``begin'' and end with ``end''.  To get a numbered list, use ``enumerate":
\begin{enumerate}
\item Item one.
\item Item two.
\begin{enumerate}
\item Nested item 1.
\item Nested item 2.
\end{enumerate}
\item Item three.
\end{enumerate}

For a bullet-point style list, use ``itemize''.

\begin{itemize}
\item Item one.
\item Item two.
\begin{itemize}
\item Nested item 1.
\item Nested item 2.
\end{itemize}
\item Item three.
\end{itemize}

\begin{center}
Centering text is also a begin...end environment.
\end{center}

\emph{Italicized text is enclosed in curly braces and preceded by backslash-`emph'.}  \textbf{Bold text is made similarly but with `textbf' in place of `emph'.}

Back to math mode.  To get Greek letters, precede the name of the letter by a backslash, inside math mode: $\alpha, \beta, \gamma, \delta; \Gamma, \Delta$ (there are no Alpha or Beta commands because they are just $A$ and $B$ - note putting ordinary letters into math mode italicizes them).  Ones especially relevant to computability include $\Sigma, \Pi, \varphi, \psi, \theta, \sigma, \tau, \chi$.  I use $\varphi$ instead of $\phi$, but this is a stylistic choice.

To get subscripts and superscripts, use carat and underscore, always inside math mode.  These will take just the next character or command you write as the subscript or superscript, so if you want to put more than one character in, enclose them in curly brackets: $\varphi_{e,s}, \varphi_e^A(e)$.  These may also be nested: $X^{A_s}_{B^2_4}$.

Some other symbols you might find useful: $\subset, \subseteq, \leq, \geq, \uparrow, \downarrow, \infty, \emptyset, \rightarrow, \Rightarrow, \leftarrow, \Leftarrow, \in, \notin, \cup, \cap, \neq, \restriction, \forall, \exists, \neg, \vee, \wedge, \ldots$.  To get the ``blackboard bold'' letters, use a command called `mathbb': $\mathbb{N}, \mathbb{R}, \mathbb{Q}$.  To get cursive-type letters, use `mathcal' (math calligraphic): $\mathcal{A}, \mathcal{B}, \mathcal{C}$.  To get the line on top of the set name that indicates complement, use `overline': $\overline{A}$.

That's enough for now.  Try writing a LaTeX document that will give you texpractice1.pdf as output.


% all `\begin's need an `\end'
\end{document}