# Installing a TeX System

## Background

A TeX system allows you to use macro packages like LaTeX or ConTeXt for mathematical typesetting. Your TeX source document is a text file containing TeX markup. This source file is subsequently compiled into a viewable and printable PDF output document.

The instructions on this page are for a TeX system installed as locally-running software on your own computer. As an alternative, there exist cloud-based TeX systems, such as CoCalc and Overleaf.

A working installation of TeX typically comprises three main components:

• the underlying “TeX engine system” or “TeX distribution” — the collection of programs, fonts, configurations, and header files necessary to process a TeX source file to produce a PDF output file; and,
• the “TeX input editor” — a text editor with specific features that aid in writing TeX source files (such as syntax highlighting and macro menus) and aid in compiling TeX source files by having buttons that automatically invoke the underlying TeX engine system and then open the PDF output; and,
• a “PDF output viewer” — this viewer might have specific features that let you magnify equations or click on a piece of output and then jump to the corresponding input in the TeX editor.

TeX distributions typically come with a TeX input editor and a PDF output viewer. If you elect to substitute a different TeX editor and/or different PDF viewer, then additional configuration may be necessary to ensure the components can locate each other.

## Step-by-step Installation Instructions for each Operating System

Disclaimer: Our instructions involve making changes to your computer such as installing/removing programs, downloading files, and setting options. Please realize that preexisting problems or unforeseen computer configurations may lead to unexpected results. Our department IT staff can assist with some problems but cannot fix large problems on personal computers.

### Microsoft Windows

