Pular para o conteúdo principal

LaTeX Cheat Sheet

Learn everything you need to know about LaTeX in this convenient cheat sheet!
7 de mai. de 2024

Have this cheat sheet at your fingertips

Download PDF

Comments

Insert a comment with%

% this text is ignored

Environments

Environments are sections in a document that apply special behavior rules to the enclosed text.

\begin{environment-name}% environment contents\end{environment-name}

Equations

Description

Code

Output

Insert inline equation with $

The equation is $e=mc^2$

Insert inline equation with \(

The equation is \(e=mc^2\)

Insert unnumbered equation with $$

The equation is

$$

e=mc^2

$$

Insert unnumbered equation with \[

The equation is

\[

e=mc^2

\]

Insert numbered equation with \begin{equation}

\begin{equation}

e=mc^2

\end{equation}

Document Structure

Preamble

Preamble content must appear before \begin{document}.

Define the document class with \documentclass.

\documentclass[options]{class}

Common class values

Class

Description

article

Default class for composing an article.

report

Typeset a multi-chapter report.

book

A class for typesetting books.

beamer

For producing presentations and slides.

Common class options

Option

Default value

Available values

fontsize

11pt

20pt, 12.5pt, etc.

paper

a4, portrait

a3, letter, landscape

toc

nolistof

listof, listofnumbered

captions

tablebelow, figurebelow

tableabove, figureabove

twocolumn

false

true

Loading Packages

Load a package with \usepackage.

\usepackage[options]{package}

Common package examples

Functionality

Code

Mathematical typesetting

\usepackage{amsmath}

Set the text encoding

\usepackage[utf8]{inputenc}

Multilingual support

\usepackage[english, spanish, portuguese]{babel}

Document

Include the entire document in a document environment.

\begin{document}% The complete document contents\end{document}

Title Page

Element

Code

Title of document

\title{text}

Author name

\author{text}

Date

\date{\today}

Generate the title page

\maketitle

Content Listings

Element

Code

Table of contents

\tableofcontents

List of tables

\listoftables

List of figures

\listoffigures

Headings

Element

Code

Chapter

\chapter{The Last Chapter}

Section

\section{Conclusion}

Subsection

\subsection{Final thoughts}

Text Justification

Description

Code

Output

Left align

\begin{flushleft}

On the left

Center align

\begin{center}

In the middle

Right align

\begin{flushright}

On the right

Lists

Description

Code

Output

Bulleted list

\begin{itemize}

\item flour

\item milk

\item eggs

\end{itemize}

  • flour
  • milk
  • eggs

Numbered list

\begin{enumerate}

\item Learn LaTeX

\item ???

\item Profit

\end{enumerate}

  1. Learn LaTeX
  2. ???
  3. Profit

Named elements in list

\begin{description}

\item[datum] Single piece of information

\item[data] Plural of datum

\end{description}

Text Mode

Formatting

Description

Code

Output

Bold

\textbf{To boldly go}

Italic

\textit{Leaning Tower of Pisa}

Small caps

C\textsc{anidae}

Spaces

Description

Code

Output

Thinnest space

very\,close

Thin space

quite\:close

Medium space

fairly\;close

1 em space

quite\quadfar

2 em space

very\qquadfar

Accents

Description

Code

Output

Hat

\hat{a}

Bar

\bar{a}

Tilde

\tilde{a}

Math Mode

Mathematical Arithmetic Operators

Description

Code

Output

Plus

2 + 3

Minus

9 - 6

Plus or Minus

\pm 1.53

Multiplication (times)

6 \times 7

Multiplication (dot)

6 \dot 7

Division (slash)

7 / 22

Division (symbol)

7 \div 22

Numeric Comparison Operators

Description

Code

Output

Equal

1 + 2 = 3

Not equal

1 + 2 \ne 4

Approximately equal

\pi \approx 3.14

Less than

6 < 7

Less than or equal to

6 \leq 7

Greater than

8 > 7

Greater than or equal to

8 \geq 7

Equations

Description

Code

Output

Fraction

\frac{7}{22}

Square root

\sqrt{49}

Nth root

\sqrt[5]{243}

Subscript

x_{i}

Superscript

x^{3}

Absolute values

|x|

Natural logarithm

\ln(5)

Logarithm

\log_{2}8

Exponential

\exp(x)

Sine, cosecant

\sin(x)=\frac{1}{csc(x)}

Cosine, secant

\cos(x)=\frac{1}{sec(x)}

Tangent, cotangent

\tan(x)=\frac{1}{cot(x)}

Greek and Hebrew Letters

Description

Code

Output

Lowercase delta

\delta

Uppercase delta

\Delta

Aleph

\Aleph

Set Theory

Description

Code

Output

Union

\cup

Intersection

\cap

Is a member of

\in

Empty set

\emptyset

Logic Operators

Description

Code

Output

Not

\neg A

And

A \land B

Or

A \lor B

Temas
Relacionado

cheat-sheet

Markdown Cheat Sheet

Learn everything you need to know about Markdown in this convenient cheat sheet!
Richie Cotton's photo

Richie Cotton

cheat-sheet

Julia Basics Cheat Sheet

Learn all the fundamentals of Julia in this comprehensive cheat sheet.
Richie Cotton's photo

Richie Cotton

10 min

cheat-sheet

Bash & zsh Shell Terminal Basics Cheat Sheet

Improve your Bash & zsh Shell skills with the handy shortcuts featured in this convenient cheat sheet!
Richie Cotton's photo

Richie Cotton

6 min

cheat-sheet

Excel Formulas Cheat Sheet

Learn the basics of Excel with our quick and easy cheat sheet. Have the basics of formulas, operators, math functions and more at your fingertips.
Richie Cotton's photo

Richie Cotton

18 min

cheat-sheet

Python for Data Science - A Cheat Sheet for Beginners

This handy one-page reference presents the Python basics that you need to do data science
Karlijn Willems's photo

Karlijn Willems

4 min

cheat-sheet

Python For Data Science Cheat Sheet For Beginners

This cheat sheet covers the basics that you need to know to do data science with Python
Karlijn Willems's photo

Karlijn Willems

1 min

See MoreSee More