Understanding LaTeX

LaTeX has been around since the early 1980s and has quite a following among the scientific community, especially mathematicians and engineers.   The following is a brief look at LaTeX, how it works, and its benefits to librarians.  For in-depth instruction visit ShareLaTeX or download The Not So Short Introduction to LaTeX 2e.

LaTeX is a markup language for creating professional looking documents based on content and structure not layout. For non-coders it looks complex, but it really isn’t.  Let’s look at a sample code.

Sample Code
Figure 1: Sample Code

The first section is called the preamble where one defines the document in terms of type, author responsibility, title, packages, etc. In this sample the type is article but there are other choices available such as book, slides, letter, proceedings, reports and others.   Packages are additional predefined instructions in a separate file that are called into use.  For example, the babel package allows for writing in different languages.  The document text follows the preamble along with commands that create structure. Commands are preceded with backslashes.  When ready, the file is compiled, and a pdf document is rendered. (Figure 2)

Figure 2: PDF output
Figure 2: PDF output

A number of complex layouts have been predefined thus, giving the author freedom to focus on the content. As an author, you tell LaTeX, using simple commands, where you want to insert lists, equations, tables, chapters etc.   Each time you compile the file, commands are executed rendering a new pdf.  This is useful when changes or updates affect the structure of a document.     Let’s say you have several equations in your document, each one is numbered, and you refer to them throughout the document.  After much work you realized that you are missing an equation.  All that is needed is to add it to the correct location with corresponding commands.  LaTeX will update the document and all references.

The power of LaTeX is even more evident in its approach to mathematical typesetting.  WYSIWYG applications like MSWord do a poor job at displaying mathematical equations. This is where LaTeX excels.  It uses an extension package from the American Mathematical Society to define structure and layout.  Figure 4 is an example at how a LaTeX script translates into a clear written formula.

Figure 3: Script & Output for Quadratic Formula using LaTeX
Figure 3: Script & Output for Quadratic Formula using LaTeX

LaTeX is a powerful tool for the scientist and it should follow that it’s beneficial for the science librarian.  Many science publishers now require authors to submit papers in LaTeX format.  LaTeX predefined packages make writing papers, citing, referencing, graphing and creating bibliographies simple tasks.  As our patrons rely on this tool, we need to support its usage through marketing, instruction, and development.  Librarians can also benefit from LaTeX for our own publication efforts; manuals, resumes, articles, grants, policy documentation, lesson planning and other document types.  Complex and extensive content is best served by LaTeX.

There is a steep learning curve and for many this is a deterrent.  It takes a bit of time, patience, and practice to fully master LaTeX but the end result is worth it.

To run LaTeX you need to download an editor such as TEXMAKER.  A Google search will result in many other program options.  Or, you can try your hand at using online tools such as ShareLaTeX or Overleaf.


Ana Torres, Assistant Head, Dibner Library, NYU Division of Libraries

We welcome your comments and suggestions. If you have a resource that you would like to see highlighted please leave us a comment.


One thought on “Understanding LaTeX

  1. Becca February 16, 2018 / 12:16 pm

    This is extremely helpful! Thanks!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s