 \documentclass[11pt, oneside]{amsart}
\usepackage{multicol}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
\usepackage{url}


\title{First Steps with TeXShop }
\author{Richard Koch}
%\date{}                                           % Activate to display a given date or no date

\begin{document}
\maketitle
%\section{}
%\subsection{}
\begin{multicols}{2}

\section{About \TeX}

\thispagestyle{empty}

\TeX\ was written by Donald Knuth at Stanford University and first released in 1978. In the 1970's, publishers were switching from hot lead to photo offset printing. Describing that time, Knuth writes ``My motivation was increased by the degradation of quality I had been observing in technical journals. The publishers of my books on computer programming had tried valiantly but unsuccessfully to produce the second edition of volume 2 in the style of the first edition without using the rapidly-disappearing hot lead process. It appeared that my books would soon have to look as bad as the journals!'' \TeX\ was designed to solve this problem.

\TeX\ is a typesetting program which can produce professional quality articles and books from manuscripts typed at a computer terminal. It is particularly good at typesetting mathematics, but is used in a variety of fields from linguistics and philosophy through economics and computer science. The program is designed to produce output of professional publisher quality, with manuscripts which can range from short letters to large multi-volume works.

Further versions of \TeX\ were released in 1982 and 1989. When the program was complete, Knuth put it in the public domain. It is available free on most current computers, including those running Mac OS X, Windows, Linux, Unix, and other operating systems. Knuth took great care to make sure the output is the same on every computer. If you create a manuscript on the Mac and give it to a Windows or Linux user, the manuscript will typeset on that user's machine and produce exactly the same output as on your Mac. 

\section{\TeX\ and  TeXShop}

\TeX\ is a command line program. To write a document, you prepare a source manuscript using a text editor and then ask \TeX\ to convert the manuscript into pdf output.  The manuscript will look like it came from a typewriter, with no special fonts, italics, or unusual symbols, but the resulting pdf document will look like it came from a professional printer.

TeXShop is a graphical interface to \TeX, allowing users to prepare manuscripts without worrying about the technical details of the process. Such graphical interfaces are available for most operating systems. Unlike \TeX\ itself, the graphical interface depends heavily on the operating system and varies from system to system. On the Mac, TeXShop is only one of many ways to graphically interact with \TeX.

\section{Getting Both Parts}

To use TeXShop, it is necessary to install both  \TeX\ and TeXShop. Clearly you have TeXShop. The \TeX\ installation is usually hidden away on Unix systems like the Mac;  to see if it is present, open Apple's System Preferences and find the preference pane named ``TeX Distribution'' at the bottom of the panel. If it is absent, you either have an old \TeX\ distribution or none at all. Otherwise the TeX Distribution pane will list available \TeX\ distributions and indicate which one is currently active.

If you don't have the preference pane, go to  \url{www.tug.org/mactex}. You will find the main \TeX\ distribution there : MacTeX (about 1.3 GB). A smaller TeX distribution is available at \url{www.tug.org/mactex/2009/morepackages}, BasicTeX (about 85 MB). Download and install the second if you have a slow connection; otherwise download and install the first. Installation is completely straightforward.

\section{Starting TeXShop}

TeXShop is designed to be immediately useable without setting any special preferences. Start the program. You'll see a blank page. In the toolbar at the top of this page you'll find a pulldown menu named Templates. Select the Latex Template from this list.  TeXShop will insert starting material in your source document.

Toward the end of this material you'll find lines 
\begin{verbatim}
   \begin{document}
   ...
   \end{document}
\end{verbatim}
Your input goes between these lines. Type some text. \TeX\ will ignore extra spaces and line feeds, so sloppy typing is allowed. A blank line starts a new paragraph.

When you are satisfied, push the Typeset button at the top left of the toolbar. You will be asked to name and save the document. Then \TeX\ will typeset it and the output will appear in a second TeXShop window.

\section{Movies}
The TeXShop Help menu contains a submenu named TeXShop Demos with short movies about TeXShop. The process described in the previous section is demonstrated in the first move,  Getting Started. Play that movie now.

