\documentclass[autumn,nocolorBG]{prosper}

\title{Producing Beautiful Documents {} \\ With \TeX {} and \LaTeX}

\subtitle{An Extremely Brief Introduction}

\author{Lawrence Hubert}

\institution{University of Illinois}

\begin{document}

\maketitle




 \begin{slide}{What is \TeX \  and \LaTeX?}

 \TeX {} is a very mathematically savvy typesetting engine produced in the 1980's by Donald Knuth from Stanford.

 \medskip

 It is open-source (which means it is free, and freely available); implemented for every conceivable operating system; it is currently in Version 3.141592, so it is, in effect, now ``fixed'' forever.

 \medskip

 Extra Credit: can you tell why it is essentially ``fixed''? And what will be the version number when Knuth dies?

\end{slide}

\begin{slide}{}

\LaTeX{} is a set of macros sitting on top of \TeX{} that makes our task easier.

\medskip

It was produced by Leslie Lamport in the middle 1980's; it is also open-source and delivered conjointly with any \TeX{} system. The current version is \LaTeX2e{} and is under constant development and extension.

\medskip

\TeX{} and \LaTeX{} work together, with \LaTeX{} helping produce what is called the document mark-up, and \TeX{} then being called upon to do the actual typesetting.



\end{slide}

\begin{slide}{Features and Advantages}


\begin{itemize}

\item Why you should use \TeX{} and \LaTeX{} ---




 \item In contrast to word-processing methods such as Word, you do not worry about the visual formatting of your document.  You are concerned only about the content.  In other words, you separate content from layout.



 \item The file you produce is \verb+ascii+, the simplest you can have with no special symbols;
  it includes general commands for what you wish to do in the document.

\end{itemize}

\end{slide}

\begin{slide}{}

\begin{itemize}

\item The subtext: you don't need to support the evil empire in Redmond Washington, use their proprietary file formats, and make Bill Gates even richer than he already is.

    \end{itemize}

    \medskip

    I handed out as a hard-copy item, the piece by Allin Cottrell,
    \emph{Word Processors: Stupid and Inefficient}.

      \medskip

      Read and enjoy, and then use \LaTeX{}.



\end{slide}


\begin{slide}{}

\begin{itemize}

\item Many places of publication (and now universally in any source that has even the slightest quantitative tinge), ask for manuscripts to be submitted as a \LaTeX{} \verb+ascii+ file (usually, along with a corresponding typeset \verb+.pdf+ file, i.e., one in portable document format).

      \medskip

      This might include the use of what is called a ``class file'' that specifies and controls the unique appearance of the document for the intended publication source.

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}

\item Class files all have the extension \verb+.cls+ (so be sure to turn on the ``show file types'' option if you are using windows; it is off by default), and, in effect, drive the formatting of a document and provide special commands to use, whenever necessary, for the document at hand.

    \medskip

    Class files are typically provided to you, or more likely, you will need to download these from some provided web site.

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}

\item Although the quantitative journals in psychology typically have their own class files now
 (e.g., \emph{Psychometrika}, \emph{Journal of Mathematical Psychology}), we will mention  several which may be germane to all of you.

     \medskip

     These, we might note, are in addition to the standard \LaTeX{} classes:

      \medskip

      \verb+article.cls+; \verb+report.cls+; \verb+book.cls+; \verb+slides.cls+; \verb+letter.cls+

    \end{itemize}

    \end{slide}

    \begin{slide}{}

    \begin{itemize}

    \item \verb+apa.cls+  (guess what this class is for?  Also, we now have \verb+apa6.cls+)

    \item \verb+uiucthesis.cls+ (let's hope some of you get to use this one)

    \item \verb+beamer.cls+ (this replaces \verb+prosper.cls+, which is the class I'm using to produce these slides)

    \item \verb+letter.cls+ (although a standard \LaTeX{} class, I still use this for my letters of recommendation; I change the address to whom the letter is going, and typeset again)

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}

\item  You can get anything \TeX{} and \LaTeX{} related (for free) from the CTAN archive: The Comprehensive \TeX{} Archive Network:

    \smallskip

     \verb+http://www.ctan.org/tex-archive+



  \item  For example, the apa stuff is at:

  \smallskip

  \verb+/macros/latex/contrib/apa+



     \item  for the UI thesis class, see:

  \smallskip

  \verb+/macros/latex/contrib/uiucthesis+

   \item  for the newer beamer class:

  \smallskip

  \verb+/macros/latex/contrib/beamer+

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}

