John K. Kimani, Ph.D.
How to Install LaTEX on your Computer

While many a time you might be in need of writing professional or at least good looking documents, articles, reports or books, you might consider looking into LaTEX. LaTeX is a high-quality typesetting system for document preparation that can be used in numerous fields. Bellow is short tutorial on how to install it and get it going on your computer.

First, you need to get the LaTEX distribution and a text editor. Some distributions come with inbuilt text editors that can be good or not so good. For Windows users I recommend MiKTeX distribution found here, and for Mac users there is the MacTeX distribution found here. The Texmaker text editor for both is found here. MiKTeX does come with it’s own text editor but I found Texmaker easier to use and monitor your progress with document previews and pdf files.


Install LaTEX on Windows or MAC
1. Download and install the MiKTeX distribution from here or the MacTeX from here.
2. Download and install the Texmaker editor from here.
3. See how to configure and get started below

Install LaTEX on Ubuntu Linux
For Linux users, the recommended LaTEX distribution is TexLive and Texmaker for the text editor. Another distribution "Lyx" exists that's more common for beginners who would want to see what they are typing hence called "WYSIWYG " (What You See Is What You Get) and avoid the mark-up language. For the rest of us who enjoy coding (very easy to learn in this case), here is how to get it in Ubuntu Linux

1. Install TexLive
On the command terminal, copy and paste this command or type it in as it is:
sudo apt-get install texlive-full
It might ask for your sudo (super user) password and if you want to part with a few hundred megabytes of your disk space which you say 'Y' for yes. By the way, this installation may take some time so plan to be doing something else as you wait.
2. Install Texmaker
For the text editor, I recommend Texmaker, a cross-platform open source LaTEX editor. On the command terminal type or copy and paste this command:
sudo apt-get install texmaker
Again, it might ask for your 'sudo' password and if you want to part with a few megabytes of your disk space. Say 'Y' for yes and you'll have Texmaker in a few minutes.
3. Refer below on how to get started with your first document.

Configure Texmaker before you start working.

Open Texmaker from the desktop icon or from the programs menu. On the menu bar, select "Options" "Configure Texmaker". From here, you can configure
  • How your commands will be interpreted
  • The Quick Build sequence of commands
  • Text editor properties, and
  • Shortcuts
For now, we will configure the first two.
1. Configure the "Commands" by making sure that the "PDF Viewer"; is set to "Built-in-Viewer" and the "Embed" checkbox is checked if there is one.
2. Configure "Quick Build" by setting Quick Build Command to "PdfLaTeX+View PDF" if not already set.

For more details on configurations, see this short manual here.
Create your first document
LaTEX uses a typesetting markup language coded on the text editor (like Texmaker). The code is transformed into various formats and it's easier to configure it to display a pdf output in one click using the Quick Build setup. If you have done everything correctly so far, you can now start producing your documents in LaTEX. Here is how to make a simple first document:
1. Open Texmaker from the desktop shortcut or the programs list.
2. Go to 'File' menu and click on New
3. Then write the following code

\documentclass{article}
\begin{document}

Hello world! This is my first document today, \today

\end{document}


Now save the document as a '.tex' file going to File, Save.
4. Finally, compile the document by clicking the arrow on "Quick Build" or going to "Tools""PDFLaTeX" followed by "Tools""View PDF" . This should create a 'pdf' file for preview that is saved in your current folder.

NOTE:
IEEE offers template files to use for their journals, conference proceedings, and bibliography for citing in IEEE format. These can be downloaded from the IEEE site here. The download comes with instructions and tutorials that are very helpful. If you are on a Linux platform, you can install the IEEEtran class files following the same procedure used in installing LaTEX in Ubuntu above. Simply, type the following command on the command terminal to install the texlive-publishers package which has the IEEEtran classes. (It also has a number of other thesis/document formats too)

sudo apt-get install texlive-publishers
Type is your sudo password if asked and say 'Y' for yes to allow it to take some disk space.

I haven't tried any of these in Mac computers but the process might be similar to what you do for Windows but when you download make sure to get the right downloads for Macs. Same with other versions of Linux but I believe the same commands used in Ubuntu will work to get LaTEX setup.
Aslo, in Ubuntu if you don't want to use the command terminal to install LaTEX you can just go to the 'Ubuntu Software Package Center' and search for the LaTeX (TexLive) distribution and Texmaker editor and installs them from there.
There are may helpful resources on the internet and books available too depending on your needs, but for now,......

Have fun!