%
% Tutorial on using font-lock-mode, flyspell-mode, AUCTeX, and reftex
% mode.
%
% Author: Jon Herzog
% Date: Sept 9 2003


%This is a tutorial to help you use the (X)Emacs modes I describe in my
%talk. Throughout this document, `C-x' means ``press and hold control
%while pressing x'', and similarly for C-c, C-g, and so on. By `M-x
%stuff', I mean ``press and release ESC, press and release x, and type
%s-t-u-f-f''. 
 
%Instructions are in comments.
 
%I assume that you put my sample .emacs into your .emacs or
%.xemacs/init.el, as appropriate, and are using xemacs or the emacs
%installed in /user/local/bin (if you're on theory machines).


\documentclass{article}

\begin{document}


%This entire document should be in color. If not, type 
%
%    M-x font-lock-mode
%
%and make sure that your emacs startup script contains the portions
%of the sample marked ``font-lock-mode stuff''



Let $n= {p_1}^{\alpha_1} {p_2}^{\alpha_2} {p_3}^{\alpha_3}
{p_4}^{\alpha_4} \ldots {p_k}^{\alpha_k}$, where the $p_1$ are
distinct odd primes and $\alpha_1 >0$. Let $x \in Z^*_p$ be a
quadratic residue.
  
\begin{enumerate}
\item Show that $x$ has exactly $k$ distinct square roots.
\item Why must all the $p_i$ be odd?
\end{enumerate}


% Below, type some correctly- and incorrectly-spelled words. The
% misspelled words should be high-lit. If not, type
%
%   M-x flyspell-mode
%
%and make sure that your emacs startup script contains the portions
%of the sample marked ``flyspell-mode stuff''

spelled right
mispeled

%If you want the spell-checker to learn a new word, let flyspell
%high-light it. Then put the mouse over it, and press the middle
%button. A menu should pop up containing similar words, and various
%ways it can learn the word. (For ever, for just this session, local
%to this file, etc.)

liskov
wang 


%Place the cursor at the end of this very long line and press
%space. If word-wrap is not automatically invoked, type
%
%  M-x auto-fill-mode
%
%and try again.

Two households, both alike in dignity, in fair Verona, where we lay our scene, from ancient grudge break to new mutiny, where civil blood makes civil hands unclean. 


%Place the cursor anywhere in this paragraph and press M-q. If emacs
%doesn't reformat the paragraph to make it look nice, type
%
%  M-x auto-fill-mode
%
%and try again.


We few, we happy few, we band of brothers;
For he to-day that sheds his blood with me
Shall be my brother; 
be he ne'er so vile,
This day shall gentle his condition: And gentlemen in England 
now a-bed Shall think themselves 
accursed they were not here,
And hold their 
manhoods cheap whiles any speaks That fought with us upon Saint Crispin's day.



%Press C-c C-s below to insert a section command. You can give a
%prefix (C-u 3 C-c C-s, for example) to pick a specific
%section. Otherwise, it defaults to the section macro immediately
%above in the text. You can use tab completion, or double-tab to see
%the options







%Press C-c C-e below to insert an environment It defaults to
%itemize. You can use tab completion, or double-tab to see the
%options.    



%Press M-[enter] to add an item to a list

\begin{itemize}

\end{itemize}


%Press C-c C-m to insert a macro. (try \frac) Again, tab completion
%and double-tabbing. 




%Press C-c C-f ? to see how to insert font commands. For example,
%C-c C-f C-e inserts \emph



%The font insertion commands are context-sensitive. Try it in a math
%environment:
$



$
%Place a closing dollar sign at the end of the following lines, and
%see how it automatically inserts the right number, highlights the
%matching one.

$\frac{1}{2}

$$\frac{1}{2}


% type M-x font-lock-fontify-buffer to get font-lock-mode to re-color
% the whole buffer



%Type the appropriate paren to see it highlight

$(\frac{1}{2} {\frac{1}{2} [\frac{1}{2}


% Highlight the following paragraph and type C-c ; to comment it, 
% C-u - C-c ; to uncomment

 
If we shadows have offended,
Think but this, and all is mended,
That you have but slumber'd here
While these visions did appear.
And this weak and idle theme,
No more yielding but a dream,
Gentles, do not reprehend:
if you pardon, we will mend:
And, as I am an honest Puck,
If we have unearned luck
Now to 'scape the serpent's tongue,
We will make amends ere long;
Else the Puck a liar call;
So, good night unto you all.
Give me your hands, if we be friends,
And Robin shall restore amends.


%Put the following line in quotes with "

Lord, what fools these mortals users be.



%Math mode time. In the space below, type ` and then pretty much any
%other key. See what symbols magically pop out. (See cheat sheet for a
%list.)
$$



$$
% Type C-c C-c to compile this document.

% Type C-` to go an error and fix it.




%AUCTeX can actually learn new macros. For example

\newcommand{\overtwo}[1][1]{\frac{#1}{2}}
\newenvironment{quoth}{\null}{\null}

%Try to insert these with C-c C-m and C-c C-e. If it doesn't work, try
%saving this document and trying again. If it still doesn't work, come
%see me.




\end{document}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 





