Your support for our advertisers helps cover the cost of hosting, research, and maintenance of this document
Formatting Information — An introduction to typesetting with LATEX
Appendix A: Installation
Section 2: Installing the software
In this section…
A.2.1 Unix and GNU/Linux
Users of modern GNU/Linux systems may not even need the TEX Collection DVD, as TEX installation packages are available online, built into the package manager for your system (see the note ‘Choice of TEX Live for Linux users’ above).>
If your system has a graphical package manager (eg Synaptic or Software, see Figure A.1 above), run it and install texlive-full (Ubuntu etc) or texlive-scheme-full (Red Hat etc), ghostscript, gv, okular, biber, kile (or texstudio or emacs), and jabref. Some of them may already be installed on your system. Go and have a cup of coffee while they automatically install all the necessary components.
The Ubuntu Software Centre only allows one package to be installed at a time, so you may prefer to use a typed command in a console window (other Linux users may prefer this approach anyway). The command name varies from distribution to distribution; but two common ones are apt (Ubuntu) and dnf (Red Hat):
sudo apt install texlive-full biber ghostscript gv \ okular biber kile texstudio emacs jabref sudo dnf install texlive-scheme-full biber ghostscript gv \ okular biber kile texstudio emacs jabref
Unfortunately, the Okular and Evince PDF/DVI viewers have cumbersome interfaces: Okular prematurely replaced two older and much better-designed viewers, kdvi and kpdf; but you could install qpdfview instead, which is faster and lighter.
Unix and GNU/Linux installers
I strongly recommend this method for most GNU/Linux users. You should only need to install from the TEX Collection DVD if you are using an older, hand-built, or commercial Unix system which has no package manager, or where the version provided by the package manager is seriously out of date.
The date of the version can be a drawback: the Linux repository versions of TEX Live can be up to a year out of date, because of the enormous volunteer effort required to put them together. For new users this should not be a concern, as most updates do not seriously affect core facilities. If there are very recently-updated packages you badly need, you can install them separately, using the instructions in § 3.2 above.
If you do decide to switch to the TEX Live DVD or download, make sure you completely uninstall and purge the texlive-full or texlive-scheme-full package first, otherwise your system will get hopelessly confused. This will leave your system in a conflicted state, because to preserve dependencies it will want to uninstall all the packages above that depend on TEX. The solution is a ‘shim’ Debian package that pretends that the Debian distribution of TEX Live is still installed, while actually using the DVD-installed version.
After installation, run texconfig (see Figure A.2 below) in a terminal window to adjust your local settings. This is a console utility, so type texconfig just to adjust your own personal settings, or sudo texconfig to adjust them system-wide (for all users). In the utility, use the arrow keys to go up and down the options, and the TAB key to jump to (and switch between) the , , and other ‘buttons’ at the foot of the screen. The spacebar or the Enter key selects a menu item or button. Most settings are correct as installed, but you might want to change one of the following:
the first option, DEST, lets you specify whether you normally want to print straight onto the printer, or ‘print’ into a file (to attach to email or upload somewhere)
the default paper size (the PAPER option), if the installed size is not your most common one (A4 or Letter)
the printer resolution (the MODE option), where you can adjust your printer settings; this allows you to fine-tune it for, say, a typesetter that you want to send output to instead of your own printer;
in the DVIPS option you can adjust your printer OFFSET (left and top margins), which is useful for older, less accurate printers.
You may also need the REHASH option later on. It is used to update TEX’s fast-find database (see step 4 above) on multiuser shared systems after adding new or updated packages.
Figure A.2: Running the post-installation program texconfig
If your printer is a conventional home or office ink-jet or laser printer, and is not shown, the LaserJet5 setting (600dpi) is probably a good bet. While still in the utility, you can test the margin settings in another window by running the testpage.tex document through LATEX (by typing latex testpage and responding to the questions about paper size and double-sided printing). Print the resulting .dvi file with the command dvips -f testpage | lpr and adjust the margins in texconfig if necessary. These adjustments are not usually needed with PDF output.
A.2.2 Apple Mac OS X
Double-click the MacTeX-yyyy-DVD.mpkg package in the mactex folder of the TEX Collection DVD (replace the yyyy with the year of your distribution as shown on the DVD sleeve). Install the package in the normal Mac way by dragging the package icon onto the hard disk icon.
If you don’t have the DVD, download the MacTeX.pkg package from http://tug.org/mactex/mactex-download.html and click it in your Downloads to start the installation.
Depending on how your Mac is set up, you may be asked to download and install the developer tools during the TEX installation. Do so.
When it’s all finished, open your Applications folder in the Finder and go to the TEX subfolder and drag TEXshop out onto your Dock. TEXshop is the editor supplied with MacTEX which you use for writing your documents.
If you are going to use Adobe Acrobat Reader instead of Preview, make sure you clear the font cache and set the resolution to the system default (112dpi) otherwise you may get very weird displays.
If you are using the El Capitan version of the operating system, it is possible that TEXshop will not recognise the folder where MacTEX installed the system. If you get an error claiming your preferred LATEX engine does not exist in /usr/texbin, then use the TEXshop menu to change the first Path Setting to /Library/TeX/texbin.
If you are unused to installing Mac software, here’s a click-by-click guide:
A.2.2.1 Download the MacTEX installer
In the TEX Users Group web page for MacTEX at http://tug.org/mactex, click on MacTEX Download
TUG MacTEX page Click on the MacTeX.pkg link to download the installer
MacTEX download page The installer will be downloaded into your Downloads area
Mac Downloads area
A.2.2.2 Running the installer
Click on the Downloads icon to see the package and click on it to start installation
Click to start the installation The Introduction screen explains what to do
Introduction screen The ReadMe screen lists what will be installed
readMe screen The License screen explains your rights: read it
License screen Click Agree to continue
License agreement The Destination screen lets you choose where to install. Normally you want to install for all users, even if you are the only user on the machine
Destination screen Pick the Standard Installation
Standard installation Wait while the files are installed
Installation progress Install the developer tools (this step will not occur if you have them already installed)
Developer tools prompt Agree to the developer tools license
Developer tools license The installer will check the location of the developer tools
Software location The developer software will be installed
Developer software installation continues The MacTEX installation scripts will be run
Installation scripts The developer software installation will continue
Developer installation The MacTEX installer will complete
Installation finished You can now dispose of the installer package
Move the installer to the Trash
A.2.2.3 Move the TEXShop editor into the Dock
Open the Finder and locate the TeX folder in Applications. In it is the TEXShop application
Locating the TEXShop application Drag and drop the TEXShop application into your Dock
TEXShop in the Dock
A.2.2.4 Testing MacTEX
\documentclass{article} \begin{document} Hello, World! \end{document}
Click TEXShop in the Dock to open it. Type the 4–line document as shown above
Editing a test document Set the LATEX processor to XƎLATEX in the drop-down menu and click . You will be asked to name and save the document: type a name, check the Encoding is set to UTF-8, and click Save
Saving and typesetting The processing log will record what LATEX does (this is also where any error messages get shown)
Processing log The typeset document is shown in a Preview window
Typeset document
A.2.3 Microsoft Windows
You can install MiKTEX from the TEX Collection DVD or by download from the MiKTEX web site.
A.2.3.1 Installing from the DVD with Autorun turned on
If your system has auto-run enabled, inserting the TEX Collection DVD should start the setup program automatically. Click on the button to start. Continue from § A.2.3.6 below below.
If your system has auto-run turned off, insert the DVD, go to the protext folder, and double-click on the Setup.exe program as shown in Figure A.3 below. Continue from § A.2.3.6 below below.
Figure A.3: The ProTEXt setup program on the TEX Collection DVD
A.2.3.3 Downloading the ProTEXt installation program
Skip this if you have the TEX Collection DVD and go straight to § A.2.3.6 below
In the TEX Users Group web page for proTEXt at http://tug.org/protext/, click on download the self-extracting protext.exe file
Click on the protext.exe link to download the installer
proTEXt download page The installer will be downloaded into your Downloads area
Windows Download When it has finished downloading, wait while it is checked for malware. When the
button appears, click it to start installation.You may be challenged by Windows Security asking if it is OK to run this program. Answer
Download finished
A.2.3.4 Extracting the installation files
The first thing is to extract the installation files. Click on
to pick a folderUnpacking folder choice Choose your Downloads folder and click
Selecting the folder to unpack to Click
to start extracting the installation filesReady to extract the installation files The installation files will be unpacked to the folder you chose
Unpacking the installation files
A.2.3.5 Locating your unpacked installation files
When unpacking has finished, run your File Explorer. In older versions of Windows, this was called My Computer or just Computer
File Explorer in the Windows 10 menu (lower left corner) Go to the folder where you unpacked the installation files and double-click on Setup.exe
The folder where you unpacked the installation files
A.2.3.6 Installing proTEXt
By now you should be able to double-click the Setup.exe program in the proTeXt folder.
In the ProTEXt setup window, select your language and click on the MiKTEX button
Installation of ProTEXt Click in the box to accept the MiKTEX licence and click to continue
Accepting the MiKTEX licence Make sure the Complete MiKTEX option is selected and click to continue
Selecting the complete installation Choose a private installation or one that everyone who uses your computer can use, and click
to continuePrivate or shared use Accept the installation folder that MikTEX suggests (unless you are an expert or have a special disk setup) and click to continue
The MiKTEX installation folder In the Options screen, select your paper size (A4 or US Letter), and whether or not you want extra packages to be downloaded and installed automatically (Yes or No) — on a laptop where a network connection is not always present, choose ‘Ask first’ instead, then click
to continuePaper size and package installation options Finally, accept the settings as shown (or change them by clicking
), and then click to start the installation processReview your installation settings During installation, MiKTEX will list the files it is installing and show a progress bar
MiKTEX installing When it is all done, wait while it indexes your fonts, then click
Finishing the installation Click TEX
to finish the installation of MiKClosing the installation
A.2.3.7 Installing TEXStudio
Go back to the ProTEXt setup window and click on the TEXStudio button
Starting TEXStudio installation The TEXStudio installation program will start and ask you to select the language to use during installation and click to continue
Selecting the language to use during TEXStudio installation Click
in the following screen to continueThe TEXStudio installation introductory screen Accept the installation folder that TEXStudio suggests (unless you are an expert or have a special disk setup) and click to continue
The TEXStudio installation folder Also accept the suggested location for the TEXStudio shortcut and click to continue
The TEXStudio shortcut Add icons to your desktop and Quick Launch bar by selecting the boxes, then click
to continueSetting icons Finally, accept the settings as shown (or change them by clicking
), and then click to start the installation processReview the settings Wait a few moments while TEXStudio installs
Installing TEXStudio When it is all done, click TEXStudio will start
andFinishing installation of TEXStudio Close down the installer
Exit the installer
A.2.3.8 Verifying the version of TEXStudio
If there is a new version available, you will be notified. You download it from the TEXStudio web site at http://texstudio.org/ as described below
New version available If TEXStudio claims it cannot find the installation of LATEX, it is out of date and should be replaced by an updated version from their web site as described here
Error message from an obsolete version Download a new version from the TEXStudio web site at http://texstudio.org/. Click on to get the latest version
The TEXStudio web site Downloading a new version of TEXStudio
Downloading from SourceForge When the download has finished, click
Starting the installation from a downloaded copy
Continue the procedure from step 2 above.
A.2.3.9 Testing TEXStudio
\documentclass{article} \begin{document} Hello, World! \end{document}
When TEXStudio runs, click and type the 4–line document as shown above
Editing a test document Click the XƎLATEX
menu and set the processor (Default Compiler) toChanging the default compiler Typeset the document by clicking on the green double-arrow icon (Build & View)
Shortcuts make life simpler
New shortcuts in TEXStudio
One last thing to do: add a Personal TEX Directory for extra downloads such as additional fonts.
MiKTEX and TEXnicCenter
If you plan on using the TEXnicCenter editor instead of TEXStudio, you must make sure when you install MiKTEX, that you make a careful note of the folder you install MiKTEX into because you will need that later, when you run TEXnicCenter for the first time after installation. It should be something like C:\Program Files\MiKTeX 2.9\miktex\bin (or a later version number, if this has moved on since the time or writing). You need to know this, because TEXnicCenter won’t guess it for you.