LaTeX: A genuinely better way to prepare scientific documents

Whilst mustering the courage to begin my reclassification proposal in the winter of 2003 I came upon a reference to LaTeX, a typesetting and document formatting method popular among scientists and mathematicians. LaTeX was described as a highly robust way to prepare scientific articles, reports, and other documents. My interest was piqued, especially considering my fanatic attitude towards all things esoteric. Since then, I&ve used LaTeX for a number of tasks, and have become a convert along the way. This article will present a synopsis of LaTeX, as well presenting its beneficial attributes.

What is LaTeX?LaTeX (pronounced "lah-tek") is a macro package that simplifies the use of TeX (pronounced "tek"), which is a typesetting engine.From the perspective of a scientist, LaTeX is a method to create publication-quality documents with ease.It should be viewed as a software tool, much like any commerciallyavailable word processing package.
In a typical document-creation task in which LaTeX is utilized, a user would use the following methodology.The creation of an input file, conversion by the LaTeX / TeX engine, and review of the output.A schematic is shown in Figure 1, with details explained in the following sections.
Input file A document is created in ASCII format (plain text) using any program.Even a word processor such as MS Word can be used, provided the output is ASCII.The document will contain the content the user wishes to typeset, and it will also contain a variety of "tags" to mark up the file.These tags are read by LaTeX / TeX and are responsible for formatting, inclusion of symbols, and more.In long documents of mostly text, the tagging required is minimal.Insertion of images does take some extra work, but the method is quite robust.In creating the original file, many users prefer to use a LaTeX editor, that will have "shortcuts" and errorchecking built-in, to expedite the process.This document, written in the proper format, is now ready for processing by the TeX engine.

LaTeX / TeX
The file is then handed to the LaTeX macro package.In most editors, this is as easy as pressing the "typeset" button.The file is run through the TeX engine, and typically takes seconds to be completed.The output is a finished document file, usually a PDF, and auxiliary files, which monitor the progress of the TeX engine.If there was an error, one could check the corresponding log file to determine what the problem may have been.
What next?At this point, one could be finished.The TeX engine has been applied, and a finished file is ready to be sent off to the publisher, co-author, or supervisor.Or, one could just as easily continue to work on the text file, and run the TeX engine every now and again to check progress, and find errors in syntax.
How does LaTeX differ from Word Processors?First, let us consider the key similarity between typesetting and word processing: a user is able to put text on a page.They are able to control the content of the text, and continually revise and edit "on-the-go." LaTeX is a typesetting method, which differs from word processing in one main way: there is a clear separation of content and formatting.The benefits to science writers are profound.One can focus on the content of the document, perfect the prose, tweak the syntax and generally improve the readability of the content, without for a moment worrying about line spacing, paragraph format, numbering section headings, and so forth.The style that LaTeX applies is consistent, functional, and aesthetically pleasing.

Separation of formatting and content
The ability to disregard pesky formatting details in the creation of a long document is a huge benefit.One can focus on the most important part of the document: the content.One is assured of having a consistent style applied across the whole document, with minimal work on the part of the author.

Free
Unlike popular word-processing packages, whose cost easily soars into the hundreds of dollars, LaTeX editors, the main TeX engine, and copious amounts of documentation are all freely available.
Made for scientists LaTeX handles certain scientific challenges particularly well.These include, but are not limited to, referencing, figure and table numbering, equations, large image files, on-thefly format changes, and others.There are a host of extensions that have been written for LaTeX by scientists, and the list is growing.

Built-in referencing capability
For those of us dependent on the Word-Endnote duo, there is a LaTeX solution.References can be downloaded in BibTeX format, and documents can have references added with ease.BibTeX is an extension that has been written for the LaTeX macro package and is maintained as an open-source project as well.
Like in Endnote, the style of the references can be changed on the fly, and a database of articles can be built to be used with multiple documents.This functionality, along with other LaTeX extensions, is free.Speed LaTeX processes documents extremely quickly, and there is considerable time saved when the engine handles formatting details.This is to say nothing of the time saved not having to generate tables of contents or numbering manually.
Available for many machines Multi-platform compatibility is essential if you want to transfer your work across platforms, either personally or by sending to colleagues.

Reliability
Word processors are somewhat notorious for crashing the night before theses are due at the printer.Long documents and large images are a risky venture in most word processing systems, but not for LaTeX.
LaTeX files are ASCII ASCII files do not suffer from so-called version errors.They are a standard format that is instantly recognizable by editing programs ranging from the simple to the complex.In addition, if you see a particular aspect of a LaTeX-generated document that is appealing, it is simple to consult the original ASCII file and see how it was generated.
Can use the editor of your choice Since LaTeX involves the generation of ASCII files, one can use any editing program, even a word processor!So long as the output is ASCII, the program choice is largely a personal preference.

Disadvantages of LaTeX
Separation of formatting and content For some, LaTeX's major advantage could be seen as a disadvantage.When someone has been trained to use a word processor for years, the idea of typesetting can be somewhat challenging.Due to the prevalence of word processing packages introduced at a fairly young age, many people don't think in terms of separating formatting and content creation tasks.

Font selection is difficult
It is much more difficult to choose specific fonts in LaTeX, the program tends to display headings and text in its own way No WYSIWIG (what you see is what you get) front-end Though there are some word processors that are using the TeX engine (LyX, in particular), there are no WYSIWIG front-ends for the TeX engine.LaTeX / TeX purists would see this as a benefit, but some may not.
In those tasks when the look of the document is more important than the content, I would wholeheartedly endorse the use of a WYSIWIG program such as MS Word, Adobe Illustrator, or others.LaTeX does not excel in tasks that require precise control over the look of a document.Also, if one is simply creating a short, informal document, there is little advantage to using LaTeX.

Conclusion
I will concede that LaTeX may not be the word processor-killer that many tout it to be.Realistically, when one's focus in creating a document is style over content, then LaTeX is not the ideal choice.LaTeX should be reserved for documents in which content is more meaningful than style, and when consistency is desired.Longer documents that are destined to be of publication-quality (submissions to scholarly journals, scientific grants or proposals, and theses) are likely the ideal situations in which to use LaTeX.
It should be noted that many scientific journals accept LaTeX-formatted documents in their submission process.In fact, a number of journals have TeX "style files" that they will make available free of charge.These files, when read into the TeX engine with your document will alter the formatting of references and text to be consistent with their submission requirements.With minimal effort, a rejected manuscript can be quickly reformatted using a style file, and sent to another journal for consideration.
My suggestion?Give LaTeX a try, there is a learning curve to get used to the syntax and method, but the time and frustration saved in the long run is well worth the effort.

Figure 1 :
Figure 1: Information flow in the creation of a document using the LaTeX macro package and TeX engine.The final formatted document is usually in PDF or PostScript format, but can also be output in a manner of different formats.

Figure 2 :
Figure 2: An example of LaTeX-formatted document and its input text; left: input text, right: LaTeX output.
Photo by Michelle Sahai