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 


{Handy LaTex Tutorials }

{Memoir class documentation }


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


Basic Document Structure

A basic latex document has 2 main parts.


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


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.



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

  Hello World!

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 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:


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}


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