- Overview / Get Help
- Math Network Account
- Instruction Support
- Printing / Scanning
- Licensed math software
- Annual Inventory
- Other Resources
Installing a TeX System
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.
Tex install for Windows
"MiKTex" will be used as the TeX system. "Texmaker" will be used as the TeX editor. Texmaker includes a built-in PDF viewer.
A few notes:
- Miktex conveniently includes its own version of ghostscript as packages (miktex-ghostscript-bin-x64). One no longer needs to install Ghostscript separately. However, Miktex can be slow updating the included GS package. Currently the older GS in Miktex can cause some instances of PS to PDF conversion for some elements (like transparency) to not render correctly. If you use PS files (either directly or in DVI -> PS -> PDF or in EPS -> PDF processes), and you see problems, you may need to look into manually installing and configuring a current GPL Ghostscript version.
- To reduce complexity of this installation, there is no currently recommended PS (or EPS) file viewer. It is less common to work directly with these file types anymore. If you do want to work directly with PS files, see notes at the bottom of this instruction set.
- Generally, one should use "pdflatex" and PDF output for any current compilation output. These instructions leave out a number of points related to DVI output to reduce complexity.
- The complete MiKTex download is large ( > 4GB ) and can take some time.
- It is assumed that the person installing these programs has ‘admin’ rights to the computer.
The "Complete" miktex package is used. Although this downloads and installs a large amount of data, it provides the complete TeX system with all available packages. One could use Miktex's "Basic" or "Advanced" installs, which download a small subset of the TeX system and install other components as you invoke them. The downside to the install-as-needed method is that the installations only work if you have an internet connection at that moment (and a few other technicalities). The "complete" system might use space for packages never used, but it avoids future hangups.
- Go to < miktex.org >. Click “Download” at the top. Look for the heading called “All Downloads” and click on that to expand the list. Find the option called “Net installer”. Download this small file to your computer.
- Go to where the file was saved, and run the installer. Proceed through the initial setup screens. Choose to Download MiKTex instead of installing it. Select the complete install. When asked to choose a download server, choose a server in your country. Choose a folder to download to. Select “Start” to begin the Download. This will now download a large number of small files to the selected folder.
NOTE: Be aware that there is no obvious notification that the download has completed. Upon completion, the Next button will simply be clickable.
NOTE: If a download fails partway through, restart the download and choose a different server to download from.
- Run the same installer again. Instead of choosing to download MiKTex, choose to install MiKTex. Choose the complete MiKTex install. Choose to install only for the user (Miktex has a few design pitfalls that this choice works around, for single-user computers). 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:Assuming you are currently residing the USA, select ‘letter’ size paper instead of A4.
NOTE: Be aware that there is no obvious notification that the installation has completed. Upon completion, the Next button will simply be clickable.
- 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.
- Options selected during install are sometimes not honored properly
- Start the MiKTex Console program. To do this, either search for "miktex" in the Windows start menu or navigate to Miktex's program folder in the start menu list of all programs.
- Go to "Settings" on the left, then the "General" tab. Ensure that the paper size selection is correct.
- In the "Tasks" menu at the top, run both the "Refresh file name database" and "Refresh font map files" tasks.
- Go to < www.xm1math.net/texmaker/ >. Click on the Download link at the top. Look under the “Texmaker for Windows” heading, and download the Texmaker for windows .msi file.
- Run the downloaded file. Leave any settings at default.
- Open Texmaker. At this point, the installation is complete.
There may be some customization required for a TeX editor to correctly use an installed TeX system. Below are some tips for configuring Texmaker for miktex in Windows. You will have to determine what needs to be done for your particular computer
- Go to Options --> Configure Texmaker. Look for the box “Ghostscript” near the bottom-left. Change this to work with the Ghostscript included with Miktex:
- Edit the entry to be (including quotes): "mgs.exe"
- Explanation: Miktex adds its binary's path to the User or System path, therefore mgs.exe is in the path search. Miktex also renames the GPL ghostscript binary from the normal gswinXXc.exe name to mgs.exe (Miktex GhostScript) to avoid clobbering a manual ghostscript install.
- Go to Options --> Configure Texmaker. Look for the box “DVI Viewer” on the right. The path may be wrong, and including the full path is not necessary since the Miktex binaries folder is in the User or System path:
- Change the entry to be (including quotes): "yap.exe" %.dvi
- If you prefer the DVI viewer to reuse the same window each time you compile and view, use this command (note that the character is a 'one'): "yap.exe" -1 %.dvi
Regarding a Postscript viewer: The old Ghostgum GSView viewer is no longer maintained. The company that bought Ghostscript also no longer maintains a viewer, as of ~ 2019. There are many programs for Windows that will open Postscript files, but they are generally of the "AppStore" variety, Ad-supported, or otherwise unclear on the credibility of the authors. One can install and configure any PS viewer deemed appropriate from an app store or internet search.
Additionally, the old GhostGum GSView program found at < http://www.ghostgum.com.au/software/gsview.htm > does technically still work with Windows 10 or 11 as of this writing. If you want to use this, configure it to work with the Miktex ghostscript:
- Download and install the program
- Open the program and ignore errors
- Go to Options -> Advanced Configure
- Change the Ghostscript DLL path to point to the Miktex GS dll. The path will be something like: [ C:\Users\<username>\Appdata\Local\Programs\MiKTeX\miktex\bin\x64\mgsdll64.dll ]. If this doesn't work directly, you can search your user account (perhaps first going directly to the hidden folder C:\Users\<username>\Appdata\Local ) for the .dll file.
- Change the Ghostscript include path to be something like: [ C:\Users\<username>\Appdata\Local\Programs\MiKTeX\Ghostscript\base;C:\Users\<username>\Appdata\Local\Programs\MiKTeX\scripts\Ghostscript\bat ]
TeX install for macOS
MacTeX uses the TeX Live distribution and includes the TeXShop editor (as well as other utilities).
A few notes:
- MacTeX installs the applications and TeX system into locations other than "Applications". This means that fully removing the files from this install is not accomplished by simply dragging the "TeX" folder under /Applications to trash. However, dragging that folder to trash and leaving the other bits should generally cause no problems. If you really want to fully uninstall MacTeX, see this page: < www.tug.org/mactex/uninstalling.html >
- You may want to download and install a new MacTeX package every couple years, or if TeX stops working. Drag /Applications/TeX to trash, and install the new one, no need to fully un-install first. Apple has been making significant changes to macOS in the last number of years that breaks programs like TeX frequently, and updating will fix any problems.
- Go to < tug.org/mactex/ >, click on the link “MacTeX Download”, then on the link "MacTeX.pkg" to begin the download.
- 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.
- Go to the new TeX folder in /Applications, then open “TeX Live Utility”.
- If prompted, enable security validation of packages.
- If prompted, allow any urgent updates to be applied.
- 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.
- From the Actions menu, choose “Refresh Packages List” followed by “Update All Packages” and confirm the subsequent prompts.
- From the Configure menu, choose “Change Paper Size...”, ensure “Letter” is selected (or A4 if standard for your country), 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.
- Go to the new TeX folder in /Applications, then open “TeXShop”.
- If prompted, allow any updates to be applied.
- 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.
Tex install for Linux
Linux installations in the LSU Math Department use the TeXlive distribution and provide several TeX editors, including Texmaker.
To install a similar such system on your own Linux-based computer, 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:
Set the system-side paper default. Issue the appropriate command for your country. For example (only do one of the following):
sudo apt update sudo apt install texlive-full
sudo paperconfig -p letter sudo paperconfig -p A4
You'll also want to install one or more TeX editors/previewers:
sudo apt install kile texmaker texstudio texworks