Skip redundant pieces
Department of Mathematics
Home : Computing Help : Documentation : LaTeX : Texmaker-FAQ

Texmaker TeX Editor

Texmaker TeX Editor is an application that is installed on the both the Linux and Apple machines in the Math Department.

From Linux:

If you are on a Linux machine within the department, go to Applications -> Office -> Texmaker TeX Editor.

[/computingHelp/latex/texmaker3.jpg]

From Mac:

If you are on one of the Apple machines choose Finder(from the dock) -> Applications -> TeX -> texmaker

[/computingHelp/latex/texmaker1.jpg]

Once you have Texmaker open, go to File -> New . This creates a new untitled document. In the untitled tab is where you will enter TeX commands for your document.

[/computingHelp/latex/texmaker2.jpg]

Creating a Document:

Now that we have Texmaker open, let's create a simple document and typeset it into a pdf document. More information on LaTeX commands and what they do can be found on the Wikibooks page.

  1. First, we need to 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.

    From the LaTeX menu, choose \documentclass. This inserts:

    \documentclass[10pt]{}
    

    into your tex file. It 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.

  2. Move the cursor to the next line and choose from the LaTeX menu AMS packages. This inserts the following lines into your tex file:

     \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.

  3. On a new line, choose from the LaTeX menu \begin{document}. This inserts:

    \begin{document}
    \end{document}
    

    Within the begin/end block is content that you will want in your document. Notice that there are many basic commands built into the Texmaker interface. For more specialized commands refer to resources like Wikibooks.

  4. 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]
    \]
    
  5. Check to make sure your code looks like the following:

    [/computingHelp/latex/code.jpg]

  6. 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, go to Tools -> PDFLaTeX. This compiles 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. Also, under the Tools menu, you can create documents in formats other than pdf such as DVI(Device Independent) and PS(Post Script). There are also converters from one type to the other.
  7. 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.

  8. Mac OS

    Click Here for Mac OS specific help