\item If you have \emph{any} reasonable mathematics in way of formulae to put into a manuscript;

\item or if you have tables that you would like to include and manage well;

\item or if you would like to easily ``repurpose'' your prose for other uses at times (a nice word, don't you think);

\item or if you would like to  see your document in many forms easily (e.g., double-spaced rough draft; two-column final look, and so on);

\end{itemize}

\end{slide}

\begin{slide}{}

\begin{itemize}

\item or if you have some simple graphics that you would like to include by way of text itself using the \verb+picture+ environment (as opposed to including a \verb+.eps+ or \verb+.pdf+ figure, which you can also do);

    \item you are a \emph{fool} (hear me, a \emph{fool}) if you don't consider using \TeX{} and \LaTeX{}.

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}

\item There is a very nice integration with all the modern file formats.  The \verb+ascii+ markup file has traditionally used the extension \verb+.tex+, and when typeset produces a \verb+.dvi+ (device independent) file, which could then be printed or viewed.

    \item The situation is true to the present, but we now have a route to going from \verb+.tex+ to \verb+.pdf+ directly (or to \verb+.ps+ and then to \verb+.pdf+; or first to \verb+.dvi+ and then \verb+.ps+ or \verb+.pdf+).

\end{itemize}

\end{slide}



\begin{slide}{}


         Because I like to use \verb+.eps+ for my included graphics, I generally go from \verb+.tex+ to \verb+.div+ to \verb+.pdf+ (this is easy to do and has no glitches; but many other paths are possible).

         \medskip

         There are html file options (\verb+.htm+) as well; much of this is now being replaced by the direct use of \verb+.pdf+


\end{slide}



\begin{slide}{}

\begin{itemize}

