Skip to Main Content

Getting Started with LaTeX

LaTeX is a typesetting program useful for mathematical and scientific writings or publications. This guide provides an overview of how to get started with LaTeX, as well as resources and exercise to help new users of the program.

The Basics

The core of LaTeX is a backend software package that complies the LaTeX code (.tex file) and creates the final document (PDF).  There are a few different programs available to do this depending on the operating system of the user.   The LaTeX Project provides information about how to install LaTeX on Windows, Macs, and Linux, as well as online services.  Instruction on how to install the most common LaTeX programs for Windows and Mac can be found in the "Installation for Windows" and "Installation for Mac OS X" sections below.

Aside from the back end software required to run LaTeX it is highly recommend that users install a text editor.  A text editor is a frontend software that can be used to create .tex file used by the compiler.  Text editor programs such as TeXwork, TexStudio, TexMaker, and TexShop provide a friendly interface for users.  Often these front end programs include help menus, wizards for creating LaTeX objects, drop down menus for inserting symbols or altering text, and many other features that will support both new and experienced LaTeX users.  You will find more information about these frontend programs in the "LaTeX Interfaces" box below.

Installation for Windows

For a Windows computer it is strongly recommend that you use the common MiKTeX editor.  The MiKTeX/about page contains several links including how to install, deploy, and update MiKTeX.  A basic set of installation instruction can be found below, but if you are having trouble be sure to check the MiKTeX page (click the previous install hyperlink):

  1. Download MiKTeX (make sure you choice the right option either basic MiKTeX 64 or basic MiKTeX 32 depending on your computer)
  2. After the download is complete run the installer.  During the installation you will be prompted to select the paper size.  It is recommend that you choice letter (this can be changed later if needed).
  3. Once the installation is complete it is recommend that you check for any updates.  The update wizard can be found through the Windows start menu.  Following the steps provided by the update wizard should be a simple, but if you are having trouble instructions can be found by clicking the update hyperlink above.
  4. With everything installed and updated the last step is to try typesetting.  MiKTeX comes with a front end text editor built in, TexWork.  To open TeXwork go to Start > All Programs > MiKTeX > TeXwork.

At this point you may want to play around and try typesetting your own document.  For your first document you should go to the Getting Started: Creating a document page.  Once you have gone through that if you are looking for some additional ideas or exercises go to the Exercises tab.

Installation for Mac OS X

For Mac OS X it is strongly recommended that you use MacTex.  Information about MacTex can be found on their main page. It is recommended that you click the link "download MacTex".  This link will take you to a page with the download package, as well as, the instructions for downloading MacTex.  If you are having trouble locating you can download package.  Follow the instruction on that page or the simple instructions listed below:

  1.  Click on "MacTex.pkg" near the top of the page to begin the download.
  2.  One the download is complete open the package and following along the installation wizard.
  3.  The "MacTex.pkg" contains several different programs and documents.  If you did not change the path during installation these items should appear in a folder with the following location Application/TeX.
  4. The two most important items contained in the TeX folder are TeX Live Utility a program that you can use to update MacTex, and TeXShop a front end text editor.  It is recommended that your run Tex Live Utility before getting started to check for updates.

With everything installed and up to date you may want to play around and try typesetting your own document, to do this open TeXShop.  For your first document you should go to the Getting Started: Creating a document tab.  Once you have gone through that if you are looking for some additional ideas or exercises go to the Exercises tab.  

When starting a new document in TeXShop you may want to begin by going to File > New from Stationary > AMS-Article this will open a text editor with a standard template for creating an article.  You will see other templates in New from Stationary that you may want to use in the future, such as beamer for creating slide show.

LaTeX Interfaces

As mentioned before the use of a front end text editor program is strongly encouraged.  These programs help to increase the readability of LaTeX code during the editing process.  Many of these programs contain wizards that can speed of the creation of certain LaTeX objects such as tables, they have overlays when using commands to provide information and to make sure the inputs are formatted properly, and they often have toolbars that simplify the use of certain common commands and symbols.  Both the MiKTeX and MacTex downloads discussed above include a text editor, but you may want to look around to find the one you like best.  I for example use TexStudio, a popular text editor.  A comparison of various editors are available.

To illustrate how powerful a good text editor can be look at the two codes below.  The first is written in notepad, for the new user it can be very difficult to follow this code and equally difficult to edit.  The second image is the same code written in TexStudio.  In TexStudio the code is automatically color coded. The color coding makes it much easier to tell the difference between comments, equations, text, commands, and other LaTeX structures.

Notepad

Screen capture of Notepad that contains code, black text on white background, displayed in a text file.

TexStudio

Code displayed through a LaTeX editor, code is color coded to enhance readability and editing.

Installation for Linux and online platforms

For instructions on how to download LaTeX for Linux visit the The LaTeX project website or download Tex Live

The LaTeX project also has links for different online platforms that can be used to edit, view, and download .tex and PDF files.

Overleaf

NYU is providing free Overleaf Professional accounts for all students, faculty and staff who would like to use a collaborative, online LaTeX editor for their projects. Overleaf Professional accounts provide real-time track changes, unlimited collaborators, and full document history.

Overleaf is designed to make the process of writing, editing and producing your research papers and project reports much quicker for both you and your collaborators. Overleaf can also be linked to other services such as reference managers to best fit into your workflow.

Claim your free Overleaf Professional account on Overleaf by signing up. You'll need to verify a NYU email address in order to receive your free Overleaf Professional account.