Writing a \TeX\ document involves interacting with two windows, a Source Window and a Preview or Output Window. You can configure TeXShop so it will place these windows in convenient locations. This configuration is explained in the second movie, Initial Preferences. 

\section{Using the Software}

To use TeXShop with \TeX, you must learn something about  how TeXShop works, and something about how \TeX\ works. The first task is quite simple, so spend most of your energy  on the second one.  

TeXShop will help you edit your manuscript, and later help you examine the typeset output. But it doesn't interfere much with the central task of typesetting the manuscript. When you push the Typeset button, TeXShop saves your source document and calls \TeX, saying essentially ``Here's a source file; please typeset it and call me when you are done. In the meantime, I'm going to take a little nap.'' When typesetting doesn't produce the result you want, the problem is almost always due to incorrect use of \TeX\ and almost never due to TeXShop. That is why you should spent most of your energy learning \TeX.

In the rest of this short report, I'll describe a few TeXShop features which simplify typesetting. Many features of the program are for advanced users and can be ignored until you have \TeX\ under your belt. When you think you need to know more, read the extensive documentation in the TeXShop Help Panel under the Help menu.

\section{Saving and Loading Documents}

When you start a manuscript and want to typeset for the first time, you'll be asked to save the document. \TeX\ creates a number of auxiliary files during typesetting, so it is not a good idea to save the manuscript in ~/Documents or your Home directory --- if you do that, you'll create a mess when you typeset. Instead, create a folder when you first save and save inside that folder.  Play the movie "Initial Preferences" again to see this being done. Later on when you use illustrations or extra input files, these too go into the folder.

If a collaborator sends a \TeX\ document which will become a joint paper, create a folder and put the document in that folder before opening it in TeXShop.

The technical name for a manuscript is ``\TeX\ source file'' and I'll use that terminology from now on. Once you have such a file, you can open it by double clicking or by dragging it to the TeXShop icon in your dock. Like all Mac programs, TeXShop has an ``Open Recent'' menu item listing source files you have recently worked on. The easiest way to open a source file is usually just to start TeXShop and find your document's name in the ``Open Recent'' menu.

\section{Typesetting and Printing}

You'll often make small changes in your source and immediately typeset to see if your changes work.  Command-T is a keyboard shortcut for typesetting. You'll find that you often use it and seldom reach up for the Typeset button.

You will usually want to print the typeset output, so TeXShop's Print command and Command-P shortcut send the typeset output to the printer. In those rare situations when you want to print your source file, use the ``Print Source...'' menu command.

\section{Editing Tricks}

The TeXShop editor uses Apple's Cocoa editing framework, which works internally with Unicode. This framework is used by many other Macintosh programs and   implements a number of editing tricks to simplify text entry. There is no need to list these tricks because they appear in all Macintosh Cocoa programs. For example, all such Cocoa programs provide unlimited Undo and Redo. 

But TeXShop implements other editing tricks of special significance for \TeX\ users. Some of these are described below.

\TeX\ makes extensive use of round, square, and curly bracket signs. Clicking once on such a sign places the cursor at the spot. Clicking on a bracket while holding the option key down selects that bracket. Double clicking on a bracket selects all text between the bracket and its matching bracket. This is a good way to determine the scope of a bracket and catch mistakes made by forgetting to include the matching sign.

A typical \TeX\ source document contains markup commands like 
\begin{verbatim}
     \chapter{First Principles} 
\end{verbatim}
or
\begin{verbatim}
     \section{Introduction} 
\end{verbatim}
to begin and title new chapters or new sections. Such commands are automatically added to the Tags pulldown menu in the toolbar of the source window. For instance, the first of these items appears as
\begin{verbatim}
    chapter: First Principles
\end{verbatim}
and the second appears as
\begin{verbatim}
    section: Introduction
\end{verbatim}
Select the appropriate menu item to move to that spot in the source manuscript. This makes it possible to rapidly navigate through the source file.

You can add your own tag by starting a line with a comment sign, colon, and marker name. For example
\begin{verbatim}
     %:Key Formula
\end{verbatim}
adds
\begin{verbatim}
     Key Formula
\end{verbatim}
to the Tag menu; selecting this item scrolls to that spot in the source.

