How and why to write your research in LaTeX

Why and How to Write Your Research and Documents in LaTeX

The majority of research is still written up using Microsoft Word and Excel. Some researchers may also use Google Docs for its cloud-based flexibility, which is good for collaboration.

However, in STEM fields such as math and physics and HSS fields such as economics, the LaTeX package, largely unchanged since the 1990s, is no less popular. One estimate puts mathematics scholarly article with a LaTeX rate at over 95%! Its superior compiling and ability to handle equations make it a must.

What is LaTeX?

Actually pronounced “LAY-teck,” LaTeX an open-source document preparation system especially useful for technical and scientific topics. LaTeX is not actually a word processor by definition. The base documents are text files, and these are rendered as professional PDFs.

Preparing documents in LaTeX lets you flexibility write lengthy documents and automate processes like creating the table of contents and bibliography. The LaTeX interface facilitates text formatting and creating complex equations, tables, and diagrams through a series of text commands.

As we at Scize welcome documents in LaTeX and actually enjoy editing them on some of the more modern platforms, we want you to also see the advantages. Or just get a general idea of what this thing is.

Read on because this article will tell you that, and how to get started with LaTeX if you’re feeling geeky.

A deeper look at what LaTeX is

LaTeX is a standalone document preparation system consisting of a collection of programs to process documents. It is in fact a programming language. The original LaTeX typesetting system was written in 1994.

It gives users functional commands for formatting document requirements like headings, footnotes and bibliographies.

LaTeX gives clean, auto-updating bibliographies
A simple, clean bibliography rendered from LaTeX Source: Dirk Hünniger, CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0>, via Wikimedia Commons

It’s very commonly used to produce scientific documents and publications in the fields like physics, engineering, mathematics, statistics, and economics.

VERY commonly. One author came up with this chart:

Source: https://www.authorea.com/users/3/articles/107393-how-many-scholarly-articles-are-written-in-latex

Typically it’s best for documents with algebraic equations, charts, and many sections. This is why you’ll often meet PhDs, even in fields like medicine, who’ve never seen it. For math, physics, and engineering, it’s just common sense. That’s why you see that cliff-life dropoff after such fields.

That doesn’t do it justice, though.

While other typesetting options operate on a WYSIWYG (what you see is what you get) approach, LaTeX works with a code view made up of raw text and commands that control the final appearance of the document once it’s compiled.

Users produce the text in a plain editor, with the right coding. Or they use a UI that makes it easier to work with. LaTeX creates a structurally attractive, formatted PDF document.

Journals like the IEEE series also offer templates for authors to edit manually. This creates a consistent style and format that’s both good for authors and for journals.

IEEE offers LaTeX and Overleaf templates
The IEEE now offers both LaTeX and Overleaf templates, along with Word. (source: IEEE)

Why you should use LaTeX

Writing in LaTeX offers several advantages over other typesetting tools and word processing software, including:

  • Consistent typesetting
  • Control over large documents with many sections, references, tables/figures, etc, as well as images
  • Typesetting for mathematical formulas
  • Automatically generated bibliographies and indexes
  • Multilingual typesetting
  • Use of PostScript or Metafont fonts

Many scholars would shrug at these or not know what they are.

That’s OK. If you don’t, it’s not for you. It’s sort of like the Linux of typesetting. If you know how to use it, it’s the only option. MacOS and Windows are all many users need.

There’s no official support for LaTeX and certain factors like layout modifications may appear quite complicated. But once you get used to its quirks and specific needs, the capabilities outweigh the limitations.

Editing packages

Since LaTeX was launched, many packages have been created to help get around the challenges of editing with it. are listed in a central archive that users can update.

Another attractive feature is that LaTeX is open-source, unlike most common paid software, like, of course, MS Office.

This means LaTeX users don’t have to pay for licensing fees and can contribute to its development and features.

Formatting

Some of these key features are an optimal hyphenation and justification approach. Automatic updating of the bibliography is also a big plus when you have a heavy literature review or you’re doing a review paper of your own.

If you’re producing a lengthy manuscript or book. LaTeX lets you separate it into smaller documents, then combine them to produce one output file.

The table of contents and references for the whole project can also be created automatically for all projects containing multiple files.

OS-agnostic

Another main advantage of writing in LaTeX is that it’s independent of any one particular software platform or operating system. As a LaTeX project consists of text files, you can use any text (.txt) editor (even Word), and these files can be easily transferred from one LaTeX tool to another, and from one OS to another.

So there are no restrictions if an author in the US is using a Mac while a co-author in Kenya is on a PC.

LaTeX online tools: for easier writing and collaboration

To create a LaTeX project, you can install an editor such as Texmaker and a compiler such as MiKTeX. That’s if you’re working offline.

