Latex notes

Setup Manjaro

Install latex tools with:

sudo pacman -S livetex-most 

To create a pdf out of a .tex file run

pdflatex latex_file.tex 

Notes

{Handy LaTex Tutorials }

{Memoir class documentation }

Commands

Commands to the latex compiler are newlines that start with the "\" character.

\document{memoir}
\begin{document}
\end{document}

Basic Document Structure

A basic latex document has 2 main parts.

Preamble

The preamble is not rendered in your document and is mostly used for setting up the environment for when the compiler runs.

Document

The document part is the main bulk of what will be rendered in your document. It is mandatory and starts with a \begin{document} and ends with an \end{document} command.
The \begin{} and \end{} commands define an environment in your document but the document environment is and should always be the topmost one you use.

Example

\documentclass{memoir}

\title{A title}
\date{} # No date will be printed if left blank
\author{James Chip}

\begin{document}
  \pagenumbering{gobble}
  \maketitle
  \newpage
  \pagenumbering{arabic}
  Hello World!
\end{document}

Text sections

Sections, subsection and paragraphs are handled as follows:

\section{Section Title}

Text that goes in the section under the title.

\subsection{A Subtitle}

Text that goes in the subsection under the title.

\subsubsection{A Sub-subtitle}

Even more text to put in.

\Paragraph{}

Paragraph text. This will be indented while the others will not.

Sections have a default numbering scheme on them. If you wish to avoid numbering on your sections then use \section*{TITLE} instead.

Paragraph setup

To set paragraph indent and spacing use the following:

\setlength{\parindent}{0pt}
\setlength{\parskip}{2em}	

nth numbers

To have numbers with th, rd or st appended to them formatted properly you can use the nth package.

\documentclass[a5paper, openany]{memoir}
\usepackage[super]{nth}

\begin{document}

These are the \nth{1}, \nth{2} and \nth{3} number on this line.

\end{document}

Topics:

{software}