The symbol
\begin{verbatim}
     %
\end{verbatim}
can appear anywhere in the source and marks the start of a comment which the \TeX\ typesetting engine will ignore. The comment continues to the end of the source line.

Often you will type extra material and discover that the material produces a typesetting error. If the error is difficult to diagnose, you may wish to comment out several lines and typeset to see if it goes away. To do this in TeXShop, select the lines you wish to comment out and select Comment in the Source menu. Each line will be commented out. To remove the comment signs, select the lines again and choose Uncomment in the Source menu.

\section{Handling \TeX\ Errors}

When \TeX\ typesets, a new Console Window opens showing progress messages from \TeX. Some of these messages will be warnings which don't interrupt typesetting; you may want to inspect them later. Other messages will describe errors which cause \TeX\ to immediately stop typesetting. Such error messages begin with the line number of the source line containing the error.

You can usually bypass errors by pressing Return; \TeX\ will resume typesetting until it reaches another error or completes the job.

At the top left of the console window you'll find a button named Goto Error. Pushing this button will take you to the line in the source containing the error.
If you wish, push this button as soon as \TeX\ reports the error without continuing typesetting to the end. The actual error is often in an earlier line; \TeX\ continues typesetting until it realizes that something has gone wrong.

You can also use TeXShop's Line Number command in the Edit menu to select a source line and go to that line.

\section{Preview Tricks}

After \TeX\ typesets, a Preview Window appears showing the typeset document. At the right of this window's toolbar, an item allows you to select several tools. The default tool, indicated with the letter ``A'', allows you to click on links in the document and immediately move to the location indicated by the link (such links are created by the \TeX\ hyperlink package, which you'll discover later in your \TeX\ studies). The ``A'' tool also allows you to select text, copy it, and paste into another document; the resulting text will lose formatting information, but can be edited in the other document.

To the right of the ``A'' tool are two magnifying glass tools. Select one and click to magnify that spot in the output. This is useful if you wish to closely inspect a complicated mathematical expression. If you double click while using the larger magnifying glass, you will magnify the entire contents of the Preview window.

The tool at the extreme right allows you to select a portion of the typeset output and drag the resulting pdf information to the desktop or another program. For instance, you can use this tool to drag an equation from TeXShop to Apple's  Keynote program. Many programs like Keynote accept the information as a pdf file, so it can be resized without losing detail. Other programs convert the pdf information to bitmap information; in that case, the bitmap becomes fuzzy when resized.
This is unfortunate, but TeXShop cannot control what other programs do with the information it provides.

Several \TeX\ packages produce slides; among the most commonly used is a package named Beamer. In the TeXShop Window menu, the Fullscreen item converts the Preview window into a fullscreen display, which if useful if you are projecting the slides on a screen. Keys and the Mouse are still active, so you can page through the slides using Spacebar and Shift-Spacebar or the arrow keys,  and click on links to activate them. Hit the escape key to return to regular mode.

\section{Preview Window Configuration}
There are several ways to configure the Preview window. By default, it has a scrollbar; you can use the bar to scroll  through the document's pages. Also by default, the preview image expands to fill the Preview window.

This behavior can be changed. The Preview menu has two items named Magnification and Display Format. Experiment with these to explore other options. TeXShop can display one page at a time or display two pages side by side. It can display with fixed magnification rather than resizing to fit the window.

The Magnification and Display Format items temporarily change the display of the current document, but do not change the document's appearance when it is next opened.  The default options can be permanently changed using TeXShop's Preference system. There is one confusing feature in Preferences: you can set the default magnification amount, but this setting will only be used if the After Window Resize option is set to Fixed Magnification.

\section{Sync}

When you are previewing typeset output, you may find a mistake. In that case you'll want to locate the corresponding spot in the source document and make a  change. To do that, click on a preview location while holding down the Command key (i.e., Apple key). The Source window will activate and show the corresponding spot. This technique works reliably with text, but not inside mathematical equations.

Similarly, click on a spot in the source document whole holding down the Command key to find the corresponding spot in the typeset output.


\end{multicols}

\end{document}  