LaTeX Software
LaTeX Software
1. Windows:
o Download and install MiKTeX from MiKTeX website.
o During installation, choose to install missing packages
automatically.
o You can also use a LaTeX editor such as TeXworks or
TeXstudio (both come with MiKTeX or can be installed
separately).
2. MacOS:
o Install MacTeX from the MacTeX website.
o After installation, you can use TeXShop (included with
MacTeX) or another LaTeX editor like TeXstudio.
3. Linux:
o Use your package manager (e.g., apt for Ubuntu) to
install LaTeX. For example:
bash
Copy
sudo apt-get install texlive-full
\begin{document}
\maketitle
\section{Introduction}
Welcome to LaTeX! This is my first document
using LaTeX.
\section{Main Content}
\[
E = mc^2
\]
\end{document}
A title
Author and date information
Two sections: "Introduction" and "Main Content"
An equation rendered in LaTeX math mode.
bash
Copy
pdflatex filename.tex
1. Preamble: This is where you define the document class and load
necessary packages.
o \documentclass{article}: Defines the type of
document (e.g., article, report, book, etc.).
o \usepackage{...}: Load additional LaTeX packages
(not used in the basic example but necessary for advanced
features like tables, graphics, etc.).
o \title{}, \author{}, \date{}: Define the title,
author, and date of the document.
2. Document Body: This is the part where the actual content of your
document goes.
o \begin{document} and \end{document}: Enclose
the document body.
o \maketitle: Generates the title section using the
previously defined title, author, and date.
o \section{}: Creates a section heading. Other sections
include \subsection{} for subsections, etc.
o The body can also contain text, equations, lists, tables,
figures, etc.
3. Mathematical Mode: For mathematical expressions, you can use
math mode.
o Inline math: Use \( ... \) or $ ... $ for small
equations within text.
o Displayed equations: Use \[ ... \] or the equation
environment.
4. Compiling: After writing the document, you need to compile it
with LaTeX to generate a PDF or other output.
LaTeX treats certain characters as special, so if you want to use them in your text, you need
to escape them with a backslash (\). Here are a few common examples: