
Table of Contents
What is LaTeX?
Popular modern word processors such as Microsoft Word, Apple Pages, LibreOffice Writer and the like make it easy to read, write and edit documents by displaying formatted output in a What-You-See-Is-What-You-Get environment.
This means that users have an interactive interface where they can see the final appearance of the document they are editing in real time. The user is simultaneously responsible for both the content and format of the document.
Although this is useful for most common scenarios, the WYSIWYG approach can quickly become an uncomfortable experience for users who need to work with complex documents with strong mathematical content (formulas, equations or diagrams and internal references to them), scientific data or documents and publications.
This is where LaTeX comes to the rescue.
LaTeX is a different approach to document creation: instead of generating the content and applying its format interactively and simultaneously while the user edits the document, LaTeX focuses on the user communicating the desired results to the engine responsible for generating the final output. It is defined as [composition or typesetting](/translation/ layout).
This approach separates content from layout, encouraging authors to focus on content and leave document design to graphic designers/designers.
The origins of LaTeX
LaTeX is based on the TeX composition system created in 1978 by Donald Knuth, a well-known U.S. computer scientist and professor. LaTeX later became a document preparation system for high-quality page layout and is mainly used for medium and large scientific and technical articles, but it can also be applied to almost any other type of publication. Some examples will speak more than words: check out this gallery of high-quality TeX documents to get an idea of what you can achieve with LaTeX.
The word LaTeX is pronounced /ˈlɑːtɛk/
or /ˈleɪtɛk/
and does not have the sound /ks/
at the end, because the name TEX is rooted in the Greek word τέχνη, (techne) which means art, technique or technology. So the X in the name is the Greek capital letter "chi" (Χ) which, if handwritten, is easily confused with the "ics" of the Latin alphabet.
It should also be noted that LaTeX is not the name of a particular editing program, but generally designates a specific subset of text marking conventions. Although almost any word processor or text editing program can be used to write LaTeX documents, there are some specific editing programs and platforms that make it easier to use LaTeX.
Recently, more and more interactive smartphone apps and websites are simplifying and generalizing document writing tasks with LaTeX, freeing the user from the burden of installing and configuring complex software packages.
What is the difference between TeX and LaTeX?
LaTeX can be defined as a set of macros tailored to TeX. The relationship between TeX and LaTeX is like the relationship between a low-level programming language such as Assembly and C. TeX can be considered a low-level element, while LaTeX is a higher-level language built on TeX, with the added advantage that one can insert pieces of TeX code into LaTeX without "breaking the document." In summary, LaTeX is a set of TeX command sequences.
Why use LaTeX?
LaTeX creates typographically balanced documents, especially for math and science in general, although you can also create a beautiful curriculum with it. It was created by scientists for scientists and is incredibly powerful because its feature set can be extended with additional packages, which are additional command libraries and environments. Packages exist for almost everything from composing poetry books to creating presentations, customizing headers and footers or managing exotic languages.
Because LaTeX files are pure text files, the writer can use the text editing software of his or her liking and the programs with which he or she is most familiar. There is no specific or mandatory software aimed at authors, so they have the freedom to choose. You can use any advanced text editor such as Notepad++ or any other specialized authoring app or software package.
The LaTeX approach is designed to allow authors to focus on the content and not worry (not too much, at least) about the appearance of the document. In addition, LaTeX can easily handle multiple, large files and allows creators to put their text files under revision control for collaborative projects.
Another feature that common word processors handle with difficulty are bibliographies and indexes: in LaTeX are generated automatically, without any problems.
If all these advantages are not enough, LaTeX also has an ever-growing community of users and authorities (the American Mathematical Society even has its own set of packages), empowers creators in their freedom of choice in many ways, has become the de facto standard in the scientific community, generates consistent content (even cross-platform), and, let’s face it, looks good once the TeX engine works its magic and generates the final output. And all this for free.
How does LaTeX work?
Typically, a text editor expects the user, in addition to actually typing the content of the document, to choose the font type and size, decide on the layout, and change the specific style of each part of the document. In LaTeX, authors simply create a plain text file (or a batch of files) and mark specific elements of the text with a series of commands that describe the structure and meaning of the content. Here is a brief example of a LaTeX code snippet:
\documentclass{article}
\title{My first LaTeX document}
\author{Leslie Lamport}
\date{February 1985}
\begin{document}
\maketitle
Hello, world!
\end{document}
Translated into words, here is telling the user to LaTeX:
- This document is an article.
- The title of the document is "My first LaTeX document."
- The author is Leslie Lamport.
- This paper was written in February 1985.
- The contents of the document are a title and the text "Hello, world!"
And it would look like this:
Once the document is generated by the TeX engine (this process is called compilation), the document output will be formatted according to the values that the designer has decided to apply to the document class "article." It is the LaTeX program itself that is used to process the text and commands (such as MiKTeX or TeX Live) that is responsible for generating a well-formatted document, such as a PDF, PostScript or DVI file, according to digital distribution or printing needs.
What tools are needed?
Since document creation is a two-step process, 2 different tools are needed:
- A text editor for creating the pure text files used in LaTeX and working with them. These editors can be generic or specific to LaTeX.
- LaTeX software itself, available for Linux, Windows and Mac.
The choice of tools depends primarily on personal preference, since many of the software out there usually integrate both the editor and the engine to compile files. If you need guidance in this regard, please let us know.
In the early years of LaTeX, authors had to manually compile .tex
files via terminal to generate the desired output. Usually that step had to be repeated several times to debug the files and eliminate possible syntax or format errors. After all errors and potential warnings were corrected, the file would be generated and the final output could be checked immediately afterward.
Nowadays, this has become a seamless process, in part due to software packages that include the editor and compiler. There are software options that integrate error logging in the same window as the editor and output file preview, or even automatically compile the file when the software detects that the user has stopped writing. There are also online editors that relieve authors of the burden of setting up the engine needed to compile the files because this process is done in their servers, on the cloud.
What is LaTeX primarily used for?
LaTeX is used primarily for mathematical and scientific documentation because it allows for extremely accurate and consistent layout, as well as having numerous automated desktop publishing features, and most importantly because it allows authors to obtain multiple presentation formats from a single source format (multiple output formats can be generated, such as PDF, HTML, OpenOffice files, etc.).) In addition, software packages are available for free and for any operating system.
Not many clients know that translation agencies can work directly with TEX files. Despite the popularity of LaTeX in the field of engineering and scientific research, customers usually prefer to send a PDF copy of the published document and have that translated.
Short glossary of TeX/LaTeX
With this glossary you will have a better understanding of the jargon usually used in TeX/LaTeX projects.
- LaTeX
A document preparation system for the production of scientific and technical papers
- Document Class (Document Class)
Defines the general layout and structure of a LaTeX document. Some examples are article, report and book.
- Preamble (Preamble)
The section of a LaTeX document that precedes the
\begin{document}
command, in which packages are loaded, settings are defined, and custom commands are declared.- Package (Package)
A collection of LaTeX commands and settings that extend its functionality. Packages are loaded with the
\usepackage
command in the preamble.- Command (Command)
A directive in LaTeX that performs a specific action. Commands generally begin with a backslash
\
followed by the command name.- Environment (Environment)
A region of a LaTeX document with a specific behavior, such as a list or table. Environments are defined with the commands
\begin{}
and\end{}
.- Macro
A user-defined command or an abbreviation created using
\newcommand
or\renewcommand
.- Compilation (Compilation)
The process of converting a LaTeX source file into a formatted document, which typically involves running a LaTeX compiler, such as pdflatex or xelatex.
- Document Structure (Document Structure)
The hierarchical organization of a LaTeX document, including sections, subsections, and chapters.
- Package Options
Additional settings or features that can be specified when loading a package using the
\usepackage
command.- Math Mode (Math Mode)
A mode in LaTeX for typesetting mathematical expressions. You can enter _inline_ math mode with the command $...
$
or display it with$$...$$
or \begin{equation}...\end{equation}
.- Floating Object (Float)
An object type in LaTeX that is automatically placed within the document, such as figures and tables.
- Label and Reference
Labels are used to uniquely identify elements such as sections, figures and tables within a LaTeX document. References are used to refer to these items labeled elsewhere in the document.
- Bibliography (Bibliography)
A list of references or citations included in a LaTeX document. Bibliographies are generally managed using BibTeX or BibLaTeX.
- Template (Template)
A predefined document format or style that can be used as a starting point for creating new documents in LaTeX.
- Cross-referencing (Cross-referencing)
The process of referring to other parts of a document by labels and references. Cross-references allow dynamic updating of references when the structure of the document changes.
- Font Selection
The process of choosing fonts for different elements of a LaTeX document, such as main text, headings, and mathematical symbols.
- Header and Footer
Independently editable parts of a LaTeX document that allow customization of various elements such as page numbers, section and chapter headings, creation and/or version control, etc.
- Markup
The process of adding formatting and structure to text using LaTeX commands, such as
\textbf{}
for bold and\emph{}
for italics.- Package Repository
Online repositories where you can find and download LaTeX packages and resources, such as CTAN (Comprehensive TeX Archive Network).
- Document Compilation Workflow
The sequence of steps involved in compiling a LaTeX document, including editing the source file, running the compiler, and displaying the output.
Translate your LaTeX projects with us. Learn more.