Introduction
Wikipedia
\(\LaTeX\) is a software system for typesetting documents. It uses a macro language called tex
.
Installation
Online
Offline
Your tex
code goes inside files with extension .tex
.
To produce PDF
files from these files, you will need a tex
distribution installed on your system.
Some popular options are:
For VS Code, use the LaTeX WorkShop
extension.
Syntax
%This is a comment
\command[optional parameters]{required parameters}
\begin{environment}
\end{environment}
Environments are areas within your document. They can be nested and should be closed as they were opened.
The Correct way.
\begin{environment1}
\begin{environment2}
\end{environment2}
\end{environment1}
The Wrong way.
\begin{environment1}
\begin{environment2}
\end{environment1}
\end{environment2}
Basic Structure
\documentclass{document_class}
% preamble area
% document appearance control commands goes here
\begin{document}
Hello World.
% document content goes here
\end{document}
Following table is present on Wikipedia
Class | Description |
---|---|
article |
For articles in scientific journals, presentations, short reports, program documentation, invitations, … |
IEEEtran |
For articles with the IEEE Transactions format. |
proc |
A class for proceedings based on the article class. |
minimal |
It is as small as it can get. It only sets a page size and a base font. It is mainly used for debugging purposes. |
report |
For longer reports containing several chapters, small books, thesis, … |
book |
For books. |
slides |
For slides. The class uses big sans serif letters. |
memoir |
For sensibly changing the output of the document. It is based on the book class, but you can create any kind of document with it. |
letter |
For writing letters. |
beamer |
For writing presentations (see LaTeX/Presentations). |
Additional Features
The document can contain additional features, for which we need to use \usepackage
command.
\usepackage[optional parameters]{package_name}