# Creating a (La)TeX Document for Publishing or Presentation

## Module Summary

LaTeX [or (La)TeX], pronounced “lah-tek” or “lay-tek”, is a popular and free open-source document markup language, with a number of text editors that work cross platforms (including Windows, Unix, Linux, MacOS, DOS, and Amiga OS). LaTeX enables some fundamental capabilities:

• easy expressions of inline mathematical notations and formulas along with text
• separate handling of style and informational content to enable versioning ease (particularly for publishing and for slideshow presentations)
• text formatting based on a number of document classes (including for publishing and for “beamer” slideshow creation)
• identification of text in informational hierarchies for easier comprehension and accessibility
• machine-readable text features for improved accessibility
• support for digital preservation (with files openable in any text editor as plaintext, without hidden text formatting), and others

This module provides some insights about LaTeX.

## Takeaways

Learners will...

• review what LaTeX is and how it is commonly used in academia
• examine basic steps for installing both a LaTeX distribution (MiKTeX) and a universal LaTeX editor (TeXmaker)
• consider a brief history of LaTeX and why it is pronounced the way it is
• review initial steps to setting up a LaTeX document in MiKTeX and the importance of proper setup of the preamble, among other issues
• explore some of the pre-packaged layout styles and color options for beamer documentclass slideshow contents in LaTeX

## Module Pretest

1. What is LaTeX (pronounced “lah-tek” or “lay-tek”)? How is LaTeX commonly used in academia? Are there competitors to LaTeX, and if so, what are they?

2. What are the basic steps for installing a LaTeX distribution (distro, or collection of software components) and a universal editor?

3. Who created LaTeX, and why did he create this? What is a brief history of LaTeX, and why is it pronounced the way it is?

4. What are some initial steps in setting up a LaTeX document? What information goes into the preamble? Why is the preamble so critical for basic elements of style?

5. What are some of the pre-packaged layout styles for beamer documentclass slideshow contents in LaTeX? What are some of the color palette options?

1. What is LaTeX (pronounced “lah-tek” or “lay-tek”)? How is LaTeX commonly used in academia? Are there competitors to LaTeX, and if so, what are they?

LaTeX is a commonly-used markup language for document and / or slideshow preparation. This markup language is written in the TeX macro language. It enables users to annotate text to indicate text type (in a hierarchy), position, and style. It also enables precise expression of mathematical notations.

The basic structure of a LaTeX document is comprised of a definition of documentclass type in an initial code at the top. This is followed by a “preamble,” in which there is definition of applied (global) coding packages to LaTeX, applied styles and a color palette, and other elements. The rest of the document, then, is code applied to the textual and visual contents of the file. Textual elements are contained in frames; frames may contain multiple slides within the frame, and particular effects may be applied to respective slides. There are other segments which may be applied: part, chapter, section, subsection, subsubsection, paragraph, subparagraph, lists, and others. A variety of effects may be applied, such as in sequence, with visual elements may visible and invisible at turns (to show changes over time).

In terms of LaTeX syntax, there are opening and closing tags, with coding applied to the texts between the tags. A compiler displays the coded output into a viewer or display pane. There are ways to code by using any or all of the following: (1) a menu in a LaTeX editor, (2) straight code (with pre-coded sequences available online), (3) pre-made templates, and other elements.

The types of image files that may be used in a LaTeX document are the following: .png, .jpeg, .gif, and .pdf. (These image files may be resized and / or rotated within the document using LaTeX code.)

For inline documentation, use of the % (percentage sign) may be used for documentation in either a left-justified new line way or following code on the same line.

In academia, LaTeX is commonly used for scientific articles, theses, dissertations, and other types of publications. It is also used for slideshow presentations (with the “beamer” documentclass).

Historically (and maybe contemporaneously), commercial competitors to LaTeX include Adobe FrameMaker, Adobe PageMaker, and Adobe InDesign, all of which use proprietary software and which use graphical user interfaces (GUIs). MathML (Mathematical Markup Language to XML or “extensible markup language”) is also mentioned. It is assumed that local conditions for users determine which technologies are preferable.

The LaTeX file is output with a .tex extension. The output format is in .pdf or portable document format. While there are some article stubs on reverse coding from pdf to LaTeX format, there is no apparent accurate way to do this with LaTeX code intact. (It is possible to extract pure text from a .pdf with relative ease but not LaTeX coding, apparently.)

2. What are the basic steps for installing a LaTeX distribution (distro, or collection of software components) and a universal editor?

To use LaTeX, one needs a LaTeX distribution (distro) and then an editor. The distro enables access to the various packages that enable the LaTeX editor to work. The user can set the distro to automatically access additional packages to the initial installation as needed.

A common LaTeX distribution is MiKTeX. A common universal editor is TeXmaker. Those who need high level mathematical notation may access American Mathematical Society packages known as AMS-LaTeX.

A screenshot of the TeXmaker workspace follows below.

Directions for the installations are available at the websites mentioned. The installations are simple to actualize with the built-in installers.

3. Who created LaTeX, and why did he create this? What is a brief history of LaTeX, and why is it pronounced the way it is?

