Intro to LaTeX

February 11, 2015

P V

What is LaTeX?

  • Text processing system
  • "Standard" for publications in science, engineering, math
  • Math-friendly
  • Semi-automatic organization of content

Basic syntax of LaTeX

A LaTeX file is an ASCII file with a .tex extension

Basic Syntax of LaTeX

  • Blank line = new paragraph
  • Blank space = new word (not space!)
  • Other blank spaces are ignored

Basic Syntax of LaTeX

There are some special characters:

%, $, \, &, #, _, ~, ^, {, }

 

Use them by prefacing with \

Required Formatting of LaTeX

First command must be:


\documentclass[12pt]{article}

Required Formatting of LaTeX

All text placed between the below:


\begin{document}

\end{document}

Required Formatting of LaTeX

Hello World


\documentclass[12pt]{article}
\begin{document}
    Hello World!
\end{document}

Structure in LaTeX

  • New section: \section{"Problem 2"}
  • New subsection: \subsection{"Part a"}
  • New subsubsubsection: \subsubsection{"Part ii"}

Vertical Spacing in LaTeX

  • Paragraphs: new line
  • Line break: \\
  • New page: \newpage
  • Vertical space: \vspace{1.5cm}

Text Alterations in LaTeX


{\it I am italicized}

{\bf Bold text}

{\tt typewriter-like}

\underline{This is underlined}

\centerline{Single line of centered text}

\begin{center}Multiple \\ centered \\ lines \end{center}

Text Alterations in LaTeX


{\tiny teeeny-tiny }

{\small still small }

{\large growing... }

{\Large getting there }

{\Huge Enormous!}

Math in LaTeX


\begin{equation}
    a = \pi r^2
    \label{eq:area}
\end{equation}

The area of a circle can be described by equation \ref{eq:area}.

Inline math: $d = 2 \pi r$.

Math in LaTeX - References

  • http://detexify.kirelabs.org/classify.html
  • http://en.wikibooks.org/wiki/LaTeX/Mathematics

Intro to LaTeX

By liviro

Intro to LaTeX

For S2015 COMS W3210.

  • 811