About Me

My photo
Delhi, NewDelhi, India
I am currently pursuing my Ph.D from IIT Delhi. I started blogging so that people don't face much of a hassle in finding solutions to problems that I've already faced and sorted out. Problems could be either hardware or software. Of late, it's becoming a hobby, especially after I received an e-mail from an anonymous reader from Germany who found one of my blog entries very useful.

Friday, July 9, 2010

Latex Tutorial: Lecture 1

OK guys. I've decided to write a series of blogs on how to start using LaTeX. This is for people who are willing to make a switch from MS-WORD/Open-Office/Pages to LaTeX to prepare their complex documents. The reason I use the word 'Complex' will be evident either later in the post or some other post that I will write later. First up, I'll cover the installation part on 3 Operating Systems (Mac OS X, Windows and Linux). This will be equivalent to overcoming a major hurdle for newbies (That's how I felt when I began learning LaTeX). Installing is not difficult, but a bit confusing. Hence, I've decided to dedicate a complete post to that. I plan to go in a step-by-step manner on how LaTeX works. Firstly, I'll start off by showing y'all a picture I came across on the Internet. This picture summarizes the need to make the switch when preparing complex documents.

The most important advantage of LaTeX is that you need not worry about formatting the document. Globally specified, the formatting remains the same throughout the document. Just worry about the CONTENT. Preparing complex documents like, say a Book, becomes a tedious task once you have to keep adjusting the position of text relative to the figures and tables in the document. You end up spending more time formatting the document than adding content to it. More on the advantages sometime later. My attempt here is to encourage more people to use LaTeX. This post is not to condemn or highlight the short-comings of Word processors. Every person has their own comfort zone and being a tech geek, I would prefer preparing complex documents in LaTeX. For people who are not tech-savvy, better stick to word processors. So, decide if you are willing to give LaTeX a try before continuing to read further.



INSTALLATION

We can divide LaTeX installation into two parts. 1) Installation of packages and associated files required to run LaTeX. (This is sufficient to run LaTeX). 2) An editor where you can type-set your document. An OS like Linux/MAC OS X has built-in editors like 'emacs' that can help you compile LaTeX documents. For those who are not too familiar with the Command Line Interface (CLI), I would suggest you to follow both the steps. We can compare steps 1 and 2 to a C compiler. To run a C program, one requires a C compiler. Turbo C/C++ forms both the editor and Compiler. You require a compiler to run your documents, even if you don't use the Turbo C/C++ editor. The packages and associated files can be equated to the compiler. Editors gives you varying degrees of satisfaction with some enhanced features and wizards in typesetting documents. To start off, I would suggest that you follow both steps . If you are familiar with emacs or other editors and don't have a problem using the CLI, then you can stop with step 1.

MAC OS X

Way back in 2006, the Apple Blog (TAB) had a post on the options available for installing and using LaTeX on MAC OS X. Since I've never used LaTeX on MAC OS, I would summarize what that post contains. MacTeX is a package that is most useful to start-off with. It contains both the packages and the editor. Just give a default install when doing it for the first time. As and when you become familiar with LaTeX and become comfortable with the word 'Packages', you can explore the package manager. For now, just remember that packages are add-ons that allow additional functionality. You will understand what packages do once you have a firm grip on the basics.

Windows

Two popular Package managers in Windows are MikTeX and TeXlive. TeXlive is available for download as an ISO image and will be helpful if you need to install additional packages. Additional packages available on CD can be installed directly. Since the list of packages is exhaustive, you may not find all the packages on the CD. Only the most popularly used packages are available on the CD. MikTeX requires the internet for installation of additional packages. This is by no means an exhaustive list of package managers on the Windows platform. There could be others that I am not aware of. An advantage of using the popular ones is that you can be sure of having the latest packages installed. There are many editors available out there and I will be sticking to the ones I have used. WinEdt is a popular one but pricey. The Windows equivalent of Kile (see below) is TeXmaker. It is an open-source editor.There are a variety of editors available for Windows. I use LaTeX on linux and am not aware of other Windows TeX editors.

Linux

Since I am a fan of Ubuntu, the installation instructions that I give out will be keeping Ubuntu in mind. The procedure could be slightly different for other Linux OSs. Every linux OS is equipped with a package manager (Synaptic in Ubuntu). It contains a complete list of software that is installed on the machine and that is available for installation. Later versions of Ubuntu have a graphical interface for installing software via the Ubuntu Software Center. For newbies, I would recommend using the latter option, which is hassle free. Search for TeXlive (which is the default package manager for LaTeX in Linux). MikTeX is not available and for the other package manager for linux, TeTex, development has been stalled. I recently read a post where they've mentioned that the other Linux OSs that used TeTex are also migrating to TeXlive. Kile is a really good editor for Linux. Apart from a smooth interface, it possesses some nice tools which saves you a lot of time when typesetting documents. There is a Windows equivalent for Kile which is called TeX Maker. My suggestion would be to install Kile as the editor. There are other editors too, but my personal preference would be Kile. The best way to install LaTeX in linux is to install Kile. All the necessary files are installed along with it.

Finally, I've reached the end of my post. Please post your comments/suggestions/questions if any to help me improve my posts. Also tell me if the installation worked for you (If you reached the end of the document). ;)

4 comments:

  1. well explained. i want to write my CV using this to start with

    ReplyDelete
  2. Hi Frank. Thanks for posting a comment. You can prepare Resume/CV using latex. I haven't tried it myself, but I guess it's pretty easy. I've found 2 useful links via a google search. Since LaTeX is open-source, you can find a lot of help on the internet. Hope this helps.

    Link 1: http://rpi.edu/dept/arc/training/latex/resumes/
    Link 2: http://www.tedpavlic.com/post_resume_cv_latex_example.php

    ReplyDelete
  3. How about a back-link to the source of the picture? Regards, the author.

    ReplyDelete