summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-20 21:06:31 +0000
committerKarl Berry <karl@freefriends.org>2022-06-20 21:06:31 +0000
commit443943db3d0d2c613ead9c30d50b49bb1419e805 (patch)
tree45693b3cd229c5b6a9c7786a3ab7abac9b0855d4 /Master/texmf-dist
parent97384c89d58ea2c4a96de01334de38d0913cab62 (diff)
yet-another-guide-latex2e (20jun22)
git-svn-id: svn://tug.org/texlive/trunk@63663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/yet-another-guide-latex2e/README8
-rw-r--r--Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.pdfbin938396 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.pdfbin0 -> 892678 bytes
-rw-r--r--Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.tex (renamed from Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.tex)2102
4 files changed, 1441 insertions, 669 deletions
diff --git a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/README b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/README
index bb72f566e52..8ee3fe2a946 100644
--- a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/README
+++ b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/README
@@ -1,7 +1,7 @@
README
-File Name: Yet-Another-Guide-LaTeX2e.pdf
-Title: Yet Another Guide to LaTeX2e. v0.5
+File Name: Yet-Another-Guide-LaTeX2e_v1.pdf
+Title: Yet Another Guide to LaTeX2e. v1.0
Author: Michael. P. Morris
@@ -9,11 +9,11 @@ Author: Michael. P. Morris
Description:
-This document is a short guide to using LaTeX2e to typeset high quality documents. It focuses on users of Windows and guides the reader through installation, some of LaTeX's conventions, and creating the front matter, body and end matter. The appendices contain a list of useful facilities not otherwise covered in this document and a list of helpful resources.
+This document is a short guide to using LaTeX2e to typeset high quality documents. It focuses on users of Windows and TeX Live and guides the reader through installation, some of LaTeX's conventions, and creating the front matter, body and end matter. The appendices contain a list of useful facilities not otherwise covered in this document and a list of helpful resources.
Cheers and Happy TeXing!!
-Michael Morris <mmorris-500@hotmail.com>
+Michael Morris <mmorris1k@gmail.com>
diff --git a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.pdf b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.pdf
deleted file mode 100644
index a5cb927a509..00000000000
--- a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.pdf b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.pdf
new file mode 100644
index 00000000000..673f24bddd2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.tex b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.tex
index ff30406743d..8d7bf66829b 100644
--- a/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e.tex
+++ b/Master/texmf-dist/doc/latex/yet-another-guide-latex2e/Yet-Another-Guide-LaTeX2e_v1.tex
@@ -1,7 +1,10 @@
\documentclass[12pt, a4paper]{article}
\usepackage{setspace}
-\usepackage[dvips]{graphicx}
+\usepackage{booktabs}
+\usepackage{multirow}
+
+\usepackage[pdftex]{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage[french, ngerman, australian]{babel}
@@ -31,19 +34,19 @@
Yet Another Guide \\
to \\
\LaTeXe \\
-v0.5 \\}
+{\Large v1.0} \\}
-\author{Michael P. Morris \footnote {Copyright \copyright 2020--2022 M. P. Morris. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Any error reports for this work can be sent to the author at \texttt{mmorris-500@hotmail.com}.} \\
-\texttt{{\footnotesize mmorris-500@hotmail.com}}}
+\author{Michael P. Morris \footnote {Copyright \copyright 2020--2022 M. P. Morris. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Any error reports for this work can be sent to the author at \texttt{mmorris1k@gmail.com}.} \\
+\texttt{{\footnotesize mmorris1k@gmail.com}}}
-\date{}
+\date{\today}
\usepackage[pdftex, colorlinks=true, allcolors=Blue]{hyperref}
\hypersetup{pdfinfo={
- Title={Yet Another Guide to LaTeX2e. v0.5},
- Author={M.P. Morris},
+ Title={Yet Another Guide to LaTeX2e. v1.0},
+ Author={Michael P. Morris},
Subject={LaTeX2e},
Keywords={Latex2e; Guide}
}}
@@ -54,9 +57,11 @@ v0.5 \\}
\thispagestyle{empty}
\begin{abstract}
-This document is a short guide to using \LaTeXe\ to typeset high quality documents. It focuses on users of Windows 10 OS and guides the reader through installation, some of \LaTeXe's conventions, and creating the front matter, body and end matter of a document. The appendices contain a list of useful facilities not covered in this document and a list of helpful resources.
+This document is a short guide to using \LaTeXe\ to typeset high quality documents. It focuses on users of Windows 10 and TeX Live 2022 and guides the reader through installation, some of \LaTeXe's conventions, and creating the front matter, body and end matter of a document. The appendices contain a list of useful facilities not covered in this document and a list of helpful resources.
\end{abstract}
+
+
%\clearpage
\pagenumbering{roman}
\tableofcontents
@@ -72,17 +77,17 @@ This document is a short guide to using \LaTeXe\ to typeset high quality documen
\section{Introduction}
-LaTeX (pronounced \emph{lah-tek}) is a markup language designed to typeset high quality documents. It was created by Donald Knuth who generously released it into the public domain and is freely available from the Comprehensive TeX Archive Network (\textsc{ctan}) at \texttt{\url{www.ctan.org}}. Since it’s release it has been greatly added to, and as of this writing there are currently over 6100 add-on packages from over 2800 contributors. The most recent version is \LaTeXe and LaTeX 3 is under development.
+LaTeX (pronounced \emph{lah-tek}) is a markup language designed to typeset high quality documents. It was created by Donald Knuth who generously released it into the public domain. It is freely available from the Comprehensive TeX Archive Network (\textsc{ctan}) at \texttt{\url{www.ctan.org}}. Since it’s release it has been greatly added to, and as of this writing there are currently over 6200 add-on packages from over 2800 contributors. The most recent version is \LaTeXe and LaTeX 3 is under development.
-This document grew from my own efforts to become a proficient LaTeX user. It is not a comprehensive guide to using LaTeX. It is aimed at giving an overview of the elements of how to mark up a document and then compile it into either postscript or \textsc{pdf} format in English. It is a very bare bones outline of LaTeX and only touches on the possibilities. The best source of information is package documentation which is available from \textsc{ctan}. There are also a number of published guides and the reference list contains several useful references. A more comprehensive list, and a helpful list of texts on typography is also available from \textsc{ctan}.
+This document grew from my own efforts to become a proficient LaTeX user. It is not a comprehensive guide to using LaTeX. It is aimed at giving an overview of the elements of how to mark up a document and then compile it into either postscript or \textsc{pdf} format in English. It is a very bare bones outline of LaTeX and only touches on it's possibilities. The best source of information for additional functionality is the package documentation and there are also a number of very comprehensive published guides. The reference list contains several useful references. A more comprehensive list, and a helpful list of texts on typography is also available from the \TeX User Group at \url{www.tug.org/books/}.
-This document focuses on the Windows 10 operating system. Users of \textsc{unix}-alike or Mac systems should consult their OS documentation for issues specific to them. There are a large number of packages and some of them overlap in functionality. There are multiple options for citation systems, for document templates and for fonts. The recommendations made in this document reflect my own experiences and prejudices.
+This document focuses on the Windows 10 operating system and the TeX Live 2022 distribution. Users of \textsc{unix}-alike or Mac systems should consult their documentation for issues specific to them. There are a large number of packages and some of them overlap in functionality. There are multiple options for citation systems, for document templates and for fonts. The recommendations made in this document reflect my own experiences and prejudices. Anyone else's mileage may vary.
-Finally, I'd like to mention The TeX Users Group, of which I am a member. This is a not-for-profit group for those interested in LaTeX. Membership is inexpensive and members are sent \textsc{tug}boat, the Journal of the Tex Users Group, three times a year, and the TeX Collection on \textsc{dvd} annually. This is a good way of keeping up with developments and also with changes to TeX distributions.
+A previous version of this document was titled `Getting Started with \LaTeXe'. The name has been changed as it was too similar to other documents relating to LaTeX. Previous versions of this document illustrated the Pro\TeX distribution. This was retired in 2022, so the focus was changed to \TeX Live 2022. This is the most current distribution available at the time of writing. \\
-A previous version of this document was titled `Getting Started with \LaTeXe'. The name has been changed as it was very similar to other documents relating to LaTeX. This version contains corrections, clarifications and some additions. This document was produced with Pro\TeX\ v3.2-031721, the most recent version available at the time of this writing.
+Finally, I'd like to mention The TeX Users Group, of which I am a member. This is a not-for-profit group for those interested in LaTeX. Membership is inexpensive and members are sent \textsc{tug}boat, the Journal of the Tex Users Group, three times a year, and the TeX Collection on \textsc{dvd} annually. This is a good way of keeping up with developments and changes to TeX distributions. \\
-The author is very interested in hearing about errors and suggestions for improvements, especially code that doesn't function as advertised. These reports can be sent to the author at \texttt{\color{Blue}mmorris-500@hotmail.com}.
+The author is very interested in hearing about errors and suggestions for improvements, especially code that doesn't function as advertised. Reports can be sent to the author at \texttt{\color{Blue}mmorris1k@gmail.com}.
@@ -90,21 +95,22 @@ The author is very interested in hearing about errors and suggestions for improv
\section{Installation}
-\LaTeXe is freely available from \texttt{\url{www.ctan.org}} in three main distributions:
+\LaTeXe is freely available from \texttt{\url{www.ctan.org}} in two main distributions:
\begin{itemize}
-\item TeXLive is cross platform and will install on \textsc{unix}-alike, Mac and Windows systems.\\
+\item TeX Live is cross platform and will install on \textsc{unix}-alike, Mac and Windows systems.\\
\item MacTeX is aimed at Mac OS users.\\
-\item ProTeX is aimed at Windows users.\\
\end{itemize}
-The most current version of ProTeX, as of this writing, is \texttt{protext-3.2-031721}. To install this on a Windows system, download it from \textsc{ctan} and unzip it. This will create a new directory called \texttt{protext-3.2-031721}. Click on this, then \texttt{setup.exe}. This will bring up the global setup console. Click \texttt{manual} to bring up a \textsc{pdf} document with easy installation instructions. The distribution also contains TeXstudio, an editor, and Sumatra, a \textsc{pdf} viewer in their respective directories. These should be installed after LaTeX. The \texttt{doc} directory contains several manuals on using LaTeX.
+This document illustrates TeX Live and is mainly aimed at users of Windows 10. The most current version of this, as of this writing, is Tex Live 2022. This can be downloaded in a number of ways from \textsc{ctan}. For Windows 10 an installer, which is about 20mb in size, may be downloaded and launched. It is also available as an \texttt{iso} file for those who burn their own DVD's. This is is a large file: about 4.3gb. TeX Live is also available on \textsc{dvd} as part of the \TeX Collection. This is distributed by the Tex User Group to members every year, and is available from the \textsc{tug} store at \url{www.tug.org/store/} along with stickers and other merchandise. \\
-After ProTeX is installed, the next step for Windows users is to place it in the Windows search path. This will allow Windows to find it if it is run from the command line. To do this, go to the Control Panel:
+For those who are installing from DVD, the first step is to open it and click on \texttt{index.html}. This contains links to installation documentation in 14 different languages. It provides instructions for Windows 7 and above, Mac OS X and GNU/Linux systems. \\
+
+After it is installed, the next step for Windows 10 users is to place it in the Windows search path. This will allow Windows to find it if it is run from the command line. To do this, go to the Control Panel:
\begin{flushleft}
@@ -112,98 +118,99 @@ After ProTeX is installed, the next step for Windows users is to place it in the
\end{flushleft}
-Then navigate to the directory containing the binary files and add it to the path. If it is a ProTeX distribution running on 64 bit Windows 10 they are in:
-
-
-\begin{flushleft}
-\texttt{C:\textbackslash Program Files\textbackslash MikTeX2.9\textbackslash miktex\textbackslash bin \textbackslash x64}
-\end{flushleft}
+Then navigate to the directory containing the binary files, those with a \texttt{.exe} extension, and add it to the path. The default location for Tex Live 2022 is:
+{\small
+\begin{verbatim}
+C:\texlive\2022\bin\win32
+\end{verbatim}
+}
\subsection{Package Management}
-\textsc{ctan} currently has over 6100 packages for LaTeX from over 2800 contributors. These provide additional features, fonts, document templates and documentation. ProTeX provides the MiKTeX Console to help manage them. This provides facilities for updating packages, accessing package documentation and installing new packages. \textsc{unix}-alike and MacTeX users should consult their documentation.
-
-The MikTeX Console can be accessed from the Windows 10 desktop by clicking
+A large part of LaTeX is made up of individual packages that add functionality. \textsc{ctan} currently has over 6200 packages from over 2800 contributors. These provide additional features, fonts, document templates and documentation. TeX Live provides the TeX Live Shell to help manage them. This provides facilities for updating packages and installing new packages. The TeX Live Shell can be accessed from the Windows 10 desktop by clicking
\begin{flushleft}
-\texttt{Windows Start $\rightarrow$ \texttt{MiKTeX 2.9} $\rightarrow$ \texttt{MiKTeX Console}}
+\texttt{Windows Start} $\rightarrow$ \texttt{TeX Live 2022} $\rightarrow$ \texttt{TLShell TeX Live Manager}
\end{flushleft}
+After the gui interface is loaded, the first thing to select is a package repository. These are world wide online sites that mirror the \texttt{ctan} main site and it will be the source of upgrades and new packages. To select one near you, select:
-When the Console appears, select the Operation Mode: \texttt{Administrator} or \texttt{User}. Select \texttt{Administrator} if you want to manage a system wide installation, such as on a single workstation, or \texttt{User} if you are working on a workstation which is part of a larger system.
-
-To add packages to LaTeX, click \texttt{Packages} and a list of all the packages available from \textsc{ctan} will appear along with the date it was installed on your system. If the date is missing, the package is not present on your installation. To install it, click the package name so that it is highlighted, then click \texttt{+} at the top of the list to install it.
+\begin{flushleft}
+\texttt{Options $\rightarrow$ Repositories}
+\end{flushleft}
-To update currently installed packages, select
+A box will appear with options to select \texttt{Any CTAN mirror}, \texttt{Specific mirror} or \texttt{Local directory}. Select a source, then click the \texttt{Save and Load} box.
+When the manager appears, it will contain a section called Package List. This has options to list \texttt{Installed}, \texttt{Not installed}, \texttt{All} and \texttt{Updatable} packages. To add packages or check for updates, a \textsc{ctan} mirror will need to be loaded. The TeX Live Shell will contact this site to compare your installation with the \texttt{ctan}. If you have already selected one with \texttt{options}, click on
\begin{flushleft}
-\texttt{Updates $\rightarrow$ Check for updates}
-\end{flushleft}
+\texttt{File $\rightarrow$ Load repository}
+\end{flushleft}
+To check for packages that are not yet installed, click \texttt{Not Installed} and a list of all the packages not installed on your system will appear. To install them, click the \textopenbullet next to the package name so that it changes to a tick, then click \texttt{Install marked}. \\
-If any updates are found, they will appear as a list. To perform the update, click \texttt{Update now} and they will be downloaded and installed automatically.
+To update currently installed packages, select \texttt{Updatable} and if any updates are found, they will appear as a list. As with installing new packages, select the packages and click \texttt{Update marked}. They will be downloaded and installed automatically. \\
-Following the package installation or update the file name and package databases have to be updated so that LaTeX can find the updated packages. If new fonts have been installed, the font map files have to be refreshed. To do this, go to the console Menu, click on
+Following the package installation or update, the file name database must to be updated so that LaTeX can find the updated package/s. To do this, go to the console Menu, click on
\begin{flushleft}
-\texttt{\texttt{Tasks $\rightarrow$ Refresh file name database}}
+\texttt{\texttt{Actions $\rightarrow$ Regenerate filename database}}
\end{flushleft}
-\begin{flushleft}
-When this is finished, go to
-\end{flushleft}
+If new fonts have been installed, the fontmap files have to be refreshed as well. To do this, go to the console Menu, click on
\begin{flushleft}
-\texttt{Tasks $\rightarrow$ Update package database}
+\texttt{Actions $\rightarrow$ Regenerate fontmaps}
\end{flushleft}
\begin{flushleft}
-If fonts have been updated or installed, select
+When this is finished, the package database also needs to be updated:
\end{flushleft}
\begin{flushleft}
-\texttt{Tasks $\rightarrow$ Refresh font map files}
+\texttt{Tasks $\rightarrow$ Update package database}
\end{flushleft}
-Package documentation can be accessed by clicking \texttt{Documentation} on the console. A list of all the packages on \texttt{ctan} will appear along with a tick in the \texttt{Installed} column if it is present on the system. Documentation may be installed in the same way as packages.
+A number of packages must be present on your system so that you can use the examples in this document. These are listed in Table 1. Their presence may be checked by clicking the \texttt{Not installed} option of the Package List section of the TeX Live Shell. This will list available packages that are not yet installed.
-A number of packages must be present on your installation so that you can use the examples in this document. Not all of them come with every distribution due to size constraints. The ProTeX distribution's download size had grown to about 3gb, and to reduce this, a number of packages were omitted. This reduced the download size to about 1gb. If any of the required packages are missing, they can be installed using the instructions in the section on Package Management below. Some packages access other packages and these must be present on your installation as well: \texttt{ragged2e}, for instance, requires the packages \texttt{everysel} and \texttt{footmisc}. BibLaTeX, which automatically generates references and reference lists, has 12 additional packages, not including style packages! A list is in Table 1.
+If any of the required packages are missing, they can be installed using the instructions above. Some packages require access to additional packages and these must be present on your system as well: \texttt{ragged2e}, for instance, requires the packages \texttt{everysel} and \texttt{footmisc}. BibLaTeX, which automatically generates references and reference lists, has 12 additional packages, not including style packages!
-\begin{table}
+\begin{table}[h]
\begin{center}
\begin{tabular}{ll}
-\hline
+\toprule[1.0pt]
\LaTeXe & Bib\LaTeX \\
-\hline
+\midrule[0.5pt]
\texttt{babel} & \texttt{babel v3.9r or above or polygossia} \\
-\texttt{datetime2} & \texttt{biber} \\
-\texttt{everysel} & \texttt{csquotes} \\
-\texttt{fancyhdr} & \texttt{etoolbox} \\
-\texttt{fontenc} & \texttt{etex} \\
-\texttt{footmisc} & \texttt{ifthen} \\
-\texttt{geometry} & \texttt{keyval} \\
-\texttt{graphicx} & \texttt{kvoptions} \\
-\texttt{hyphenat} & \texttt{logreq} \\
-\texttt{ragged2e} & \texttt{pdftexcmds v0.27 or above} \\
-\texttt{setspace} & \texttt{url} \\
-\texttt{xcolor} & \texttt{xpatch} \\
+\texttt{booktabs} & \texttt{biber} \\
+\texttt{datetime2} & \texttt{csquotes} \\
+\texttt{everysel} & \texttt{etoolbox} \\
+\texttt{fancyhdr} & \texttt{etex} \\
+\texttt{fontenc} & \texttt{ifthen} \\
+\texttt{footmisc} & \texttt{keyval} \\
+\texttt{geometry} & \texttt{kvoptions} \\
+\texttt{graphicx} & \texttt{logreq} \\
+\texttt{hyphenat} & \texttt{pdftexcmds v0.27 or above} \\
+\texttt{multirow} & \texttt{url} \\
+\texttt{ragged2e} & \texttt{xpatch} \\
+\texttt{setspace} & \\
+\texttt{xcolor} & \\
\texttt{xmp} & \\
& Bibliographical Styles \\
& \texttt{biblatex-apa} \\
& \texttt{biblatex-chicago} \\
& \texttt{biblatex-mla} \\
& \texttt{biblatex-vancouver} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Required and recommended packages}
\end{center}
@@ -212,13 +219,13 @@ A number of packages must be present on your installation so that you can use th
\subsection{Additional Software}
-The software listed below is helpful for managing projects in LaTeX. An editor makes marking up a text file and compiling it much simpler. Two freely available editors are \TeX studio and Kile. \TeX studio comes with ProTeX and the most recent version is available from:
+The software listed below is helpful for managing LaTeX projects. An editor makes marking up a text file and compiling it much simpler, and a reference manager helps with automatically generated references and citations. Two freely available editors are TeX studio and Kile. TeX studio is available from:
\begin{flushleft}
\texttt{\url{www.texstudio.org}}
\end{flushleft}
-Kile is another popular choice with similar functionality to TeXstudio. It has a preview feature which shows how your document will look. It is available from:
+Kile is another popular choice with similar functionality to TeXstudio. It has a preview feature which shows how your document will look after it is compiled. It is available from:
\begin{flushleft}
\texttt{\url{www.kile.sourceforge.io/}}
@@ -230,14 +237,14 @@ A reference manager is helpful for scholarly writing because it can keep all the
\texttt{\url{www.jabref.org}}
\end{flushleft}
-Zotero is also freely available and supports a large number of reference formats. It allows users to add pdf's, images and web pages to its databases and users can also add annotations to each entry:
+Zotero is also freely available and supports a large number of reference formats. It allows users to add pdf's, images and web pages to its databases and users can add their own annotations to each entry:
\begin{flushleft}
\texttt{\url{www.zotero.org}}
\end{flushleft}
-A fundamental requirement for LaTeX is a viewer so that typesetters can view the results of their labours. There are a large number of viewers for \textsc{pdf} files, and ProTeX comes with Sumatra \textsc{pdf}. The latest version is available from:
+A fundamental requirement for LaTeX is a viewer so that typesetters can view the results of their labours. There are a large number of viewers for \textsc{pdf} files. Sumatra \textsc{pdf} is a free and popular choice. The latest version is available from:
\begin{flushleft}
@@ -245,14 +252,14 @@ A fundamental requirement for LaTeX is a viewer so that typesetters can view the
\end{flushleft}
-GSView is a free postscript viewer for Windows. It requires Ghostscript which is installed automatically by ProTeX. GSview v5.0 is available from:
+GSView is a free postscript viewer for Windows. It requires Ghostscript which is installed automatically by TeX Live. GSview v5.0 is available from:
\begin{flushleft}
\texttt{\url{www.ghostgum.com.au/software/gsview.htm}}
\end{flushleft}
-LaTeX handles a limited range of graphic formats so an image converter is useful. Image Magic is freely available and reads and writes over 200 graphic formats. It is available from:
+LaTeX handles a limited range of graphic formats so an image converter is useful. Image Magic is freely available and reads and writes over 200 graphic formats. It is available from:
\begin{flushleft}
\texttt{\url{www.imagemagick.org/script/index.php}}
@@ -270,7 +277,9 @@ LaTeX is run from the command line by navigating to the project folder and then
\end{flushleft}
-This produces a \textsc{dvi} file called \texttt{TestFile.dvi} that can be converted to postscript with \texttt{dvips}:
+\begin{flushleft}
+This produces a \textsc{dvi} file called \texttt{TestFile.dvi} that can be converted to postscript with \texttt{dvips}:
+\end{flushleft}
\begin{flushleft}
@@ -278,7 +287,9 @@ This produces a \textsc{dvi} file called \texttt{TestFile.dvi} that can be conve
\end{flushleft}
+\begin{flushleft}
If \textsc{pdf} format is preferred, use \textsc{pdf}latex:
+\end{flushleft}
\begin{flushleft}
@@ -310,7 +321,7 @@ and it will run automatically. In Kile, go to
\section{Project Management}
-The first step in creating a document with LaTeX is to write the text and save it as a plain text file into a project directory created specifically for that project. This text file is then marked up so that when it is compiled it becomes a formatted postscript or \textsc{pdf} document. The normal suffix for this file is \texttt{.tex}. During compilation, LaTeX will produce several other files and having a project directory will help keep all of them together. This directory should also contain any graphic files and reference databases so that LaTeX can find them.
+The first step in creating a document with LaTeX is to write the text and save it as a plain text file into a project directory created specifically for that project. This text file is then marked up so that when it is compiled it becomes a formatted postscript or \textsc{pdf} document. The normal suffix for this file is \texttt{.tex}. During compilation, LaTeX will produce several other files and having a unique project directory will help keep all of them together. This directory should also contain any graphic files and reference databases so that LaTeX can find them.
\subsection{Postscript vs \textsc{pdf}}
@@ -321,27 +332,32 @@ One of the first things to consider is if the document is to be produced in post
\clearpage
-\section{LaTeX Conventions}
-LaTeX documents have two parts: the preamble and the document text. The preamble defines the document's global properties such as the template for the document, paper size, fonts and margins and loads packages that contain functions that will be used to format the text. The first command is \texttt{\textbackslash documentclass\{TemplateName\}} Packages are loaded with the \texttt{\textbackslash usepackage[Options]\{PackageName\}} command. The required package name is placed between the curly braces and a list of options separated by commas are listed between square brackets:
+\section{LaTeX Conventions}
+LaTeX documents have two parts: the preamble and the document text. The preamble defines the document's global properties such as the template for the document, paper size, fonts and margins and loads packages that contain functions that will be used to format the text. The first command is \texttt{\textbackslash documentclass[options]\{TemplateName\}} Packages are loaded with the \texttt{\textbackslash usepackage[Options]\{PackageName\}} command. The required package name is placed between the curly braces and a list of options separated by commas are listed between square brackets:
-\begin{flushleft}
-\texttt{\textbackslash documentclass\{TemplateName\} \\
-\textbackslash usepackage[Option1, Option2]\{PackageName\}}
-\end{flushleft}
-
+{\small
+\begin{verbatim}
+\documentclass[Option1, Option2]{TemplateName}
+\usepackage[Option1, Option2]{PackageName}
+\end{verbatim}
+}
After the preamble comes the document text. This is contained inside the \texttt{document} environment and includes the text, graphs, tables, lists etc.
The simplest document uses LaTeX's default settings and requires only that the document class be specified and that the text be placed in the \texttt{document} environment. The following creates an article class document with everything else left at the default settings:
-\begin{flushleft}
-\texttt{\textbackslash documentclass\{article\} \\
-\textbackslash begin\{document\} \\
-Document Text Here \\
-\textbackslash end\{document\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\documentclass{article}
+\begin{document}
+
+Document Text Here
+
+\end{document}
+\end{verbatim}
+}
\subsection{Commands}
@@ -349,9 +365,9 @@ Document Text Here \\
Commands in LaTeX begin with a \texttt{\textbackslash}. This is one of LaTeX's special characters and alerts LaTeX that the following is an instruction rather than text. This is followed by a command and the object of the command is often placed between curly braces: \texttt{\textbackslash Command\{Object\}}. To format a section of text in italics, the \texttt{\textbackslash textit\{\}} command tells LaTeX that the text inside the curly braces is to be formatted in italics:
-\begin{flushleft}
-\texttt{\textbackslash textit\{Lorem ipsum dolor sit amet, consectetur adipiscing elit.\}}
-\end{flushleft}
+\begin{verbatim}
+\textit{Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
+\end{verbatim}
\begin{flushleft}
@@ -364,69 +380,71 @@ produces
\end{flushleft}
-Commands are also used to select special characters: A \$ is one of LaTeX's control characters, so a \texttt{\textbackslash} must be added to tell LaTeX that it should be processed as text: \texttt{\textbackslash \$} produces \texttt{\$}. Commands for all of LaTeX's control characters is in Table 8.
+Commands are also used to select special characters. This can include LaTeX's control characters, symbols and diacritics. \$ is one of LaTeX's control characters. It informs LaTeX that the following code is to be executed in Math mode. A \texttt{\textbackslash} must be added to tell LaTeX that it should be processed as text: \texttt{\textbackslash \$} produces \texttt{\$}. Commands for all of LaTeX's control characters are in Table 8.
It is always a good idea to annotate your code. Annotations can be added to LaTeX code by starting comment lines with a \texttt{\%}. This will stop LaTeX from attempting to run it and returning an error message:
-\begin{flushleft}
-\texttt{
-\% This is a comment. \\
+{\small
+\begin{verbatim}
+% This is a comment.
+\end{verbatim}
}
-\end{flushleft}
-
\clearpage
+
\section{Preamble}
Every LaTeX document has a preamble which contains instructions regarding document template, page size and other options that will affect it as a whole. It is the first part of any document and goes before the body of the text. The first line of the preamble is:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[Options]\{DocumentTemplate\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\documentclass[Options]{DocumentTemplate}
+\end{verbatim}
+}
This specifies the template for the document. The base options are \texttt{article}, \texttt{book}, \texttt{letter} or \texttt{report}. There are a wide range of templates and some organisations produce their own. If one of these is required, it is named here and will be loaded when the document is compiled. After the template is selected, options define font size, paper size, number of columns and whether it is to be printed on one side of the page or two.
LaTeX's defaults are: a 10pt font size, a paper size of 8.5'' x 11'', which is the US standard letter size, portrait orientation, a separate title page for the report class but not the others, typesetting in one column, and printing on one side of the page only. All these can be customised. A summary of commands and options are outlined in Tables 2 and 3.
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{ll}
-\hline
+\toprule[1.0pt]
Option & Command \\
-\hline
+\midrule[0.5pt]
Document Type & \texttt{letter, article, report, book} \\
Typeface Size (pts) & \texttt{10, 11, 12} \\
Title Page & \texttt{titlepage, notitlepage} \\
Columns & \texttt{onecolumn, twocolumn} \\
Layout & \texttt{oneside, twoside} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Document class options}
\end{center}
\end{table}
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Size & Measurement(mm) & Command \\
-\hline
+\midrule[0.5pt]
A4 & 210 x 297 & \texttt{a4paper} \\
A5 & 148 x 210 & \texttt{a5paper} \\
B5 & 176 x 250 & \texttt{b5paper} \\
Executive & 185 x 267 & \texttt{executivepaper} \\
Legal & 216 x 356 & \texttt{legalpaper} \\
Letter & 216 x 279 & \texttt{letterpaper} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Paper sizes}
\end{center}
@@ -436,143 +454,177 @@ Letter & 216 x 279 & \texttt{letterpaper} \\
The following code creates an article class document with A4 sized paper and a 12-point font. The other options will stay at their default settings:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[12pt, a4paper]\{article\}} \\
-\end{flushleft}
-
-
-After the document type is defined, packages that will be used are loaded with
+{\small
+\begin{verbatim}
+\documentclass[12pt, a4paper]{article}
+\end{verbatim}
+}
\begin{flushleft}
-\texttt{\textbackslash usepackage[Options]\{PackageName\}} \\
+After the document type is defined, packages that will be used are loaded with
\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[Options]{PackageName}
+\end{verbatim}
+}
+
The first package is \texttt{setspace}. This package supports single, one-and-a-half and double spacing with \texttt{\textbackslash singlespacing}, \texttt{\textbackslash onehalfspacing} and \texttt{\textbackslash doublespacing}. This will change the spacing of the entire document, but figures, tables and footnotes will be unaffected. \texttt{setspace} is loaded in the preamble and the required spacing is specified in the document text after \texttt{\textbackslash begin\{document\}}. LaTeX's default spacing is single spaced:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\} \\
-\textbackslash usepackage\{setspace\} \\
-\textellipsis \\
-\textbackslash begin\{document\} \\
-\textbackslash doublespacing \\
-\textellipsis \\
-\textbackslash end \{document\}
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
+\usepackage{setspace}
+. . .
+\begin{document}
+\doublespacing
+. . .
+\end {document}
+\end{verbatim}
}
-\end{flushleft}
The next package is \texttt{graphicx} which is part of the `graphics' bundle. It provides facilities to include graphics in documents with it's \texttt{\textbackslash includegraphics\{\}} command.
-\begin{flushleft}
-\texttt{\textbackslash usepackage\{graphicx\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage{graphicx}
+\end{verbatim}
+}
\texttt{xcolor} provides support for coloured text, text background, page colour or a coloured box surrounding text. This is especially helpful for \textsc{pdf} documents that contain hot links as they can be highlighted. If no options are specified, 19 colours are available. Options \texttt{dvipsnames}, \texttt{svgnames} and \texttt{x11names} provide 68, 151 and 317 colours respectively. Colours and their designations for each of these options are provided in \texttt{xcolour's} documentation (Kern, 2021). If specific colours are required, this package can produce them in rgb and cmyk format. The following loads \texttt{xcolor} with \texttt{dvipsnames} to provide 68 colour choices:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[dvipsnames]\{xcolor\} }
-\end{flushleft}
-
+\begin{verbatim}
+\usepackage[dvipsnames]{xcolor}
+\end{verbatim}
-The \texttt{babel} package supports hyphenation for justified text and has facilities for about 200 languages. This includes three dialects of English: \texttt{english} refers to American and Canadian, \texttt{UKenglish} refers to British, and \texttt{australian} refers to Australian and New Zealand English. If the document contains text in multiple languages, all of them should be listed as options. There may be multiple options for language: English has three and German, two. Consult the documentation for details on each one. The language listed last is the document’s main language:
+The \texttt{babel} package supports hyphenation for justified text and has facilities for about 200 languages. This includes three dialects of English: \texttt{english} refers to American and Canadian, \texttt{UKenglish} refers to British, and \texttt{australian} refers to Australian and New Zealand English. If the document contains text in multiple languages, all of them should be listed as options. There may be multiple options for each language: English has three and German, two. Consult the documentation for details on each one. The language listed last is the document’s main language:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[french, ngerman, australian]\{babel\}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[french, ngerman, australian]{babel}
+\end{verbatim}
+}
+This loads French, German and Australian English with Australian being the document's main language. To swap to one of the other languages in the text, use \texttt{\textbackslash select language\{LanguageName\}} for blocks of text such as paragraphs, and \texttt{\textbackslash foreignlanguage \{LanguageName\}\{Text\}} for text that is part of a paragraph:
-This loads French, German and Australian English with Australian being the document's main language. To swap to one of the other languages in the text, use \texttt{\textbackslash selectlang- uage\{LanguageName\}} for blocks of text such as paragraphs, and \texttt{\textbackslash foreignlanguage\{Lang- uageName\}\{Text\}} for text that is part of a paragraph:
+{\small
+\begin{verbatim}
+Text in English.
+\selectlanguage{french}
+Texte en Francais.
+\selectlanguage{australian}
+Returns to Australian English.
+\end{verbatim}
+}
-\begin{flushleft}
-\texttt{Text in English. \\
-\textbackslash selectlanguage\{french\} \\
-Texte en Francais. \\
-\textbackslash selectlanguage\{australian\} \\
-Returns to Australian English. \\}
-\end{flushleft}
\begin{flushleft}
or
\end{flushleft}
-\begin{flushleft}
-\texttt{\textbackslash foreignlanguage\{french\}\{Texte en Francais.\}}
-\end{flushleft}
+
+{\small
+\begin{verbatim}
+\foreignlanguage{french}{Texte en Francais.}
+\end{verbatim}
+}
-If LaTeX doesn't hyphenate words properly, they will run into the right-hand margin. To fix this, a list of troublesome words and their syllables can be specified with the \texttt{hyphenat} package and it's \texttt{hyphenation\{\}} command. These words are placed in hyphenation's curly braces divided into syllables with a -. For example, `hyphenate' is defined as \texttt{hy-phen-ate} and preamble is \texttt{pre-am-ble}. Multiple words are separated by commas:
+If LaTeX doesn't hyphenate words properly, they will run into the right-hand margin. To fix this, a list of troublesome words can be listed with the \texttt{hyphenat} package and it's \texttt{\textbackslash hyphenation\{\}} command. These words are placed in hyphenation's curly braces divided into syllables with a -. For example, `hyphenate' is defined as \texttt{hy-phen-ate} and preamble is \texttt{pre-am-ble}:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[french, ngerman, australian]\{babel\} \\
-\textbackslash usepackage\{hyphenat\} \\
-\textbackslash hyphenation\{hy-phen-ate, pre-am-ble\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[french, ngerman, australian]{babel}
+\usepackage{hyphenat}
+\hyphenation{hy-phen-ate pre-am-ble}
+\end{verbatim}
+}
-Dates can be added with datetime2. This package is loaded with
\begin{flushleft}
-\texttt{\textbackslash usepackage\{datetime2\}}
+Dates can be added with datetime2. This package is loaded with
\end{flushleft}
+
+{\small
+\begin{verbatim}
+\usepackage{datetime2}
+\end{verbatim}
+}
+
\begin{flushleft}
and the date itself inserted in the text with
\end{flushleft}
-\begin{flushleft}
-\texttt{\textbackslash today}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\today
+\end{verbatim}
+}
This will add the date the document was compiled in \textsc{yyyy-mm-dd} format so it will look like 2020-09-19. The format can be changed with the \texttt{useregional} option. This will set the date format so that it matches the language specified when \texttt{babel} was loaded. The \texttt{babel} example above specifies Australian English and will format the timestamp to \textsc{dd mm yyyy}. To add the day of the week, add the \texttt{showdow} option:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[useregional, showdow]\{datetime2\}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[useregional, showdow]{datetime2}
+\end{verbatim}
+}
-The \texttt{fontenc} package gives access to the glyphs of language. This is done through what LaTeX refers to as encodings. The default, and LaTeX's original encoding option, is \texttt{OT1}. This gives access to glyphs for the English alphabet. Unfortunately, this encoding doesn’t allow hyphenation of accented characters that appear in non-English latin alphabets. If the document is in English this doesn’t matter, but if the document contains glyphs from other latin alphabets, the encoding should be changed to \texttt{T1}. This has a wider range of glyphs. LaTeX provides encodings for a range of languages: Cyrillic, African Latin, Vietnamese, Greek, Armenian etc. If text for languages in alphabets other than latin are included in your document, encodings for these will have to be loaded as well. For this, see Mittelbach, et al (2016).
+The \texttt{fontenc} package gives access to the glyphs of language. This is done through what LaTeX refers to as encodings. The default, and LaTeX's original encoding option, is \texttt{OT1}. This gives access to glyphs for the English alphabet. Unfortunately, this encoding doesn’t allow hyphenation of accented characters that appear in non-English latin alphabets. If the document is in English this doesn’t matter, but if the document contains glyphs from other latin alphabets, the encoding should be changed to \texttt{T1}. This has a wider range of glyphs. LaTeX provides encodings for a range of languages: Cyrillic, African Latin, Vietnamese, Greek, Armenian etc. If text for languages in alphabets other than latin are included in your document, encodings for these will have to be loaded as well. For more on this, see Mittelbach, et al (2016).
TS1 is a coding that gives access to symbols. This can be loaded at the same time as the font encoding(s). The required encodings are specified in options. To load both T1 and TS1 encodings:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[TS1, T1]\{fontenc\}}
-\end{flushleft}
+
+{\small
+\begin{verbatim}
+\usepackage[TS1, T1]{fontenc}
+\end{verbatim}
+}
+
LaTeX's default setting for text alignment is justified with both edges of the text block aligned evenly. If the text block should be left aligned with a ragged right side, \texttt{ragged2e} will format the text as this for the entire document with the \texttt{document} option. To use this package, two additional packages should be present on your LaTeX installation. These are \texttt{everysel} and \texttt{footmisc}. The following loads \texttt{ragged2e} and sets the document text alignment to left aligned with a ragged right side:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[document]{ragged2e}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[document]{ragged2e}
+\end{verbatim}
+}
The next line loads the font for the document. If it is not defined, it will default to Computer Modern, which is LaTeX's original font. LaTeX provides a wide range of fonts with an option to install more if required. This example loads Latin Modern with the package name \texttt{lmodern}.
+{\small
+\begin{verbatim}
+\usepackage{lmodern}
+\end{verbatim}
+}
\begin{flushleft}
- \texttt{\textbackslash usepackage\{lmodern\}}
+Table 4 contains a short font sampler and package names.
\end{flushleft}
-Table 4 contains a short font sampler and package names. A wide range of fonts is available. The TeX User Group maintains the LaTeX font catalogue. See the Resources section for a link to this.
-
-
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Font Name & Package Name & Sample Text \\
-\hline
+\midrule[0.5pt]
Avant Garde & \texttt{avant} & \fontfamily{pag}\selectfont Lorem ipsum dolor sit amet \\
Bookman & \texttt{bookman} & \fontfamily{pbk}\selectfont Lorem ipsum dolor sit amet \\
Charter & \texttt{charter} & \fontfamily{bch}\selectfont Lorem ipsum dolor sit amet \\
@@ -584,7 +636,7 @@ New Century Schoolbook & \texttt{newcent} & \fontfamily{pnc}\selectfont Lore
Palatino & \texttt{mathpazo} & \fontfamily{ppl}\selectfont Lorem ipsum dolor sit amet \\
Times New Roman & \texttt{mathptmx} & \fontfamily{ptm}\selectfont Lorem ipsum dolor sit amet \\
Utopia & \texttt{utopia} & \fontfamily{put}\selectfont Lorem ipsum dolor sit amet \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{A short font sampler}
\end{center}
@@ -593,20 +645,20 @@ Utopia & \texttt{utopia} & \fontfamily{put}\selectfont Lor
Margins can be adjusted from the defaults with the \texttt{geometry} package. The left, right, top, and bottom margins can all be specified with this, and an allowance made for binding if the document is to be bound. It accepts units in millimetres, centimetres, points, and inches (mm, cm, pt, in). The options are listed in Table 5.
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{ll}
-\hline
+\toprule[1.0pt]
Option & Comment \\
-\hline
+\midrule[0.5pt]
\texttt{left} & Left Margin \\
\texttt{right} & Right Margin \\
\texttt{top} & Top Margin \\
\texttt{bottom} & Bottom Margin \\
\texttt{bindingoffset} & Add space for binding \\
\texttt{headheight} & Changes the size of the header \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Geometry options}
\end{center}
@@ -615,97 +667,126 @@ Option & Comment \\
If headers and footers are contained in the document, LaTeX may sometimes return an error message to say that the headheight is too small. This can be corrected with the \texttt{\textbackslash headheight} option. For this document I have set the headheight to $1.5\times$ the point size of the text for a headheight of 18pt. The header is designed to hold a single line of text, but can be adjusted to accommodate multiple lines. The following code sets the left margin at 1.5 inches, the right margin at 1 inch, the top margin at 1 inch, the bottom margin at 1.75 inches and the height for the header to 18 point:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[left=1.5in, right=1.0in, top=1.0in, bottom=1.75in,
-headheight=18pt]\{geometry\}}
-\end{flushleft}
+
+{\small
+\begin{verbatim}
+\usepackage[left=1.5in, right=1.0in, top=1.0in, bottom=1.75in,
+headheight=18pt]{geometry}
+\end{verbatim}
+}
+
The page margins can be changed mid-document with \texttt{\textbackslash newgeometry\{\}}. It reverts to the original settings with\texttt{ \textbackslash restore\{geometry\}}. The \texttt{\textbackslash newgeometry\{\}} command has the same options as those used by geometry in the preamble:
-\begin{flushleft}
-\texttt{\textbackslash newgeometry\{left=0.5in, right=0.5in, top=0.5in, bottom=0.5in\}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\newgeometry{left=0.5in, right=0.5in, top=0.5in, bottom=0.5in}
+\end{verbatim}
+}
-This changes the margins to a uniform 0.5 inches. To change it back:
\begin{flushleft}
-\texttt{\textbackslash restore\{geometry\}}
+This changes the margins to a uniform 0.5 inches. To change it back:
\end{flushleft}
+{\small
+\begin{verbatim}
+\restore{geometry}
+\end{verbatim}
+}
+
+
Headers and footers are handled by the \texttt{fancyhdr} package. This package provides header and footer placement to the left, centre and right and customizable lines for both headers and footers. The pagestyle should be changed to fancy if this package is used:
-\begin{flushleft}
-\texttt{\textbackslash usepackage\{fancyhdr\} \\
-\textbackslash pagestyle\{fancy\}}
-\end{flushleft}
+
+{\small
+\begin{verbatim}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\end{verbatim}
+}
+
There are six locations available: left, centre and right headers and footers. The location and contents of each header or footer is specified as:
-\begin{flushleft}
-\texttt{\textbackslash lhead\{Left Top\} \\
-\textbackslash chead\{Centre Top\} \\
-\textbackslash rhead\{Right Top\} \\
-\textbackslash lfoot\{Bottom Left\} \\
-\textbackslash cfoot\{Bottom Centre\} \\
-\textbackslash rfoot\{Bottom Right\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\lhead{Left Top}
+\chead{Centre Top}
+\rhead{Right Top}
+\lfoot{Bottom Left}
+\cfoot{Bottom Centre}
+\rfoot{Bottom Right}
+\end{verbatim}
+}
+
The text of the header or footer is contained between the curly braces. These can contain page numbers and dates generated using \texttt{\textbackslash thepage} and \texttt{\textbackslash today} respectively. Decorative lines can be added to both headers and footers with
-\begin{flushleft}
-\texttt{\textbackslash renewcommand{headrulewidth}{0.5pt} \\
-\textbackslash renewcommand{footrulewidth}{0.5pt}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\renewcommand{headrulewidth}{0.5pt}
+\renewcommand{footrulewidth}{0.5pt}
+\end{verbatim}
+}
-This will place lines that are 0.5 points wide beneath the header and above the footer. Line weights can be increased and decreased between 0.0 and 1.0. A line weight of 0.0pt produces no lines.
+This will place lines that are 0.5 points wide beneath the header and above the footer. Line weights can be increased and decreased between 0.0 and 1.0. A line weight of 0.0pt produces no lines. \\
The following code loads \texttt{fancyhdr} and places a running header or title top left, page numbers top right, today’s date stamp bottom left and decorative lines 0.5 points thick below the footer and above the header:
-\begin{flushleft}
-\texttt{\textbackslash usepackage\{fancyhdr\} \\
-\textbackslash pagestyle\{fancy\} \\
-\textbackslash lhead\{Running Header or Title.\} \\
-\textbackslash chead\{\} \\
-\textbackslash rhead\{\textbackslash thepage\} \\
-\textbackslash lfoot\{\textbackslash today\} \\
-\textbackslash cfoot\{\} \\
-\textbackslash rfoot\{\} \\
-\textbackslash renewcommand\{\textbackslash headrulewidth\}\{0.5pt\} \\
-\textbackslash renewcommand\{\textbackslash footrulewidth\}\{0.5pt\}} \\
-\end{flushleft}
-
+{\small
+\begin{verbatim}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\lhead{Running Header or Title.}
+\chead{}
+\rhead{\thepage}
+\lfoot{\today}
+\cfoot{}
+\rfoot{}
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0.5pt}
+\end{verbatim}
+}
\clearpage
+
\section{Text}
The body of the text for LaTeX documents is enclosed in the document environment:
-\begin{flushleft}
-\texttt{\textbackslash begin\{document\} \\
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. \\
-\textbackslash end\{document\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{document}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus. \\
+\end{document}
+\end{verbatim}
+}
-Either a blank line between two sections of text, or \texttt{\textbackslash par}, denotes a paragraph break and \texttt{\textbackslash \textbackslash} starts a new line.
-Page breaks can be inserted with, \texttt{\textbackslash newpage} or \texttt{\textbackslash clearpage}. \texttt{\textbackslash clearpage} is preferred if the document contains chapters or sections with tables, figures, or graphics. This will place them at the end of their section if LaTeX is unable to place them in the text.
+Either a blank line between two sections of text, or \texttt{\textbackslash par}, denotes a paragraph break and \texttt{\textbackslash \textbackslash} starts a new line.
+Page breaks can be inserted with, \texttt{\textbackslash newpage} or \texttt{\textbackslash clearpage}. \texttt{\textbackslash clearpage} is preferred if the document contains chapters or sections with tables or figures. This will place them at the end of their section if LaTeX is unable to place them in the text.
\subsection{Fonts and Styles}
-The base font and size for LaTeX documents is loaded in the preamble. Font styles, such as \textbf{bold} or \textit{italic} can be changed in the body of the text. A list and their commands are contained in Table 6. These can be changed in two ways. The first is to insert the text in curly braces following a command. This
+The base font and size for LaTeX documents is loaded in the preamble. Font styles, such as \textbf{bold} or \textit{italic} can be changed in the body of the text. A list of font styles and their commands are contained in Table 6. These can be changed in two ways. The first is to insert the text in curly braces following a command. This
+
+{\small
+\begin{verbatim}
+\textit{Lorem ipsum dolor sit amet . . .}
+\end{verbatim}
+}
-\begin{flushleft}
-\texttt{\textbackslash textit\{Lorem ipsum dolor sit amet . . .\}}
-\end{flushleft}
-
\begin{flushleft}
formats the text between the curly braces in italics as
\end{flushleft}
@@ -718,11 +799,15 @@ formats the text between the curly braces in italics as
This is useful for single words or sentences, but for blocks of text an environment is convenient:
-\begin{flushleft}
-\texttt{\textbackslash begin\{itshape\} \\
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. \\
-\textbackslash end\{itshape\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\{begin{itshape}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. \\
+\end{itshape}
+\end{verbatim}
+}
\begin{flushleft}
This produces:
@@ -735,16 +820,16 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultric
\end{flushleft}
-Fonts can be made larger or smaller from {\tiny Tiny} to {Normal Size} to {\Huge Huge} in a similar way. Table 7 gives commands for resizing fonts.
+Fonts can be made larger or smaller from {\tiny Tiny} to {Normal Size} to {\Huge Huge} in a similar way. Table 7 gives commands for resizing fonts. \\
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Style & Command & Sample \\
-\hline
+\midrule[0.5pt]
Roman & \texttt{\textbackslash textrm\{\}} & \textrm{Roman} \\
Sans Serif & \texttt{\textbackslash textsf\{\}} & \textsf{Sans Serif} \\
Typewriter & \texttt{\textbackslash texttt\{\}} & \texttt{Typewriter} \\
@@ -754,7 +839,7 @@ Small Caps & \texttt{\textbackslash textsc\{\}} & \textsc{Small Caps}
Underline & \texttt{\textbackslash underline\{\}} & \underline{Underline} \\
Emphasis & \texttt{\textbackslash emph\{\}} & \emph{Emphasis} \\
Slanted & \texttt{\textbackslash textsl\{\}} & \textsl{Slanted} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Text styles}
\end{center}
@@ -762,13 +847,13 @@ Slanted & \texttt{\textbackslash textsl\{\}} & \textsl{Slanted}
-\begin{table}
+\begin{table}{h}
\small
\begin{center}
\begin{tabular}{lc}
-\hline
+\toprule[1.0pt]
Command & Sample \\
-\hline
+\midrule[0.5pt]
\texttt{\textbackslash tiny\{\}} & \tiny{Lorem ipsum dolor sit amet} \\
\texttt{\textbackslash scriptsize\{\}} & \scriptsize{Lorem ipsum dolor sit amet} \\
\texttt{\textbackslash footnotesize\{\}} & \footnotesize{Lorem ipsum dolor sit amet} \\
@@ -779,7 +864,7 @@ Command & Sample \\
\texttt{\textbackslash LARGE\{\}} & \LARGE{Lorem ipsum dolor sit amet} \\
\texttt{\textbackslash huge\{\}} & \huge{Lorem ipsum dolor sit amet} \\
\texttt{\textbackslash Huge\{\}} & \Huge{Lorem ipsum dolor sit amet} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Font sizes}
\end{center}
@@ -787,13 +872,13 @@ Command & Sample \\
-If \texttt{xcolor} is loaded, fonts, font backgrounds and pages can be re-coloured. \texttt{\{\textbackslash color\{Col- orName\} Text\}} changes the colour of text inside the curly braces. To change it to red:
-
-
-\begin{flushleft}
-\texttt{\{\textbackslash color\{red\} Lorem ipsum dolor sit amet, consectetur adipiscing elit.\}}
-\end{flushleft}
+If \texttt{xcolor} is loaded, fonts, font backgrounds and pages can be re-coloured. \texttt{\{\textbackslash color \{ColorName\}\{Text\}} changes the colour of text inside the curly braces. To change it to red:
+{\small
+\begin{verbatim}
+\color{red} Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+\end{verbatim}
+}
\begin{flushleft}
produces:
@@ -801,7 +886,7 @@ produces:
\begin{flushleft}
-{\color {red} Lorem ipsum dolor sit amet, consectetur adipiscing elit.}\\
+{\color {red} Lorem ipsum dolor sit amet, consectetur adipiscing elit.}
\end{flushleft}
@@ -809,11 +894,12 @@ produces:
\texttt{\textbackslash colorbox\{\}} changes the background colour, in this case to Sea Green:
\end{flushleft}
-
-\begin{flushleft}
-\texttt{{\textbackslash colorbox\{SeaGreen\}\{Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet\}\}}}
-\end{flushleft}
-
+{\small
+\begin{verbatim}
+{\colorbox {SeaGreen}{Lorem ipsum dolor sit amet Lorem ipsum dolor
+sit amet}}
+\end{verbatim}
+}
\begin{flushleft}
produces
@@ -830,9 +916,9 @@ Both can be changed by specifying the background colour and the text colour:
\end{flushleft}
-\begin{flushleft}
-\texttt{\textbackslash colorbox\{SkyBlue\}\textbackslash color\{Red\}\{Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet\}}
-\end{flushleft}
+\begin{verbatim}
+\colorbox{SkyBlue}{\color{Red} Lorem ipsum dolor sit amet}
+\end{verbatim}
\begin{flushleft}
@@ -841,7 +927,7 @@ produces:
\begin{flushleft}
-\colorbox{SkyBlue}{\color{Red} Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet}
+\colorbox{SkyBlue}{\color{Red} Lorem ipsum dolor sit amet}
\end{flushleft}
@@ -856,17 +942,18 @@ The following symbols are used by LaTeX as part of it's programming instructions
\end{center}
-These and the commands to produce them along with a range of other common symbols are in Table 8.
+These and the commands to produce them along with a range of other common symbols are in Table 8. \\
Quotation marks are produced by using the \texttt{\textasciigrave} and \texttt{\textquotesingle} keys or \texttt{\textbackslash textquoteleft} and \texttt{\textbackslash textquoteright}: \texttt{\textasciigrave Word'} produces `Word'. For double quotes, use two of each or \texttt{\textbackslash textquotedblleft and \textbackslash textquotedblright} : \texttt{\textasciigrave \textasciigrave Word''} produces ``Word''. The \texttt{\textasciigrave} key is located at the top left of the keyboard below the \texttt{esc} key. The \texttt{\textquotesingle} symbol is the usual single quotation mark. The \textquotedbl\ key on the keyboard is not used. Three dashes are available: the hyphen (\texttt{\textminus} produces -: `The syllables of hyphenate are hy-phen-ate') the en dash for ranges (\texttt{\textminus \textminus} produces --: 1939--45) and the em dash for punctuation (\texttt{\textminus \textminus \textminus} produces ---: `Your profundities --- My truisms').
-\begin{table}
+\begin{table}[h]
+\small
\begin{center}
\begin{tabular}{llll}
-\hline
+\toprule[1.0pt]
Symbol & Command & Symbol & Command \\
-\hline
+\midrule[0.5pt]
\{ & \texttt{\textbackslash \{ } & --- & \texttt{\textminus \textminus \textminus or \textbackslash textemdash} \\
\} & \texttt{\textbackslash \}} & \textasciigrave & \small \texttt{\textbackslash asciigrave} \\
@@ -911,8 +998,7 @@ Symbol & Command & Symbol & Command \\
\textminus & \texttt{\textbackslash textminus} & \textgreater & \texttt{\textbackslash textgreater} \\
\textless & \texttt{\textbackslash textless} & \textcopyright & \texttt{\textbackslash textcopyright} \\
-
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Special characters and some common symbols}
\end{center}
@@ -925,13 +1011,13 @@ This list is a very small sample of the symbols available in LaTeX. Scott Pakin
Most glyphs that have diacritics in latin alphabets, such as German \"{A} \"{a}; \"{O} \"{o}, \"{U} \"{u}, Spanish \~{n}, Polish \k{A} \k{a}, \'{C} \'{c}, \k{E} \k{e}, \'{N} \'{n}, etc can be represented by using the commands in Table 9. LaTeX also provides non-latin glyphs for the alphabets that have them, such as the German Eszett \ss\ and Scandinavian O-Slash \O\ or \o.\ These can be produced by the commands in Table 10. Table 11 contains commands for some punctuation marks such as the guillemots, Spanish \textexclamdown\ and \textquestiondown\ and base quotes \quotedblbase.\ Some of these glyphs combine with the following word automatically so it can be challenging to represent them as single letters if this is required. The code \texttt{\textbackslash ss is a German letter} might compile as `\ss is a German letter'. This may be fixed by inserting a \texttt{\textbackslash} after \texttt{\textbackslash ss}: \texttt{\textbackslash ss\textbackslash\ is a German letter} compiles as `\ss\ is a German letter'.
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Diacritic & Code & Example \\
-\hline
+\midrule[0.5pt]
Acute & \texttt{\textbackslash \'{}\{\}} & {\Large \'{a}} \\
Breve & \texttt{\textbackslash u\{\}} & {\Large \u{a}} \\
Caron / Ha\v{c}ek & \texttt{\textbackslash v\{\}} & {\Large \v{a}} \\
@@ -944,20 +1030,20 @@ Macron & \texttt{\textbackslash =\{\}} & {\Large \={a}} \\
Ogonek & \texttt{\textbackslash k\{\}} & {\large \k{a}} \\
Tilde & \texttt{\textbackslash $\sim$\{\}} & {\Large \~{a}} \\
Umlaut & \texttt{\textbackslash "\{\}} & {\Large \"{a}} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Common diacritics}
\end{center}
\end{table}
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Name & Upper Case & Lower Case \\
-\hline
+\midrule[0.5pt]
\textbf{German} & & \\
Eszett & & \texttt{\textbackslash ss} \ss \\
& & \\
@@ -971,20 +1057,20 @@ OE ligature & \texttt{\textbackslash OE} \OE & \texttt{\textbackslash o
O-Slash & \texttt{\textbackslash O} \O & \texttt{\textbackslash o} \o \\
Ring-A & \texttt{\textbackslash r\{A\}} \r{A} & \texttt{\textbackslash r\{a\}} \r{a} \\
Thorn & \texttt{\textbackslash TH} \TH & \texttt{\textbackslash th} \th \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Some non-latin alphabetical glyphs}
\end{center}
\end{table}
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Name & Symbol & Command \\
-\hline
+\midrule[0.5pt]
Double Guillemot: Left & \guillemetleft & \texttt{\textbackslash guillemetleft} \\
Double Guillemot: Right & \guillemetright & \texttt{\textbackslash guillemetright} \\
Single Guillemot: Left & \guilsinglleft & \texttt{\textbackslash guilsinglleft} \\
@@ -994,7 +1080,7 @@ Question Mark Down & \textquestiondown & \texttt{\textbackslash textquestio
Base quote: Double & \quotedblbase & \texttt{\textbackslash quotedblbase} \\
Base Quote: Single & \quotesinglbase & \texttt{\textbackslash quotesinglbase} \\
Elipsis & \textellipsis & \texttt{\textbackslash textellipsis} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Punctuation marks}
\end{center}
@@ -1004,6 +1090,7 @@ Elipsis & \textellipsis & \texttt{\textbackslash textellipsi
\clearpage
+
\section{Body}
@@ -1011,90 +1098,102 @@ Elipsis & \textellipsis & \texttt{\textbackslash textellipsi
Sectioning is the division of a document into parts, chapters, sections, subsections, subsubsections, paragraphs, and subparagraphs. These divisions are available for all LaTeX document classes, apart from letter. Chapters are not available for article class documents. Sectioning commands have the same format as text formatting commands: \texttt{\textbackslash SectionType\{SectionTitle\}}. LaTeX numbers them automatically and the text of the \texttt{SectionTitle} will appear in the Table of Contents. The following creates two sections, each with two subsections:
+{\small
+\begin{verbatim}
+\section{Section 1}
+\subsection{1A}
+\subsection{1B}
-\begin{flushleft}
-\texttt{\textbackslash section\{Section 1\}} \\
-\texttt{\textbackslash subsection\{1A\}} \\
-\texttt{\textbackslash subsection\{1B\}} \\
-
-\texttt{\textbackslash section\{Section 2\}} \\
-\texttt{\textbackslash subsection\{2A\}} \\
-\texttt{\textbackslash subsection\{2B\}} \\
-\end{flushleft}
-
+\section{Section 2}
+\subsection{2A}
+\subsection{2B}
+\end{verbatim}
+}
\subsection{Environments}
Environments are used in the body of the document to define a particular behaviour. These range from abstracts, tables, and figures, lists and sections of text with differing justification. LaTeX environments are enclosed with \texttt{\textbackslash begin\{EnvironmentName\}} and \texttt{\textbackslash end\{EnvironmentName\}}. A short list of environments is in Table 12:
-\begin{flushleft}
-\texttt{\textbackslash begin\{EnvironmentName\} \\
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus.\\
-\textbackslash end\{EnvironmentName\} \\}
-\end{flushleft}
-\begin{table}
+{\small
+\begin{verbatim}
+\begin{EnvironmentName}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus.\\
+\end{EnvironmentName}
+\end{verbatim}
+}
+
+\begin{table}[h]
\small
\begin{center}
-\begin{tabular}{ll}
-\hline
+\begin{tabular}{lp{5cm}}
+\toprule[1.0pt]
Environment & Description\\
-\hline
-abstract & Text of a document’s abstract. \\
-centre & Centred text. \\
-flushleft & Left aligned text. \\
-flushright & Right aligned text. \\
-description & Labelled lists. \\
-enumerate & Numbered lists. \\
-itemize & Bulleted lists. \\
-quotation & Include quotes. \\
-verbatim & Text in typewriter font that that will appear exactly as typed. \\
-table & Floating tables. \\
-figure & Floating figures. \\
-\hline
+\midrule[0.5pt]
+\texttt{abstract} & Text of a document’s abstract. \\
+\texttt{centre} & Centred text. \\
+\texttt{flushleft} & Left aligned text. \\
+\texttt{flushright} & Right aligned text. \\
+\texttt{description} & Labelled lists. \\
+\texttt{enumerate} & Numbered lists. \\
+\texttt{itemize} & Bulleted lists. \\
+\texttt{quotation} & Include quotes. \\
+\texttt{verbatim} & Text in typewriter font that that will appear exactly as typed. \\
+\texttt{table} & Floating tables. \\
+\texttt{figure} & Floating figures. \\
+\bottomrule[1.0pt]
\end{tabular}
\caption{Environment options}
\end{center}
\end{table}
-The verbatim environment prints the entered text in a typewriter font with no formatting. If the text isn't broken with a \texttt{<return>}, it produces text in one long line which may run across the page, into the right-hand margin and then off the page entirely. The first 100 digits of $\pi$ may appear on your editor as
+The verbatim environment prints it's in a typewriter font with no formatting. If the text isn't broken with a \texttt{<return>}, it produces text in one long line which may run across the page, into the right-hand margin and then off the page entirely. The first 100 digits of $\pi$ may appear on your editor as
+{\small
\begin{verbatim}
-The first 100 digits of pi:
+The first 100 digits of $\pi$: \\
3.14159265358979323846264338327950288419716939937510582097494459
23078164062862089986280348253421170679
\end{verbatim}
+}
\begin{flushleft}
but when the document is compiled, it produces:
\end{flushleft}
-\begin{verbatim}
-The first 100 digits of pi:
+
+\begin{flushleft}
+The first 100 digits of $\pi$: \\
3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679
-\end{verbatim}
+\end{flushleft}
-This can be fixed by breaking the text into lengths that don't cross into the margins. In this example, it is broken into 25-digit sections with a \textbackslash \textbackslash to signal the end of a line:
+This can be fixed by breaking the text into lengths that don't cross into the margins. In this example, it is broken into 25-digit sections with a <return> to signal the end of a line:
+
+{\small
\begin{verbatim}
-The first 100 digits of pi: \\
-3.141592653589793238462643 \\
-38327950288419716939937510 \\
-58209749445923078164062862 \\
-089986280348253421170679 \\
+The first 100 digits of $\pi$: \\
+3.141592653589793238462643 <return>
+38327950288419716939937510 <return>
+58209749445923078164062862 <return>
+089986280348253421170679
\end{verbatim}
+}
\begin{flushleft}
This produces:
\end{flushleft}
+
\begin{flushleft}
-The first 100 digits of pi: \\
+The first 100 digits of $\pi$: \\
3.141592653589793238462643 \\
38327950288419716939937510 \\
58209749445923078164062862 \\
@@ -1108,13 +1207,15 @@ The first 100 digits of pi: \\
Lists may be bulleted or numbered and are created with the \texttt{itemize} and \texttt{enumerate} environments respectively. List items are specified with \texttt{\textbackslash item Item Text}. For a bulleted list:
-\begin{flushleft}
-\texttt{\textbackslash begin\{itemize\} \\
-\textbackslash item Item 1 \\
-\textbackslash item Item 2 \\
-\textbackslash item Item 3 \\
-\textbackslash end\{itemize\}}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{itemize}
+\item Item 1
+\item Item 2
+\item Item 3
+\end{itemize}
+\end{verbatim}
+}
\begin{flushleft}
produces:
@@ -1129,18 +1230,23 @@ produces:
The symbol denoting each item in a bulleted list can be changed by adding an option after each \texttt{\textbackslash item} command in square brackets:
-\begin{flushleft}
-\texttt{\textbackslash begin\{itemize\} \\
-\textbackslash item[--] Item 1 \\
-\textbackslash item[\textbackslash textasteriskcentered] Item 2 \\
-\textbackslash item[\textbackslash textdagger] Item 3 \\
-\textbackslash end\{itemize\}}
-\end{flushleft}
+
+{\small
+\begin{verbatim}
+\begin{itemize}
+\item[--] Item 1
+\item[\textasteriskcentered] Item 2
+\item[\textdagger] Item 3
+\end{itemize}
+\end{verbatim}
+}
+
\begin{flushleft}
produces:
\end{flushleft}
+
\begin{itemize}
\item[--] Item 1
\item[\textasteriskcentered] Item 2
@@ -1148,20 +1254,25 @@ produces:
\end{itemize}
-Numbered lists are created by the enumerate environment:
-
\begin{flushleft}
-\texttt{\textbackslash begin\{enumerate\} \\
-\textbackslash item Item 1 \\
-\textbackslash item Item 2 \\
-\textbackslash item Item 3 \\
-\textbackslash end\{enumerate\} \\}
+Numbered lists are created by the enumerate environment:
\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{enumerate}
+\item Item 1
+\item Item 2
+\item Item 3
+\end{enumerate}
+\end{verbatim}
+}
+
\begin{flushleft}
produces:
\end{flushleft}
+
\begin{enumerate}
\item Item 1
\item Item 2
@@ -1173,18 +1284,20 @@ produces:
Lists can be nested with additional enumerate commands. Each sub-category is contained within its own enumerate environment.
-\begin{flushleft}
-\texttt{\textbackslash begin\{enumerate\} \\
-\textbackslash item Item 1 \\
-\textbackslash begin\{enumerate\} \\
-\textbackslash item Item A \\
-\textbackslash item Item B \\
-\textbackslash item item C \\
-\textbackslash end\{enumerate\} \\
-\textbackslash item Item 2 \\
-\textbackslash item Item 3 \\
-\textbackslash end\{enumerate\} \\}
-\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{enumerate}
+\item Item 1
+\begin{enumerate}
+\item Item A
+\item Item B
+\item item C
+\end{enumerate}
+\item Item 2
+\item Item 3
+\end{enumerate}
+\end{verbatim}
+}
\begin{flushleft}
@@ -1203,136 +1316,388 @@ produces:
\item Item 3
\end{enumerate}
+\clearpage
+\subsection{Tables}
+Tables are placed inside their own environment. LaTeX places them so that they don’t break across pages and because their location can vary from the location specified by typesetters, they are referred to as floats. Using \texttt{\textbackslash clearpage} at the end of each document section places any outstanding floats at the end of the section before the new one starts.
-\subsection{Tables and Figures}
-Tables and figures are placed inside their own environments. LaTeX places them so that they don’t break across pages. Because their location can vary from the location specified by typesetters, they are referred to as floats. Using \texttt{\textbackslash clearpage} at the end of each section places any outstanding floats at the end of the section before the new one starts.
+\subsubsection{Basic Tables}
+Tables are placed within the \texttt{table} environment. LaTeX numbers them automatically and the caption will appear in the List of Tables. \\
+Tables consist of two nested environments: \texttt{table}, and \texttt{tabular}. \texttt{\textbackslash begin\{table\}} has an option to help place the table on the page. This can be at the top of the page with \texttt{t}, the bottom of the page with \texttt{b}, here with \texttt{h} and on a separate page of floats with \texttt{p}. These commands don't over-ride LaTeX's formatting rules, but can be enforced a bit more with \texttt{!}. \texttt{\textbackslash begin\{table\}[!h]} places a table at the location of it's code.
-\subsubsection{Tables}
-Tables are placed within the \texttt{table} environment. A caption can be added with \texttt{\textbackslash caption \{Caption Text\}} just before \texttt{\textbackslash end\{table\}} so that it appears below the table. LaTeX numbers them automatically and the caption will appear in the List of Tables.
+The next line justifies the table on the page. This can be \texttt{centre}, \texttt{flushleft} or \texttt{flushright}.
-Tables consist of three nested environments: \texttt{table}, \texttt{table alignment} and \texttt{tabular}. After \texttt{\textbackslash begin\{table\}}, comes the table’s alignment on the page. This can be \texttt{centre}, \texttt{flushleft} or \texttt{flushright}. The table's contents and formatting instructions are contained in the \texttt{tabular} environment. Instructions relating to the number of columns, their alignment and if there are vertical lines separating the columns are on the same line as \texttt{\textbackslash begin\{tabular\}} in curly braces. The alignment commands are \texttt{l} = left aligned, \texttt{c} = centred and \texttt{r} = right aligned. Vertical lines are added with a \texttt{|}. This key is located on the keyboard below \texttt{backspace}.
+Instructions relating to the number of columns, their alignment and if there are vertical lines seperating the columns are on the same line as \texttt{\textbackslash begin\{tabular\}} in curly braces. The number of alignment options should match the number of columns. The options are \texttt{l} = left aligned, \texttt{c} = centred and \texttt{r} = right aligned. These will automatically adjust the column width to the contents.
-The code below shows the three nesting levels for a table with four columns with column 1 left aligned, columns two and three centred and column 4 right aligned. Vertical lines separate columns 1--2, 2--3 and 3--4.
+\texttt{ p\{ColumnWidth\}} may be used to define the width of a column. The width may be specified in millimetres (mm), Centimetres (cm), and inches (in). The size of the table's font may be reduced by placing a \texttt{\textbackslash {FontSize}} command after the beginning of the table environment.
+Vertical lines are added with a \texttt{|} placed between the alignment commands. This key is located on the keyboard below \texttt{backspace}. Horizontal lines with definable widths are available through the \texttt{booktabs} package. This package offers three commands: \texttt{\textbackslash toprule [Width]}, \texttt{\textbackslash midrule[Width]} and \texttt{\textbackslash bottomrule[Width]}. These commands accept measurements in points (pt), millimetres (mm), centimetres (cm), inches (in) etc. \\
-\begin{flushleft}
-\texttt{\textbackslash begin\{table\} }\\
-\texttt{\textbackslash begin\{center\}} \\
-\texttt{\textbackslash begin\{tabular\}{l|c|c|r}} \\
-\bigskip
-\texttt{. . . Table Contents . . . }\\
-\bigskip
-\texttt{\textbackslash end\{tabular\}} \\
-\texttt{\textbackslash caption\{Caption text\}} \\
-\texttt{\textbackslash end\{center\}} \\
-\texttt{\textbackslash end\{table\}} \\
-\end{flushleft}
+The code below shows the two nesting levels for a table with four columns. The table is placed at it's location in the document code with the \texttt{[h]} option. It is centred on the page with the center environment. Column 1 is left aligned, column 2 centred, column 3 right aligned and column 4 has a user defined width of 5cm. Vertical lines separate columns 1--2, 2--3 and 3--4. A caption is placed at the bottom of the table:
-The data for the table is placed inside the \texttt{tabular} environment. Each cell is separated with an \texttt{\&} and the end of each row is specified with \texttt{\textbackslash \textbackslash}. The following example creates a table with four columns and four rows. The first row contains the column headings with horizontal lines above and below it with another horizontal line at the bottom of the table. These lines are added with \texttt{\textbackslash hline}. Table 13 shows the compiled output.
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\begin{center}
+\begin{tabular}{l|c|r|p{5cm}}
+
+{. . . Table Contents . . . }
+
+\end{tabular}
+\caption{Caption text}
+\end{center}
+\end{table}
+\end{verbatim}
+}
-\begin{flushleft}
-\texttt{\textbackslash begin\{table\}} \\
-\texttt{\textbackslash begin\{center\}} \\
-\texttt{\textbackslash begin\{tabular\}\{l|c|c|r\}} \\
-\texttt{\textbackslash hline} \\
-\texttt{Column 1 \& Column 2 \& Column 3 \& Column 4 \textbackslash \textbackslash} \\
-\texttt{\textbackslash hline} \\
-\texttt{Row 1 \& Text 2 \& Text 3 \& 3.157 \textbackslash \textbackslash} \\
-\texttt{Row 2 \& Text 2 \& Text 3 \& 14.930 \textbackslash \textbackslash} \\
-\texttt{Row 3 \& Text 2 \& Text 3 \& 0.720 \textbackslash \textbackslash} \\
-\texttt{\textbackslash hline} \\
-\texttt{\textbackslash end\{tabular\}} \\
-\texttt{\textbackslash caption\{Example Table.\}} \\
-\texttt{\textbackslash end\{center\}} \\
-\texttt{\textbackslash end\{table\}} \\
-\end{flushleft}
+Table data is placed inside the \texttt{tabular} environment. Each cell is separated with an \texttt{\&}, and the end of each row is specified with \texttt{\textbackslash \textbackslash}. \\
+The following example creates a table with four columns and four rows. The first row contains the column headings with lines above and below it with another line at the bottom of the table. These lines are defined in points with the top and bottom lines 1.0 points thick and the middle line 0.5 points thick. Table 13 shows the compiled output. The font size has been slightly reduced with \texttt{\textbackslash small}.
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{l|c|r|p{5cm}}
+\toprule[1.0pt]
+Column 1 & Column 2 & Column 3 & Column 4 \\
+\midrule[0.5pt]
+Row 1 & Text 2 & 3.157 & Lorem ipsum dolor sit amet, consectetur
+adipiscing elit. \\
+Row 2 & Text 2 & 14.930 & Nulla est purus, ultrices in porttitor in,
+accumsan non quam. \\
+Row 3 & Text 2 & 0.720 & Nam consectetur porttitor rhoncus. Curabitur
+eu est et leo feugiat auctor vel quis lorem. \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Sample table}
+\end{center}
+\end{table}
+\end{verbatim}
+}
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
-\begin{tabular}{l|c|c|r}
-\hline
+\begin{tabular}{l|c|r|p{5cm}}
+\toprule[1.0pt]
Column 1 & Column 2 & Column 3 & Column 4 \\
-\hline
-Row 1 & Text 2 & Text 3 & 3.157 \\
-Row 2 & Text 2 & Text 3 & 14.930 \\
-Row 3 & Text 2 & Text 3 & 0.720 \\
-\hline
+\midrule[0.5pt]
+Row 1 & Text 2 & 3.157 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
+Row 2 & Text 2 & 14.930 & Nulla est purus, ultrices in porttitor in, accumsan non quam. \\
+Row 3 & Text 2 & 0.720 & Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. \\
+\bottomrule[1.0pt]
\end{tabular}
\caption{Sample table}
\end{center}
\end{table}
-\subsubsection{Figures}
+Horizontal lines can be placed across a selection of columns with \texttt{\textbackslash cmidrule}. This command requires the line thickness and the column number/s the line will appear at.
-The first step in importing graphic files is to place the file in the project directory so that LaTeX can find it. Graphics are placed within documents inside the \texttt{figure} environment. The placement of the figure on the page can be: \texttt{centre}, \texttt{flushleft} or \texttt{flushright}.
-The code below loads a graphic file named \texttt{Drawing} as a centred graphic in the \texttt{figure} environment with a caption. The caption text will appear as the figure title in the List of Figures in the front matter. \texttt{\textbackslash includegraphics\{\}} tells LaTeX the name of the graphic file to load and \texttt{scale} specifies whether to reduce or enlarge: 1.0 is original size, 0.5 is half size and 2.0 is double. In this case, the file size is reduced to 50\% of the original which is about 10cm square.
-
+{\small
+\begin{verbatim}
+\cmidrule[LineThickness]{ColumnNumbers x-n}
+\end{verbatim}
+}
-\begin{flushleft}
-\texttt{\textbackslash begin\{figure\}} \\
-\texttt{\textbackslash center} \\
-\texttt{\textbackslash includegraphics[scale=0.5]\{Drawing.pdf\}} \\
-\texttt{\textbackslash caption\{Spiral\}} \\
-\texttt{\textbackslash end\{figure\}} \\
-\end{flushleft}
+The following code produces a table with three columns with headings with horizontal lines. The middle line covers columns 1-2 of the three table columns. The output is Table 14.
-\begin{flushleft}
-produces:
-\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{lll}
+\toprule[1.0pt]
+Column 1 & Column 2 & Column 3 \\
+\cmidrule[0.5pt]{1-2}
+Row 1 & Text 1 & Lorem ipsum dolor sit amet \\
+Row 2 & Text 2 & Nulla est purus \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Sample Table: Partial horizontal lines}
+\end{center}
+\end{table}
+\end{verbatim}
+}
+
+
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{lll}
+\toprule[1.0pt]
+Column 1 & Column 2 & Column 3 \\
+\cmidrule[0.5pt]{1-2}
+Row 1 & Text 1 & Lorem ipsum dolor sit amet \\
+Row 2 & Text 2 & Nulla est purus \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Sample Table: Partial horizontal lines}
+\end{center}
+\end{table}
+
+Lines can cover any combination of columns. For a single column, specify the column number/s only. Although the line may cover only one column, both the beginning and end columns should still be specified, in this case a line 1 point thick over column 1:
+
+
+{\small
+\begin{verbatim}
+\cmidrule[1.0pt]{1-1}
+\end{verbatim}
+}
+
+
+For multiple separated columns on the same row, the command can be used as many times as necessary. To place them in columns 1 and 3--4:
+
+
+{\small
+\begin{verbatim}
+\cmidrule[1.0pt]{1-1} \cmidrule[1.0pt]{3-4}
+\end{verbatim}
+}
+
+
+\subsubsection{Combining columns}
+
+Columns can be merged with \texttt{\textbackslash multicolumn}. This command requires the number of columns to merge, the alignment of the column text and the text for the merged columns:
+
+\begin{verbatim}
+\multicolumn{MergedColumns}{Alignment}{text}
+\end{verbatim}
+
+The following code merges columns 1--3 of a four column table with centred text. If the number of merged columns is less than the total number, the extra columns should be signified with a \texttt{\&} and the end of the row should be marked with a \texttt{\textbackslash \textbackslash}. In the example below, only the first three columns are merged, so the fourth should be signified with a \texttt{\&}. The output is in Table 15:
+
+
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{lcrp{5cm}}
+\toprule[1pt]
+\multicolumn{3}{c}{Combined Columns} & \\
+Column 1 & Column 2 & Column 3 & Column 4 \\
+\midrule[0.5pt]
+Row 1 & Text 2 & 3.157 & Lorem ipsum dolor sit amet, consectetur
+adipiscing elit. \\
+Row 2 & Text 2 & 14.930 & Nulla est purus, ultrices in porttitor in,
+accumsan non quam. \\
+Row 3 & Text 2 & 0.720 & Nam consectetur porttitor rhoncus. Curabitur
+eu est et leo feugiat auctor vel quis lorem. \\
+\bottomrule[1pt]
+\end{tabular}
+\caption{Sample table: Combined columns}
+\end{center}
+\end{table}
+\end{verbatim}
+}
+
+
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{lcrp{5cm}}
+\toprule[1pt]
+\multicolumn{3}{c}{Combined Columns} & \\
+Column 1 & Column 2 & Column 3 & Column 4 \\
+\midrule[0.5pt]
+Row 1 & Text 2 & 3.157 & Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\
+Row 2 & Text 2 & 14.930 & Nulla est purus, ultrices in porttitor in, accumsan non quam. \\
+Row 3 & Text 2 & 0.720 & Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. \\
+\bottomrule[1pt]
+\end{tabular}
+\caption{Sample table: Combined columns}
+\end{center}
+\end{table}
+
+
+
+\subsubsection{Combining Rows}
+
+
+Rows can also be combined with the \texttt{\textbackslash multirow} command from the \texttt{multirow} package. This command requires the number of rows to be combined, the width, and the text for the multiple row cell. Width may be specified in the same way as a \texttt{p\{\}} alignment with a specified width, or it may be automatically set to it's natural width. LaTeX's natural width is selected by inserting an \texttt{\textasteriskcentered} in the width option:
+
+
+\begin{verbatim}
+\multirow{NumberOfRows}{Width}{Text}
+\end{verbatim}
+
+The code below creates a table with three columns. The first column contains three merged rows with the column's width set to natural with an \textasteriskcentered. The second and third columns contain data in the normal way.
+
+
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{cll}
+\toprule[1.0pt]
+\multirow{3}{*}{Start Time} & Early & Topic 1 \\
+ & Mid-day & Lunch \\
+ & Late & Topic 2 \\
+\bottomrule[1.0pt]
+\end{tabular}
+\end{center}
+\caption{Sample Table: Combined rows}
+\end{table}
+\end{verbatim}
+}
+
+
+
+
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{cll}
+\toprule[1.0pt]
+\multirow{3}{*}{Start Time} & Early & Topic 1 \\
+ & Mid-day & Lunch \\
+ & Late & Topic \\
+\bottomrule[1.0pt]
+\end{tabular}
+\end{center}
+\caption{Sample Table: Combined rows}
+\end{table}
+
+
+\subsubsection{Combined Columns and Rows}
+
+Columns and rows can be combined to produce very complex tables. The code below produces a table for seminar times. It combines columns for the headings and rows for the times. The output is Table 17.
+
+{\small
+\begin{verbatim}
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{clll}
+\toprule[1.0pt]
+\multicolumn{4}{c}{Seminar Timetable} \\
+\midrule[0.5pt]
+\multicolumn{3}{c}{Times} & Titles \\
+\midrule[0.5pt]
+\multirow{8}{*}{Day} & \multirow{2}{*}{Monday} & Morning & Topic 1 \\
+ & & Afternoon & Topic 2 \\
+ & & & \\
+ & \multirow{2}{*}{Tuesday} & Morning & Topic 3 \\
+ & & Afternoon & Topic 4 \\
+ & & & \\
+ & \multirow{2}{*}{Wednesday} & Morning & Topic 5 \\
+ & & Afternoon & Topic 6 \\
+\bottomrule[1.0pt]
+\end{tabular}
+\end{center}
+\caption{Sample Table: Combined columns and rows}
+\end{table}
+\end{verbatim}
+}
+
+
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{clll}
+\toprule[1.0pt]
+\multicolumn{4}{c}{Seminar Timetable} \\
+\midrule[0.5pt]
+\multicolumn{3}{c}{Times} & Titles \\
+\midrule[0.5pt]
+\multirow{8}{*}{Day} & \multirow{2}{*}{Monday} & Morning & Topic 1 \\
+ & & Afternoon & Topic 2 \\
+ & & & \\
+ & \multirow{2}{*}{Tuesday} & Morning & Topic 3 \\
+ & & Afternoon & Topic 4 \\
+ & & & \\
+ & \multirow{2}{*}{Wednesday} & Morning & Topic 5 \\
+ & & Afternoon & Topic 6 \\
+\bottomrule[1.0pt]
+\end{tabular}
+\end{center}
+\caption{Sample Table: Combined columns and rows}
+\end{table}
+
+\clearpage
-\begin{figure}
+\subsection{Figures}
+
+The first step in importing graphic files is to place the file in the project directory so that LaTeX can find it. Graphics are placed within documents inside the \texttt{figure} environment. This is a float and the same positioning commands may be used as with tables: \texttt{h}, \texttt{t}, \texttt{b} or \texttt{p}. The placement of the figure on the page can be: \texttt{centre}, \texttt{flushleft} or \texttt{flushright}. The graphic is selected with \texttt{\textbackslash includegraphics}. This command requires the name of the graphic file and has a \texttt{scale} option that tells LaTeX to resize it: 1.0 is the normal size, 0.5 is half size and 2.0 is double size. Captions are added in the same way as tables with \texttt{\textbackslash caption\{\}}.
+
+{\small
+\begin{verbatim}
+\includegraphics[Sizing]{GraphicFileName}
+\end{verbatim}
+}
+
+The code below loads an encapsulated postscript file named \texttt{Drawing.eps} as a centred graphic in the \texttt{figure} environment with a caption. The caption text will appear as the figure title in the List of Figures in the front matter. \texttt{\textbackslash includegraphics\{\}} tells LaTeX the name of the graphic file to load and \texttt{scale} specifies whether to reduce or enlarge: 1.0 is original size, 0.5 is half size and 2.0 is double. In this case, the file size is reduced to 50\% of the original which is about 10cm square. The code below produces figure 1. \\
+
+
+{\small
+\begin{verbatim}
+\begin{figure}[h]
+\center
+\includegraphics[scale=0.5]{Drawing.eps}
+\caption{Spiral}
+\end{figure}
+\end{verbatim}
+}
+
+
+\begin{figure}[h]
\center
\includegraphics[scale=0.5]{Drawing.eps}
\caption{Spiral}
\end{figure}
-LaTeX works with a quite limited range of graphic formats. Documents in postscript format can only contain graphics in postscript (\texttt{ps}) or encapsulated postscript (\texttt{eps}) formats. These are vector formats. Postscript is the `gold standard' for printed documents but unfortunately, postscript only works with whole pages. \texttt{eps} works with graphics of any size so this is the preferred format for graphics that are smaller than this. Documents in \textsc{pdf} format created by \textsc{pdf}LaTeX can contain graphics in \texttt{pdf}, \texttt{png}, \texttt{jpeg} or \texttt{jbig2} formats. If the file is in a different format, it will have to be converted to one of these.
+\subsubsection{LaTeX and Graphic Formats}
+
+
+LaTeX works with a quite limited range of graphic formats. Documents in postscript format can only contain graphics in postscript (\texttt{ps}) or encapsulated postscript (\texttt{eps}) formats. Documents created by \textsc{pdf}TeX may contain graphics in \texttt{pdf}, \texttt{png}, \texttt{jpeg} or \texttt{jbig2} formats. If the file is in a different format, it will have to be converted to one of these. A good choice for this is Image Magic. It is freely downloadable and can read and write 200 graphic formats. \\
+
+
+There are two types of graphic formats: vector and raster. Vector formats, such as postscript (\texttt{ps}), encapsulated postscript (\texttt{eps}), are based on geometric concepts such as points, lines, and curves. Vector format file sizes are relatively small because the file contains only the instructions for the points, lines and curves that make up the graphic. It is most often used for line art, such as diagrams, graphs, 3D models, etc. It has the advantage that it can be upsampled or downsampled (enlarged or shrunk) without any loss of quality. Postscript is the `gold standard' for printed documents but unfortunately, postscript only works with whole pages. \texttt{eps} works with graphics of any size so this is the preferred format for graphics that are smaller than this.
-There are two types of graphic formats: vector and raster. Vector formats, such as postscript (\texttt{ps}), encapsulated postscript (\texttt{eps}) and Portable Document Format (\texttt{pdf}), are based on geometric concepts such as points, lines, and curves. Vector format file sizes are relatively small because the file contains only the instructions for the points, lines and curves that make up the graphic. It is most often used for line art, such as diagrams, graphs, 3D models, etc. It has the advantage that it can be upsampled or downsampled (enlarged or shrunk) without any loss of quality.
+Raster graphics are made up of pixels. Each pixel has a value relating to its individual colour attached to it. They are produced by digital cameras, scanners, etc and the file sizes are relatively large. These formats cannot be manipulated, that is resized, rotated, etc without losing information. To avoid this, image processing should be completed before they are inserted into a document and the image sized to the dimensions that it will be printed at.
-Raster graphics are made up of pixels. Each pixel has a value relating to its individual colour attached to it. They are produced by digital cameras, scanners, etc and the file sizes are relatively large. These formats cannot be manipulated, that is resized, rotated, etc without losing information which lowers quality. Any image processing should be completed before they are inserted into a document and the image sized to the dimensions that it will be printed at.
+If the image is in \texttt{pdf} format, any fonts that it contains should be embedded before it is included in a LaTeX document. This means that a copy of the fonts included in the graphic are included with the image file. If they are not embedded, fonts on the current user's system will be substituted. If they are not the same, the image will not appear as it's creator intended. \\
-If the document is to be printed professionally and it includes raster graphics, it is worth consulting the printers for their requirements. This may include specific file formats, resolution, which is often 300ppi, a colour space, often cmyk or rgb, and colour depth which may be restricted to 8bit.
+If the document is to be printed professionally, the printers should be consulted for their requirements. These may include specific file formats, resolution, which is often 300ppi, a colour space, often cmyk or rgb, and colour depth which may be restricted to 8bit. These are best edited with dedicated graphics software. A large number of these are available, both commercial and non-commercial.
\clearpage
\subsection{Page Numbering}
-The default page numbering in LaTeX is Arabic numerals which begin on the first page. Table 14 shows the available styles:
+The default page numbering in LaTeX is Arabic numerals which begin on the first page. Table 18 shows the available styles:
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{lll}
-\hline
+\toprule[1.0pt]
Style & Numeral Type & Example Text \\
-\hline
+\midrule[0.5pt]
\texttt{arabic} & Arabic numerals & 1, 2, 3, 4, 5 \\
\texttt{roman} & Lower-case Roman numerals & i, ii, iii, iv, v \\
\texttt{Roman} & Upper-case Roman numerals & I, II, III, IV, V \\
-\texttt{alph} & Lower-case letters & a, b, c, d, e, f \\
-\texttt{Alph} & Upper-case letters & A, B, C, D, E, F \\
-\hline
+\texttt{alph} & Lower-case letters & a, b, c, d, e \\
+\texttt{Alph} & Upper-case letters & A, B, C, D, E \\
+\bottomrule[0.5pt]
\end{tabular}
\caption{Page numbering options}
\end{center}
@@ -1343,18 +1708,21 @@ Style & Numeral Type & Example Text \\
If the page numbering for the document is to be other than arabic, it can be specified after \texttt{\textbackslash begin\{document\}} with \texttt{\textbackslash pagenumbering\{StyleName\}}:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\}} \\
-\bigskip
-\texttt{. . . \\}
-\bigskip
-\texttt{\textbackslash begin\{document\}} \\
-\texttt{\textbackslash pagenumbering\{StyleName\}} \\
-\bigskip
-\texttt{Document Text} \\
-\bigskip
-\texttt{\textbackslash end\{document\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
+
+. . .
+
+\begin{document}
+\pagenumbering{StyleName}
+
+Document Text
+
+\end{document}
+\end{verbatim}
+}
+
It is possible to have two styles in a document, for instance lower case Roman numerals for the front matter including the index, Table of Contents, List of Figures, etc, and Arabic numerals for the remainder of the text.
@@ -1362,45 +1730,62 @@ This is handled with \texttt{\textbackslash pagenumbering\{StyleName\}}. At the
The following creates an article class document with an un-numbered title page containing an abstract, a Table of Contents, List of Figures and List of Tables on separate pages with Roman numerals and the body text in Arabic numerals.
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\}} \\
-\texttt{\textbackslash title\{The Lost Secrets of \textbackslash LaTeXe\}} \\
-\texttt{\textbackslash author\{Anonymous\}} \\
-\texttt{\textbackslash begin\{document\}} \\
-\texttt{\textbackslash maketitle} \\
-\texttt{\textbackslash thispagestyle\{empty\}} \\
-\texttt{\textbackslash begin\{abstract\}} \\
-\texttt{Abstract text.} \\
-\texttt{\textbackslash end\{abstract\}} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash pagenumbering\{roman\}} \\
-\texttt{\textbackslash tableofcontents} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash listoffigures} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash listoftables} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash pagenumbering\{arabic\}} \\
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
+\title{The Lost Secrets of \LaTeXe}
+\author{Albertus Magnus}
-\texttt{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . } \\
+\begin{document}
+\maketitle
+\thispagestyle{empty}
-\texttt{\textbackslash end\{document\}} \\
-\end{flushleft}
+\begin{abstract}
+Abstract text.
+\end{abstract}
-To change the page numbering counter, use \texttt{\textbackslash setcounter\{page\}\{PageNumber\}}.
+\clearpage
+\pagenumbering{roman}
+\tableofcontents
+\clearpage
+
+\listoffigures
+\clearpage
+
+\listoftables
+\clearpage
+
+\pagenumbering{arabic}
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus . . .
+
+\end{document}
+\end{verbatim}
+}
\begin{flushleft}
-\texttt{\textbackslash pagenumbering\{arabic\}} \\
-\texttt{\textbackslash setcounter\{page\}\{5\}} \\
+To change the page numbering counter, use \texttt{\textbackslash setcounter\{page\}\{PageNumber\}}.
\end{flushleft}
+{\small
+\begin{verbatim}
+\pagenumbering{arabic}
+\setcounter{page}{5}
+\end{verbatim}
+}
+
+\begin{flushleft}
This changes the page numbering to Arabic and begins the page count at page 5.
+\end{flushleft}
\clearpage
+
\section{Mathematics in LaTeX}
One of LaTeX’s strengths is its facilities for mathematical equations. This is done by either activating math mode, or by using the \texttt{equation} or \texttt{displaymath} environments.
@@ -1408,9 +1793,13 @@ One of LaTeX’s strengths is its facilities for mathematical equations. This is
Math mode is activated by enclosing a mathematical expression within a pair of \texttt{\$}. This is especially useful when an equation is set within text such as when you need to include mathematics, such as the results of a statistical test, in a report:
-\begin{flushleft}
-\texttt{... main effect for the interaction between the factors was significant \$(F(2,125) = 3.146, p < 0.05, \textbackslash omega\^{}2 = 0.032)\$, though the practical significance ...}
-\end{flushleft}
+{\small
+\begin{verbatim}
+... main effect for the interaction between the factors was significant \$(F(2,
+125) = 3.146, p < 0.05, \textbackslash omega\^{}2 = 0.032)\$, though the
+practical significance ...
+\end{verbatim}
+}
\begin{flushleft}
@@ -1430,16 +1819,17 @@ Summation notation is available with the \texttt{\$\textbackslash sum\$} command
\sum\limits_{i=1}^{n}x_i = x_1 + x_2 + x_3 \ldots x_n
\end{displaymath}
-Some common mathematical symbols and the commands to produce them are shown in Table 15. LaTeX comes with Greek letters in upper and lowercase fonts. It provides all the lower-case letters and some of the upper-case letters. Pakin (2021) recommends that upper case Latin glyphs be used for the missing Greek upper-case letters. A list of these and their commands are in Table 16.
+Some common mathematical symbols and the commands to produce them are shown in Table 19. LaTeX comes with Greek letters in upper and lowercase fonts. It provides all the lower-case letters and some of the upper-case letters. Pakin (2021) recommends that upper case Latin glyphs be used for the missing Greek upper-case letters. A list of these and their commands are in Table 20.
-\begin{table}
+\begin{table}[h]
+\small
\begin{center}
\begin{tabular}{ll}
-\hline
+\toprule[1.0pt]
$a \times b + c - d \div e$ & \texttt{a \textbackslash times b + c - d \textbackslash div e} \\
$a < b > c$ & \texttt{a < b > c} \\
-$a^2 + b^2 = c^2$ & \texttt{a\^{}2 + b\^{}2 = c\^{}2} \\
+$a^2 + b^2 = c^2$ & \texttt{a\^{}2 + b\^{}2 = c\^{}2} \\
$y - y_1 = m(x - x_1)$ & \texttt{y - y\_1 = m(x - x\_1)} \\
$f'$ & \texttt{f'} \\
$n!$ & \texttt{n!} \\
@@ -1451,7 +1841,7 @@ $\overbrace{abc}$ & \texttt{\textbackslash overbrace\{\}} \\
$\underbrace{abc}$ & \texttt{\textbackslash underbrace\{\}} \\
$\sum$ & \texttt{\textbackslash sum} \\
$\sum\limits_{i=0}^{\infty}$ & \texttt{\textbackslash sum \textbackslash limits \_\{i=0\}\{\textbackslash infty\} }\\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Some common mathematical symbols}
\end{center}
@@ -1459,10 +1849,11 @@ $\sum\limits_{i=0}^{\infty}$ & \texttt{\textbackslash sum \textbackslash limi
-\begin{table}
+\begin{table}[h]
+\small
\begin{center}
\begin{tabular}{llllllllll}
-\hline
+\toprule[1.0pt]
$\Gamma$ & \texttt{\textbackslash Gamma} & $\Delta$ & \texttt{\textbackslash Delta} & $\Theta$ & \texttt{\textbackslash Theta} & $\Lambda$ & \texttt{\textbackslash Lambda} & $\Xi$ & \texttt{\textbackslash Xi} \\
$\Pi$ & \texttt{\textbackslash Pi} & $\Sigma$ & \texttt{\textbackslash Sigma} & $\Upsilon$ & \texttt{\textbackslash Upsilon} & $\Phi$ & \texttt{\textbackslash Phi} & $\Psi$ & \texttt{\textbackslash Psi} \\
@@ -1478,8 +1869,7 @@ $\lambda$ & \texttt{\textbackslash lambda} & $\mu$ & \texttt{\textbackslas
$\rho$ & \texttt{\textbackslash rho} & $\sigma$ & \texttt{\textbackslash sigma} & $\tau$ & \texttt{\textbackslash tau} & $\upsilon$ & \texttt{\textbackslash upsilon} & $\phi$ & \texttt{\textbackslash phi} \\
$\chi$ & \texttt{\textbackslash chi} & $\psi$ & \texttt{\textbackslash psi} & $\omega$ & \texttt{\textbackslash omega} \\
-
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Upper and lowercase Greek letters}
\end{center}
@@ -1488,12 +1878,13 @@ $\chi$ & \texttt{\textbackslash chi} & $\psi$ & \texttt{\textbackslash ps
Both \texttt{equation} and \texttt{displaymath} environments print one-line equations. The difference between them is that formulae set with \texttt{equation} are numbered:
-
-\begin{flushleft}
-\texttt{\textbackslash begin\{equation\}} \\
-\texttt{\textbackslash bar\{X\} = \textbackslash frac\{\textbackslash Sigma X\}\{n\}} \\
-\texttt{\textbackslash end\{equation\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\begin{equation}
+\bar{X} = \frac{\Sigma X}{n}
+\end{equation}
+\end{verbatim}
+}
\begin{equation}
@@ -1502,11 +1893,11 @@ Both \texttt{equation} and \texttt{displaymath} environments print one-line equa
-\begin{flushleft}
-\texttt{\textbackslash begin\{displaymath\}} \\
-\texttt{\textbackslash bar\{X\} = \textbackslash frac\{\textbackslash Sigma X\}\{n\}} \\
-\texttt{\textbackslash end\{displaymath\}} \\
-\end{flushleft}
+\begin{verbatim}
+\begin{displaymath}
+\bar{X} = \frac{\Sigma X}{n}
+\end{displaymath}
+\end{verbatim}
@@ -1520,119 +1911,135 @@ This is a very short preview of LaTeX's mathematical capabilities. It has extens
\clearpage
+
\section{Front Matter}
\subsection{Title Pages}
Title pages are defined in the final part of the preamble with \texttt{\textbackslash title\{\}}, \texttt{\textbackslash author\{\}} and \texttt{\textbackslash date\{\}}. The current date can be placed inside \texttt{\textbackslash date\{\}} with \texttt{\textbackslash today}, or a date can be entered manually. The title page is created with \texttt{\textbackslash maketitle} which follows \texttt{\textbackslash begin\{document\}}:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\}} \\
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
-\texttt{\textbackslash title\{The Lost Secrets of \textbackslash LaTeXe\}} \\
-\texttt{\textbackslash author\{Herodotus\}} \\
-\texttt{\textbackslash date\{\textbackslash today\}} \\
+\title{The Lost Secrets of \LaTeXe}
+\author{Albertus Magnus}
+\date{\today}
-\texttt{\textbackslash begin\{document\}} \\
-\texttt{\textbackslash maketitle} \\
+\begin{document}
+\maketitle
-\texttt{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . }
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus . . .
-\texttt{\textbackslash end\{document\}}
-\end{flushleft}
+\end{document}
+\end{verbatim}
+}
\subsection{The Abstract}
Abstracts are created by the abstract environment:
-\begin{flushleft}
-\texttt{\textbackslash begin\{abstract\}} \\
+{\small
+\begin{verbatim}
+\begin{abstract}
-\texttt{Lorem ipsum dolor sit amet . . . }
+Lorem ipsum dolor sit amet . . .
-\texttt{\textbackslash end\{abstract\}} \\
-\end{flushleft}
+\end{abstract}
+\end{verbatim}
+}
The abstract can appear on the title page or on a page of its own by inserting pagebreaks following \texttt{\textbackslash maketitle} and after the end of the abstract environment. This example places the abstract on a page of its own after the title page:
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\}} \\
-
-\texttt{\textbackslash title\{The Lost Secrets of \textbackslash LaTeXe\}} \\
-\texttt{\textbackslash author\{Herodotus\}} \\
-\texttt{\textbackslash date\{\textbackslash today\}} \\
-
-\texttt{\textbackslash begin\{document\}} \\
-\texttt{\textbackslash maketitle }\\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash begin\{abstract\}} \\
-\texttt{Lorem ipsum dolor sit amet . . .} \\
-\texttt{\textbackslash end\{abstract\}} \\
-
-\texttt{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . }
+\title{The Lost Secrets of \LaTeXe}
+\author{Albertus Magnus}
+\date{\today}
+\begin{document}
+\maketitle
+\clearpage
+\begin{abstract}
+\Lorem ipsum dolor sit amet . . .
+\end{abstract}
-\texttt{\textbackslash end\{document\}} \\
-\end{flushleft}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus . . .
+\end{document}
+\end{verbatim}
+}
\subsection{Table of Contents, List of Figures and List of Tables.}
The Table of Contents, List of Figures and List of Tables are inserted with:
-\begin{flushleft}
-\texttt{\textbackslash tableofcontents} \\
-\texttt{\textbackslash listoffigures} \\
+{\small
+\begin{verbatim}
+\tableofcontents
-\texttt{\textbackslash listoftables} \\
-\end{flushleft}
+\listoffigures
+
+\listoftables
+\end{verbatim}
+}
A page break after each command will place them on separate pages. LaTeX will generate these automatically and number them when the document is compiled from the sectioning commands and the figure and table captions.
The following creates a document with a title page containing the title and abstract, a Table of Contents, List of Figures and List of Tables. These are placed on separate pages and numbered in Roman numerals, with the body of the text in Arabic numerals. It is double spaced with a ragged right margin. Page breaks are specified with \texttt{\textbackslash clearpage}:
-\begin{flushleft}
-\texttt{\textbackslash documentclass[a4paper]\{article\}} \\
-
-\texttt{\textbackslash title\{The Lost Secrets of \textbackslash LaTeXe\}} \\
-\texttt{\textbackslash author\{Herodotus\}} \\
-\texttt{\textbackslash date\{\textbackslash today\}} \\
-\texttt{\textbackslash begin\{document\}} \\
-\texttt{\textbackslash maketitle} \\
-\texttt{\textbackslash doublespacing} \\
+{\small
+\begin{verbatim}
+\documentclass[a4paper]{article}
-\texttt{\textbackslash begin\{abstract\}} \\
+\title{The Lost Secrets of \LaTeXe}
+\author{Albertus Magnus}
+\date{\today}
-\texttt{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . }
+\begin{document}
-\texttt{\textbackslash end\{abstract\}} \\
-\texttt{\textbackslash thispagestyle\{empty\}} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash pagenumbering\{roman\}} \\
-\texttt{\textbackslash tableofcontents} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash listoffigures} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash listoftables} \\
-\texttt{\textbackslash clearpage} \\
-\texttt{\textbackslash pagenumbering\{arabic\}} \\
+\maketitle
+\doublespacing
-\texttt{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . }
+\begin{abstract}
-\texttt{\textbackslash end\{document\}} \\
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus . . .
-\end{flushleft}
+\end{abstract}
+\thispagestyle{empty}
+\clearpage
+\pagenumbering{roman}
+\tableofcontents
+\clearpage
+\listoffigures
+\textbackslash clearpage
+\listoftables
+\clearpage
+\pagenumbering{arabic}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
+ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
+rhoncus . . .
+\end{verbatim}
+}
\clearpage
+
\section{End Matter}
@@ -1640,76 +2047,156 @@ The following creates a document with a title page containing the title and abst
A reference list allows readers to verify sources used by scholars, gives information about the type of source, and allows readers to locate them. Referencing is a fundamental requirement of scholarly writing. In LaTeX, these may be placed in the text manually or generated automatically.
-\subsubsection{The Olde Fashioned Way}
-References can be inserted into a document manually for referencing systems such as MLA, Chicago, Vancouver, and APA styles. A reference list can be added in the appropriate place in the document with \texttt{\textbackslash section\{title\}} command, and the references listed below this manually. Footnotes can be created by placing a \texttt{\textbackslash footnote\{Your Text\}} at the appropriate location in the text. When the document is compiled, the location is numbered with a superscript, and \texttt{Your Text} appears at the bottom of the page. Doing this by hand can be quite laborious and painstaking but it has the advantage that it will match any style requirement.
+\subsubsection{Ye Olde Fashioned Way}
+References and citations can be inserted into a document manually. A reference list can be added in the appropriate place in the document with \texttt{\textbackslash section\{title\}} command, and the references listed below this. Footnotes can be created by placing \texttt{\textbackslash footnote\{Your Text\}} at the appropriate location in the text. When the document is compiled, the location is numbered with a superscript, and \texttt{Your Text} appears at the bottom of the page. Doing this by hand can be quite laborious and painstaking but it has the advantage that it will match any style requirement.
\subsubsection{Automatically Generated References: Bib\LaTeX}
-LaTeX has facilities to generate references and reference lists automatically. BibLaTeX is a modern package for managing references and a wide range of packages with reference styles are available for it from \textsc{ctan}.
+LaTeX has facilities to generate references and reference lists automatically. BibLaTeX is a modern package for managing references and a wide range of packages with reference styles are available for it from \textsc{ctan}. BibLaTeX requires that several packages be present on your LaTeX installation. These are listed in the `Required Packages' table above. \\
-BibLaTeX requires that several packages be present on your LaTeX installation. Not all of them may be present so it is worth checking. These are: \texttt{e-TeX}, \texttt{etoolbox}, \texttt{kvoptions}, \texttt{logreq}, \texttt{pdftexcmds v0.27 or above}, \texttt{keyval}, \texttt{ifthen}, \texttt{url}, \texttt{xpatch}. Recommended packages are \texttt{babel v3.9r or above}, or \texttt{polyglossia} and \texttt{csquotes}. These recommended packages provide facilities for languages other than American English and should be loaded before \texttt{biblatex}. \texttt{biber} is also required as this processes and sorts the reference list during the document's compilation.
+The first step in using LaTeX's automated reference system is to create a reference database for the project. This contains a list of primary, secondary, and tertiary sources used in the document in \texttt{.bib} format and is saved to the project directory so that LaTeX can find it when the document is compiled. Entrys have varying requirements. Database entrys for books require the name/s of the authors, the title, publisher, year of publication, publisher and publishers' address. Articles require authors, title, journal name, year, volume and pages. See BibLaTeX's documentation for specific requirements for each type of reference.
-The first step in using LaTeX's automated reference system is to create a reference database for the project. This contains a list of primary, secondary, and tertiary sources used in the document in \texttt{.bib} format and is saved to the project directory so that LaTeX can find it when the document is compiled. LaTeX's format for entries for books and articles is this:
+All bibliographical entries require a unique key. LaTeX uses these to match entries in the text with each reference. The type of reference and it's unique key are contained in the first line. The key can be anything, but the first author's surname and year of publication, such as \texttt{Paper10}, is memorable. If the database contains more than one publication by the same author(s) in the same year, they can be uniquely identified by adding a letter: Paper10a, Paper10b, Paper10c.
+It is possible to edit this file manually with a plain text editor if required, though there are a number of reference managers that simplify this process. The section above on Additional Software has several suggestions. A sample database containing an entry for a book and an article is below. These files should be saved in \texttt{.bib} format.
+
+
+{\small
\begin{verbatim}
- @book{Paper10,
- author = {A Paper and F Pen and B L K Ink},
- title = {Our Book},
- publisher = {First Authors Press},
- year = {2010},
- address = {Booktown}
- }
+@book{Paper10,
+author = {A Paper and F Pen and B L K Ink},
+title = {Our Book},
+publisher = {First Authors Press},
+year = {2010},
+address = {Booktown}
+}
- @article{Kliker12,
- author = {G Kliker and L Flash},
- title = {Photographing Critics},
- Journal = {The Journal of Critical Photography},
- Year = {2012},
- Volume = {12},
- pages = {50-60}
- }
+@article{Kliker12,
+author = {G Kliker and L Flash},
+title = {Photographing Critics},
+Journal = {The Journal of Critical Photography},
+Year = {2012},
+Volume = {12},
+pages = {50-60}
+}
\end{verbatim}
+}
+
-The standard reference types are \texttt{article}, \texttt{book}, \texttt{booklet}, \texttt{conference}, \texttt{inbook}, \texttt{incollection}, \texttt{inproceedings}, \texttt{manual}, \texttt{mastersthesis}, \texttt{misc}, \texttt{phdthesis}, \texttt{proceedings}, \texttt{techreport} and \texttt{unpublished}. This list is saved in \texttt{.bib} format.
-All bibliographical entries contain a unique key. This is contained in the first line. It can be anything, but the first author's surname and year of publication is memorable. If the database contains more than one publication by the same author(s) in the same year, they can be uniquely identified by adding a letter: Paper10a, Paper10b, Paper10c. This key is used to identify specific entries in the bibliography for use as identifiers in the text when automatic citation generators are used.
+\begin{flushleft}
+Table 21 contains a list of reference types supported by BibLaTeX. \\
+\end{flushleft}
-A short list of common referencing styles and their packages is listed in Table 17. These can be installed if they are missing with LaTeX's Console. Additional information on these styles including limitations and incompatibilities is available in each package's documentation.
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
\begin{tabular}{ll}
-\hline
-Reference Style & Package Name \\
-\hline
+\toprule[1.0pt]
+& LaTeX Reference Types \\
+\midrule[0.5pt]
+& \texttt{article} \\
+& \texttt{book} \\
+& \texttt{booklet} \\
+& \texttt{conference} \\
+& \texttt{inbook} \\
+& \texttt{incollection} \\
+& \texttt{inproceedings} \\
+& \texttt{manual} \\
+& \texttt{mastersthesis} \\
+& \texttt{misc} \\
+& \texttt{phdthesis} \\
+& \texttt{proceedings} \\
+& \texttt{techreport} \\
+& \texttt{unpublished} \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Reference types supported by BibLaTeX}
+\end{center}
+\end{table}
+
+
+Citations are placed in the text with \texttt{\textbackslash cite\{\}} or \texttt{\textbackslash parencite\{\}} with the reference key placed between curly braces. \texttt{\textbackslash cite\{Kliker12\}} produces a reference that is something like Kliker and Flash (2012). \texttt{\textbackslash parencite\{Kliker12\}} produces a citation in parentheses (Kliker and Flash, 2012). \\
+
+
+
+\begin{verbatim}
+Lorem ipsum dolor sit amet, \cite{Kliker12} consectetur adipiscing elit.
+Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam
+consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel
+quis lorem. Ut et ligula dolor, sit amet consequat lorem
+\parencite{Kliker12}.
+\end{verbatim}
+
+\begin{flushleft}
+produces
+\end{flushleft}
+
+\begin{flushleft}
+Lorem ipsum dolor sit amet, Kliker and Flash (2012) consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. Ut et ligula dolor, sit amet consequat lorem (Kliker and Flash, 2012).
+\end{flushleft}
+
+
+A short list of common referencing styles and their packages is listed in Table 22. Additional information on these styles including limitations and incompatibilities is available in each package's documentation. \\
+
+\begin{table}[h]
+\small
+\begin{center}
+\begin{tabular}{p{5cm}l}
+\toprule[1.0pt]
+Style & Package Name \\
+\midrule[0.5pt]
American Psychological Association, 7th Edition & \texttt{biblatex-apa} \\
Chicago Manual of Style, 17th Edition & \texttt{biblatex-chicago} \\
MLA Handbook for Writers of Research Papers, 9th Edition & \texttt{biblatex-mla} \\
Vancouver Style & \texttt{vancouver} \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{BibLaTeX citations styles}
\end{center}
\end{table}
-\texttt{biblatex} is loaded in the preamble along with the required citation style and the name of the reference database. Required packages that are not automatically loaded, such as \texttt{babel} and \texttt{csquotes}, should be loaded with \texttt{\textbackslash usepackage{}} prior to \texttt{biblatex}. The required style is specified as an option in square brackets:
-
-
\begin{flushleft}
-\texttt{\textbackslash usepackage[style=apa]{biblatex}}
+\texttt{biblatex} is loaded in the preamble along with the required citation style. \\
\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[style=StyleName]{biblatex}
+\end{verbatim}
+}
\begin{flushleft}
-loads the American Psychological Association, 7th Edition style. \texttt{vancouver} loads the Vancouver style and \texttt{mla} loads the MLA style. There is no need to use the entire package name.
+The \texttt{StyleName} \texttt{apa} loads the American Psychological Association, 7th Edition style. \texttt{vancouver} loads the Vancouver style and \texttt{mla} loads the MLA style. There is no need to use the entire package name.
\end{flushleft}
-The code below loads \texttt{biblatex}, specifies the name of the reference database with \texttt{\textbackslash addbibresource\{Databasename.bib\}} and places the reference list on a new page:
+The \texttt{biblatex-chicago} style package is an exception to this. This package is loaded in place of \texttt{biblatex}, and the format is defined in options. This can be any of BibLaTeX's standard formats: \texttt{numeric}, \texttt{alphabetic}, \texttt{authordate} and \texttt{authortitle}. The following loads \texttt{biblatex-chicago} with the \texttt{authordate} option:
+
+
+{\small
+\begin{verbatim}
+\usepackage[authordate]{biblatex-chicago}
+\end{verbatim}
+}
+
+
+BibLaTeX requires that a number of packages be present on your LaTeX installation. Two are loaded before biblatex. These are \texttt{babel} and \texttt{csquotes}. The others should be loaded automatically by LaTeX if they are required.
+
+The reference database is loaded next with \texttt{\textbackslash addbibresource\{\}}. This loads the reference database and requires only the name of the database.
+
+The reference list is placed inside the document environment at the desired location in the text with \texttt{\textbackslash printbibliography}.
+An optional command is \texttt{\textbackslash nocite\{\}}. This allows items that have not been explicitly referred to in the text, but are in the bibliographical database, to be included in the reference list. To include a specific item, it's unique key should be placed inside the curly brackets: \texttt{\textbackslash nocite\{ItemKey\}}. To include all the items in the bibliography, use a \texttt{\textasteriskcentered: \textbackslash nocite\{\textasteriskcentered\}}. \\
+
+The code below loads \texttt{biblatex}, specifies the name of the reference database with \texttt{\textbackslash addbibresource\{Databasename.bib\}} and places the reference list with all the references in the bibliography on a new page:
+
+{\small
\begin{verbatim}
+\documentclass[]{article}
+ . . .
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=CitationStyle]{biblatex}
@@ -1723,21 +2210,10 @@ Document Text.
\printbibliography
\end{document}
\end{verbatim}
+}
-The \texttt{biblatex-chicago} style package is an exception to this. This package is loaded in place of \texttt{biblatex}, and the format is defined in options. This can be any of BibLaTeX's standard formats: \texttt{numeric}, \texttt{alphabetic}, \texttt{authordate} and \texttt{authortitle}. The following loads \texttt{biblatex-chicago} with the \texttt{authordate} option:
-
-
-\begin{verbatim}
-\usepackage[authordate]{biblatex-chicago}
-\end{verbatim}
-
-
-The reference list is placed inside the document environment at the desired location in the text with \texttt{\textbackslash printbibliography}. An optional command is \texttt{\textbackslash nocite\{\}}. This allows items that have not been explicitly referred to in the text, but are in the bibliographical database, to be included in the reference list. To include a specific item, it's unique key should be placed inside the curly brackets: \texttt{\textbackslash nocite\{ItemKey\}}. To include all the items in the bibliography, use a \texttt{\textasteriskcentered: \textbackslash nocite\{\textasteriskcentered\}}.
-
-Citations are placed in the text with \texttt{\textbackslash cite\{\}} or \texttt{\textbackslash parencite\{\}} with the reference key placed between curly braces. \texttt{\textbackslash cite\{Kliker12\}} produces a reference that is something like Kliker and Flash (2012). \texttt{\textbackslash parencite\{Kliker12\}} produces a citation in parentheses (Kliker and Flash, 2012).
-
-When documents with BibLaTeX citations are compiled, the citation processing package \texttt{biber} must also be run to process and sort the citations and reference list.
+When documents with BibLaTeX citations are compiled, the citation processing package \texttt{biber} must also be run to process and sort the citations and reference list. \\
Referencing styles are regularly revised, new ones appear, and institutions and publications may have their own versions of these. If an automated referencing system is used, the documentation should be consulted for shortcomings and possible incompatibilities with style requirements.
@@ -1747,50 +2223,63 @@ Referencing styles are regularly revised, new ones appear, and institutions and
Appendices can be added to documents with the \texttt{appendix} package. This is loaded in the preamble with
+
+{\small
\begin{verbatim}
\usepackage{appendix}
\end{verbatim}
+}
-Options for this package are listed in Table 18:
+\begin{flushleft}
+Options for this package are listed in Table 23:
+\end{flushleft}
-\begin{table}
+\begin{table}[h]
\small
\begin{center}
-\begin{tabular}{ll}
-\hline
+\begin{tabular}{lp{5cm}}
+\toprule[1.0pt]
+Option & Description \\
+\midrule[0.5pt]
\texttt{toc} & Includes a title in the Table of Contents prior to listing the appendices \\
\texttt{page} & Places a title prior to the beginning of the appendices \\
\texttt{title} & Adds the name `Appendix' to each appendix title \\
\texttt{titletoc} & Does the same to each appendix title in the Table of Contents \\
\texttt{header} & Does the same for each page header \\
-\hline
+\bottomrule[1.0pt]
\end{tabular}
\caption{Options for package appendix}
\end{center}
\end{table}
-The appendices themselves are placed inside the appendix environment and are sectioned in the same way as the document text:
+The appendices themselves are placed inside the appendix environment and are sectioned in the same way as the document text. Insert a \texttt{\textbackslash clearpage} before \texttt{\textbackslash begin\{append- ices\}} and before each section to place them on a new page.
+
+{\small
+\begin{verbatim}
+\clearpage
+\begin{appendices}
+\clearpage
+\section{Appendix 1}
+\clearpage
+\section{Appendix 2}
+\end{appendices}
+\end{verbatim}
+}
-\begin{flushleft}
-\texttt{\textbackslash begin\{appendices\}} \\
-\texttt{\textbackslash section\{Appendix 1\}} \\
-\texttt{\textbackslash section\{Appendix 2\}} \\
-\texttt{\textbackslash end\{appendices\}} \\
-\end{flushleft}
-To begin the appendices on a new page, and to place each new appendix on a new page, insert a page break before the appendix’s environment and the beginning of a new appendix.
\clearpage
+
\section{Compiling Documents}
\subsection{Postscript Format}
-When the text is marked up, it must be compiled to produce a readable document. LaTeX can produce postscript and \textsc{pdf} files. Postscript is the `Gold Standard’ for printed documents and LaTeX produces these without any special commands in the preamble. These files are compiled by running LaTeX multiple times to resolve the front and back matter, tables, and lists, and if the document contains references created through BibLaTeX, Biber will also have to be run to sort and resolve these. The following scheme is suggested for documents that contain BibLaTeX references. \texttt{biber} can be omitted if they are not present.
+When the text is marked up, it must be compiled to produce a readable document. LaTeX can produce postscript and \textsc{pdf} files. Postscript is the `Gold Standard’ for printed documents and LaTeX produces these without any special commands in the preamble. These files are compiled by running LaTeX multiple times to resolve the front and back matter, tables and lists. If the document contains references created through BibLaTeX, Biber will also have to be run to sort and resolve these as well. The following scheme is suggested for documents that contain BibLaTeX references. \texttt{biber} can be omitted if they are not present.
\begin{center}
@@ -1800,7 +2289,7 @@ When the text is marked up, it must be compiled to produce a readable document.
\texttt{latex} \\
\end{center}
-This can be done through an editor’s \textsc{gui} interface. To do this in TeXstudio, go to the Menu: \\
+This can be done through the command line or an editor’s \textsc{gui} interface. To do this in TeXstudio, go to the Menu: \\
\begin{flushleft}
\texttt{Tools $\rightarrow$ Commands $\rightarrow$ LaTeX} \\
@@ -1814,7 +2303,9 @@ In Kile: \\
\texttt{Build $\rightarrow$ Compile $\rightarrow$ LaTeX} \\
\end{flushleft}
+\begin{flushleft}
If the document contains BibLaTeX references, \texttt{biber} is in the same menu. \\
+\end{flushleft}
This creates a Device Independent (\texttt{.dvi}) file. This intermediate file is then converted to postscript. In TeXstudio: \\
@@ -1832,44 +2323,56 @@ In Kile: \\
\end{flushleft}
-LaTeX saves the resulting files to the project directory. \texttt{dvi} files can be viewed with \textsc{yap} (Yet Another Previewer), which comes with ProTeX. Click on the dvi file to activate it. Postscript files can be viewed with GSView.
+LaTeX saves the resulting files to the project directory. \texttt{dvi} files can be viewed with \textsc{dviout}, which comes with TeX Live. Click on the \texttt{dvi} file to activate it. Postscript files can be viewed with GSView.
-\subsection{\textsc{pdf} Format}
+\subsection{PDF Format}
-\texttt{dvi} and postscript files can be converted to \textsc{pdf} format if required using the \texttt{DVI->PDF} or \texttt{PS->PDF} options in TeXstudio or the \texttt{DVItoPDF} or \texttt{PStoPDF} options in Kile. These will not contain any hyperlinks and there will be no metadata attached to the file. \textsc{pdf}LaTeX supports these features so is the recommended way to produce \textsc{pdf} files.
+\texttt{.dvi} and postscript files can be converted to \textsc{pdf} format if required using the \texttt{DVI->PDF} or \texttt{PS->PDF} options in TeXstudio or the \texttt{DVItoPDF} or \texttt{PStoPDF} options in Kile. \texttt{pdf} files created this way will not contain any hyperlinks and there will be no metadata attached to the file. \textsc{pdf}LaTeX supports these features so is the recommended way to produce \textsc{pdf} files.
Hypertext links can be inserted into \textsc{pdf} documents with the \texttt{hyperref} package. This automatically turns all internal references, such as the table of contents and lists of tables and figures, cross references, and citations into active hyperlinks. Clicking on the link will take you to the appropriate place in the text. This should be the last package loaded in the preamble.
-By default, text with hyperlinks appear framed in a colour depending on the type of link: citations in green, \textsc{url}'s in magenta and links in red, etc. This can be changed to coloured text by adding the \texttt{colorlinks=true} option. As with the default colours, this has different colours for each type of link. The \texttt{allcolors} option changes all links to a single colour. This colour can be any in the \texttt{xcolor} option nominated when \texttt{xcolor} was loaded in the preamble. The following code loads \texttt{hyperref} with hyperlinks being flagged with text coloured blue:
+By default, text with hyperlinks appear framed in a colour depending on the type of link: citations in green, \textsc{url}'s in magenta and links in red, etc. This can be changed to coloured text by adding \texttt{colorlinks=true} to the options. As with the default colours, this has different colours for each type of link. The \texttt{allcolors} option changes all links to a single colour. This colour can be any from the \texttt{xcolor} option nominated when \texttt{xcolor} was loaded in the preamble. The following code loads \texttt{hyperref} with hyperlinks being flagged with text coloured blue:
-\begin{flushleft}
-\texttt{\textbackslash usepackage[pdftex, colorlinks=true, allcolours=blue]\{hyperref\}} \\
-\end{flushleft}
+{\small
+\begin{verbatim}
+\usepackage[pdftex, colorlinks=true, allcolours=blue]{hyperref}
+\end{verbatim}
+}
-It is worth specifying a backend driver for this package, in this case, \texttt{pdftex}. This helps configure \texttt{hyperref} to the compiler used for the document. In the case of \textsc{pdf} files, \textsc{pdf}LaTeX.
+It is worth specifying a backend driver for this package. This helps configure \texttt{hyperref} to the compiler used for the document. In the case of \textsc{pdf} files, it is \textsc{pdf}LaTeX with the \texttt{pdftex} driver.
Links to external web pages can be created in the text with \texttt{\textbackslash url\{WebAddress\}}. The following code will create a link to \textsc{ctan}'s homepage at \texttt{www.ctan.org}:
+\begin{verbatim}
+\url{www.ctan.org}
+\end{verbatim}
+
\begin{flushleft}
-\texttt{\textbackslash url\{www.ctan.org\}}
+It appears as
\end{flushleft}
-The file metadata can be edited with \texttt{\textbackslash hypersetup\{pdfinfo=\{ . . .\}\}}. This contains information regarding the title, author, subject, creation date, modification date and keywords. It can be seen by accessing the document's properties. The following code provides only title, author, subject and keywords. It omits the creation date and modification date, so \textsc{pdf}LaTeX will automatically fill these fields with the current date:
-
\begin{flushleft}
-\texttt{\textbackslash hypersetup\{pdfinfo=\{} \\
-\texttt{Title=\{The Lost Secrets of LaTeX2e\},} \\
-\texttt{Author=\{Herodotus\},} \\
-\texttt{Subject=\{LaTeX2e\},} \\
-\texttt{Keywords=\{PDFD; Latex; Guide\}} \\
-\texttt{\}\}} \\
-
+\url{www.ctan.org}
\end{flushleft}
-The creation date and modification date fields can be specified if required. The format is \texttt{\textsc{yyyymmddhhmmss}}: \texttt{\textsc{yyyy}} = year, \texttt{\textsc{mm}} = month, \texttt{\textsc{hh}} = hour, \texttt{\textsc{mm}} = minute and \texttt{\textsc{ss}} = second.
+
+The file metadata can be included with \texttt{\textbackslash hypersetup\{pdfinfo=\{ . . .\}\}}. This contains information regarding the title, author, subject, creation date, modification date and keywords. It can be seen by accessing the document's properties. The following code provides title, author, subject and keywords.
+
+
+{\small
+\begin{verbatim}
+\hypersetup{pdfinfo={
+Title={The Lost Secrets of LaTeX2e},
+Author={Albertus Magnus},
+Subject={LaTeX2e},
+Keywords={PDF; Latex2e; Guide}
+}}
+\end{verbatim}
+}
+
As with postscript documents, \textsc{pdf}LaTeX will have to be run multiple times to resolve the front and back matter, tables, hyperlinks, etc.
@@ -1877,7 +2380,6 @@ As with postscript documents, \textsc{pdf}LaTeX will have to be run multiple tim
\clearpage
-
\section{References}
\begin{flushleft}
@@ -1926,29 +2428,28 @@ International Committee of Medical Journal Editors (2021). Recommendations for t
\section{Some Additional \LaTeXe Facilities}
-LaTeX has a much wider range of functionality than described in this document. Some add-on packages enhance existing facilities and others support music, presentations, and line drawings. Some of these are outlined in this Appendix.
+LaTeX has a much wider range of functionality than described in this document. Some add-on packages enhance existing facilities and others support music, presentations, and line drawings. Some of these are described in this Appendix.
\paragraph{Languages}
-LaTeX has facilities for a wide range of modern languages and supports non-latin alphabets, such as Cyrrilic, and Logosyllabary, Syllabary, Abjad and Abugida writing systems. It also supports a range of extinct languages such a Phonecian, Egyptian Hieroglyphics, Linear B and Runic and provides symbols for phonetics.
-
+LaTeX has facilities for a wide range of modern languages and supports non-latin alphabets, such as Cyrrilic, and Logosyllabary, Syllabary, Abjad and Abugida writing systems. It also supports a range of extinct languages such as Phonecian, Egyptian Hieroglyphics, Linear B and Runic and provides symbols for the phonetic alphabet.
-\paragraph{AMS-LaTeX}
-AMS Maths is a production of the American Mathematical Society. It provides a range of enhanced mathematical facilities and enhancements including for the LaTeX's standard document classes.
+\paragraph{Line Drawings: PSTricks}
+PSTricks creates line drawings. It can draw mathematical functions, diagrams, and pictures. It creates postscript output, but it is possible to create \textsc{pdf} output with the \texttt{pdftricks} package.
-\paragraph{Beamer}
-Beamer produces presentations. It is a document class that is loaded in the preamble. It is compatible with \textsc{pdf}LaTeX and can create slides and handouts in \textsc{pdf} and supports overlays and hyperlinks.
-
-\paragraph{PSTricks}
-PSTricks creates line drawings. It can draw mathematical functions, diagrams, and pictures. It creates postscript output, but it is possible to create \textsc{pdf} output with the \texttt{pdftricks} package.
+\paragraph{Mathematics: AMS-LaTeX}
+AMS Maths is a production of the American Mathematical Society. It provides a range of enhanced mathematical facilities including for LaTeX's standard document classes.
\paragraph{Music}
A range of LaTeX packages support music. It can produce sheet music and sections of scores can be inserted into texts with \texttt{musixtex}. Songbooks can be created with the \texttt{songs} or \texttt{songbook} packages, \texttt{guitar}, \texttt{guitarchordschemes} and \texttt{guitartabs} support the guitar, \texttt{bagpipe} supports bagpipe music and gregorian chant is possible with \texttt{gregoriotex}.
+\paragraph{Presentations: Beamer}
+Beamer produces presentations. It is a document class that is loaded in the preamble. It is compatible with \textsc{pdf}LaTeX and can create slides and handouts in \textsc{pdf} and supports overlays and hyperlinks.
+
\clearpage
@@ -1996,36 +2497,41 @@ The \TeX faq addresses questions about \TeX with informative answers on a wide v
\section{A Sample Script for a Postscript Document}
+{\small
\begin{verbatim}
-% Document Type
+% Document Type, text point size and paper size
\documentclass[12pt, a4paper]{article}
% Line Spacing
\usepackage{setspace}
-% Graphic management
-\usepackage{graphicx}
+% Graphic management with the dvips backend
+\usepackage[dvips]{graphicx}
-% Colour Support with a colour palette from dvipsnames
+% Colour support with the dvipsnames colour palette
\usepackage[dvipsnames]{xcolor}
-% Hyphenation
+% Hyphenation for French, German and Australian English
\usepackage[french, ngerman, australian]{babel}
\usepackage{hyphenat}
+% A list of words that LaTeX didn't hyphenate properly
\hyphenation{}
-% Date formatting
+% Date formatting in Australian format
\usepackage[useregional, showdow]{datetime2}
-% Font and encoding
+% Font and encoding. This loads T1 and TS1 encodings, the Latin Modern
+% font and a ragged right edge for the text block
\usepackage[TS1, T1]{fontenc}
+\usepackage[document]{ragged2e}
\usepackage{lmodern}
-% Page margins
+% Page margins in inches with the geometry package
\usepackage[left=1.5in, right=1.0in, top=1.0in, bottom=1.75in,
headheight=18pt]{geometry}
-% Headers and footers
+% Headers and footers with a running header, page numbering and a
+% left footer containing the date.
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Running Header or Title.}
@@ -2040,21 +2546,225 @@ headheight=18pt]{geometry}
% The document title
\title{The Lost Secrets of \LaTeXe}
% The author(s)
-\author{Herodotus}
+\author{Albertus Magnus}
+
+% Insert today's date
+\date{\today}
+
+% The end of the preamble and the beginning of the document
\begin{document}
-% Create the title and abstract on the front page with no headers or
-% footers
+
+% Create the title and abstract on the front page with no headers,
+% footers or page numbers.
\maketitle
\thispagestyle{empty}
-% Write the abstract
+% Insert an abstract
\begin{abstract}
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
-ultrices in port titor in, accumsan non quam. Nam consectetur porttitor
-rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem.
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
+vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
+gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate
+a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi
+tristique senectus et netus et malesuada fames ac turpis egestas.
\end{abstract}
+
+% Create a new page for the Table of Contents and begin numbering the
+% pages in lower case Roman numerals for the front matter.
+\clearpage
+\pagenumbering{roman}
+\tableofcontents
+
+% Create a new page for the List of Figures
+\clearpage
+\listoffigures
+
+% Create a new page for the List of Tables
+\clearpage
+\listoftables
+
+% Create a new page to begin the text of the document and begin
+% numbering thepages in Arabic numerals.
+\clearpage
+\pagenumbering{arabic}
+
+% Define line spacing
+\doublespacing
+
+
+% Document text with sections, a hot link at the end of the first
+% section, a numbered list and a table.
+
+\section{Integer sapien est}
+
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
+vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
+gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
+vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant
+morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus
+vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor
+gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra
+ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus.
+Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur
+auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue
+eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci
+dignissim rutrum.
+
+% Insert a numbered list
+
+\begin{enumerate}
+\item Mauris ut est
+\item Ut quis purus
+\item Sed ac odio
+\item Sed vehicula hendrerit sem
+\item Duis non odio
+\end{enumerate}
+
+\subsection{Phasellus adipiscing semper elit}
+
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi.
+Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
+vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan
+bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi.
+Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec
+ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis
+parturient montes, nascetur ridiculus mus. Aliquam tincidunt urna.
+Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris.
+Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat
+at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec
+nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin
+fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a,
+molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at,
+accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna.
+Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim.
+Pellentesque tincidunt purus vel magna. Integer non enim. Praesent
+euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus
+pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum
+pellentesque felis eu massa.
+
+Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae
+lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer
+adipiscing elit. In hac habitasse platea dictumst. Integer tempus
+convallis augue. Etiam facilisis. Nunc elementum fermentum wisi.
+Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis
+odio placerat quam, ac pulvinar elit purus eget enim. Nunc vitae
+tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae
+risus porta vehicula.
+
+% Insert a table
+\begin{table}[h]
+\begin{center}
+\begin{tabular}{cll}
+\toprule[1.0pt]
+1 & Fusce mauris & Vestibulum luctus nibh at lectus \\
+2 & Vestibulum diam & Aliquam pellentesque, augue quis sagittis \\
+3 & Vestibulum porttitor & Nulla facilisi \\
+4 & Morbi fringilla, wisi & In dignissim interdum, justo lectus \\
+5 & Cras ac magna & Cras nulla \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Caption text}
+\end{center}
+\end{table}
+
+% End of the text and the document.
+
+\end{document}
+\end{verbatim}
+}
+
+
+\clearpage
+
+
+
+\section{A Sample Script for a \textsc{pdf} Document}
+
+{\small
+\begin{verbatim}
+% Document Type
+\documentclass[12pt, a4paper]{article}
+
+% Line Spacing
+\usepackage{setspace}
+
+% Graphic management with the pdftex backend
+\usepackage[pdftex]{graphicx}
+
+% Colour support with the dvipsnames colour palette
+\usepackage[dvipsnames]{xcolor}
+
+% Hyphenation for French, German and Australian English
+\usepackage[french, ngerman, australian]{babel}
+\usepackage{hyphenat}
+\hyphenation{}
+
+% Date formatting in Australian format
+\usepackage[useregional, showdow]{datetime2}
+
+% Font and encoding. This loads T1 and TS1 encodings, the Latin Modern
+% font and a ragged right edge for the text block
+\usepackage[TS1, T1]{fontenc}
+\usepackage[document]{ragged2e}
+\usepackage{lmodern}
+% Page margins with the geometry package
+\usepackage[left=1.5in, right=1.0in, top=1.0in, bottom=1.75in,
+headheight=18pt]{geometry}
+
+% Headers and footers with a running header, page numbering and a
+% left footer containing the date.
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\lhead{Running Header or Title.}
+\chead{}
+\rhead{\thepage}
+\lfoot{\today}
+\cfoot{}
+\rfoot{}
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0.5pt}
+
+% The document title
+\title{The Lost Secrets of \LaTeXe}
+% The author(s)
+\author{Albertus Magnus}
+
+% Insert today's date
+\date{\today}
+
+% Load hyperref to allow hotlinks in the document. These options load
+% the pdf backend and set all links to the colour blue
+\usepackage[pdftex, colorlinks=true, allcolors=Blue]{hyperref}
+
+% Metadata for the PDF file: Title, Author, Subject and Keywords
+
+\hypersetup{pdfinfo={
+Title={The Lost Secrets of LaTeXe},
+Author={Albertus Magnus},
+Subject={LaTeX2e},
+Keywords={Latex2e; Guide}
+}}
+
+
+% The end of the preamble and the beginning of the document
+\begin{document}
+
+% Create the title and abstract on the front page with no headers,
+% footers or page numbers.
+\maketitle
+\thispagestyle{empty}
+
+% Insert an abstract
+\begin{abstract}
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
+vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
+gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate
+a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi
+tristique senectus et netus et malesuada fames ac turpis egestas.
+\end{abstract}
+
% Create a new page for the Table of Contents and begin numbering the
% pages in lower case Roman numerals for the front matter.
\clearpage
@@ -2076,31 +2786,93 @@ rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem.
% Define line spacing
\doublespacing
-% Page Numbering
-\pagenumbering{arabic}
-% Beginning of the text.
-Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus,
-ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor
-rhoncus. Curabitur eu est et leo feugiat auctor vel quis lorem. Ut et
-ligula dolor, sit amet consequat lorem. Aliquam porta eros sed velit
-imperdiet egestas. Maecenas tempus eros ut diam ullamcorper id dictum
-liberotempor. Donec quis augue quis magna condimentum lobortis. Quisque
-imperdiet ipsum vel magna viverra rutrum. Cras viverra molestie urna,
-vitae vestibulum turpis varius id.
+% Document text with sections, a numbered list, a table and a hot link
+% at the end of the first section.
-Vestibulum mollis, arcu iaculis bibendum varius, velit sapien blandit
-metus, ac posuere lorem nulla ac dolor. Maecenas urna elit, tincidunt in
-dapibus nec, vehicula eu dui. Duis lacinia fringilla massa. Cum sociis
-natoque penatibus et magnis dis parturient montes, nasceturridiculus mus.
-Ut consequat ultricies est, non rhoncus mauris congue porta.
+\section{Integer sapien est}
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit,
+vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum
+gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
+vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant
+morbi tristique senectus et netus et malesuada fames ac turpis egestas.
+Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus
+vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor
+gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra
+ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus.
+Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur
+auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue
+eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci
+dignissim rutrum. \url{www.ctan.org}
+
+
+% Insert a numbered list
-% End of the Text
+\begin{enumerate}
+\item Mauris ut est
+\item Ut quis purus
+\item Sed ac odio
+\item Sed vehicula hendrerit sem
+\item Duis non odio
+\end{enumerate}
-\end{document}
+\subsection{Phasellus adipiscing semper elit}
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi.
+Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis
+vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan
+bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi.
+Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec
+ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis
+parturient montes, nascetur ridiculus mus. Aliquam tincidunt urna.
+Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris.
+Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat
+at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec
+nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin
+fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a,
+molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at,
+accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna.
+Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim.
+Pellentesque tincidunt purus vel magna. Integer non enim. Praesent
+euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus
+pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum
+pellentesque felis eu massa.
+
+Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae
+lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer
+adipiscing elit. In hac habitasse platea dictumst. Integer tempus
+convallis augue. Etiam facilisis. Nunc elementum fermentum wisi.
+Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis
+odio placerat quam, ac pulvinar elit purus eget enim. Nunc vitae
+tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae
+risus porta vehicula.
+
+
+% Insert a table
+\begin{table}[h]
+\begin{center}
+\begin{tabular}{cll}
+\toprule[1.0pt]
+1 & Fusce mauris & Vestibulum luctus nibh at lectus \\
+2 & Vestibulum diam & Aliquam pellentesque, augue quis sagittis \\
+3 & Vestibulum porttitor & Nulla facilisi \\
+4 & Morbi fringilla, wisi & In dignissim interdum, justo lectus \\
+5 & Cras ac magna & Cras nulla \\
+\bottomrule[1.0pt]
+\end{tabular}
+\caption{Caption text}
+\end{center}
+\end{table}
+
+% End of the text and the document.
+
+\end{document}
+
\end{verbatim}
+}
+
+
\clearpage