LaTeX was created in 1985 by Leslie Lamport, an American computer scientist. It was created as an add-on to the TeX digital typesetting system created by Donald Knuth. (Knuth originated the idea and approach of “literate programming,” which is described as “a programming paradigm…in which a program is given as an explanation of the program logic in a natural language, such as English, interspersed with snippets of macros and traditional source code, from which a compilable source code can be generated.” The idea is that people do not have to conform to a pre-made software but rather that the software can be brought into play based on the structure of the document as conceptualized by people. There have been a number of other efforts at using the open-source TeX for digital typography.

“TeX” is from the capital Greek letters: tau, epsilon, and chi. TeX is derived from a Greek word “τέχνη” meaning “skill, art, technique”) LaTeX. The capital chi or χ is pronounced with a light “k” sound.

4. What are some initial steps in setting up a LaTeX document? What information goes into the preamble? Why is the preamble so critical for basic elements of style?

The opening line of a LaTeX document should be the definition of the document class:

\documentclass [a4paper, 12pt] {article}

or

\documentclass [11pt] {beamer}

Next follows the preamble, which describes the packages used in the particular document to enable coding and digital typography.

\usepackage {babel}

\usetheme { } \usecolortheme { }

\title {} \subtitle {} \author {} \date {}

\begin{document}

\end {document}

Within the document, there is text mode as well as math mode (indicated by $for inline math and$\$ tags for math in its own lines).

Any language expressible using UTF-8 may be used within a LaTeX document.

Based on the markup, there can be auto generation of a table of contents, bibliography, and an index (as in books, theses, and dissertations, among others).

The LaTeX processing may be used in a standalone way to process a text, or it may be used as an intermediate step for file processing. For example, some mathematical coding may be processed using LaTeX, and then that file is exported to .pdf and used as a readable image in PowerPoint or Word.

Much finer details are available elsewhere and also within the universal LaTeX editor tool (for learning on-the-fly).

5. What are some of the pre-packaged layout styles for beamer documentclass slideshow contents in LaTeX? What are some of the color palette options?

The Beamer Theme Gallery shows some common designs, including default ones, named for places and things (in alphabetical order): AnnArbor, Antibes, Bergen, Berkeley, Berlin, Boadilla, boxes, CambridgeUS, Copenhagen, Darmstadt, default, Dresden, Frankfurt, Goettingen, Hannover, Ilmenau, JuanLesPins, Luebeck, Madrid, Malmoe, Marburg, Montpellier, PaloAlto, Pittsburgh, Rochester, Singapore, Szeged, and Warsaw. The color themes include the following names: default, albatross, beaver, beetle, crane, dolphin, dove, fly, lily, monarca, orchid, rose, seagull, seahorse, spruce, whale, and wolverine” (“Beamer Theme Matrix”).

On the site, these may be navigated by theme, color, font, or theme and color. In general, most designs seem to have white backgrounds and often blue accents.

The pre-packaged layout styles for slideshows do seem to have a particular utilitarian look-and-feel, which is instantly recognizable by those who have read scientific papers or viewed science-based slideshows.

## Examples

There are plenty of examples online of articles processed with LaTeX and beamer-based slideshows.

## How To

The steps to creating a particular LaTeX document depends on the text contents and the type of the document and then the desired purpose.

It seems to make sense to write up the document first, drop it in NotePad (or a similar text editor), then start a LaTeX file, and drop the textual contents in, and then apply the markup.

## Possible Pitfalls

As with any technology, one pitfall may be that one invests time to learn something only to be overtaken by technological advancements or disruptive changes. That said, this approach of “literate programming” has applications in other software well beyond LaTeX, and the applications of digital typography extend to other markup languages.

## Module Post-Test

1. What is LaTeX (pronounced “lah-tek” or “lay-tek”)? How is LaTeX commonly used in academia? Are there competitors to LaTeX, and if so, what are they?

2. What are the basic steps for installing a LaTeX distribution (distro, or collection of software components) and a universal editor?

3. Who created LaTeX, and why did he create this? What is a brief history of LaTeX, and why is it pronounced the way it is?

4. What are some initial steps in setting up a LaTeX document? What information goes into the preamble? Why is the preamble so critical for basic elements of style?

5. What are some of the pre-packaged layout styles for beamer documentclass slideshow contents in LaTeX? What are some of the color palette options?

## References

Beamer Theme Gallery. (n.d.). Retrieved June 29, 2017, from http://deic.uab.es/~iblanes/beamer_gallery/index_by_theme.html.

Beamer Theme Matrix. (n.d.). Retrieved June 29, 2017, from https://mpetroff.net/files/beamer-theme-matrix/.

“LaTeX.” (2017, June 16). Wikipedia. Retrieved June 28, 2017, from https://en.wikipedia.org/wiki/LaTeX.

TeX. (2017, June 13). Wikipedia. Retrieved July 1, 2017, from https://en.wikipedia.org/wiki/TeX.

## Extra Resources

Beamer Theme Gallery http://deic.uab.es/~iblanes/beamer_gallery/

LaTeX/Package Reference https://en.wikibooks.org/wiki/LaTeX/Package_Reference

MiKTeX Distribution https://miktex.org/

Mrs. Krummel LaTeX Video Tutorials http://mrskrummel.com/tutorials.html

TeXmaker LaTeX Editor http://www.xm1math.net/texmaker/