
 \documentclass[12pt,epsf,leqno, fleqn,makeidx]{article}
   \usepackage{graphicx}
 \usepackage{fix-cm}
\usepackage{wrapfig}
 
\usepackage{setspace}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{verbatim}

 \usepackage{array,multirow}

\usepackage{setspace}
 
 %Eric's usepackages
\usepackage{setspace} % for doublespacing
 \usepackage{url} % appropriately display url's
\usepackage{hyperref} \hypersetup{breaklinks=true, pagecolor= white, colorlinks= true, linkcolor=black, hyperfootnotes= false, urlcolor=blue } \urlstyle{ rm}
  \usepackage{longtable}
\usepackage[T1]{fontenc}
  \usepackage{lmodern}
% \usepackage{garamond}
%\usepackage{palatino}
% \usepackage{mathpazo}
 \usepackage{amsmath}
%  \usepackage[T1]{pbsi}
%\usepackage[table,x11names,svgnames]{xcolor}
\usepackage{verbatim}
\usepackage{graphicx}
\usepackage{amsthm} % Theorem environments
\usepackage{amssymb}% extra common ams symbols
 \usepackage{boxedminipage}
 \usepackage{endnotes}

 \usepackage{verbatim}
\usepackage{color}

 \usepackage{tikz} 

 \usepackage{makeidx}
\makeindex
 \immediate\write18{makeindex  latex-rasmusen.idx}

\reversemarginpar
\topmargin   -.8in
 \oddsidemargin -.5in
  \textheight  10in
 \textwidth 6.5in

