An introduction to LATEX
Note: This is a blog post from an older version of this website. Links and styles on this page might not work/render as expected.

The write-up of my talk on LATEX for beginners, as a part of Tech Talk Tuesday, an initiative of PES OpenSource. I structured my talk based on this book - The Not So Short Introduction to LATEX. So refer this book for all details as I’ve posted the notes I made to deliver my talk.

Introduction

  • Donald Knuth
    • 1977 - TEX
    • 1982 - first TEX engine
    • 1989 - enhancements
    • Why the name TEX ? - Technology
  • about TEX and LATEX
  • LATEX - Lay-Tech
  • Why LATEX ?
    • professional look
    • mathematics & science
    • only few commands used to specify the structure
    • easy generation of footnotes, references, table of contents, etc
    • add-on packages
    • highly portable
    • free

Basic Layout

Level -2
  • spaces are uniform & single line break
  • empty line defines end of para & severl empty lines
  • 10 meta-characters. Escape to print metachar. \textbackslash to print escape char
Level -1
  • Commands start with \
  • case sensitive
  • starred variant
  • terminated with a non-letter
  • Commands are space-hungry!
  • use {}
  • parameters in {}
  • optional params []
  • \command[optional]{param}
  • % -> Comments
  • verbatim package. \begin{comment} to \end{commend}
Level 0
  • file must start with \documentclass{class}
    • specifies type of document
    • some commands following this to specify some more details
    • optional commands -
      • size, papertype, formulae alignment, titlepage, twosided, openright, landscape, doc, font encoding, etc
  • to load some package \usepackage{name}
  • write content within \begin{document} and \end{document}
  • \pagestyle{style} & \thispagestyle{style}
    • plain - page number in footer, middle
    • headings - headings, page number. empty footer.
    • empty - both empty
  • \include{file} & \includeonly{file,file,...} & \input{file}

Typesetting Text

Level 1
  • \\ & \newline & \newpage & \\*
  • \linebreak[n] & \nolinebreak[n] & \pagebreak[n] & \nopagebreak[n]
  • \hyphenation{word list}
  • \-
  • \mbox{text} & \fbox{text}
  • \today & \TeX{} & \LaTeX{}
  • quotation marks ` and ‘
  • ligatures - ff fi fl etc [Refer book, Sec:2.4.8, page 24]
  • ellipsis - \ldtos
  • ~ & \@ & \frenchspacing
  • label{...} & \ref{...} & \pageref{...}
  • \footnote{...}
Level 2
  • \maketitle
    • \title
    • \author
    • \date - optional
  • \tableofcontents
  • divide publication
    • \frontmatter
    • \mainmatter
    • \appendix
    • \backmatter
  • \part
  • \chapter - depends on document class
  • \section
  • \subsection
  • subsubsection
  • \paragraph
  • \subparagraph
  • \begin{...} & \end{...}
    • enumerate
      • use \item
    • itemize
      • use \item
    • description
      • use \item[Name] Description ...
    • {flushleft} & {flushright} & {center}
    • {quote} & {verse}
    • {verbatim}
    • {tabular} & {|l|c|r|p{...}}
    • {verbatim}
  • \verb+text+

Mathematics & Font handling

Refer the book.