\item There are very nice tools for long projects: automated indexing (including multiple indices such as Subject and Author --- I've done these using the package \verb+multind.sty+);

\medskip

automatic construction and inclusion of Tables of Contents, Tables of Figures, and Tables of Tables;

\medskip

easier preparation of Proceedings Volumes and Journals where the ``chapters'' are actually separate manuscripts;

\end{itemize}

\end{slide}

\begin{slide}{}

\begin{itemize}

\item  if you really get into this, you can use BibTeX, which generates bibliographies from a master file (a \verb+.bib+ file) where you maintain  \emph{all} your references (from birth).

    \medskip

    You can have bibliographies generated automatically by referencing according to a label placed in your text;

    \item if the bibliography entries need to be in a particular form, you can generate the appropriate style using a bibliographic style file (one with a \verb+.bst+ extension);


  \end{itemize}

  \end{slide}


 \begin{slide}{}

    for example, Erik Meijer has produced the package \verb+apacite.sty+ and assorted items you need for APA citation practice:

    \medskip

    \verb+/biblio/bibtex/contrib/apacite+

\end{slide}






\begin{slide}{}

\begin{itemize}

\item When one does mathematics or statistics in any form, there is just \emph{no} substitute for using \TeX{} and \LaTeX{}.

\medskip

The quality of production is incredibly high, even for very complicated mathematical presentation.

\medskip

If you use \verb+apa.cls+ (or \verb+apa6.cls+) and put \verb+jou+ in the document class options, the resulting manuscript will typeset two-column (like APA) and look exactly like a printed reprint;

\end{itemize}

\end{slide}

\begin{slide}{}

 in fact, it is so good, maybe we should just skip the submission/review/resubmission process.

 \medskip

 Many journals (including, for example, \emph{Psychometrika}) now use \LaTeX{} markup to generate all the necessary files for printing the journal.

\end{slide}








\begin{slide}{}

\begin{itemize}

  \item  \TeX{} considers the paragraph as the unit of typesetting, with the manner in which lines are set and broken, and how hyphenation is done, based on a very nice  dynamic programming algorithm (one of my own research areas).

    \smallskip

    The only Desktop Publishing Program that uses such a method is Adobe's InDesign.

    \smallskip

    If you wish, I could tell you my experiences with typesetting by hand in $8^{th}$ grade shop --- we used what was called the ``first-fit'' method.

\end{itemize}

\end{slide}


\begin{slide}{}

\begin{itemize}



\item There are many add-on packages (all free, and with a file extension of \verb+.sty+) that provide collections of new commands and environments for various purposes.

    \medskip

    Also, there is language/font support for literally hundreds of languages (see the \verb+babel+ packages):

    \medskip

    \verb+/macros/latex/required/babel+

    \medskip

    A search on my MikTex distribution for \verb+.sty+, gets over 3000 hits; these packages were automatically included during a full install.

    \end{itemize}

\end{slide}

\begin{slide}{}

Packages are continually under development and an installation such as Miktex has a mechanism for updating its distribution.

\medskip

Also, when you use a \verb+.sty+ file that may not be in the distribution as yet, MikTex is so smart that it goes out to the Web, gets the package, and installs it for you.

\medskip

This all says, by the way, that we need to be on high-speed internet access to function effectively.  No more dirty-dialup.


\end{slide}


\begin{slide}{}

\begin{itemize}

\item Packages are included with the command \verb+\usepackage{}+, placed in the preamble (the area between \verb+\documentclass{}+ and \verb+\begin{document}+;

    \medskip

    the ones I routinely use are:

     \smallskip

     \verb+curves.sty+ (this adds a few nice drawing capabilities to the \verb+picture+ environment);

     \smallskip

     \verb+graphicx.sty+ (the standard for incorporating and manipulating all sorts of graphics into a manuscript);



\end{itemize}



\end{slide}

\begin{slide}{}


    \verb+multind.sty+ (for creating both subject and author indices);



    \verb+amsmath.sty+, \verb+latexsym.sty+, \verb+amsfonts.sty+ (these add new symbols from the American Mathematical Society).



\end{slide}


\begin{slide}{}



GNU (Gnu is not Unix, recursively) ---

\medskip

The newest extension of the \verb+picture+ environment is loaded with \verb+pgf.sty+ and \verb+tikz.sty+ (portable graphics format).

\medskip

TikZ ist kein Zeichenprogram

\medskip

Just as \verb+beamer.cls+ is all the rage now for slides, TikZ/pgf has a similar appeal for drawing your diagrams and pictures.  These are written by the same person (apparently, with a lot of time on his hands) --- Till Tantau





\end{slide}


\begin{slide}{Resources and Documentation}

There are a few sources that we all should have available.  The first costs money (\$45.00):

\smallskip

Leslie Lamport, \emph{\LaTeX{}: A document preparation system}, 1994, Addison-Wesley.

\smallskip

and three are free as \verb+.pdf+:

\smallskip

The not so short introduction to \LaTeX2e{}:

\smallskip

\verb+/info/lshort/english/lshort.pdf+

\smallskip

A beginner's introduction to typesetting with \LaTeX{}:

\smallskip

\verb+/info/beginlatex/beginlatex-3.6.pdf+

\smallskip

The Comprehensive \LaTeX{} Symbol List

\smallskip

\verb+/info/symbols/comprehensive+



\verb+/symbols-letter.pdf+










\end{slide}


\begin{slide}{}

Two other Addison-Wesley products are worth buying if you have the money:

\smallskip

Frank Mittelbach and Michel Goosens, \emph{The \LaTeX{} companion (2nd Edition)}, 2004.

\smallskip

Helmut Kopka and Patrick Daly, \emph{Guide to \LaTeX{} (4th Edition)}, 2003.

\smallskip

Also, from George Gr\"{a}tzer (author of \emph{Math Into Latex}), we have a short course from his book:

\smallskip

\verb+math_into_latex_short_course.pdf+

\smallskip

and videos in

\smallskip

\verb+mil4-video-presentations+



\end{slide}

\begin{slide}{}

There is no better place for all things \TeX{} and \LaTeX{} than the TeX Users Group (TUG):

\smallskip

\verb+http://www.tug.org+

The group's printed journal (TUGboat) and online source (PracTeX) are available for free, as well as all sorts of other information and items.  I am a member for \$75.00; students pay \$45.00.

\smallskip

You get a lot of stuff for this price (TexLive; Tugboat; CTAN snapshots; etc.).

\end{slide}

\begin{slide}{}

I have put a few items up on my web site that you can access.  We will use some in the demonstrations to follow:

\smallskip

\verb+cda.psych.uiuc.edu/multivariate_fall_2012/+

\verb+latex_class_material+

\begin{itemize}

\item \verb+latex_presentation.tex+ (the source file for the slides you are now looking at);

\item \verb+latex_presentation.pdf+ (the actual file I am showing to you now);

\item \verb+wp.html+ (Allin Cottrell's piece on Stupid and Inefficient Word Processors)


\end{itemize}

\end{slide}

\begin{slide}{}

An aside on file names ---

\medskip

Make sure your titles are meaningful.  We are no longer limited to less than or equal to eight characters in our file names. Always use the extensions. It will make things much easier to find (later as well as more immediately).

\bigskip

The underscore mark is very helpful in avoiding the use of spaces (which still can cause problems, so avoid them).  Also, remember that names are generally case-sensitive, so I generally only use lower-case.

\end{slide}

\begin{slide}{Files for the Demonstration}

\begin{itemize}

\item \verb+ED2007.cls+ (the class file for Edwin Diday's Festschrift)


\item \verb+ED2007manuscripts.pdf+ (instructions on how to use the class file)

\item \verb+ED2007manuscripts.tex+ (the source file)


\item \verb+diday_rev.pdf+ (the Hubert and K\"{o}hn paper for the Festschrift)

\item \verb+diday_rev.tex+ (the source file)

\item \verb+AR_Monte_Carlo_box_plots_all.eps+ (the included \verb+.eps+ file for the paper, with name violating my lower-case rule)


\end{itemize}

\end{slide}



\begin{slide}{The Mechanics}


An Editor and a Distribution

For the Mac:

\smallskip

\verb+http://www.tug.org/mactex+

\smallskip

Download the large image file (in \verb+MacTex.pkg+ [2.1G]) and install (easily by clicking).  You are given Texshop as an editor and interface (see the file: \verb+WelcomeToMacTex.pdf+ ).

\medskip

For Windows:

\medskip

First download and do a complete install of the typesetting engine MikTex from:

\smallskip

\verb+http://miktex.org+ (Version 2.9 now)


\end{slide}


\begin{slide}{}

For your (Zen-like, and chroma-coded) editor, use WinEdt and download from

\smallskip

\verb+http://winedt.com+ (Version 5.5 for the license immediately below; the current Version is 7 with licence to follow that for 5.5)

\smallskip

After installed, call up the Registration box (under Help), and enter exactly as stated (including spaces and capitals):

\smallskip

Name: UIUC Psychology (50-user Site License)

\smallskip

Code: 7431692338750581620

\end{slide}

\begin{slide}{}

Version 6 or 7:

\smallskip

Name:     Lawrence Hubert

\smallskip

Code:     5444201233798851783

\smallskip


This is good forever ...

\medskip

For Linux/Unix:

\smallskip

You already know what to do and use.

\end{slide}


\begin{slide}{Some Parting Comments}

LyX is a free visual document processor (they call it WYSIWYM) that can export \LaTeX{} processable files and uses \LaTeX{} itself as a backend:

\smallskip

\verb+http://www.lyx.org+

\smallskip

A (rather expensive) commercial version of a LyX-type system is Scientific Word from MacKichan Software:

\smallskip

\verb+http://www.mackichan.com+

\end{slide}

\begin{slide}{}



I have some Lucida fonts that I bought from PcTeX; I think these are just beautiful and will give
an example later.

\smallskip

You use them by putting a \verb+usepackage[]{}+ statement in your document (in the preamble), and then use the two options of \verb+lucidasmallscale+ and \verb+nofontinfo+ and the package name of \verb+lucimatx+.

\smallskip

The only problem for me is that I haven't figured out (as yet) how to use them outside of PcTeX; I get an error message about not all fonts being located when I try within WinEdt, for example.





\end{slide}


\begin{slide}{}

Once you know how to makeup a document in \LaTeX{}, you can write questions in simple email that might involve formulas using these same \LaTeX{} commands  (this is the nerd version of text messaging).

\medskip

Also, if you are adventuresome, you can use your knowledge of \LaTeX{} commands to ask for, among other things, dates: \verb+\dinner+

\smallskip

This is read ``backslash dinner?'' ---



\end{slide}








\end{document}



