LaTeX MINIMALInformation gathered by kat for Evilzone.
In the scientific world you will probably come across LaTeX sooner or later. I haven't used it for a long time, but the other day I had to write a paper and I found out that I still remember something about it. So I decied to write this paper for you. I still don't think it's good enough, but I guess It will never be. Maybe it is out of place, maybe somebody will find it usefull.
1. About 2. Install 3. Syntax 4. Examples 1. AboutTaken from Tobi Oetikers' The Not So Short Introduction to LaTeX:
“LATEX is a typesetting system that is very suitable for producing scientific and mathematical documents of high typographical quality. It is also suitable for producing all sorts of other documents, from simple letters to complete books. LATEX uses TEX as its formatting engine.”
2. InstallLinux –
Tex LiveOSX –
MacTeXWindows -
proTeXtHow to install depends obviously on the OS, you can follow the links for instructions. These distributions are mostly free software. One can also write .tex documents in text editors such as emacs, vim…
Vim manual One can also implement LaTeX on webpages using
MathJax, an open source JavaScript display engine, or use any other solution.
3. Syntax 3.1. BasicsThe LaTeX commands begin with a backslash. Example: \title \alpha
The text of the command goes in curly brackets.
Example: \frac{123}{33} =>123/33
Options go in square brackets. Example: \documentclass[12pt]{amsart}
The curly braces are also used to restrict the scope of a command.
Example: \textbf{Calculate} => only the word Calculate gets bolded.
% is used for comments.
3.2. The structureThe next 3 lines are necessary in a .tex document :
\documentclass
Preamble goes here.
\begin{document}
Your text goes here.
\end{document}
3.3. The PreambleThe documentclass can be book, article, report or extra one you have downloaded.
Then one should include some extensions like amssymb or amsmath for using mathematical symbols:
\usepackage{amssymb, amsmath}
Analogly you add any package you need. For writing in my language I have to include:
\usepackage[T1]{fontenc}
For code snippets one needs:
\usepackage[listings]
Then one defines the layout. For example:
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.5in}
\hoffset=-0.75in
\pagestyle{plain}
\setlength{\topmargin}{0in}
\setlength{\headsep}{0in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
3.4. The BodyThe body starts with \begin{document} and ends with \end{document}.
To define the vertical spacing between lines one uses \vspace{1cm} and for horizontal spacing \hspace{1cm}. In curly braces one defines the details.
Probably one needs to add a title:
\title{\textbf{LaTeX minimal}}
\author{me}
\date{\today}
\maketitle
After the title goes the table of contents:
\tableofcontents
Then the sections:
\section{Syntax}\label{syn}
\subsection{Preamble}
One can add labels to sections, so can refer to them later like:
\ref{syn}
If one needs to enumerate items:
\begin{enumerate}
\item Aleph-naught
\item Aleph-one
\end{enumerate}
In the end there is usually some bibliography:
\begin{thebibliography}
\bibitem{1}
The Not So Short Introduction to LaTeX
\bibitem{2}
A quick guide to LaTeX
\end{thebibliography}
Remove page numbering with:
\thispagestyle{empty}
As for writing symbols and equations I suggest using
http://detexify.kirelabs.org/classify.html, Wikipedia
http://ia.wikipedia.org/wiki/Wikipedia:LaTeX_symbols or any other manual.
Some basic expressions:
\cdot => multiply
\sqrt{} => sqare root
\frac{}{} => fraction
^{} => superscript
_{} => subscript
\begin{matrix} \end{matrix} => matrix
\overline{} => overline
\int => integral
\insertcode{}
Example: \(1,2\cdot\frac{15}{4}-0,\!\overline{2}\cdot(\frac{1}{3})^{-2}\)
4. ExamplesEvilzone equation made in LaTeX would look something like this:
evilzone.tex:
\documentclass[12pt]{article}
\usepackage[a4paper,pdftex]{geometry}
\usepackage[english]{babel}
\usepackage{xcolor}
\usepackage{fix-cm}
\setlength{\oddsidemargin}{0mm}
\setlength{\evensidemargin}{0mm}
\definecolor{grey}{rgb}{0.6,0.6,0.6}
\begin{document}
\thispagestyle{empty}
\colorbox{grey}{
\parbox[t]{1.0\linewidth}{
\centering \fontsize{20pt}{80pt}\selectfont
\vspace*{0.7cm}
\textbf{\(\sqrt{Evilzone}=(\frac{Hacking}{Security^2}\cdot\frac{Quality}{Quantity})\)}
\vspace*{0.7cm}
}
}
\end{document}
The output .pdf is attached.
More examples can be found on
http://www.latextemplates.com/ or else.
Sources:Wikipediahttp://www.mathjax.org/A quick guide to LaTeXThe Not So Short Introduction to LaTeX