Skip redundant pieces
Department of Mathematics

TeXShop(on Mac OSX)

In addition to Texmaker TeX Editor, the Mac machines have another application for creating TeX documents called TeXShop. TeXShop has less embedded features then Texmaker, but it works just as well if you are familiar with TeX or LaTeX commands. To access TeXShop, open a new untitled document by choosing Finder (from the dock) -> Applications -> TeX -> TeXShop.

[/computingHelp/latex/macLatex1.jpg]


Creating a Document:

  1. Lets create a simple document. First ensure that that under the Typeset menu, LaTeX and PdfTex are checked unless you have a reason to do otherwise.

  2. We need to first create our preamble. This contains the directives that the compiler needs to create the document. Commands in the preamble affect the whole document. Also note that none of what is in the preamble gets printed in the document.

    Type the following into your untitled document:

    \documentclass[10pt]{}
    

    This tells the compiler that you want a 10 point font document which can be changed if so desired. Within the curly braces {}, we need to tell the compiler what sort of document we want. Type the word article within the braces to create an article type document. See Wikibooks for more options.

  3. Now we want to make the mathematics packages available. To do this, add the following lines directly below the line \documentclass:

     \usepackage{amsmath} 
     \usepackage{amsfonts} 
     \usepackage{amssymb} 
    

    These are directives which tell the compiler that we want to use the features of these packages. amsmath, amsfonts, and amssymb gives you full access to almost any mathematical expression you can think of. There are many more packages available for purposes other than mathematics.

  4. On a new line, insert the following code:

    \begin{document}
    \end{document}
    

    Within the begin/end block is content that you will want in your document. For more specialized commands refer to resources like Wikibooks.

  5. To continue with our example, lets create a matrix. Within the \begin{document} ... \end{document} block, copy the following code which produces a matrix:

    \[
    \left[ \begin {array}{ccc}
    \frac{\partial y_{1}}{\partial x_{1}}
          & \cdots & \frac{\partial y_{1}}{\partial x_{n}} \\
    \vdots	& \ddots & \vdots \\ 
    \frac{\partial y_{m}}{\partial x_{1}} 
          & \cdots & \frac{\partial y_{m}}{\partial x_{n}}
    \end{array} \right]
    \]
    

  6. Check to make sure your code looks like the following:

    [computingHelp/latex/macLatex2.jpg]
  7. Once you have put your desired content into the document body, you will need to save the document. Choose File -> Save as and then choose the path you want from the pull down menu. For the file name, call it whatever you want followed by .tex (i.e. sample.tex). Once you have saved your tex file, click on the [/computingHelp/latex/macLatex3.jpg] button in the upper left hand corner of texshop. This typesets your document, and creates the pdf document in the same directory that you saved the tex file in. The name of the file is the same prefix you used when you saved the file followed by the .pdf suffix (i.e. sample.pdf). You can then navigate to that directory and open the pdf file. You should see the following:

    [/computingHelp/latex/matrix.jpg]
    Note that each time you typeset the document, the old document is overwritten with the new one unless you change the name of your document.
  8. For a few more common mathematical examples, paste the code found in this sample into texmaker, and typeset it into a pdf following the same instructions given above. For a more in depth coverage of topics dealing with the language of LaTeX, visit the Wikibooks page or the library.