\newcommand{\red}[1]{\color{red}{#1} \color{black} }
\newcommand{\green}[1]{\color{green}{#1} \color{black} }

\newcommand{\myheading}[1] {\noindent \color{blue}{\sc #1}\color{black}}

 \newcommand{\comments}[1]{}
 
\newcommand{\bigfont}{\fontsize{60pt}{70pt}\selectfont}
\newcommand{\smallfont}{\fontsize{6pt}{7pt}\selectfont}
\newcommand{\bl }{\textbackslash}

%------------------------------------ -- 

\begin{document}
 
  \parskip 12pt
   \parindent 12pt


 
 
February 29, 2020 \\
Eric Rasmusen, erasmuse@indiana.edu\\
This file is   at \url{http://www.rasmusen.org/a/latex-rasmusen.pdf}.  The source file is:   \url{http://www.rasmusen.org/a/latex-rasmusen.tex}.


{\tt These notes are {\bf   tips and tricks} that I have found useful or thought might be useful. I wrote these for my own use and have not tried to make them clear for others, but some other people will find them useful.}
 




  My email address is erasmuse@indiana.edu . 

 I use BB to indicate Backslash. 
 
\hrule %---------------------------------------------------------------------
 TABLES 
  BBusepackage{array,multirow}
  
\hspace*{-48pt} \begin{minipage}[c]{ \linewidth}
   \begin{center} 
  \begin{footnotesize}

    {\sc       Table 1: \\
       Toughness, ($ x_1/x_2$)  and   {\bf Player 1's Share   \boldmath$\pi$ }  }
    \vspace*{ 12pt}
    
 \begin{tabular}{| l r| ccc ccc|  }
 \hline
       \multicolumn{2}{ |c  } { \;} &   \multicolumn{6}{c|} { }\\
  \multicolumn{2}{ |c  } { \;} &   \multicolumn{6}{c|} {$\alpha_2$}\\
        \multicolumn{2}{ |c  } { \;} &   \multicolumn{6}{c|} { }\\
    \multicolumn{2}{ |c  } { \;}  &.01 &.50 &1.00 &2.00&5.00 &10.00 \\  
\cline{3-8}
             \multicolumn{2}{ |c|  } { \;} &   \multicolumn{6}{c|} { }\\
  \multirow{9}{*}{\;\;\;  $\alpha_1$ }  &.01 & 3.00/3.00   &  &  &&  &\\
      &   & {\bf 50} &  &  \multicolumn{4}{c|} { }\\
             & &   \multicolumn{6}{c|} { }\\
 &.50   & 2.82/2.99 {\bf df} &2.81/2.81   & &   &  &\\
       & &  & {\bf 50}& \multicolumn{4}{c|} { }\\
             & &   \multicolumn{6}{c|} { }\\
  &1.00& 2.64/2.98 {\bf  ss}  &2.63/2.79 {\bf xx} & 2.61/2.61 & &    &\\
  \multicolumn{2}{ |c|  } { \;}  &  &  & {\bf 50} & &  &  \\ 
    \multicolumn{2}{ |c|  } { \;}  &  &  &  & &  &  \\ 
 &2.00 & 2.33/2.95  {\bf xx} & 2.31/2.75 {\bf xx} & 2.28/2.56 {\bf fgf} & 1.01/2.47 {\bf 50}  &&\\
    \multicolumn{2}{ |c|  } { \;}  &  &  &  & &  &  \\ 
      \hline
            \end{tabular}

            \end{footnotesize}
             \end{center}
             \end{minipage}
                 \vspace*{ 12pt}
\hrule %---------------------------------------------------------------------


DISPLAYSTYLE FOR INTEGRALS AND SUMMATION SIGNS
 Put 
BBeverymath{BBdisplaystyle}  in the preamble before begin{document} in every single one of my files. 

\hrule %---------------------------------------------------------------------

    "ff" COMING OUT WITH TOO BIG A SPACE. 
    In math mode $payoff$ looks ugly. You need to use mathitalic, like BBmathit{payoff}. 
 \mathit{Payoff}


For comments: 
PERCENTAGE Here is a one line comment

BBiffalse
  Here is the commented paragraph   
 that won't show up in the output. 
BBfi

%one  line comment. 

\iffalse
  Here is the commented paragraph   
 that won't show up in the output. 
\fi

\hrule %---------------------------------------------------------------------

CLOSELY  SPACED LISTS

\newenvironment{enumerate-close}{
\vspace*{-9pt}
  \begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{
  \end{enumerate}
}

 Here is a list created using the new environment  immediately above her ein the source file, with close spacing between lines: 
\begin{enumerate-close}
\item Here is the first item
\item Here is the 2nd item
\item Here is the  3rd item
\end{enumerate-close}

\hrule %---------------------------------------------------------------------

 INDEXING
 Use 
\bl documentclass[12pt, makeidx]\{article\}\\

 Put the following command  in your preamble: 
\bl immediate\bl write18\bl \{makeindex  latex-rasmusen.idx\}\\
 That command uses write18 to issue a DOS command to process the *.idx file.

 Put these \index{commands} at the start, int eh preamble before begin document: 

\bl  usepackage\{makeidx\}\\
\bl makeindex

 and at the \index{point} where you want the index to show up, write


\bl begin\{theindex\}\\
\bl printindex \\
\bl end\{theindex\}

  To index a \index{word} i.e.  the word `Likelihood'  write at each page it  appears: 

I would say that the  \bl index\{likelihood\} of that is zero. 
 
  For   index subentries, use an exclamation point and  tag   as:
 

``In some respects the Bayesian formulation \bl index\{Bayesian
inference!advantage and disadvantage of
\} is the simpler and in
other respects the more difficult.''
 
 You have to run this  a few times to get all teh auxiliary files working right. 
 
 A good reference is:
``MakeIndex: An Index Processor For LaTEX'' by Leslie Lamport 17
February 1987 \url{http://tex.loria.fr/bibdex/makeindex.pdf}

 
\printindex
 


MORE STUFF, I DONT UNDERSTAND NOW:

\bl indexentry{words!and|hyperpage}{1}
\bl xindexentry{existing|hyperpage}{1}

to generate something like this:

\bl begin{theindex}\\
\bl item{extend}\bl hfill{3}\\
\bl item{extension problem}\bl hfill{3}\\
\bl item{extension of a map}\bl hfill{3}\\
\bl item{homotopic}\bl hfill{5}\\
\bl item{homotopy}\bl hfill{5}\\
\bl end{theindex}

I have an examples of tex input and pdf output, with different and
better
instructions, at

http://www.rasmusen.org/a/sample-index.tex and
http://www.rasmusen.org/a/sample- index.pdf




 Here is an example of how to create an italicized index entry. This
puts the entry ``{\bl it Producers-- The}'' at the location ``producers''
would have in the index.

The next game, inspired by Mel Brooks's offbeat film {\bl it The
Producers} \bl index{producers@{\bl it Producers-- The}}, illustrates a
peculiarity of optimal contracts

 My second way to do indexes, the less intelligent way (because it
will repeat page numbers if more than one \bl label{} is on one page, and
it won't alphabetize) is to just put \bl label{termtoindex} in the text,
and \bl pageref{termtoindex} in the index. Check to see if a label is
assigned more than once, by mistake. To do that, you can look at the
latex processing log in *.log, or you can look at the *.aux file and
it will list all the page numbers assigned to a label.

\hrule %---------------------------------------------------------------------

LATEX RELATIVE PATHS AND INPUT AND INCLUDE

    If I put
\bl input{..\bl preamble-regulation.tex}
 that tells latex to search the directory ABOVE my current one for the file preamble-regulation.tex and to insert it. 
You can use 
\bl input{.\bl below-directory\bl preamble-regulation.tex}
 to look in below-directory, the directory BELOW my current one. 
 The similar command \bl include  differs in how it treats nesting and multiple input commands. 

 \bl includeonly is a useful command for saying which inputs to pay attention to. For a book, you can put it in the preamble and only include the chapters you want to texify at that  moment. 
 \bl includeonly{file1, file3}   

See \url{http://en.wikibooks.org/wiki/LaTeX/General_Guidelines}.
\hrule %---------------------------------------------------------------------
 MARGINAL NOTES WITH NUMBERS

  Here's a way to have   a floating margin note, with special numbers for the marginal notes with an "m" before each number so the footnotes are m1, m2, m3, etc. 


\newcommand{\margincomment}[1]{% a simple margin note
        \refstepcounter{mynote}% step counter
        \mbox{\textsuperscript{m\themynote  } }% the number (superscript) in text preceded by m
        \marginpar{\tiny \mbox{ \textsuperscript{m\themynote} }#1}% the note with number
}
\newcounter{mynote}% a new counter for use in margin notes

Here is my text.\margincomment{Here is my marginal note.}


\hrule %----------------------------------------------------------------------
BACKSLASHES

\bl newcommand\{\bl bl \}\{\bl textbackslash\}
\hrule %---------------------------------------------------------------------
 WORDRAPPING AROUND FIGURES AND PICTURES

\bl usepackage\{wrapfig\} 

 \bl begin\{wrapfigure\}[12]\{l\}\{.6\bl linewidth\}
\bl vspace\{-28pt\}

 \bl begin\{center\}
  \{\bl sc Figure 12.\bl ref\{1913-ohio-hunting-license.jpg\}\bl \bl 
 A 1913 Ohio Hunting License \} 
\bl end\{center\}
\bl refstepcounter\{figurecounter\} \bl label\{1913-ohio-hunting-license.jpg\}  
 \bl includegraphics[width=\bl linewidth]\{1913-ohio-hunting-license.jpg\}
\bl end\{wrapfigure\}
 Then we put the text that is supposed to go on the right side of the page. The 12 is optional and says the picture should take up 12 lines of text. Usually leave that out. 

\hrule %---------------------------------------------------------------------
 SANS SERIF FONT: 
 Use this command to change the entire document from that point forward: 
 \bl renewcommand{ \bl rmdefault}{cmss}
\hrule %---------------------------------------------------------------------

 TYPE FONT SIZES

  By default, LaTeX uses 10pt Computer Modern Roman as its base font.
You can change this base font by using the 11pt or 12pt style option
on the documentclass line like this:

\bl documentclass[11pt]{article\}

             10pt Default     11pt Option     12pt Option
\bl tiny            5pt              6pt             6pt
\bl scriptsize      7pt              8pt             8pt
\bl footnotesize    8pt              9pt            10pt
\bl small           9pt             10pt            11pt
\bl normalsize     10pt             11pt            12pt
\bl large          12pt             12pt            14pt
\bl Large          14pt             14pt            17pt
\bl LARGE          17pt             17pt            20pt
\bl huge           20pt             20pt            25pt
\bl Huge           25pt             25pt            25pt

 
The \bl resizebox command (from graphicx package) is convenient if you want to produce, e.g., a title that fills the entire page width:
\bl resizebox{\bl linewidth\}{!}{\bl it shape Foo!}\\
\resizebox{\linewidth}{!}{\it shape Foo!}

 For big font: 
\bl usepackage\{fix-cm\}\\
\bl newcommand\{\bl bigfont\}\{\bl fontsize\{60pt\}\{70pt\}\bl selectfont\}\\
\bl newcommand\{\bl smallfont\}\{\bl fontsize\{6pt\}\{7pt\}\bl selectfont\}
\bl begin{bigfont}Here is my writing in a big font. \bl end{bigfont}\\
\begin{bigfont}Here is my writing in a big font. \end{bigfont}\\
\begin{smallfont}Here is my writing in a small 6/7  font. \end{smallfont}

\hrule %---------------------------------------------------------------------
MARGIN COMMENTS

\bl newcommand\{\bl margincomment\}[1]
  \{\bl mbox\{\}\bl marginpar\{\bl tiny\bl hspace\{0pt\} poundsign 1\}\}

\bl margincomment\{Here is my comment\}

\margincomment\{Here is my comment\}

\hrule %---------------------------------------------------------------------

 URLS, WEBLINK DISPLYA: 

 \bl usepackage\{url\} % appropriately display url's
\bl usepackage\{hyperref\} \bl hypersetup\{breaklinks=true, 
  colorlinks= true, linkcolor=black, hyperfootnotes= false, urlcolor=blue \}    \bl urlstyle\{same\}
 \bl usepackage\{breakurl\} % This helps  multi-line pdf links work

\hrule %---------------------------------------------------------------------
\myheading\{COLOR\}

\bl usepackage\{color\}
\bl newcommand\{\bl red\}[1]\{\bl color\{red\}\{poundsign 1\} \bl color\{black\} \}
\bl newcommand\{\bl green\}[1]\{\bl color\{green\}\{poundsign 1\} \bl color\{black\} \}

\bl newcommand\{\bl myheading\}[1] \{\bl noindent \bl color\{blue\}\{\bl sc  poundsign 1\}\bl color\{black\}\}

\bl myheading\{Here is the Heading\}

\red{Here is some red writing.}

\hrule %---------------------------------------------------------------------
 SPACES

A single backslash \bl  will make sure that there is just a single space
after a word. This is useful after a period which does not end a
sentence, e.g. in Mr. \bl  Jones, so there is just one space after the
period.

For a negative space in math mode, use \bl !

For a normal-width space use \bl :, backslash-colon This is very useful for alignmen tin tables. 

\bl hfill and \bl vfill both put space in up to the limits of the page
borders. Thus, Top of page \bl vfill Bottom of page will fill up  an
entire page, with blank space in the middle.

\bl vspace*{24pt} and \bl hspace*{32pt} do the obvious things. 

The command ~ is supposed to prevent a linebreak.(tilde) 

 \hrule %---------------------------------------------------------------------

USING SUBSCRIPTS AND SUPERSCRIPTS TOGETHER


MAKING DIGITS AND LETTER SUBSCRIPTS LOOK OK TOGETHER, CHANGING THE FONT SIZE
\newcommand{\s}{\scriptscriptstyle}
 
This  happens 
if and only if
$$
 -f_{\s 11}+\sum_{j=2}^n
\frac{f_{{\s 1}j}^2}{\lambda^{{\s 2}j}} \geq 1
$$


How to make $x^i_j$ different from $x_j^i$.

$X_i^{\bl phantom{i}j}$ and $X^j_{\bl phantom{j}i}$?

<A HREF=" http://www.cse.iitd.ernet.in/~anup/homepage/UNIX/latex.html
">"Some
useful tips and tricks in LaTeX".</A>

\hrule %---------------------------------------------------------------------
FLOATS
 I have not figured out a good way to deal with floats, to get diagrams where I want them. A couple of promising packages are: 

\bl usepackage{float} \bl usepackage{afterpage}

\bl begin{figure}[h!]
 This is supposed to make the figure go right at this point in the paper. 
\bl end{figure}

This command is supposed to clear out the floats after teh current page is done filling up: \bl afterpage{\bl clearpage} .

\hrule %---------------------------------------------------------------------
ENDNOTES

 \bl usepackage{endnotes} \bl let\bl footnote=\bl endnote

 This will make every use of the Footnote command and endnote.
 
   At the end  of
the document, put   \bl theendnotes  to have them print out.


   \hrule %---------------------------------------------------------------------
In Latex, how do I set up a link to http://rasmusen.org/religion.htm  that show up in the text as LINK-MINE?

Put \bl usepackage{hyperref} in your header, and when you want to link to a page, use the command \bl href{http://rasmusen.org/religion.htm}{LINK-MINE}.



 It works like \href{http://rasmusen.org/religion.htm}{this}. 
\hrule %---------------------------------------------------------------------
 PUTTING A CIRCLE AROUND SOME TEXT: 

 \bl usepackage{tikz} 
  

\bl newcommand*\bl mycircle[1]{ 
  \bl begin{tikzpicture}[baseline=(C.base)]
    \bl node[draw,circle,inner sep=1pt](C) {\#1};
  \bl end{tikzpicture}}

\bl mycircle{N}ight

\newcommand*\mycircle[1]{ 
\begin{tikzpicture}[baseline=(C.base)]
 \node[draw,circle,inner sep=1pt](C) {#1};
\end{tikzpicture}}

\mycircle{N}ight, N\mycircle{ig}ht, \mycircle{Night}
\hrule %---------------------------------------------------------------------
LANDSCAPE VIEW

Changing the whole document to  landscape  can be done be using the geometry-package:

    \bl usepackage[landscape]{geometry}

Next I will show you how to change the page layout of single pages. The lscape-package provides according possiblities:

    xxusepackage{lscape}

With

    \bl begin{landscape}

   dfgdfsfg

    \bl end{landscape}


\url{http://texblog.wordpress.com/2007/11/10/landscape-in-latex/}
\hrule %---------------------------------------------------------------------
LOOKING AT THE PDF OUTPUT WHILE EDITING
   If you produce a pdf file and it is open with Adobe Reader, you can't run your tex file through again-- it stops. Instead, use EVINCE, another pdf reader, at least while you are editing the file. 

 \hrule %---------------------------------------------------------------------
\newpage

 \vspace*{\fill}

CENTERING VERTICALLY ON A PAGE

  Here is the stuff to center with the same vertical distance above and below.  The commands you can't see are
  
  \vspace*{\fill}

\bl newpage

\bl vspace*{\bl fill}

 text here
  
  \bl vspace*{\bl fill}

\bl newpage

\newpage
\hrule %---------------------------------------------------------------------
DOUBLE SPACING

 The following command changes to 1.2 spacing: 

 \bl renewcommand{\bl baselinestretch}{1.2}

\bl usepackage{setspace} followed by \bl doublespace does double spacing, without using doublespacing in footnotes and table captions and suchlike. \bl begin{singlespace} and \bl end{singlespace} then are used to have singlespacing of some packages. 



 I also use setspace in making a new command for indented singlespaced quotations: 

\newenvironment{bigquote}
             { \begin{quotation} \begin{small} \begin{singlespace}  }
                {  \end{singlespace}  \end{small}  \end{quotation}   }
 
\begin{bigquote}
 Here is the quotation. \\
 I'll put  linebreaks in to make it \\
three lines long. 
\end{bigquote}


 
\bl newenvironment{bigquote}
             { \bl begin{quotation} \bl begin{small} \bl begin{singlespace}  }
                {  \bl end{singlespace}  \bl end{small}  \bl end{quotation}   }
 
\bl begin{bigquote}
 Here is the quotation. \bl \bl 
 I'll put  linebreaks in to make it \bl \bl 
three lines long. 
\bl end{bigquote}

\hrule %---------------------------------------------------------------------
 
 END OF PROOF

Here is the rpoof, and it ends.  $\qed$

\bl qed is the input symbol. 
 
This needs the package
\bl usepackage{amsthm}, Theorem environments
 
\hrule %---------------------------------------------------------------------
SYMBOLS FOR WRITING LEGAL BRIEFS

 
\P 9  \S 42   \dotfill  56 


  \begin{verbatim}
\P 9  \S 42   \dotfill  56 
\end{verbatim}

 \hrule %---------------------------------------------------------------------
INDICATOR SIGNS

 Use $I_{gi}$ as  a variable which equals 1 if agent $i$ picks an action that costs him $g$ and 0 otherwise. 
 \hrule %---------------------------------------------------------------------


FOR LOOKING UP LATEX SYMBOLS:

 This is great! \url{http://detexify.kirelabs.org}and 
\url{http://detexifyblog.kirelabs.org/past/2009/7/19/detexify_explained}
\hrule %---------------------------------------------------------------------
\bl mbox and \bl fbox make boxes without and with borders, to keep text
together. There can't be a line break in the middle of that kind of
box. For a box that spans multiple lines, use  

\bl usepackage{boxedminipage}
\bl fboxsep=12pt needs to be set for around big blocks of text, with boxedminipage, but if you are just using fbox for one word  or symbol, change it   to 
\bl xfboxsep=.2pt
 
\fboxsep=12pt
\begin{boxedminipage}[c]{0.6 \linewidth} 
Text that I want to box, such as a game description, goes here. The    box width  is .6 of entire line . It splits lines depending on how wide it is, to squish the text into the box. 
  \end{boxedminipage}
\fboxsep=.2pt

Put  box around an equation like this: 
$$
 5= x^2 \;\;\;  \fbox{$24v   =6  \alpha  t + (1-\alpha)g^7$}   \;\;\;
67=
\int\limits_0^8
 $$

\begin{verbatim*}  

 \mbox and \fbox make boxes without and with borders, to keep text
together. There can't be a line break in the middle of that kind of
box. For a box that spans multiple lines, use  

\bl usepackage{boxedminipage}
 


\begin{boxedminipage}[c]{0.6 \linewidth} 
Text that I want to box, such as a game description, goes here. The    box width  is .6 of entire line . It splits lines depending on how wide it is, to squish the text into the box. 
  \end{boxedminipage}


Put  box around an equation like this: 
$$
 5= x^2 \;\;\;  \fbox{$24v   =6  \alpha  t + (1-\alpha)g^7$}   \;\;\;
67=
\int\limits_0^8
 $$

\end{verbatim*}

\hrule %---------------------------------------------------------------------
 
For BEAMER, the way to make a latex file into a presentation PDF
similar
to powerpoint, see`		 
 \url{http://www.rasmusen.org/a/beamer-rasmusen.tex} and\\
  \url{http://www.rasmusen.org/a/beamer-rasmusen.pdf}
 
\hrule %---------------------------------------------------------------------

 RUNNING WITHOUT STOPPING FOR ERRORS

Insert the command \textbackslash batchmode to run without error messages
and without stopping for errors.	The *.log file will still be created
with all the errors listed in it.

\hrule %---------------------------------------------------------------------


 NO AUX FILE OR OTHER SUCH CREATED


\textbackslash nofiles 
 is the command for that. 

 The *.log file gets created anyway, though. 

\hrule %---------------------------------------------------------------------


DELETING FILES FROM WITHIN LATEX

My next task is to figure out how to have Latex clean up after itself, deleting the *.log, *.aux, temptex.txt, *.out files unless told not to. 

 To do this,  which I haven't figured out yet, one uses the write18 command.  Here are some examples of how to use it generally



\textbackslash write18{erase temp1.*}
 

\textbackslash write18{erase temp1.log}
 ( doesn't work-- new log created anyway.) 


  \textbackslash write18{copy temp.tex realname.tex}


The write18 command doesn't work unless you alter your latex operating files, though. THe designers were fearful of security breaches, since the write18 command would allow a *.tex file to have commands which could take over your computer and, for example, download virus files. 

 So here is how to enable the write18 command: 

\begin{verbatim}



EnableWrite18=t

 

Command execution either happens at \output time or right
away, according to the absence or presence of the \immediate
prefix.



http://wiki.contextgarden.net/texmf.cnf

in texmf.cnf  set

  shell_escape=t

In Miktex it is totally different. Follow the instructions in:

  http://wiki.contextgarden.net/write18

In the DOS Shell run:

initexmf --edit-config-file=miktex\config\pdftex.ini

and put in the new empty file that creates,

EnableWrite18=t

Or, I think this would work: create a new file:

   C:\Documents and Settings\All Users\Application
 Data\MiKTeX\2.7\miktex\config\pdftex.ini

 \end{verbatim}

Its only content should be

EnableWrite18=t

This will be a local supplement to the pdftex.ini file which is in
wherever  your Miktex2.7 main directory is, and I think it will not
be erased when MIktex updates itself.


\hrule %---------------------------------------------------------------------


  MOVING AUXILIARY STUFF INTO THE  *.TEX FILE, BUT IN THE MIDDLE.

 This takes a bunch of fancy stuff, but is not too hard. Here is an example file: 

\begin{verbatim}

\documentclass[12pt]{article}

 \batchmode
 %  Thus no error messages--see the *.log file for them. 

\usepackage{filecontents}

\newif\ifauxfileexists    \IfFileExists{temptex.txt}
{\global\auxfileexiststrue}{\global\auxfileexistsfalse}
    \ifauxfileexists %Do nothing if ifauxfileexists=TRUE.

\else  \begin{filecontents}{temptex.txt} 
%% %%%%%
%% This is just filler. 
%% %%%%%
 \end{filecontents}     \fi %The end of the  ELSE instructions.

    \input{temptex.txt}
%The real temptex.txt. created later, has all the auxiliary files in it. 
 %Run this *.tex file through latex twice or thrice to fix the style.  


\hrule %---------------------------------------------------------------------


\begin{document}
 

    \huge  \url{http://Rasmusen.org}


    \begin{filecontents}{temptex.txt}

\usepackage{hyperref}
\hypersetup{colorlinks=  true, urlcolor=blue}  

    \end{filecontents} 


\end{document}


\end{verbatim}

I figured this out with lots of help from peopel at \url{http://groups.google.com/group/comp.text.tex/browse_thread/thread/94ff34113e8c57e/a358fc38446c4762#a358fc38446c4762}, and from  	
Erik Quaeghebeur   and Scott Pakin in particular.



Maybe also see: 
\url{ http://www-hep2.fzu.cz/tex/texmf-
dist/doc/latex/filecontents/filecontents.pdf} and 
\url{http://carroll.aset.psu.edu/pub/CTAN/support/bundledoc/arla
tex.pdf}.


\hrule %---------------------------------------------------------------------



A USER'S GROUP FOR QUESTIONS

 A latex user group that has easy registration and very active readership is at: 

\url{http://groups.google.com/group/comp.text.tex/browse_thread/thread/094ff34113e8c57e#}

\hrule %---------------------------------------------------------------------


GOOD PACKAGES AND FORMAT:  


\begin{verbatim}

\usepackage[T1]{fontenc}
  \usepackage{lmodern}
&\usepackage{garamond}
%\usepackage{palatino}
% \usepackage{mathpazo}


\usepackage{verbatim}    % verbatim classes
 \usepackage{url} % appropriately display url's
\usepackage{hyperref} \hypersetup{breaklinks=true, pagecolor= white, colorlinks= true, linkcolor=black, hyperfootnotes= false, urlcolor=blue } \urlstyle{ rm}
  \usepackage{longtable}
\usepackage{graphicx}
\usepackage{amsmath}

 \reversemarginpar
  \topmargin  -.3in   \oddsidemargin -.1in
  \textheight  8in  \textwidth 6in
  \baselineskip 16pt
 \parindent 12pt  \parskip 10pt


\end{verbatim}

\hrule %---------------------------------------------------------------------


PUTTING EVERYTHING INTO ONE *.TEX FILE

  The filecontents environment will do this. It puts a section of text into a new file.  If you want to overwrite a file name, or use this in the middle of a *.tex document instead of at the very beginning, though, you need to use the filecontents package. See \url{http://www.ctan.org/tex-archive/macros/latex/contrib/filecontents/}.

\begin{verbatim}

\usepackage{filecontents}

%The next section creates the file garamond.sty.
\begin{filecontents}{garamond.sty}
%%
%% This is file `garamond.sty`
%% 
%% This file is under the public domain.
%% Original author: Gael Varoquaux
%%       gael dot varoquaux at normalesup dot org 
\pdfmapfile{=ugm.map}
\let\rmdefault@garamond\rmdefault%

\newcommand{\garamond}{%
\renewcommand{\rmdefault}{ugm}\normalfont%
}

\newcommand{\ungaramond}{%
\renewcommand{\rmdefault}{\rmdefault@garamond}\normalfont%
}
\end{filecontents}
 
\end{verbatim}

\hrule %---------------------------------------------------------------------


\newenvironment{heading1}{\bigskip \noindent \large \bf \sf
}{ }

\begin{heading1} 
  1. Introduction
  \end{heading1}

 If you try \{\textbackslash heading1 1.Introduction\} that will NOT work.

\hrule %---------------------------------------------------------------------


 
  

MATH MACROS

\newcommand{\toarrow }{\hspace{-4pt}\to \hspace{-3pt }}

\newcommand{\suchthat }{\hspace{-4pt} : \hspace{-2pt } } 

\newcommand{\smallcircle}{ {\scriptstyle \circ  }  }
\newcommand{\of}{ \hspace{-1pt}  \smallcircle  \hspace{-1pt} }

\newcommand{\C}{\mathbb{C}}
\newcommand{\R}{\mathbb{R}} %For real numbers
\newcommand{\grad}{\nabla}

% For margin comments in small font
\newcommand{\marginlabel}[1]
  {\mbox{}\marginpar{\raggedleft\hspace{0pt}#1}}
\newcommand{\marg}[1]
  {\mbox{}\marginpar{\tiny\hspace{0pt}#1}}
\newcommand{\numeq}[1]{\begin{align}\begin{split} #1
\end{split}\end{align}}

(1) $f^{{\scriptscriptstyle -1} \prime \prime }$ is better than $f^{-1})''$.    


(2) $  f \suchthat A \toarrow B $ is better than $ f : A \rightarrow B  $.    

(3) $f \of g$ is better than $f \circ g$. 

(4)  $\C^2$ and  $\R^3$ and $\grad f(x)$ \marg{Here is a marginal comment. It is quite a long one, isn't it? }





\begin{verbatim}

\newcommand{\toarrow }{\hspace{-4pt}\to \hspace{-3pt }}

\newcommand{\suchthat }{\hspace{-4pt} : \hspace{-2pt } } 

\newcommand{\smallcircle}{ {\scriptstyle \circ  }  }
\newcommand{\of}{ \hspace{-1pt}  \smallcircle  \hspace{-1pt} }


\newcommand{\C}{\mathbb{C}}
\newcommand{\R}{\mathbb{R}} %For real numbers
\newcommand{\grad}{\nabla}

% For margin comments in small font
\newcommand{\marginlabel}[1]
  {\mbox{}\marginpar{\raggedleft\hspace{0pt}#1}}
\newcommand{\marg}[1]
  {\mbox{}\marginpar{\tiny\hspace{0pt}#1}}
\newcommand{\numeq}[1]{\begin{align}\begin{split} #1
\end{split}\end{align}}

(1) $f^{{\scriptscriptstyle -1} \prime \prime }$ is better than $f^{-1})''$.    


(2) $  f \suchthat A \toarrow B $ is better than $ f : A \rightarrow B  $.    

(3) $f \of g$ is better than $f \circ g$. 

(4)  $\C^2$ and  $\R^3$ and $\grad f(x)$ \marg{Here is a marginal comment. It is quite a long one, isn't it? }

\end{verbatim}
 
\hrule %---------------------------------------------------------------------


TYPESETTING PAGES AND BOOKS

\url{http://www.economics.utoronto.ca/osborne/latex/PMAKEUP.HTM}  has notes on page makeup by TeX author 	Martin J. Osborne

Something important to keep in mind in using Latex is that it is designed   for professional typesetters typesetting books, not for scholars writing papers.   This means that its code aims at a good-looking, readable, final product, not  good-looking, readable  input code. Not being WYSIWYG is the result of this. I actually prefer that as a scholar. It means that I can be sloppy about spacing when I type in  text and formulas, and I can cut-and-paste with ease. But it means that anything requiring labelling is hard to read in the code. The identity of Section 3, equation (10), and Figure 4a keeps changing.	It is much clearer to assign.

 
\hrule %---------------------------------------------------------------------


 FIGURES AND YOUR OWN COUNTERS

How do we make figures not go at the top of a page, but rahter
next towhere they are referneced? Don't use the begin figure end figure environment. Instead typeset the figures yourself, and use your own counter. 

 Unforunately, figures tend to float anyway. 



 The following creates the new counter named figurecounter and starts it at 0. It immediately is stepped up to 1, and the label fig11 is associated with 1. 

\newcounter{figurecounter}
\setcounter{figurecounter}{0}
\refstepcounter{figurecounter} \label{fig11}

(1) ``I will use Figure \ref{fig11}''

\refstepcounter{figurecounter}  \label{fig22}

(2) ` `I will use Figure \ref{fig22} ' ' 

This  was generated by: 

\begin{verbatim}

\newcounter{figurecounter}
\setcounter{figurecounter}{0}
\refstepcounter{figurecounter} \label{fig11}

(1)``I will use Figure \ref{fig11}''

\refstepcounter{figurecounter}  \label{fig22}

(2)  ` `I will use Figure \ref{fig22} ' ' 

\end{verbatim}


\hrule %---------------------------------------------------------------------


 PDF and LATEX

PDF: Foxit Reader.  . When I process inLatex,
I can process and produce a new PDF even while the old one is
open. I then need to close it in Foxit and reopen it to see th
enew one, though-- there is no RELOAD command.  



\hrule %---------------------------------------------------------------------


MICROSOFT WORD and LATEX and PDF
 
Acrobat 9 pro will convert PDF to WORD, so I can do
everything in latex and convert later.


\hrule %---------------------------------------------------------------------


FONTS

\url{ http://www.tug.org/fonts/special-s.pdf}

\url{ http://www.tug.dk/FontCatalogue/mathfonts.html }"Fonts with
Math Support" and other fonts too.



Seventh Circuit: \url{http://www.ca7.uscourts.gov/Rules/type.pdf}

Mathpazo, New Century, Palatino, Garamond are all good.  The palatino font used in Mathpazo has stupid quotation marks
that are like double primes and do not distinguish between
starting and ending quotation marks. So Garamond is better.
Lmodern is pretty good too (Latin Modern).

See \url{http://gael-varoquaux.info/computers/garamond/index.html}

 
   
  To use the command  \textbackslash garamond, make sure garamond fonts are in a folder   in the same directory as this main *.tex file, and that the file garamond.sty is in the same directory as the main *.tex file (NOT just  in the font directory). Garamond is btter than mathpazo or palatino because it has true quotation marks.   Also, put the following commands before BEGIN DOCUMENT: 

\begin{verbatim}
 
\usepackage[T1]{fontenc}
  \usepackage{lmodern}
\usepackage{garamond}   


 Then to use garamond, do this: 

\garamond

 This text is in Garamond font. 

\ungaramond

 This text is in  Computer Modern

 
\end{verbatim}

 
 FONTS

Latex has some very impressive calligraphy and cursive fonts at: 

\url{http://www.tug.dk/FontCatalogue/calligraphicalfonts.html}

 AREV is a good font for overheads. I don't like beamer; just user ordinary latex.Then you can reveal the slides slowly in a simple way. 
\bl usepackage[T1]{fontenc}
\bl usepackage{arev}

 
\hrule %---------------------------------------------------------------------



Use \newcommand{\eqbydefinition}{\rm \stackrel{def}{=}  }  instead of
$
\equiv$, so it is $ \eqbydefinition$.
 $$
x \equiv y  \qquad x  \eqbydefinition y
$$



\begin{verbatim}

Use \newcommand{\eqbydefinition}{\rm \stackrel{def}{=}  }  instead of
$
\equiv$, so it is $ \eqbydefinition$.
 $$
x \equiv y  \qquad x  \eqbydefinition y
$$

\end{verbatim}

\hrule %---------------------------------------------------------------------


 To MAke text all cpaital letters:
\MakeUppercase{  3.   A Model with the Social Planner as Prosecutor}



ENDNOTE:
   THis package does not work with the package that makes \url
{sdfdsf} commands, so you need to replace all underscores with \_.


\hrule %---------------------------------------------------------------------



DOUBLE SPACING

Use package {setspace}

%  Before the BEGIN DICOUMENT, in the PREAMBLE: \setstretch{2}


OR, if you don't want to doublespace footnotes, tables, etc. TRY:

% \doublespacing


\hrule %---------------------------------------------------------------------



p. 144. p.  168 TexBook INTEGRALS

$$
\int\limits_0^\pi \quad \quad \int_0^\pi  \qquad \int\nolimits_0^\pi
\quad  \sum\nolimits_{n=1}^9  \quad \quad \sum\limits_{n=1}^9\quad
\quad \sum_{n=1}^9
 $$

 
 \newcommand{\negspace}{\!}

$$
\int _0^\pi  f(x) dx \qquad \int _0^\pi  f(x) \thinspace dx
 $$


$$
\frac{52!}{12!40!} \qquad \frac{52!}{12!\thinspace 30!\thinspace 10!}
 $$

$$
\sqrt{2} x \qquad \sqrt{2} \thinspace  x
 $$



$$
\sqrt{\log x}  \qquad \sqrt{\thinspace \log x}
 $$

$ x^2/2  \qquad x^2 \negspace/2 $

$ n/\log n \qquad n/\negspace  \log n $

$\Gamma_2 + \Delta^2 \qquad  \Gamma_{\negspace 2} + \Delta^{\negspace
2}$

$$
\int \int_D dx dy \qquad \int \negspace \negspace \negspace  \int_D dx
\thinspace dy
 $$


\hrule %---------------------------------------------------------------------


FROM THE TEXBOOK, JANUARY 7

INTPUT FILE APPEARANCE

Replace  the default space command \ with the equivalent \space.

There should be some space \space \space \space \space\space \space in
the middle of this sentence.


SLANTS AND ITALICS

p. 13 of The TeXBook:  {\sl This is slanted Roman typeface.}

p. 14 of The TeXBook: The slant of italic supposedly creates problems if there is a switch back to roman. Therefore, Knuth suggests we  put a new control sequence in at the transition back point, like this:

 {\it I am switching from italics \/} to roman. If I do it {\it this way} it does not work as well, he thinks, but I think it is better. On the other hand:  (The trick is perhaps helpful {\it for punctuation\/}.)  (Otherwise we {\it get this}.)  But both look the same to me in this last example.




QUOTES WITHIN QUOTES

  He said, ``She replied,  `I will go home'\thinspace''. \\
versus\\
He said, ``She replied,  `I will go home' ''.\\




 CALLIGRAPHIC LAGRANGIAN LETTERS

${\cal L}$ versus
${\mathcal L}$. Both of these look the same.

p. 32. Type H at an error message, or look in the log file, to get an
expanded error message.

p. 73, 91. To avoid line breaks, insert a tilde like this:
Mr~Rasmusen.

p. 74, If you don't want to have extra spaces after periods and other
punctuations,
use
frenchspacing. {\frenchspacing It would look like: this. No extra
space.} No, it doesn't seem to work.



p. 94. Here is a way to have one output line per input line without
putting \\ after each line. Somehow it put blanks in between, though.

{\obeylines
This is one line.
\quad This is one line.
This is one line.
\quad This is one line.

}%end \obeylines



DOUBLE SUPERSCRIPT

Here is how to do one: $x^{y^2} $.  We can have an empty subscrpt or
superscript too: ${}_3$ and ${}^{superscript}$.


GETTING  SQUARE ROOTS TO LINE UP

p. 131. What is worse is $\sqrt{x}+ \sqrt{y}+ \sqrt{d}$ because the
$y$
dips down and the $d$ goes up. WHat is better is
  $\sqrt{\mathstrut x}
+ \sqrt{\mathstrut y}+ \sqrt{\mathstrut d}$. The mathstrut is a box.

Maybe just redefine the commands that are always too narrow: 
\begin{verbatim} \renewcommand{\hat}{\widehat} \end{verbatim}. 

p. 135. Variables  $\check{x}$ and $\dot{x}$ and $\ddot{x}$  and
$\widetilde{x}$  and $\mathring{x}$ and $\breve{x}$. For overlining,
$\overline{x}$ is a line of flexible
length, whereas $\bar{x}$ is always short.

 $\sqcup$ and  $\sqcup$  and $\bullet$

p. 135.   For  double overlines and hats, try this:  $\skew6 \bar{
\bar{ x}} $ or
$\skew6 \overline{\overline{x}}$  and   $\skew6 \hat{ \hat{x}}$ or
$\skew6 \widehat{ \widehat{x}}$

p. 135.  It's a good idea to makes lots of  macros for common
notation, e.g.???

p. 142. To keep bits of fractions from being too small, use struts.
Compare

\begin{equation} \label{e1}
 a_0+ \frac{1} {     \frac{1}{a_1 + \frac{1}{ a_2+ \frac{1}{a_r}    } }       }
\end{equation}

and

\begin{equation} \label{e1}
 a_0+ \frac{1} {\displaystyle{ \strut  \frac{1}{a_1 + \displaystyle{ \strut \frac{1}{ a_2+\displaystyle{   \strut \frac{1} {a_r} } }  }}}}
\end{equation}

p. 143. Fractionlike things:

\begin{equation} \label{e1}
  x \atop y+2
\end{equation}

\begin{equation} \label{e1}
  x \choose y+2
\end{equation}


$$
\frac{ x }{y+2} \above 2pt  \frac{ a }{ b}
$$

$$
\displaystyle{ x \over y+2} \above 2pt  \displaystyle{ a \over  b}
$$



p. 147. TexBook. DELIMITERS

$$
  ( \bigl(  \biggl( \Biggl(
$$

p. 147.TexBoo EXTRA SPACE IN CONDITIONALS

Tex does conditionals like this:
$$
Prob (x|y) = .56
$$

That is better than closng up with negative space, but sometimes tex
does put in too much space.
$$
Prob (x \!|\!y) = .56
$$


NEGATIVE SPACE \!

p. 166. TWO FORMULAS ON ONE LINE

$$
 f(x) = 3x^2 \qquad  n \geq 15
$$



\hrule %---------------------------------------------------------------------



LIMITS AND MAXIMIZATION



p. 145 TexBook. DOUBLE INDEXES FOR SUMS

$$
 \sum_{\scriptstyle 0  \leq i \leq M \atop \scriptstyle 0  \leq j \leq
N} P(i,j)
 $$


p. 162.TexBook
$$
\Pr_{y \to 0}(g(y) < 5) =  \exp 2 + \log (x)  - \max_{1 \leq a \leq B}
(a,x) + \lim_{x \to \infty} g(x)
$$


 

The supposed LiMIT and MAX  command are a cheat. They just write  Lim
or Max and then subscript  with  the arrow or whatever.

$\lim_{x\to\infty} f(x)=0$

$\max_{0\le x\le 1}x(1-x)=1/4$

 Instead use stackrel, like this:
$$
 \stackrel{\rm  \displaystyle lim }{\scriptscriptstyle x\to\infty}
f(x)  = 534z + \frac{3}{y}
$$
 and  like
$\stackrel{\rm \displaystyle max}{\scriptstyle x} x(1-x) $, for
maximization.

 I should probably make those into   macros, since they take  so many
commands.
 

\bigskip

 

 

\begin{verbatim}

  \define \limminmax{arg1}{arg2} = \stackrel{\rm  \displaystyle arg1 }
{\scriptscriptstyle arg2}

 



p. 145 TexBook. DOUBLE INDEXES FOR SUMS

$$
 \sum_{\scriptstyle 0  \leq i \leq M \atop \scriptstyle 0  \leq j \leq
N} P(i,j)
 $$


p. 162.TexBook
$$
\Pr_{y \to 0}(g(y) < 5) =  \exp 2 + \log (x)  - \max_{1 \leq a \leq B}
(a,x) + \lim_{x \to \infty} g(x)
$$
 



The supposed LiMIT and MAX  command are a cheat. They just write  Lim
or Max and then subscript  with  the arrow or whatever.

$\lim_{x\to\infty} f(x)=0$

$\max_{0\le x\le 1}x(1-x)=1/4$

 Instead use stackrel, like this:
$$
 \stackrel{\rm  \displaystyle lim }{\scriptscriptstyle x\to\infty}
f(x)  = 534z + \frac{3}{y}
$$
 and  like
$\stackrel{\rm \displaystyle max}{\scriptstyle x} x(1-x) $, for
maximization.

 I should probably make those into   macros, since they take  so many
commands.


  \end{verbatim}

\bigskip

\hrule %---------------------------------------------------------------------
  Here is how to make both text and math bold: \\
 \mathversion{bold} {\bf  The Truthful  Equilibrium: 
   $m_1=75, m_2=75$}   \mathversion{normal}

\bigskip

\newcommand{\bbeta}{\mbox{\boldmath$\beta$}}

This is my bold $\bbeta$.

\hrule %----------------------------------------------------------- 




\bigskip

 A dash has three marks like--- this.

A hyphen has two marks  quasi--linked like that.

\hrule

$$
 \bar{a} \;\; \breve{a}
 $$

$$
 \overbrace{ a + b+ \dots + z}\;\;\;\;  \underbrace{ a + b+ \dots + z}
$$


\hrule



$$
 f(x) \overset  {\rm def} {=} x^2 - 3
 $$


\hrule

ROMAN TEXT INSIDE MATH

Use mbox like this:
$$
  x=y \; \mbox{if and only if}\;  z=90
$$

\hrule %---------------------------------------------------------------------



 
\begin{verbatim*} indicates where blanks are.  Here is

 A dash has three marks like--- this.

A hyphen has two marks  quasi--linked like that.


\hrule %---------------------------------------------------------------------


$$
 \bar{a} \;\; \breve{a}
 $$

$$
 \overbrace{ a + b+ \dots + z}\;\;\;\;  \underbrace{ a + b+ \dots + z}
$$


\hrule %---------------------------------------------------------------------



$$
 f(x) \overset  {\rm def} {=} x^2 - 3
 $$


\hrule %---------------------------------------------------------------------


ROMAN TEXT INSIDE MATH

Use mbox like this:
$$
  x=y \; \mbox{if and only if}\;  z=90
$$

\hrule

\end{verbatim*}



\hrule %---------------------------------------------------------------------


VERBATIM

\begin{verbatim*} indicates where blanks are.  Here is

some text. *** $$$$

\end{verbatim*}

\hrule %---------------------------------------------------------------------


FOOTNOTES INSIDE TABLES AND MATH

 Use the  footnotemark command to insert the footnote number. To
insert the footnote itself, use



$$
  x = y\footnotemark
$$

 \addtocounter{footnote}{-1}\footnotetext{Except when $ x= 8$. }
\stepcounter{footnote}


\begin{tabular}{|l|l|r|l|}
\hline
lattice & $d$ & $q$ & last column\footnotemark \\
\hline
square & 2 & 4 & 1.763 \\
\hline
\end{tabular}

\addtocounter{footnote}{-1}\footnotetext{ That's two words in that
entry.   }
\stepcounter{footnote}

\hrule %---------------------------------------------------------------------



 DECIMAL POINTS



  The following input:
  \begin{tabular}{r@{.}l}
  3&14159\\
  16&2\\
  123&456\\ \end{tabular}




\hrule %---------------------------------------------------------------------



 Here is a table with partial hrule, not going all the way across, and
partial vrules too.
\begin{tabular} {lcc}
  & Radon & Unexposed  \\
  &  &      \\
\cline{2-3}
  &  \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
 Cancer  &\multicolumn{1}{|c|}{$ \theta P(cancer|radon) \cdot n(radon)
$}
&\multicolumn{1}{|c|}{$\theta P(cancer|unexposed)  \cdot
n(unexposed) $  }    \\
  &     \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
\cline{2-3}
  &      \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
Healthy &\multicolumn{1}{|c|}{$\gamma P(healthy|radon)\cdot n(radon) $
} &\multicolumn{1}{|c|}{$\gamma   P(healthy|unexposed)  \cdot
\cdot n(unexposed)     $ }  \\
  &       \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
\cline{2-3}
\end{tabular}

\hrule %---------------------------------------------------------------------



 
 There are three ways to do comments in Latex.

 1. There is a comment hidden on this line. %Here is a comment.

2. There is a multiline comment hidden on the next lines using a
command
from the verbatim package I inserted at the start of this file.
\begin{comment}
  Here is the first line of the comment.
 Here is the second line.
 Here is the third.
\end{comment}

3. There is a comment hidden here,  \comments{Here is my comment. }
just
after the comma, using the new comments command I create at the start
of
this file.


\hrule %---------------------------------------------------------------------



\begin{quotation} \begin{footnotesize}

  {\bf  He had submitted a bid ceiling of \$2,100 for a custom-made
analog stereo amplifier, and the highest  anybody else had submitted
was
\$1,400, so he was sure to win.}  {\rm disaster struck. }
\end{footnotesize} \end{quotation}



\begin{boxedminipage}[c]{0.6 \linewidth}  %box is .6 of entire line
text that I want to box, such as a game description, goes here.
  \end{boxedminipage}

  \vspace*{.25in}

  \baselineskip 24pt
  {\bf  He had submitted a bid ceiling of \$2,100 for a custom-made
analog stereo amplifier, and the highest  anybody else had submitted
was
\$1,400, so he was sure to win.}  {\rm disaster struck. }

\bigskip

\hrule


\bigskip

$$
   {Maximize \atop x } x^2-x {\rm or }   {Maximize \atop
\scriptstyle{x} } x^2-x
$$

   \bigskip

\hrule

\bigskip

\begin{equation} \label{e1}
\begin{array}{ll}
   \pi_1^d   & ={\displaystyle -c +  \int_0^{Eu} \left(  \int_v^z (u-
v)
f(u) du \right) g(v) + \int_{Eu}^v \left(  \int_v^z( u-v) f(u) du
\right) g(v)dv. }\\ & \\
  &= -c + A_1 + A_2.\;\;\; \left\{  \sum_{i=1}^3 x_i  \big(
\Big(
\bigg(
\Bigg(    \right.    \\
\end{array}
\end{equation}
   Equation (\ref{e1}) is nonsense.  But so are (\ref{e2}) and
(\ref{e3}).


\begin{eqnarray}
 F(x) &= &3x^2   \label{e2}\\
 & & \nonumber \\
 & =& 4z  \label{e3}\\
\end{eqnarray}


\bigskip

\hrule

\bigskip


\begin{tabular}{ll}
 $ \pi_i =$& $\left\{ \begin{tabular}{lll}
  $V-x_i$ & if
$T(x_i) < Min\{ T(x_j, T(x_k) \} $  & (Firm $i$ gets the patent)\\
 & & \\
$\frac{V}{2} - x_i$ & if $T(x_i) = Min \{T(x_j),T(x_k)\}    $ & (Firm
$i$ shares
the patent
 \\
\end{tabular} \right.$\\
\end{tabular}

 $$ \label{e1-35}
  \stackrel{\displaystyle max}{\scriptstyle x} x(1-x) \eqno{(1-35)}
\;\;
\; \not\exists  \dot{x}, \ddot{x}
$$


$$
\stackrel{\displaystyle lim}{\scriptscriptstyle x\to\infty}  f(x)
\;\;
\;\; \int_0^\infty x f(x)\,dx,\;\;\; not,\;\;\; \int_0^\infty x f(x)
dx,
$$


  \bigskip

\hrule

\bigskip

 The two standard ways are the overline, $\overline{U}_i$,  and the bar, $\bar{U}_i$. Try this: $\overline{\!U\!}$ or try this: $\overline{\!U} $. Here is  $\widetilde{12345}$ Or  $\sim$ sometimes. \textasciitilde{sped} is for a high tilde. For \~Tilde in text. Put $\bl acksquare$ at the end of the proof.\endnote{Here it is.}  How to make $x^i_j$ different from $x_j^i$. Use $X_i^{\phantom{i}j}$ and $X^j_{\phantom{j}i}$


\bigskip

\hrule

\bigskip

\pagenumbering{roman}  This also restarts the numbering to 1. Do you
know that a table  in on page   \ref{table1}?

\bigskip

\hrule

\bigskip

\begin{verbatim}

Here is
 some
 Unformatted
 text  with & \\ #

\end{verbatim}

\bigskip

\hrule

\bigskip


\label{table1}
\begin{tabular}{l |  llllll}
 \hline
  Variable &      Minimum &       25th percentile
&
Median  &    Mean    &   75th percentile  &     Maximum\\
\hline \hline
   Crimerate &      0.56   &   3.48   &  5.36 &   5.97     & 7.76  &
22.08\\
Murderfraction &      0.00  &    0.00   &   0.00   &  0.36&      0.58
&2.50\\
         Pop &      1.16  &   16.76  &   40.27  &  116.82   &  98.72
&9329.99\\
\hline
\end{tabular}


 \bigskip

\hrule

\bigskip

undo the commenting to get the figure inserted.

\begin{center}
 %   \includegraphics[width=2in]{latex1.jpg}
\end{center}
\vspace*{-10pt}
\begin{center}
 {\bf Figure 2: Some Stuff  }
\end{center}


\bigskip

\hrule

\bigskip

\begin{center} {\bf Table 11: IMF Aid }

 \begin{tabular}{lllccc} &          &
&\multicolumn{3}{c}{\bf Debtor}\\
 &      &       & Reform   &    &  Waste \\
&  &  Aid       &    3,2   &    &  -1,3 \\
 & {\bf IMF}    &          &    &     &   \\
 & & No Aid     & -1,1       &  &   0,0 \\
 &      &          &    &     &   \\
  \multicolumn{6}{l}{\it Payoffs to: (IMF, Debtor).}\\
 \end{tabular}\\
 \end{center}

\bigskip

\hrule

\bigskip

\pagestyle{myheadings}
   \markboth { } {$\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
\;
\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
\;
\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;
\;
\;\;\;\;\;\;$
Lyon and Rasmusen }

   \bigskip

\hrule

\bigskip


\pagestyle{empty}



             10pt Default     11pt Option     12pt Option

\tiny{            5pt              6pt             6pt}






\scriptsize{     7pt              8pt             8pt}\\
\footnotesize{    8pt              9pt            10pt}\\
\small{        9pt             10pt            11pt}\\
\normalsize{     10pt             11pt            12pt}\\
\large{        12pt             12pt            14pt}\\
\Large{         14pt             14pt            17pt}\\
\LARGE{         17pt             17pt            20pt}\\
\huge{          20pt             20pt            25pt}\\
\Huge{25pt             25pt            25pt}\\







 \begin{normalsize}


$$
 { \textstyle  y = x^2 + \pi,    } \;\;{ \displaystyle y = x^2 + \pi,
}
\;\;{ \scriptstyle y = x^2 + \pi, }\;\;{ \scriptscriptstyle y = x^2 +
\pi }
      $$

\bigskip

\hrule

\bigskip

 Left side text \hfill  right side

  Left side text \dotfill   right side


  ~ \hfill  right side

    \bigskip

\hrule

\bigskip



\renewcommand{\thefootnote}{\fnsymbol{footnote}}

 Here's is one\footnote{starred note} and here is a second.\footnote{
Daggered footnote}Here is a third.\footnote{The third footnote.}



  To do asterisk footnotes, do this:$^*$\footnotetext{$^*$ Here is the
footnote.}

 \bigskip

\hrule

\bigskip

\listoffigures

 \listoftables

\bigskip

\hrule

\bigskip

\begin{description}
\item[Oranges:] a fruit that Amelia likes a lot, just as she likes
grapes and pickles.
\item[Lettuce:] something Amelia does not like.
\end{description}

\begin{verse}
 This is the first line of  a poem\\
 Here is the second, hwich is so long that it runs over on
to the next
line, where it will be indented.\\
 And here is the third.\\
 \end{verse}

 \bigskip

\hrule

\bigskip




The command @{} kills the space between columns in a table and replaces it with whatever is in curly brackets. It can be used to cleverly align tables around decimal points, thus:
\begin{table}[!b]   \label{tabpage}
\begin{tabular} {l r @{.} l}
 Variable & Mean\\
  X &  1 & 234\\
 Y & 23 & 1\\
 Z & 1456 & 34567\\
 \end{tabular}
\caption{The World in 1812} %This will appear as Table 1:
The World...
 \end{table}



The table is on page \pageref{tabpage}.



 \bigskip

\hrule

\bigskip

\begin{tabbing}
 % set the tab positions
 \hspace {1in} \=   \hspace {1in} \= \hspace {1in} \= \hspace {1in}
\\
  one  \> be \>  due to \> differences,\\
 one  \> to \> reputation \> the sort\\
\end{tabbing}


   \bigskip

\hrule

\bigskip


 \begin{equation}  \label{e16}
\begin{array}{lll lll l}
   De(s) &  & & = 0 &     if  & s <p \\
 &  & & & & \\
Pr(s) &  = \frac{(1) g(p)} {g(p) + m(p)[1-G(s^*) ]} & =\frac{g(p)}
{g(p)
+ \frac{ g(p)}{G(\overline{p}_h)}   [1-G(s^*) ]}    &  =   \frac{G(
\overline{p}_h)} {1-[G(s^*)-G(\overline{p}_h) ]  }   & if & s=p  \\
 & & & & &  \\
   De(s) &   &    &= 0 & if & s \in (p, s^*)  \\
 &  & & & &   \\
   De(s) &  =   \frac{m(p) g(s)}{g(p) + m(p)[1-G(s^*) ]}  &  =  \frac{
\frac{ g(p)}{G(\overline{p}_h)}  g(s)}{g(p) + \frac{
g(p)}{G(\overline{p}_h)} [1-G(s^*) ]}   &= \frac{g(s)  }{   1-[G(s^*)-
G(
\overline{p}_h) ] }         & if & s \geq s^*  \\
\end{array}
\end{equation}



\bigskip

\hrule

\bigskip


\theendnotes


  \let\footnote=\endnote






\begin{verbatim}

December 10,  2008/Augut 1, 2009. 

What is below is from 

 latex-rasmusen.txt


----------------------------------------------------------------------

SCIENTIFIC WORKPLACE

Here's what to do to convert a SWP-made file into one that regular
latex can process:

1. Delete the line    \input{tcilatex}  which I think Scientific
Workplace will put back in for you automatically when you load it.

2. Change \frame{  to {\tt , which will result in a line of  nonsense
where each figure was, but will allow latex to process the file
without trouble.



----------------------------------------------------------------------

PICTURES

 Latex actually makes pretty good pictures. Here is how to make a
200x100 mm picture, with 0,0 as its base point, and a line sloping up
in direction (1,1) and 50mm long starting at (0,0):



\begin{picture}(200,100)(0,0)

 \put(0,0) {\line (1,1){50}}


 \end{picture}


----------------------------------------------------------------------


 BOLD MATH

LaTeX   ignores the \bf in stuff like ${\bf \beta}$, but has \boldmath
to get around this. Unfortunately, it only works in text-mode, not
math-mode. But you can get around this   by defining a new command for
each symbol you want boldfaced:

\newcommand{\bbeta}{\mbox{\boldmath$\beta$}}

This is my bold $\bbeta$, or you can do it like this
$$
\bbeta \; is \; bold \; but\; not \; \beta
$$

 Or try this boldsymbol method:

$$
 \boldsymbol{5}x \neq 5x \;\;\;\boldsymbol{\theta}y \neq \theta y
$$


ROMAN TEXT INSIDE MATH

Use mbox like this:
$$
  x=y \; \mbox{if and only if}\;  z=90
$$

--------------------------------------------
 
$$
 \bar{a} \;\; \breve{a}
 $$

$$
 \overbrace{ a + b+ \dots + z}\;\;\;\;  \underbrace{ a + b+ \dots + z}
$$






$$
 f(x) \overset  {\rm def} {=} x^2 - 3
 $$

----------------------------------------------------------------------

\begin{table} does tables as floats, trying to go at the top or bottom
of pages. \begin{tabular} puts them wherever they happen to be,
skipping everything and going to the next page if there isn't room and
just leaving blank space behind. Thus,  \begin{table}  is better. It
is an EXTRA command, though. You still need to use TABULAR too, like
this:


 \begin{table} \begin{tabular} {ll}
   First & Second & Third\\
A  new row & Has\footnotemark & New text\\
\end{tabular}\end{table}



----------------------------------------------------------------------


VERBATIM

\begin{verbatim*} indicates where blanks are.

----------------------------------------------------------------------

FOOTNOTES INSIDE TABLES AND MATH

 Use the \footnotemark command to insert the footnote number. To
insert the footnote itself, use

 \addtocounter{footnote}{-1}\footnotetext{Here is my footnote}
\stepcounter{footnote}

 outside the table or math but trying to be on the same page.




$$
  x = y\footnotemark
$$

 \addtocounter{footnote}{-1}\footnotetext{Except when $ x= 8$. }
\stepcounter{footnote}


\begin{tabular}{|l|l|r|l|}
\hline
lattice & $d$ & $q$ & last column\footnotemark \\
\hline
square & 2 & 4 & 1.763 \\
\hline
\end{tabular}


\addtocounter{footnote}{-1}\footnotetext{ That's two words in that
entry.   }
\stepcounter{footnote}



----------------------------------------------------------------------


  



*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@*@* 




DEFINING YOUR OWN COUNTERS AND LABELS.

This is tricky in Latex, because while you can define new counters, I
can't see how you would attach their values to labels. The \label
command can only be used in environments that have their own counters
(such as \begin{equation}), and you can't fool those environments into
adding to a counter without having them print the value on the printed
page somewhere. So I used Tex programming, like this. I create a new
counter named \fignum and then attach it to a label called \1f, \2f,
and so forth, advancing the counter in between. I used \edef rather
than \def because \edef inserts the value at the particular time,
while \def would repeat the command \number\fignum each time \1f was
written.

\newcount\fignum\fignum=1


 \edef\1f{\number\fignum}

  \advance\fignum  by 1


   \edef\2f{\number\fignum}

Example:   Figure \1f  says  this. The second part of it, Figure \1fa,
says something different.  Figures  \2f and \2f-a say something still
different.

This is plain Tex, not Latex.

 You  need to write backslash-1-f rather than backslash-f-1. I'm not
sure why-- it must be that the number gets interpreted as doing
something special to the definition rather than being part of the
name.

You have to remember to put your definitions earlier in the document
than when  you use the term defined. You could put them all the start,
actually, but then you might forget to re-order them when you change
the order of the diagrams.

I think you can advance the fignum variable by a negative number if
you want to.



----------------------------------------------------------------------
BIBTEX.
  I'm not sure if this is worth using or not. Here's how it works with
Miktex.

1. For your file myfile.tex, construct a bibliography database file
myfile.bib with a bunch of entries like this, which do not not have to
be in alphabetical order:

 @article{hotelling:1929:ej,
  author = {Hotelling, Harold},
  journal = {Economic Journal},
  month = {mar},
  number = {153},
  pages = {41--57},
  publisher = {Royal Economic Society},
  title = {Stability in Competition},
  volume = {39},
  year = {1929}
}

You can do this from Google Scholar by going to Scholar Preferences
and checking off towards the bottom that you want a Bibtex-format
link. After you set your prferences,  Import into BibTeX will be a
link  fror each item a   Google Scholar search turns up.

2. Pick a style file such as econometrica.bst.  Put that file and the
myfile.bib file into the same directory as myfile.tex.

3. Wherever you want the references in myfile.tex, insert the commands

\bibliographystyle{econometrica} %needs  econometrica.bst file in
folder
 \bibliography{myfile} %needs myfile.bib file in folder

 \nocite{*}

 The nocite command makes sure that all the entries in the myfile.bib
file get put into the references. Otherwise, only the ones cited using
bibtex commands get put in. The bibtex citing commands are just extra
commands to remember and make reading latex input files harder, so I
don't think I'll use them.


4. Change the name of myfile.tex to plain myfile.

5. Run myfile  through pdflatex.  That will create myfile.aux.

6. Run myfile through bibtex. That will use myfile.aux and
econometrica.bst and myfile.bib to create myfile.blg, a log file, and
also myfile.bbl, the bibliography formatted nicely.

7. Run myfile through pdflatex again.





----------------------------------------------------------------------

DATES
   Put the last revision date of a paper on manually, e.g. May 20,
1998.
Also, put the commands "pdf'd \today".


----------------------------------------------------------------------


\BEGIN{CASES}   FOR EQUATIONS WITH SEVERAL CASES:

 This will be useful. It puts a big curly bracket after the equals
sign to enclose the various cases that can occur. You need to have  \bl usepackage{amsmath, amsthm, amssymb} in the preamble at the start of the document. 

\begin{equation*}
|x|=
\begin{cases} x & \text{if $x=0$,}
\\
-x &\text{if $x\le 0$.}
\end{cases}
\end{equation*}


----------------------------------------------------------------------


 Here is a table with partial hrule, using the cline command across
columns 2 and 3, not going all the way across, and
partial vrules too.

\begin{tabular} {lcc}
  & Radon & Unexposed  \\
  &  &      \\
\cline{2-3}
  &  \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
 Cancer  &\multicolumn{1}{|c|}{$ \theta P(cancer|radon) \cdot n(radon)
$}
&\multicolumn{1}{|c|}{$\theta P(cancer|unexposed)  \cdot
n(unexposed) $  }    \\
  &     \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
\cline{2-3}
  &      \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
Healthy &\multicolumn{1}{|c|}{$\gamma P(healthy|radon)\cdot n(radon) $
} &\multicolumn{1}{|c|}{$\gamma   P(healthy|unexposed)  \cdot
\cdot n(unexposed)     $ }  \\
  &       \multicolumn{1}{|c|}{ }  & \multicolumn{1}{|c|}{ } \\
\cline{2-3}
\end{tabular}

----------------------------------------------------------------------

COMMENTS.
 There are three ways to do comments in Latex.

1. The standard way to do comments  puts in % and then everything on
the line after it is commented out:

First I have some input, like $y = x^2 + \beta$. %Here is a comment.

2. If you put \usepackage{verbatim} at the start of your file, you can
do multiline comments like this:

\begin{comment}
  Here is the first line of the comment.
 Here is the second line.
 Here is the third.
\end{comment}

3.If you put \newcommand{\comments}[1]{} at the start of your file,
you
can have the best way of all:

Say  $y = x^2 + \beta$.\comments{Here is my comment. } Maybe $x=
4\phi$.

  Note that if you use \usepackage{verbatim}, it creates an odd
command that makes everything after it in the file a comment.  Suppose
you write:

\comment{Here is what I wanted to be my comment.} Here is some more
writing for my paper.

Then not only will the words in the brackets be a comment, but all the
words after the brackets and on the next lines and pages too.
----------------------------------------------------------------------
 


SPECIAL EQUATION NUMBERING

CURRENT WAY:  Put a star after the equation command to suppress
numbering, like \begin{equation*}... \end{equation*}. Whether or not
you do that, you can put \tag{A1} on a particular line to make it
label as equation (A1) (It adds the parentheses automatically); or
\notag so there is no  equation number displayed. To add a label that
you can refer to later, put in \label{A1}.  Then later you can refer
to it as equation \eqref{A1}, which comes out as "equation (A1)". Note
that \eqref puts in the parentheses automatically; \ref does not.

\align replaces \array, they say.



HERE IS AN OLD WAY To put in your own equation number (1-35), without
changing the stnadard ordering, do this,putting the command at the end
of your equation (after the \end{array} if it is an array). Remember
to use $$, not \begin{equation}.

 $$ \label{e1-35}
    f(x) = x^2+34  \eqno{(1-35)}
$$

----------------------------------------------------------------------



\usepackage{hyperref}
\hypersetup{breaklinks=true,
pagecolor=white,
colorlinks=true,
linkcolor= blue,
hyperfootnotes= true,
urlcolor=blue
}


\urlstyle{rm}
 %so it doesn't use a  typewriter font for url's.

\url{
http://ihome.ust.hk/~tanjim/verylongaddresslikethisone-111111zxzxzxzxz
xzxzx
zxzxsqut_high.pdf}

 This will use the package hyperref, and turn the address in
\url{sdfd} into a link, as well as displaying sdfd in the text in
color (which will look grey when printed).  Also, it will split the
address sensibly across lines.  The web address can include tilde and
underscore without special control characters, which is not usual in
tex. Also, references  to  footnotes, pages, and to equations and
other \ref{sdf}   will be links to the original equations. If want a
reference to use the correct counter  but not to create a link   use
\ref*{label} or  \pageref*{label}.

The manual for hyperref is at:

http://www.tug.org/applications/hyperref/manual.html#x1-90003.5

\url{sdfd} is a separate macro though, which I think can work even if
you don't use hyperref  (but you want to split up across lines
sensibly, and be able to use underscore and tildes).



----------------------------------------------------------------------

VARIOUS LITTLE COMMANDS


\pagenumbering{roman}  This also restarts the numbering to 1.

\not\exists for an exists symbol with a slash through it.



A special little extra space  is proper for integrals, like this:
$$
\int_0^\infty x f(x)\,dx,\;\;\; not,\;\;\; \int_0^\infty x f(x)dx,
$$

 To put the limits ofthe integral above and below the integral sign,
rather than at the sides ofthe top and bottom, say
$$
 int\limits_0^1
$$





 I should use notation like $\dot{x}$ and $\ddot{x}$ sometimes.

\dotfill for a long line of dots.

UNDERSCORE, UNDERLINE  \_ is ok, no math $$ needed.

\begin{verbatim} \end{verbatim} for unformatted text.

----------------------------------------------------------------------


  
----------------------------------------------------------------------

REFERENCE LISTS GOING OVER SEVERAL PAGES

For reference lists, use \begin{description} \item[] Rasmusen, Eric
(1980) {\it A Book}.  \end{description}

That will generate a list with the first word (Rasmusen) off to the
left a bit and the rest indented from it.

If I have a long document, sometimes long multipage lists go crazy in
latex and won't put in a pagebreak at the right spot. The solution is
to break off the list as a separate document, say, list1.tex. Use
\setcounter{page}{522} to start it at page 522. If there are labels
such as page numbers that are needed, they will be in a *.aux file in
the main document. Copy that *.aux file to the preamble, before
begin{document}, of the list1.tex document.



----------------------------------------------------------------------

----------------------------------------------------------------------
 SHADED TABLES:

  \bl usepackage[table,x11names,svgnames]{xcolor}

\bl rowcolors{2}{black!10}{black!5}


\bl begin{tabular}{l |  llllll}
 \bl hline
   \bl rowcolor{black!25} Variable zzz    Minimum zzz       25th percentile
zzz
Median  zzz    Mean    zzz   75th percentile  zzz     Maximum\bl \bl 
\bl hline \bl hline
   Crimerate zzz      0.56   zzz   3.48   zzz  5.36 zzz   5.97     zzz 7.76  zzz
22.08\bl \bl 
Murderfraction zzz      0.00  zzz    0.00   zzz   0.00   zzz  0.36zzz      0.58
zzz2.50\bl \bl 
         Pop zzz      1.16  zzz   16.76  zzz   40.27  zzz  116.82   zzz  98.72
zzz9329.99\bl \bl 
\bl hline
\bl end{tabular}

----------------------------------------------------------------------

HYPERLINKS FROM PDFs


  usepackage[bookmarks=true,bookmarksopen=true,colorlinks=
true,urlcolor=
 {red!60!black},linkcolor={blue!80},pdfview=fit,breaklinks=true]
{hyperref}


 \bl href{mailto:erasmuse@indiana.edu}{erasmuse@indiana.edu}

\bl url{http://www.rasmusen.org}

----------------------------------------------------------------------


DIAGRAMS-FIGURES

Diagrams: use alt-PRINT SCREEN to do a screen capture and use PAINT to
make a JPG. Or, use powerpoint, and SAVE AS a jpg file.

 In miktex, diagrams are simple. Just insert:

\bl begin{figure}
\bl centering
\bl includegraphics[width=80mm]{options2.jpg}
\bl caption{Figure 2:    Pointwise and Extremum Riskiness}
\bl end{figure}

or even just

\bl includegraphics[width=80mm]{options2.jpg}

To get the caption not to automatically number, use:

 usepackage{ccaption} \bl captiondelim{}\bl renewcommand{\bl thefigure}{}
\bl renewcommand{\bl figurename}{}

 The folowing is useful to get figures put on the same page with text
instead of
off on their own pages.

\bl renewcommand\bl floatpagefraction{.9}
\bl renewcommand\bl topfraction{.9}
\bl renewcommand\bl bottomfraction{.9}
\bl renewcommand\bl textfraction{.1}
\bl setcounter{totalnumber}{50}
\bl setcounter{topnumber}{50}
\bl setcounter{bottomnumber}{50}

  Be wary of using pdf's instead of jpg's. If a pdf is cropped, soemtimes it is not truly cropped-and all the white space does show up in the tex file. 



----------------------------------------------------------------------

POWERPOINT

\url{http://www.ecs.soton.ac.uk/~srg/softwaretools/presentation/TeX4PPT/}
 This is the best of the two tex powerpoint programs. Free, and easy
to install.
Needs Powerpoint 2002.



----------------------------------------------------------------------

\begin{verbatim}


 INTEGRALS AND PRODUCTS AND SUMMATIONS IN FRACTIONS

 Q: If I  use a \bl prod or \bl int within a \bl frac{}{} they end up very
small
with the sub/superscripts alongside rather than above or below.

Answer:

\bl frac{\bl displaystyle \bl int_a^b dx f(x)}{\bl displaystyle \bl prod_{i=1}
^{\bl infty} a_i}

<A HREF=" http://www.cse.iitd.ernet.in/~anup/homepage/UNIX/latex.html
">"Some useful tips and tricks in LaTeX".</A>

  More generally:




----------------------------------------------------------------------


  TILDES

FOR WIDE TILDE ON TOP OF SOMETHING:  \bl widetilde{12345}

FOR TILDE IN TEXT, NOT on top of something: $\bl sim$ . This is what to
use in URL's.

 \bl textasciitilde is for a high tilde (no  dollarsign  needed). $\bl sim$ is for a
midlevel tilde.

For Tilde in text, on top of the next letter: \bl ~


----------------------------------------------------------------------


 PUTTING THINGS ON THE SAME PAGE (Does this really work?)

Put \bl begin{samepage}...\bl end{samepage} around the whole mess.

<A HREF=" http://www.cse.iitd.ernet.in/~anup/homepage/UNIX/latex.html
">"Some useful tips and tricks in LaTeX".</A>


----------------------------------------------------------------------

MAXIMIZING  F(X) BY CHOICE OF X

$$
   {Maximize \bl atop x } x^2-x
$$


$$
   {Maximize \bl atop  \bl scriptstyle{x} } x^2-x
%Tthe scritpstyle is too small, really.
$$

----------------------------------------------------------------------


  BRANCHING "IF" DEFINITIONS

   Sometimes I want to use a big bracket to say X=2 if Y<3 but X=5 if
Y \bl geq 3.
Here's the style for that:

\bl begin{tabular}{ll}
 $ \bl pi_i =$zzz $\bl left\bl { \bl begin{tabular}{lll}
  $V-x_i$ zzz if
$T(x_i) < Min\bl { T(x_j, T(x_k) \bl } $  zzz (Firm $i$ gets the patent)\bl \bl 
 zzz zzz \bl \bl 
$\bl frac{V}{2} - x_i$ zzz if $T(x_i) = Min \bl {T(x_j),T(x_k)\bl }    $ zzz (Firm
$i$ shares
the patent
 \bl \bl 
\bl end{tabular} \bl right.$\bl \bl 
\bl end{tabular}


----------------------------------------------------------------------



PROOF END SYMBOL

 At the start, have:
     usepackage{graphicx}
 usepackage{amsmath}
       \bl usepackage{amssymb}
 Then put $\bl blacksquare$ at the end of the proof.

----------------------------------------------------------------------


FORMAT FOR A TWO-BY-TWO GAME

\bl begin{center} {\bl bf Table 11: IMF Aid }

 \bl begin{tabular}{lllccc} zzz          zzz
zzz\bl multicolumn{3}{c}{\bl bf Debtor}\bl \bl 
 zzz      zzz       zzz Reform   zzz    zzz  Waste \bl \bl 
zzz  zzz  Aid       zzz    3,2   zzz    zzz  -1,3 \bl \bl 
 zzz {\bl bf IMF}    zzz          zzz    zzz     zzz   \bl \bl 
 zzz zzz No Aid     zzz -1,1       zzz  zzz   0,0 \bl \bl 
 zzz      zzz          zzz    zzz     zzz   \bl \bl 
  \bl multicolumn{6}{l}{\bl it Payoffs to: (IMF, Debtor).}\bl \bl 
 \bl end{tabular}\bl \bl 
 \bl end{center}

----------------------------------------------------------------------


RAGGEDRIGHT, LEFT JUSTIFICATION

 The tex default is to right- and left-justify the page, which looks
very professional. I just read, though, that psychologists find this
actually slows down reading compared to just left-justifying, because
people are not used to the diverse spacing of letters and words that
is required for uniform margins on both sides. Also, a raggedright
looks better for working papers, I think.

The command for that is

 \bl begin{raggedright}

 \bl parindent 24pt

 \bl parskip 10pt

 \bl end{raggedright}

 You need to put the parindent and parskip commands AFTER the
begin{raggedright}

----------------------------------------------------------------------


  PROCESSING TEX

 The free Miktex  (<A HREF="http://www.miktex.org/">http:
//www.miktex.org/</A>) looks to be an excellent latex and tex Windows
processor program. I've been using SWP, and putting figures in looks
to work better in Miktex. Miktex gets PDF's right, which my version of
SWP does not always do, and it processes straight from myfile.tex to
myfile.pdf. On the other hand, it has some problems, noted below,
which make it unhandier to use.

 I think I've foudn the best solution. In textpad, create a new TOOL
in CONFIGURE-PREFERENCES. Choose ADD, then DOS COMMAND, then write
pdflatex \$file

 (1)  I have a suggestion for  the standard installation instructions:
say more about the Windows command prompt. I haven't used it for
years, though I happened to remember it was in Accessories. Also, the
user should know that he can change the default directory in teh
command prompt to wherever he keeps his tex input files-- say,
d:/smith/latex-input, using the  Properties (reachable by right
clicking the command prompt).

(2) The command prompt requires you to type in all your commands,
which is burdensome if they are long, e.g.,

  pdflatex D:
\bl _home\bl _HomeWD\bl INCOMING\bl FIGURECOPY/myfilewithalongname.tex

You can't copy and paste in the usual way with CTRL-C and CTRL-V. What
you can do, though is to copy to the clipboard with CTRL-C and then
paste by rightclicking on the Command Prompt program and choosing
PASTE.

I will put a  comment line like this at the start of my tex files:

%   pdflatex     chap07_MoralHazard.tex

then I can copy all but the % part and paste it into the command
prompt, and it will process chap07_MoralHazard.tex  and write  to
chap07_MoralHazard.pdf

(3) Something  better would be  a graphic interface to replace the
command prompt. I don't know how to write such an interface, but here
is what it would be: It would  be simple: just a window in which the
user could  do two things:

1. Browse and choose a tex file to process, e.g.,
myfilewithalongname.tex, instead of having to type in the full name in
the command prompt, and instead of having to have it in the command
prompt's directory.

2. Issue the processing command--- most simply "latex
myfilewithalongname.tex", or "pdflatex", or others that might be
useful. There should be two to five choices, and the user would check
the box of the command he wants to use.

 The command would take the file from (1) and put the output in the
same directory as the input.

  The interface could be fancier, but that covers what the user needs
every single time he uses Miktex, and it would save a lot of tricky
typing.

(4) Miktex is fouled up by carriage returns, even ones that are not
hard breaks. Thus, before I tex my files using it I need to strip off
all the carriage returns, thus making all my equations, nicely
separated into separate lines for visibility, into unreadable
paragraphs

 With the help of Alan, I solved this problem. What I had to do was to
save my file as DOS or UTF-8 instead of as ANSI.




----------------------------------------------------------------------

SIZING

PRODUCTS
  Use \bl prod, NOT \bl Pi  , with {\bl displaystyle
\bl prod_1^3} if necessary.



THE LARGE CURLY BRACKET:
\bl left\bl {

THE LARGE SUMMATION SIGN: Use \bl sum, NOT \bl Sigma, with {\bl displaystyle
\bl sum_1^3} if necessary.

For integrals, to get them in the large style in Arrays or
in text use  {\bl displaystyle \bl int_0^1}.


\bl begin{array}{ll}
   \bl pi_1^d   zzz ={\bl displaystyle -c +  \bl int_0^{Eu} \bl left(  \bl int_v^z (u-
v)
f(u) du \bl right) g(v) + \bl int_{Eu}^v \bl left(  \bl int_v^z( u-v) f(u) du
\bl right) g(v)dv. }\bl \bl  zzz \bl \bl 
  zzz= -c + A_1 + A_2. \bl \bl 
\bl end{array}




 To change size of any operator like { | } [ ] ( ), one need to use
commands

\bl big
\bl Big
\bl bigg
\bl Bigg

 For example, \bl bigg| These command are in order of increasing size.
This
is especially good for |, since it can take superscripts and
subscripts
properly then, unlike with \bl left|



----------------------------------------------------------------------

EQUATION ARRAYS


\bl begin{eqnarray}
 F(x) zzz= zzz3x^2\bl \bl 
 zzz zzz \bl nonumber \bl \bl 
 zzz =zzz 4z
\bl end{eqnarray}

 Use \bl begin{eqnarray}* to not have any nubmers. Note that there are
always 3 columns. The newer versino of this is
\bl begin{align}...\bl end{align}, which is easier to type and they say
looks better and handles long equations better so the euqation number
doesn't get overwritten.



----------------------------------------------------------------------

PAGE HEADERS

 For a title page, use \bl titlepage or \bl thispagestyle{empty}


\bl pagestyle{myheadings}
 \bl markboth  {  Ramseyer-Rasmusen }{ Ramseyer-Rasmusen}

OR,

\bl pagestyle{myheadings}
   \bl markboth { } {$\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;
\bl ;
\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;
\bl ;
\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;
\bl ;
\bl ;\bl ;\bl ;\bl ;\bl ;\bl ;$
Lyon and Rasmusen }

 % these two things in conjunction put the page nubmers at the upper %
right of each page, with "Lyon and Rasmusen" just before them.

 BBusepackage{fancyhdr}  BBpagestyle{fancy}   BBfancyhead{}
 BBfancyfoot{}   BBrhead{ BBthepage}

 Above is the fancyhdr package, w hich is tricky to use. The BBfancyhead{} and foot clear out whatever is the current page  style--something crucial to do. You could use BBlead, BBlfoot, etc. too. 
----------------------------------------------------------------------

 EQUATION STYLES

 documentclass[12pt,epsf,leqno, fleqn]{article}

     This is for left equation numbering, and for not centering the
equations but rather putting them towards the left at a fixed indent
from the margin.  documentclass is always better than   documentstyle,
because it permits packages to be used. Also, this does 12 pt type.



----------------------------------------------------------------------


DOUBLE SPACING

  \bl baselineskip 24pt

 This goes AFTER Begin Document.



--------------------------------------------------------

 
 

 \bl topmargin -1.5in


----------------------------------------------------------------------



DIFFERENT FONTS: But these do not reliably work.
{\bl sf sans serif.  Christianity depends ...}
{\bl tt typewriteer. might occur. }
{\bl rm Roman. Christianity depends on ancient  }

I like the palatino font better than Times New Roman. Here is a
package that uses it, and which uses Helvetica for its sans serif
font: \bl usepackage{mathpazo}

For cursive font, use the pbsi package and \bl textbsi{  a command like
this.}

  usepackage[T1]{pbsi}



MATH FONTS
 These are different from the others (LARGE, etc.)

  \bl textstyle - default in the running text and in array environment
     \bl displaystyle - default for displayed equations
     \bl scriptstyle - default for first-level sub and superscripts
     \bl scriptscriptstyle - default for higher-level sub and
superscripts

----------------------------------------------------------------------


"Left side text \bl hfill  right side"

 The hfill command is good for putting text on each side of a page.

" ~ \bl hfill  right side"

   The tilde ~ can be used for a space. "\bl ;" works just as well. I
think \bl quad or \bl \bl quad works better in math mode-- maybe it's
intelligent and makes the space a nice-looking length.


----------------------------------------------------------------------

FOOTNOTES WITH SYMBOLS

 This will make the first footnote an asterisk and the second one a
dagger,and
then goes back to the default, nubmers, starting with number 1.

\bl renewcommand{\bl thefootnote}{\bl fnsymbol{footnote}}

 Here's is one\bl footnote{starred note} and here is a
second.\bl footnote{Daggered footnote}

 \bl renewcommand{\bl thefootnote}
\bl setcounter{footnote}{0}

  To do asterisk footnotes, use the command:

  Here is the text$^*$\bl footnotetext{$^*$ Here is the
footnote}.


----------------------------------------------------------------------


FOR OVERHEADS AND HANDOUTS

   \bl reversemarginpar
  \bl topmargin  -1in
  \bl oddsidemargin -.25in
 \bl textheight  8.7in
 \bl textwidth 7in
\bl pagestyle{empty}




----------------------------------------------------------------------


LISTS

\bl listoffigures
 \bl listoftables



\bl begin{description}
\bl item[Oranges:] a fruit that Amelia likes a lot, just as she likes
grapes and pickles.
\bl item[Lettuce:] something Amelia does not like.
\bl end{description}

\bl begin{verse}
 This is the first line of  a poem\bl \bl 
 Here is the second, hwich is so long that it runs over on
to the next
line, where it will be indented.\bl \bl 
 And here is the third.\bl \bl 
 \bl end{verse}


----------------------------------------------------------------------


\bl begin{comment}% I need to have \bl usepackage{verbatim}
 This is a comment.
\bl end{comment}


----------------------------------------------------------------------

The table is on page \bl pageref{t1}.
 %This  prints the page number where label t1 is found.

----------------------------------------------------------------------


{\bl it Here is some italics but with \bl emph{these words} emphasized in
Roman.}   I can also use the same command to get \bl emph{italics} in the
middle of Roman words.

----------------------------------------------------------------------


Use $\bl Beta$ in tex, rather than $B$, so I can  globally change it
easily  later.


----------------------------------------------------------------------


http://www.mackichan.com/

    Here is how to make a tex DVI file into a
postscripgt file:

dvips   9.dvi -Z -o  myfile.ps

  The -Z compresses it. The postcript files are quite large, though.
(394K from
70 K, for example, with 3 diagrams). The -Z commadn will comrpess it
about 40
prcent, I think, and it will still pirint drictly.

   TO TURN A DVI FILE INTO AN ASCII FILE:

uuencode 9.dvi 9.dvi> negot.asc



----------------------------------------------------------------------



The command @{} kills the space between columns in a table and
replaces it with
whatever is in curly brackets. It can be used to cleverly align tables
around
decimal points, thus:

\bl begin{table} [! h] %This puts the table right here, not
floating.
Or just try:
\bl begin{table}[h]



 \bl begin{table}[! h t] %This puts the table here or top
\bl begin{figure}[! b f] %This puts it at the bottom or on a
float page.





\bl begin{table}[!b]   \bl label{t1}
\bl begin{tabular} {l r @{.} l}
 Variable zzz Mean\bl \bl 
  X zzz  1 zzz 234\bl \bl 
 Y zzz 23 zzz 1\bl \bl 
 Z zzz 1456 zzz 34567\bl \bl 
 \bl end{tabular}



----------------------------------------------------------------------

\bl caption{The World in 1812} %This will appear as Table 1:
The World...
 \bl end{table}




----------------------------------------------------------------------

(I Haven't tried  this)

I need to write large tables that span many pages; I tried the tabular
environment but found out that it put everything on one page, with
most of the text going down the drain, i.e. below the physical page.
Is there a way of doing this smoothly, that is, without breaking the
large table into smaller ones that would approximately fit into one
page each? Answer: For LaTeX2e: You should look into either
supertab.sty or longtable.sty, both can be found in:

   /usr/um/generic/tex3.141/latex2e/tools/

with documentation in:

   /usr/um/generic/tex3.141/latex2e/tools/doc/

in the form of .dtx and .dvi files, you can run LaTeX on the .dtx
files, or simply look at the .dvi files.




----------------------------------------------------------------------




PACKAGES
 To put in a package: All packages are located in TCItex/tex/latex . I
am not sure if I can put a new one in with a new directory, and it
will get read in. Tha owrked at the office, but not at home, f or
a0poster. I can just use ADD  to get verbatim.

A0poster is good for large font sizes.
 documentclass[article ]{a0poster}
 usepackage{a0size}




----------------------------------------------------------------------



  In TEXTPAD, hard breaks are put in, sometimes in
awkward places, so I may have to do some fiddling to make sure key
commands do not get cut across lines.



----------------------------------------------------------------------



The easiest way to get headings of funny 'sections' such as prefaces
in the table of contents is to use the counter secnumdepth described
in Appendix C of the LaTeX manual. For example:

  \bl setcounter{secnumdepth}{-1}
  \bl chapter{Preface}

Of course, you have to set secnumdepth back to its usual value (which
is 2 in the standard styles) before you do any 'section' which you
want to be numbered.

Similar settings are made automatically in the LaTeX book class by the
\bl frontmatter and \bl backmatter commands.

This is why it works: \bl chapter without the star does

    1.put something in the .toc file;
    2.if the secnumdepth counter is greater than or equal to zero,
increase the counter for the chapter and write it out.
    3.write the chapter title.




----------------------------------------------------------------------



   From the NoT os short intro to Latex 2e

\bl include {chap2.tex, chap2.tex, chap3.tex}

\bl includeonly{chap2.tex} %This means only chap2.tex will be
included.

This does not work in SWP.



----------------------------------------------------------------------



For packages:
http://www.ctan.org/tex-archive/help/Catalogue/alpha.html

 



----------------------------------------------------------------------

 ADVICE TO BEGINNERS

 Do not use commands like \bl section{sd}, \bl theorem{sd} and so forth. In
reading the ms, this means you cannot see th enumber of the section or
theorem. It is easier, for articles as opposed to books, just to use
boldface and noindent directly.


----------------------------------------------------------------------


\bl begin{tabbing}
 % set the tab positions
 \bl hspace {1in} \bl =   \bl hspace {1in} \bl = \bl hspace {1in} \bl = \bl hspace {1in}
\bl \bl 
  one  \bl > be \bl >  due to \bl > differences,\bl \bl 
 one  \bl > to \bl > reputation \bl > the sort\bl \bl 
\bl end{tabbing}



----------------------------------------------------------------------


 MY STANDARD FORMATTING HEADER:
 

documentclass[12pt,epsf]{article}
 usepackage{mathpazo} % for palatino font

 usepackage{verbatim} % for  \bl begin{comment} feature.

 usepackage{ccaption} \bl captiondelim{}\bl renewcommand{\bl thefigure}{}
\bl renewcommand{\bl figurename}{} %for good figure captions

\bl renewcommand\bl floatpagefraction{.9}
\bl renewcommand\bl topfraction{.9}
\bl renewcommand\bl bottomfraction{.9}
\bl renewcommand\bl textfraction{.1}
\bl setcounter{totalnumber}{50}
\bl setcounter{topnumber}{50}
\bl setcounter{bottomnumber}{50}

 usepackage{hyperref} \bl hypersetup{breaklinks=true, pagecolor=white,
colorlinks=
true, linkcolor=black, hyperfootnotes= false, urlcolor=blue }
\bl urlstyle{rm}

 usepackage{graphicx} %for pictures

 usepackage{amsmath}

 usepackage{amssymb}


\bl reversemarginpar
  \bl topmargin  -.3in
  \bl oddsidemargin -.1in
  \bl textheight  8.5in
  \bl textwidth 7in
  \bl baselineskip 16pt




     begin{document}

\bl titlepage

\bl begin{raggedright}

 \bl parindent 24pt

 \bl parskip 10pt

adsfqdfadfasdfasdfdsaf

 \bl end{raggedright}
 end{document}

----------------------------------------------------------------------




http://www.usq.edu.au/users/leis/notes/latex/ has good latex
diagram instructions.




times	Times, Helvetica, Courier
pslatex	same as Times, but uses a specially narrowed Courier. This is
preferred
over Times because of the way it handles Courier.
newcent	New Century Schoolbook, Avant Garde, Courier
palatino	Palatino, Helevetica, Courier
palatcm	changes the Roman to Palatino only, but uses CM mathematics



Small Capitals	\bl textsc{words to be in small capitals}	puts the words
in the
brackets in small capitals


	\bl textsl{words to be slanted}

http://www.image.ufl.edu/help/latex/fonts.shtml



----------------------------------------------------------------------

 

\end{verbatim}

\end{normalsize}


\end{document}
 