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

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

Figure A.1: Installing TEX Live from Synaptic, an Ubuntu package manager


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 OK, Cancel, 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 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 PreferencesEngine 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

  1. In the TEX Users Group web page for MacTEX at, click on MacTEX Download

    TUG MacTEX page


  2. Click on the MacTeX.pkg link to download the installer

    MacTEX download page


  3. The installer will be downloaded into your Downloads area

    Mac Downloads area


A.2.2.2 Running the installer

  1. Click on the Downloads icon to see the package and click on it to start installation

    Click to start the installation


  2. The Introduction screen explains what to do

    Introduction screen


  3. The ReadMe screen lists what will be installed

    readMe screen


  4. The License screen explains your rights: read it

    License screen


  5. Click Agree to continue

    License agreement


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


  7. Pick the Standard Installation

    Standard installation


  8. Wait while the files are installed

    Installation progress


  9. Install the developer tools (this step will not occur if you have them already installed)

    Developer tools prompt


  10. Agree to the developer tools license

    Developer tools license


  11. The installer will check the location of the developer tools

    Software location


  12. The developer software will be installed

    Developer software installation continues


  13. The MacTEX installation scripts will be run

    Installation scripts


  14. The developer software installation will continue

    Developer installation


  15. The MacTEX installer will complete

    Installation finished


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

  1. Open the Finder and locate the TeX folder in Applications. In it is the TEXShop application

    Locating the TEXShop application


  2. Drag and drop the TEXShop application into your Dock

    TEXShop in the Dock


A.2.2.4 Testing MacTEX

Hello, World!
  1. Click TEXShop in the Dock to open it. Type the 4–line document as shown above

    Editing a test document


  2. Set the LATEX processor to XƎLATEX in the drop-down menu and click Typeset. 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


  3. The processing log will record what LATEX does (this is also where any error messages get shown)

    Processing log


  4. 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 Open proTeXt 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

  1. In the TEX Users Group web page for proTEXt at, click on download the self-extracting protext.exe file

    The TUG web site proTEXt page


  2. Click on the protext.exe link to download the installer

    proTEXt download page


  3. The installer will be downloaded into your Downloads area

    Windows Download


  4. When it has finished downloading, wait while it is checked for malware. When the Run button appears, click it to start installation.

    You may be challenged by Windows Security asking if it is OK to run this program. Answer Yes

    Download finished


A.2.3.4 Extracting the installation files

  1. The first thing is to extract the installation files. Click on Browse to pick a folder

    Unpacking folder choice


  2. Choose your Downloads folder and click OK

    Selecting the folder to unpack to


  3. Click Extract to start extracting the installation files

    Ready to extract the installation files


  4. The installation files will be unpacked to the folder you chose

    Unpacking the installation files


A.2.3.5 Locating your unpacked installation files

  1. 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)


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

  1. In the ProTEXt setup window, select your language and click on the MiKTEX Install button

    Installation of ProTEXt


  2. Click in the box to accept the MiKTEX licence and click Next to continue

    Accepting the MiKTEX licence


  3. Make sure the Complete MiKTEX option is selected and click Next to continue

    Selecting the complete installation


  4. Choose a private installation or one that everyone who uses your computer can use, and click Next to continue

    Private or shared use


  5. Accept the installation folder that MikTEX suggests (unless you are an expert or have a special disk setup) and click Next to continue

    The MiKTEX installation folder


  6. 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 Next to continue

    Paper size and package installation options


  7. Finally, accept the settings as shown (or change them by clicking Back), and then click Start to start the installation process

    Review your installation settings


  8. During installation, MiKTEX will list the files it is installing and show a progress bar

    MiKTEX installing


  9. When it is all done, wait while it indexes your fonts, then click Finish

    Finishing the installation


  10. Click Close to finish the installation of MiKTEX

    Closing the installation


A.2.3.7 Installing TEXStudio

  1. Go back to the ProTEXt setup window and click on the TEXStudio Install button

    Starting TEXStudio installation


  2. The TEXStudio installation program will start and ask you to select the language to use during installation and click OK to continue

    Selecting the language to use during TEXStudio installation


  3. Click Next in the following screen to continue

    The TEXStudio installation introductory screen


  4. Accept the installation folder that TEXStudio suggests (unless you are an expert or have a special disk setup) and click Next to continue

    The TEXStudio installation folder


  5. Also accept the suggested location for the TEXStudio shortcut and click Next to continue

    The TEXStudio shortcut


  6. Add icons to your desktop and Quick Launch bar by selecting the boxes, then click Next to continue

    Setting icons


  7. Finally, accept the settings as shown (or change them by clicking Back), and then click Install to start the installation process

    Review the settings


  8. Wait a few moments while TEXStudio installs

    Installing TEXStudio


  9. When it is all done, click Finish and TEXStudio will start

    Finishing installation of TEXStudio


  10. Close down the installer

    Exit the installer


A.2.3.8 Verifying the version of TEXStudio

  1. If there is a new version available, you will be notified. You download it from the TEXStudio web site at as described below

    New version available


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


  3. Download a new version from the TEXStudio web site at Click on Download now to get the latest version

    The TEXStudio web site


  4. Downloading a new version of TEXStudio

    Downloading from SourceForge


  5. When the download has finished, click Run

    Starting the installation from a downloaded copy


Continue the procedure from step 2 above.

A.2.3.9 Testing TEXStudio

Hello, World!
  1. When TEXStudio runs, click FileNew and type the 4–line document as shown above

    Editing a test document


  2. Click the OptionsConfigure TeXStudio menu and set the processor (Default Compiler) to XƎLATEX

    Changing the default compiler


  3. Typeset the document by clicking on the green double-arrow icon (Build & View)

    Your typeset document appears in a PDF window


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