This part will be dedicated to talking about Parts, Chapters, Sections and Paragraphs. The hierarchy being just that, so for those who don't click a lot in Microsoft Word to make sure everything is the right hierarchy, you're going to have to type it now! (Honestly I rather type than click a lot).
For those wondering what a section
is, it's another word for header, but more general since latex serves different needs for documents.
Defining these are simple, just put \
in front of the word, like so:
\part{Part 1}
\chapter{Chapter 1}
\section{Section 1}
\paragraph{Paragraph 1}
\par Text % \par is for paragraph text, as it indents
Except for
\par
, they all have alternate forms by putting*
in front of the word, this is to not have the numbers and such
shown.
Let's make a new document and use a variety of these to really show how they work:
\documentclass[11pt, letterpaper, oneside]{book}
% To use chapter, it must be book class
\title{Latex For Beginners Part 2}
\author{Mustafif}
\date{\today}
\begin{document}
\maketitle % create title page
\pagenumbering{arabic} %define page numbering
\newpage
\tableofcontents % set table of contents
\newpage
\part{The first of the first}
\chapter{I am chapter}
\section{I am the section}
\subsection{I am subsection}
\subsubsection{I am subsubsection}
\section*{I have no number and TOC won't see me}
\end{document}
Run pdflatex part2.tex
and you'll see something like this:
In the next part we will discuss Equations, the fun and the pain
Top comments (0)