Note: The instructions below are from 2016. Since then, the proTeXt distribution (https://tug.org/protext/) has become available, and might be an easier alternative to the instructions below.

Miktex 2.9 will be used as the TeX system. TeXMaker will be used as the TeX editor. TeXMaker includes a built-in PDF viewer. Ghostscript and Ghostview will be used as the Postscript system. TeXMaker will attempt to automatically adjust its settings for use with Miktex, Acrobat Reader, and Ghostview.

Note that the Miktex download is large ( 1000MB ) and can take some time.

It is assumed that the person installing these programs has ‘admin’ rights to the computer.

1. Go to < miktex.org >. Click “Download” at the top. Look for the heading called “Other Downloads” and click on that to expand the list. Find the option called “Net installer” which should look something like "Miktex 2.9.5721 64-bit Net Installer". Save this small file to your computer.
NOTE: Be aware that there is no notification that the download has completed. Upon completion, the Next button will be clickable.
3. Run the same installer again. Instead of choosing to download Miktex, choose to install Miktex. Choose the complete Miktex install. Choose to install for all users of the computer. For the question “Install Miktex From,” choose the folder that was selected in the previous step b., where the downloaded files were saved, and click next. Leave the install folder at the default location.
IMPORTANT: Select ‘letter’ size paper instead of A4. Select “Yes” For the question, “Install missing packages on-the-fly.”
NOTE: Be aware that there is no notification that the installation has completed. Upon completion, the Next button will be clickable.
4. The folder with the downloaded files, and the small downloader program may be moved or deleted. These files are not needed for TeX to work.
2. Verify MikTex settings:
1. - Options selected during install are sometimes not honored properly
2. Start the Miktex Settings program. Open the Windows Start menu then select  All Programs -> Miktex 2.9 -> Maintenance (Admin) -> Settings (Admin).
3. In the General tab, select “Letter” size paper, then click the “Refresh FNDB” and “Update Formats” buttons above.
4. Click OK to Exit.
1. - If you have a PDF printer installed, these programs may affect its operation. If there are problems after installing Ghostscript, re-install the PDF printer program.
3. Go to < pages.cs.wisc.edu/~ghost/ >.  Click on the link “ GSView 5.0”. At the top of the download page, click on the link for the Windows download, either 64-bit (gsv50w64.exe) or 32-bit (gsv50w32.exe). Again, most computers now are 64-bit computers.
4. Install Ghostscript. Run the setup program. Leave all the options at the default settings.
Windows 7+: You may see a screen asking if the install completed successfully. Choose the option to indicate that the install was successful
5. Install Ghostview. Run the setup program ( gsv50wXX.exe ). Leave all the options as default.
Windows 7+: You may see a screen asking if the install completed successfully. Choose the option to indicate that the install was successful. Both downloaded install files may be deleted after installation is complete.
3. Open TexMaker. At this point, the installation is complete. However, there may be some customization required. TeX editors do not always correctly auto-configure themselves to work with a given TeX system on a computer. TeXmaker seems to not auto-detect very well. Below are some tips for configuring TexMaker if there are problems. You will have to determine what needs to be done for your particular computer
5. Go to Options → Configure Texmaker.  Look for the box “Ghostscript” near the bottom-left. The path can be wrong in up to three ways:
• -bit  version wrong. For example,  “gswin32c.exe”  for 32-bit  and   “gswin64c.exe”  for 64-bit
[ C:/Program Files/gs/gs9.15/bin/gswin32c.exe ]  →  [  C:/Program Files/gs/gs9.15/bin/gswin64c.exe  ]

• Program Files folder is wrong. On 64-bit computers, 32-bit programs go in the “ (x86)” folder.
[ C:/Program Files/gs/gs9.15/bin/gswin32c.exe ]  →  [  C:/Program Files (x86)/gs/gs9.15/bin/gswin32c.exe  ]
• The version of ghostscript was not detected correctly. Go to the C:\Program Files\gs  folder to see the correct name
[ C:/Program Files/gs/gs9.07/bin/gswin64c.exe ]  →  [  C:/Program Files/gs/gs9.15/bin/gswin64c.exe  ]
6. Go to Options → Configure Texmaker.  Look for the box “DVI Viewer” on the right. The path can be wrong in up to two ways:
• Program Files folder is wrong. On 64-bit computers, 32-bit programs go in the “ (x86)” folder
[ C:/Program Files/Miktex 2.9/miktex/bin/yap.exe ]  →  [  C:/Program Files (x86)/Miktex 2.9/miktex/bin/yap.exe  ]
• For the 64-bit miktex, the program path is different than expected
[ C:/Program Files/Miktex 2.9/miktex/bin/yap.exe ]  →  [  C:/Program Files/Miktex 2.9/miktex/bin/x64/yap.exe  ]
7. Go to Options → Configure Texmaker. Look for the box “PS Viewer” on the right. The path can be wrong:
• -bit version wrong. For example,  “gsview32.exe”  for 32-bit  and   “gsview64.exe”  for 64-bit
[ C:/Program Files/Ghostgum/gsview/gsview32.exe ]  →  [ C:/Program Files/Ghostgum/gsview/gsview64.exe ]

### Apple macOS

MacTeX uses the TeX Live distribution and includes the TeXShop editor.

2. Double-click the downloaded MacTeX.pkg file. Proceed through the installation screens. When the installation is complete, there will be a subfolder called TeX in your Applications folder.
3. If you would like a convenience dock entry: from the Finder's Go menu choose Applications, then open the TeX folder, finally drag the TeXShop icon to your dock.
2. Update and configure your TeX system:
1. From the Finder's Go menu choose Applications, then open the TeX folder, then open “TeX Live Utility”.
2. If prompted, enable security validation of packages.
3. If prompted, allow any urgent updates to be applied.
4. From the TeX Live Utility menu, choose “Check For Updates...” and apply any updates that are found. This may quit and restart the TeX Live Utility program. In that case, again choose “Check For Updates...”, repeating the process until no updates remain.
5. From the Actions menu, choose “Refresh Packages List” followed by “Update All Packages” and confirm the subsequent prompts.
6. From the Configure menu, choose “Change Paper Size...”, ensure “Letter” is selected, then accept the choice. This will cause a cascade of updates during which there will be a spinning indicator near the top of the TeX Live Utility window. Wait for the indicator to disappear before quitting the TeX Live Utility program.
3. Update TeXShop:
1. From the Finder's Go menu choose Applications, then open the TeX folder, then open “TeXShop”.
2. If prompted, allow any updates to be applied.
3. To be certain, from the TeXShop menu, choose “Check For Updates...” and apply any updates that are found. Repeat this step until no more updates remain.

### Linux

Linux installations in the LSU Math Department use the TeXlive distribution and provide several TeX editors include Kile.

How you might install a similar such system on your own Linux-based computer depends on the flavor of Linux in use. See your distribution’s documentation or package listings for more information on where to find and install a TeX system.

On Linux systems based on Debian or Ubuntu, you typically would issue the following commands in a Terminal window:

```sudo apt update
sudo apt install texlive-full
sudo paperconfig -p letter```

You'll also want to install one or more TeX editors/previewers:

`sudo apt install kile texmaker texstudio texworks`