Even more flexibly, and in many ways more secure, online tools like Overleaf and Authorea now enable you to do online, real-time collaboration.

Overleaf also offers a rich text mode that renders headings and formatting. This gets rid of a lot of the learning curve for coding LaTeX, making it more user-friendly than ever.

Moreover, Overleaf offers hundreds of public, free templates.

Use LaTeX for formal letters
A few of Overleaf’s formal letter templates. (source: Overleaf)

These include templates for books, letters, calendars, presentations, CVs, and reports. Here’s how a letter looks in the Overleaf UI.

Don’t let the code lead you to think you need to be a programmer.

You absolutely don’t.

Workspace of a LaTeX project in Overleaf. The files are displayed on the left, the editor in the center and the output PDF on the right.

We’re dwelling on Overleaf here because we welcome editing jobs in Overleaf. These are absolutely terrific for writer–editor cooperation and deliver immediate results.

Even though we emphasize the social sciences and health sciences, we’ve used Overleaf in areas such as sociology and associated networks. It was brilliant for that.

And unlike Word, we don’t have to worry so much about backups, corrupted files, and security.

That said, we’ll also edit LaTeX in Word. This requires editing at the text level, and in that area, it definitely saves a lot of time and trouble if you know the basics of editing in the language. So let’s do an intro.

Getting started: The basics of writing your research in LaTeX

Here we’ll give you some examples of the most common and essential elements you may encounter when editing a LaTeX document.

The preamble

The first line, the preamble, in the LaTeX file declares the type of document to be created.

This handles the appearance of the document based on multiple available classes such as article, book, or report. An example of this line of code is \documentclass{article}. Below this declaration, as part of the preamble, the packages to be used in the document are listed, as well as the encoding used.

The document contents are then enclosed between the \begin{document} and \end{document}. Once text is inserted in this area, you have to compile the document to see the changes in the PDF document.

Text formatting

The most common text formatting commands in LaTeX are bold, underline, and italics. These are written as shown in the list below:

  1. Bold text is created with the \textbf{…}
  2. Text can be underlined with the \underline{…}
  3. Italicized text is written using the \textit{…}

Letters and punctuation is also a bit quirky.

Normal upper-case and lower-case letters, as well as numbers, give ordinary output. So do ! @ ∗ ( ) [ ] / ? . , | : ; − + =

Editors like us also deal with:

Normal character LaTeX code
Hyphen – (1 hyphen)
En-dash — (2 hyphens)
Em-dash — (3 hyphens)

Creating a list

You can create ordered and unordered lists in LaTeX. Unordered lists consist of entries preceded by a black dot.

The environment is defined using \begin{itemize} and \end{itemize}, and in between these commands, each entry in the list is written, preceded by the control sequence \item.

An ordered list, however, contains entries preceded by a number. In this case, the environment is defined using  \begin{enumerate} and \end{enumerate}.

Inserting images

LaTeX uses a package called graphicx to include images in documents.

The commands that can be used with this package are \graphicspath{…}, which defines the directory where the images are located, and the command \includegraphics{…}, which lists the image to be included in the document.

Creating a table

LaTeX uses the tabular package by default to create tables.

This is an example of a table with three rows and three columns.

LaTeX table coding – pretty easy

The LaTeX code for creating a table is shown on the left along with the expected rendered output on the right.

The {c c c} parameter defines the number of columns as well as their justification (in this case centered). You can also replace c with r or l to align text to the right or left.

The table is wrapped within the center environment so that it’s rendered in the center of the page.

For a deeper dive into formatting, see here. However, you can avoid this pain simply by using a solution like Overleaf.

Conclusion – The present and future of LaTeX

LaTeX has been a valuable typesetting tool for researchers for over three decades. Online tools like Overleaf have now eliminated a lot of the coding and the geek factor, so authors can collaborate in the cloud, with nothing to install locally. They can work on parts and link them together like Lego blocks through a central UI.

LaTeX is clearly here to stay for some time longer. Even more interesting is how packages like Overleaf show how LaTeX isn’t limited to physics and math. It can also be used to make very attractive structured documents, avoiding a lot of the pesky things that Word has a tendency to do (like falling in love with certain styles and reverting to default fonts).

While in this article you have learned about the basics of LaTeX, you can learn more in this Overleaf tutorial, or watch some of the many videos on YouTube. And here’s a massive Wiki of helpful TeX tools. There are also several online communities that you can reach out to such as the TeX StackExchange.

And when you’re ready for a manuscript edit or an edit of your professional documents, Scize Editing is here to make sure the scientific English is superb. We love the power of LaTeX, whether collaborating on Overleaf or doing old-fashioned markup in Word Doc. Get in touch and order a professional scientific edit.

*top image credit: Alessio Damato, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons