\documentclass[12pt, a4paper]{article} \usepackage{setspace} \usepackage{booktabs} \usepackage{multirow} \usepackage[pdftex]{graphicx} \usepackage[dvipsnames]{xcolor} \usepackage[french, ngerman, australian]{babel} \usepackage{hyphenat} \hyphenation{} \usepackage[useregional, showdow]{datetime2} \usepackage[TS1,T1]{fontenc} \usepackage[left=1in, top=1in, bottom=1.25in, right=1in, headheight=18pt]{geometry} \usepackage{fancyhdr} \pagestyle{fancy} \lhead{} \chead{} \rhead{\thepage} \lfoot{} \cfoot{} \rfoot{} \renewcommand{\headrulewidth}{0.0pt} \renewcommand{\footrulewidth}{0.0pt} \usepackage[title, toc]{appendix} %opening \title{ Yet Another Guide \\ to \\ \LaTeXe \\ {\Large v1.2} \\} \author{Michael P. Morris \\ {\small Research Fellow} \\ {\small Australian National University} \\ } \date{\today} \usepackage[pdftex, colorlinks=true, allcolors=Blue]{hyperref} \hypersetup{pdfinfo={ Title={Yet Another Guide to LaTeX2e. v1.2}, Author={Michael P. Morris}, Subject={LaTeX2e}, Keywords={Latex2e; Guide} }} \begin{document} \maketitle \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 and TeX Live 2023 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 \clearpage \listoffigures \clearpage \listoftables \clearpage \pagenumbering{arabic} Copyright \copyright 2020--2023 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". \clearpage \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. 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 6400 add-on packages from over 2900 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 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 and the TeX Live 2023 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. 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. `Getting Started with \LaTeXe' also illustrated the Pro\TeX distribution. This was retired in 2022, so the focus was changed to \TeX Live. \TeX Live 2023 is the most current distribution available at the time of 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 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}. \paragraph{Acknowledgements:} Many thanks to those anonymous people who have commented on this document and have made sugestions. \clearpage \section{Installation} \LaTeXe is freely available from \texttt{\url{www.ctan.org}} in two main distributions: \begin{itemize} \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.\\ \end{itemize} 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 2023. 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 \textsc{iso} file for those who burn their own \textsc{dvd}'s. This is is a large file: about 4.8gb. 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. \\ For those who are installing from \textsc{dvd}, the first step is to open it and click on \texttt{index.html}. This contains links to installation documentation in 14 languages. It provides instructions for Windows 7 and above, Mac \textsc{os x} and \textsc{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} \texttt{Control Panel $\rightarrow$ System and Security $\rightarrow$ System $\rightarrow$ Advanced System Settings $\rightarrow$ Environmental Variables $\rightarrow$ Path in the User Variables box $\rightarrow$ Edit} \end{flushleft} Then navigate to the directory containing the binary files, those with an \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} LaTeX has a large number 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{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 \textsc{ctan} main site and it will be the source of upgrades and new packages. To select one near you, select: \begin{flushleft} \texttt{Options $\rightarrow$ Repositories} \end{flushleft} 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 named \texttt{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{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}. \\ 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 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{Actions $\rightarrow$ Regenerate filename database}} \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{Actions $\rightarrow$ Regenerate fontmaps} \end{flushleft} \begin{flushleft} When this is finished, the package database also needs to be updated: \end{flushleft} \begin{flushleft} \texttt{Tasks $\rightarrow$ Update package database} \end{flushleft} 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. 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, requires 12 additional packages, not including style packages! \begin{table}[h] \begin{center} \begin{tabular}{ll} \toprule[1.0pt] \LaTeXe & Bib\LaTeX \\ \midrule[0.5pt] \texttt{babel} & \texttt{babel v3.9r or above or polygossia} \\ \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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Required and recommended packages} \end{center} \end{table} \subsection{Additional Software} The software listed below is helpful for managing LaTeX projects. These are editors, a reference database and a document viewer. \\ An editor makes marking up a text file and compiling it much simpler. 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 after it is compiled. It is available from: \begin{flushleft} \texttt{\url{www.kile.sourceforge.io/}} \end{flushleft} A reference manager is helpful for scholarly writing because it can keep all the references in a single place, and if the references and reference list is are to be generated automatically, it forms a database that the generator can refer to. Jabref imports 15 reference formats and links to full text documents on the web. It is freely available from: \begin{flushleft} \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 \textsc{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 their documents. 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} \texttt{\url{www.sumatrapdfreader.org/free-pdf-reader}} \end{flushleft} 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: \begin{flushleft} \texttt{\url{www.imagemagick.org/script/index.php}} \end{flushleft} \clearpage \section{LaTeX Conventions} \subsection{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 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}} One of the first things to consider is if the document is to be produced in postscript or Portable Document Format (\textsc{pdf}). Postscript is the `gold standard’ for printed documents and produces the highest quality files for printing. \textsc{pdf} supports hypertext links and live connections to websites and are somewhat smaller than postscript files. \subsection{LaTeX Documents} LaTeX documents have two parts: the preamble and the document text. The preamble defines the document's global properties such as the type of 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\}}. This specifies the type of document, letter, article, book, etc, the font size and paper type. Packages are loaded with the \texttt{\textbackslash usepackage[Options]\{PackageName\}} command. The required package name is placed between the curly braces and any options separated by commas are listed between square brackets: {\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: {\small \begin{verbatim} \documentclass{article} \begin{document} Document Text Here \end{document} \end{verbatim} } \subsection{Commands} 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{verbatim} \textit{Lorem ipsum dolor sit amet, consectetur adipiscing elit.} \end{verbatim} \begin{flushleft} produces \end{flushleft} \begin{flushleft} \textit{Lorem ipsum dolor sit amet, consectetur adipiscing elit.} \end{flushleft} Commands are also used to select special characters. This can include LaTeX's control characters, symbols and diacritics. \texttt{\$} is one of LaTeX's control characters. It informs LaTeX that the following code is to be executed in Math mode. For LaTeX to process it as a text character, a \texttt{\textbackslash} must be added: \texttt{\textbackslash \$} produces \$. 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: {\small \begin{verbatim} % This is a comment. \end{verbatim} } \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: {\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}[h] \small \begin{center} \begin{tabular}{ll} \toprule[1.0pt] Option & Command \\ \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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Document class options} \end{center} \end{table} \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Size & Measurement(mm) & Command \\ \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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Paper sizes} \end{center} \end{table} 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: {\small \begin{verbatim} \documentclass[12pt, a4paper]{article} \end{verbatim} } \begin{flushleft} 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: {\small \begin{verbatim} \documentclass[a4paper]{article} \usepackage{setspace} . . . \begin{document} \doublespacing . . . \end {document} \end{verbatim} } The \texttt{booktabs} package offers several tweaks to LaTeX's default tables. These add some extra space above and below lines and the ability to define the thickness of lines. It is loaded with: {\small \begin{verbatim} \usepackage{booktabs} \end{verbatim} } 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. {\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{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 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: {\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: {\small \begin{verbatim} Text in English. \selectlanguage{french} Texte en fran\c{c}aise. \selectlanguage{australian} Returns to Australian English. \end{verbatim} } \begin{flushleft} or \end{flushleft} {\small \begin{verbatim} \foreignlanguage{french}{Texte en Fran\c{c}ais.} \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 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}: {\small \begin{verbatim} \usepackage[french, ngerman, australian]{babel} \usepackage{hyphenat} \hyphenation{hy-phen-ate pre-am-ble} \end{verbatim} } \begin{flushleft} 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} {\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: {\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 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: {\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: {\small \begin{verbatim} \usepackage[document]{ragged2e} \end{verbatim} } The next line specifies the fony. 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} Table 4 contains a short font sampler and package names. \end{flushleft} \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Font Name & Package Name & Sample Text \\ \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 \\ Courier & \texttt{courier} & \fontfamily{pcr}\selectfont Lorem ipsum dolor sit amet \\ Computer Modern & \texttt{cmodern} & \fontfamily{cmr}\selectfont Lorem ipsum dolor sit amet \\ Helvetica & \texttt{helvet} & \fontfamily{phv}\selectfont Lorem ipsum dolor sit amet \\ Latin Modern & \texttt{lmodern} & \fontfamily{lmr}\selectfont Lorem ipsum dolor sit amet \\ New Century Schoolbook & \texttt{newcent} & \fontfamily{pnc}\selectfont Lorem ipsum dolor sit amet \\ 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 \\ \bottomrule[1.0pt] \end{tabular} \caption{A short font sampler} \end{center} \end{table} 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}[h] \small \begin{center} \begin{tabular}{ll} \toprule[1.0pt] Option & Comment \\ \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 \\ \bottomrule[1.0pt] \end{tabular} \caption{Geometry options} \end{center} \end{table} 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: {\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: {\small \begin{verbatim} \newgeometry{left=0.5in, right=0.5in, top=0.5in, bottom=0.5in} \end{verbatim} } \begin{flushleft} 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: {\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: {\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 {\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. \\ 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: {\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: {\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 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 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} formats the text between the curly braces in italics as \end{flushleft} \begin{flushleft} \textit{Lorem ipsum dolor sit amet . . . } \end{flushleft} This is useful for single words or sentences, but for blocks of text an environment is convenient: {\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: \end{flushleft} \begin{flushleft} \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{flushleft} Fonts can be made larger or smaller from {\tiny Tiny} to {Normal Size} to {\Huge Huge} in a similar way. For fonts in 12pt, \texttt{huge{}} and\texttt{ Huge{}} sizes are identical. 10 and 11pt font sizes show a difference. Table 7 gives commands for resizing fonts. \\ \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Style & Command & Sample \\ \midrule[0.5pt] Roman & \texttt{\textbackslash textrm\{\}} & \textrm{Roman} \\ Sans Serif & \texttt{\textbackslash textsf\{\}} & \textsf{Sans Serif} \\ Typewriter & \texttt{\textbackslash texttt\{\}} & \texttt{Typewriter} \\ Italics & \texttt{\textbackslash textit\{\}} & \textit{Italics} \\ Boldface & \texttt{\textbackslash textbf\{\}} & \textbf{Boldface} \\ 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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Text styles} \end{center} \end{table} \begin{table}[h] \small \begin{center} \begin{tabular}{lc} \toprule[1.0pt] Command & Sample \\ \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} \\ \texttt{\textbackslash small\{\}} & \small{Lorem ipsum dolor sit amet} \\ \texttt{\textbackslash normalsize\{\}} & \normalsize{Lorem ipsum dolor sit amet} \\ \texttt{\textbackslash large\{\}} & \large{Lorem ipsum dolor sit amet} \\ \texttt{\textbackslash Large\{\}} & \Large{Lorem ipsum dolor sit amet} \\ \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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Font sizes} \end{center} \end{table} If the \texttt{xcolor} package 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: \end{flushleft} \begin{flushleft} {\color {red} Lorem ipsum dolor sit amet, consectetur adipiscing elit.} \end{flushleft} \begin{flushleft} \texttt{\textbackslash colorbox\{\}} changes the background colour, in this case to Sea Green: \end{flushleft} {\small \begin{verbatim} {\colorbox {SeaGreen}{Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet}} \end{verbatim} } \begin{flushleft} produces \end{flushleft} \begin{flushleft} {\colorbox {SeaGreen}{Lorem ipsum dolor sit amet Lorem ipsum dolor sit amet}} \end{flushleft} \begin{flushleft} Both can be changed by specifying the background colour and the text colour: \end{flushleft} \begin{verbatim} \colorbox{SkyBlue}{\color{Red} Lorem ipsum dolor sit amet} \end{verbatim} \begin{flushleft} produces: \end{flushleft} \begin{flushleft} \colorbox{SkyBlue}{\color{Red} Lorem ipsum dolor sit amet} \end{flushleft} \subsection{Special Characters} The following symbols are used by LaTeX as part of it's programming instructions so require marking up if they are to be placed in a document as text: \begin{center} \{ \} \% \& \$ \_ \# \textbackslash \~{} \^{} \\ \end{center} 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}[h] \small \begin{center} \begin{tabular}{llll} \toprule[1.0pt] Symbol & Command & Symbol & Command \\ \midrule[0.5pt] \{ & \texttt{\textbackslash \{ } & --- & \texttt{\textminus \textminus \textminus or \textbackslash textemdash} \\ \} & \texttt{\textbackslash \}} & \textasciigrave & \small \texttt{\textbackslash asciigrave} \\ \% & \texttt{\textbackslash \%} & \textasciiacute & \texttt{\textbackslash textasciiacute} \\ \& & \texttt{\textbackslash \& } & \textasciibreve & \texttt{\textbackslash textasciibreve} \\ \$ & \texttt{\textbackslash \$ or \textbackslash textdollar} & \textbullet & \texttt{\textbackslash textbullet} \\ \_ & \texttt{\textbackslash \_} & \textopenbullet & \texttt{\textbackslash textopenbullet} \\ \# & \texttt{\textbackslash \#} & \textellipsis & \texttt{\textbackslash textellipsis} \\ \textbackslash & \texttt{\textbackslash textbackslash} & \textasteriskcentered & \texttt{\textbackslash textasteriskcentered} \\ \~{} & \texttt{\textbackslash \textasciitilde\{\} } & \textdagger & \texttt{\textbackslash textdagger} \\ \^{} & \texttt{\textbackslash \textasciicircum\{\} } & \textdaggerdbl & \texttt{\textbackslash textdaggerdbl} \\ \textquoteleft & \texttt{\textbackslash textquoteleft or \textasciigrave} & \textparagraph & \texttt{\textbackslash textparagraph} \\ \textquoteright & \texttt{\textbackslash textquoteright or \textquotesingle} & \textsection & \texttt{\textbackslash textsection} \\ \textquotedblleft & \texttt{\textbackslash textquotedblleft or \textasciigrave \textasciigrave} & \texttildelow & \texttt{\textbackslash texttildelow} \\ \textquotedblright & \texttt{\textbackslash textquotedblright or \textquotesingle \textquotesingle} & \textasciitilde & \texttt{\textbackslash textasciitilde} \\ -- & \texttt{\textminus \textminus or \textbackslash textendash} & \textperiodcentered & \texttt{\textbackslash textperiodcentered} \\ \textsterling & \texttt{\textbackslash textsterling} & \texteuro & \texttt{\textbackslash texteuro} \\ \textcent & \texttt{\textbackslash textcent} & \textyen & \texttt{\textbackslash textyen} \\ \textdegree & \texttt{\textbackslash textdegree} & \textcelsius & \texttt{\textbackslash textcelsius} \\ \textcopyleft & \texttt{\textbackslash textcopyleft} & \texttrademark & \texttt{\textbackslash texttrademark} \\ \texttimes & \texttt{\textbackslash texttimes} & \textdiv & \texttt{\textbackslash textdiv} \\ \textminus & \texttt{\textbackslash textminus} & \textgreater & \texttt{\textbackslash textgreater} \\ \textless & \texttt{\textbackslash textless} & \textcopyright & \texttt{\textbackslash textcopyright} \\ \bottomrule[1.0pt] \end{tabular} \caption{Special characters and some common symbols} \end{center} \end{table} This list is a very small sample of the symbols available in LaTeX. Scott Pakin maintains `The Comprehensive LaTeX Symbol List' which provides a list of over 18,000 symbols. This list is freely available from \textsc{ctan}. A link is provided in the Reference section. \subsection{Accents and Non-Latin Glyphs} 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}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Diacritic & Code & Example \\ \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}} \\ Cedilla & \texttt{\textbackslash c\{\}} & {\Large \c{a}} \\ Circumflex & \texttt{\textbackslash \^{}\{\}} & {\Large \^{a}} \\ Dot & \texttt{\textbackslash .\{\}} & {\Large \.{a}} \\ Grave & \texttt{\textbackslash \textquotesingle\{\}} & {\Large \`{a}} \\ Hungarian Umlaut & \texttt{\textbackslash H\{\}} & {\Large \H{o}} \\ Macron & \texttt{\textbackslash =\{\}} & {\Large \={a}} \\ Ogonek & \texttt{\textbackslash k\{\}} & {\large \k{a}} \\ Tilde & \texttt{\textbackslash $\sim$\{\}} & {\Large \~{a}} \\ Umlaut & \texttt{\textbackslash "\{\}} & {\Large \"{a}} \\ \bottomrule[1.0pt] \end{tabular} \caption{Common diacritics} \end{center} \end{table} \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Name & Upper Case & Lower Case \\ \midrule[0.5pt] \textbf{German} & & \\ Eszett & & \texttt{\textbackslash ss} \ss \\ & & \\ \textbf{Polish} & & \\ Barred L & \texttt{\textbackslash L} \L & \texttt{\textbackslash l} \l \\ & & \\ \textbf{Scandinavian} & &\\ Ash & \texttt{\textbackslash AE} \AE & \texttt{\textbackslash ae} \ae \\ Eth & \texttt{\textbackslash dh} \DH & \texttt{\textbackslash dh} \dh \\ OE ligature & \texttt{\textbackslash OE} \OE & \texttt{\textbackslash oe} \oe \\ 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 \\ \bottomrule[1.0pt] \end{tabular} \caption{Some non-latin alphabetical glyphs} \end{center} \end{table} \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Name & Symbol & Command \\ \midrule[0.5pt] Double Guillemot: Left & \guillemetleft & \texttt{\textbackslash guillemetleft} \\ Double Guillemot: Right & \guillemetright & \texttt{\textbackslash guillemetright} \\ Single Guillemot: Left & \guilsinglleft & \texttt{\textbackslash guilsinglleft} \\ Single Guillemot: Right & \guilsinglright & \texttt{\textbackslash guilsinglright} \\ Exclamation Down & \textexclamdown & \texttt{\textbackslash textexclamdown} \\ Question Mark Down & \textquestiondown & \texttt{\textbackslash textquestiondown} \\ Base quote: Double & \quotedblbase & \texttt{\textbackslash quotedblbase} \\ Base Quote: Single & \quotesinglbase & \texttt{\textbackslash quotesinglbase} \\ Elipsis & \textellipsis & \texttt{\textbackslash textellipsis} \\ \bottomrule[1.0pt] \end{tabular} \caption{Punctuation marks} \end{center} \end{table} \clearpage \section{Body} \subsection{Sectioning} 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: {\small \begin{verbatim} \texttt{\textbackslash SectionType\{SectionTitle\}}. \end{verbatim} } \begin{flushleft} 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: \end{flushleft} {\small \begin{verbatim} \section{Topic 1} \subsection{Point 1} \subsection{Point 2} \section{Topic 2} \subsection{Point 1} \subsection{Point 2} \end{verbatim} } \subsection{Environments} Environments are used in the body of the document to define a particular type of text. 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: {\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}{lp{5cm}} \toprule[1.0pt] Environment & Description\\ \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 in a typewriter font with no formatting. If the text isn't broken with a \texttt{}, 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$: \\ 3.14159265358979323846264338327950288419716939937510582097494459 23078164062862089986280348253421170679 \end{verbatim} } \begin{flushleft} but when the document is compiled, it produces: \end{flushleft} \begin{flushleft} The first 100 digits of $\pi$: \\ 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679 \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 \texttt{} to signal the end of a line: {\small \begin{verbatim} The first 100 digits of $\pi$: \\ 3.141592653589793238462643 38327950288419716939937510 58209749445923078164062862 089986280348253421170679 \end{verbatim} } \begin{flushleft} This produces: \end{flushleft} \begin{flushleft} The first 100 digits of $\pi$: \\ 3.141592653589793238462643 \\ 38327950288419716939937510 \\ 58209749445923078164062862 \\ 089986280348253421170679 \\ \end{flushleft} \subsection{Lists} 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: {\small \begin{verbatim} \begin{itemize} \item Item 1 \item Item 2 \item Item 3 \end{itemize} \end{verbatim} } \begin{flushleft} produces: \end{flushleft} \begin{itemize} \item Item 1 \item Item 2 \item Item 3 \end{itemize} 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: {\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 \item[\textdagger] Item 3 \end{itemize} \begin{flushleft} 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 \item Item 3 \end{enumerate} Lists can be nested with additional enumerate commands. Each sub-category is contained within its own enumerate environment. {\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} produces: \end{flushleft} \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} \clearpage \subsection{Tables} LaTeX has substantial facilities for generating tables. These can range in design from simple $2 \times 2$ tables to complex tables with merged columns and rows. This section makes use of the \texttt{booktabs} package. This offers several tweaks to LaTeX's default tables. They add some extra space above and below lines and the ability to define the thickness of lines. It is loaded in the preamble with: {\small \begin{verbatim} \usepackage{booktabs} \end{verbatim} } Tables are placed inside the \texttt{table} environment. LaTeX places them in the document so that they don’t break across pages. Because their location, like those of figures, 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 begins. \subsubsection{Basic Tables} Tables consist of two nested environments: \texttt{table}, and \texttt{tabular}. The code below gives some basic commands: {\small \begin{verbatim} \begin{table}[Location] \begin{centre} \begin{tabular}{Cell Alignment and size} {. . . Table Contents . . . } \end{tabular} \caption{Caption Text} \end{center} \end{table} \end{verbatim} } \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 where it appears in the code. \\ The next line justifies the table on the page. This can be \texttt{centre}, \texttt{flushleft} or \texttt{flushright}. \\ The table cell's formatting and contents are placed in the \texttt{tabular} environment. 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 instructions should match the number of columns: one for each column. 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. \texttt{ p\{ColumnWidth\}} may be used to define the width of a column if required. 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. \\ 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: {\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} } 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}[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} 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. {\small \begin{verbatim} \cmidrule[LineThickness]{ColumnNumbers} \end{verbatim} } 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. {\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 an \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 an \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 \subsection{Figures} \subsubsection{Choosing a Graphic Format} LaTeX works with a quite limited range of graphic formats. Postscript documents can only contain graphics in postscript (\texttt{ps}) or encapsulated postscript (\texttt{eps}) formats. Documents created by PDFTeX 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. Image Magic is a good converter. 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. \\ Raster graphics are made up of pixels. Each pixel has a value relating to its individual colour. 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. \\ 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, 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. \subsubsection{Placing Figures in LaTeX Documents} The first step in placing graphics in LaTeX documents is to place the file in the project directory so that LaTeX can find it. They 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 figure may be aligned on the page with: \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 when the document is compiled. \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} \clearpage \subsection{Page Numbering} The default page numbering in LaTeX is Arabic numerals which begin on the first page. Table 18 shows the available styles: \begin{table}[h] \small \begin{center} \begin{tabular}{lll} \toprule[1.0pt] Style & Numeral Type & Example Text \\ \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 \\ \texttt{Alph} & Upper-case letters & A, B, C, D, E \\ \bottomrule[0.5pt] \end{tabular} \caption{Page numbering options} \end{center} \end{table} 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\}}: {\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. This is handled with \texttt{\textbackslash pagenumbering\{StyleName\}}. At the beginning of the front matter, insert \texttt{\textbackslash pagenumbering\{roman\}} and when the main matter of the document begins, insert \texttt{\textbackslash pagenumbering\{arabic\}}. If the title page is to be un-numbered, insert \texttt{\textbackslash thispagestyle\{empty\}} following \texttt{\textbackslash maketitle}. \\ 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. {\small \begin{verbatim} \documentclass[a4paper]{article} \title{The Lost Secrets of \LaTeXe} \author{Albertus Magnus} \begin{document} \maketitle \thispagestyle{empty} \begin{abstract} Abstract text. \end{abstract} \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} 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. Math mode is activated by enclosing a mathematical expression within a pair of \texttt{\$}. This is especially useful when mathematics is set within text, such as the results of a statistical test, in a report: {\small \begin{verbatim} ... main effect for the interaction between the factors was significant $(F(2, 125) = 3.146, p < 0.05, \omega^2 = 0.032)$, though the practical significance ... \end{verbatim} } \begin{flushleft} produces \end{flushleft} \begin{flushleft} . . . main effect for the interaction between the factors was significant $(F(2,125) = 3.146, p < 0.05, \omega^2 = 0.032)$, though the practical significance . . . \end{flushleft} \texttt{\^{}} and \texttt{\_} produce superscripts and subscripts respectively, and fractions can be typeset with \texttt{\$\textbackslash frac\{Numerator\}\{Denominator\}\$}. Three quarters is \texttt{\$\textbackslash frac\{3\}\{4\}\$}: $\frac{3}{4}$ and square roots are \texttt{\$\textbackslash sqrt\{16\}\$}: $\sqrt{16}$. Special characters can be created with diacritics: \texttt{\$\textbackslash bar\{X\}\$} produces $\bar{X}$ and \texttt{\$\textbackslash hat\{Y\}\$} produces $\hat{Y}$. \\ Summation notation is available with the \texttt{\$\textbackslash sum\$} command which produces the Greek letter $\sum$. The \texttt{\textbackslash limits} command places upper and lower limits. The lower limit of summation is defined with a subscript and the upper limit of summation is defined with a superscript: \texttt{\$\textbackslash sum \textbackslash limits\_\{i=1\}\^{}\{n\}\$} produces $\sum\limits_{i=1}^{n}$. \\ Additional elements can be added: \texttt{\$\textbackslash sum \textbackslash limits\_\{i=1\}\^{}\{n\} x\_i = x\_1 + x\_2 + x\_3 \textbackslash ldots x\_n\$}. This produces: \begin{displaymath} \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 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}[h] \small \begin{center} \begin{tabular}{ll} \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} \\ $y - y_1 = m(x - x_1)$ & \texttt{y - y\_1 = m(x - x\_1)} \\ $f'$ & \texttt{f'} \\ $n!$ & \texttt{n!} \\ $\frac{a}{b}$ & \texttt{\textbackslash frac\{a\}\{b\}} \\ $a \choose b$ & \texttt{a \textbackslash choose b} \\ $\sqrt a$ & \texttt{\textbackslash sqrt a} \\ $\root n \of {a}$ & \texttt{\textbackslash root n \textbackslash of \{a\}} \\ $\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\} }\\ \bottomrule[1.0pt] \end{tabular} \caption{Some common mathematical symbols} \end{center} \end{table} \begin{table}[h] \small \begin{center} \begin{tabular}{llllllllll} \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} \\ $\Omega$ & \texttt{\textbackslash Omega} \\ $\alpha$ & \texttt{\textbackslash alpha} & $\beta$ & \texttt{\textbackslash beta} & $\gamma$ & \texttt{\textbackslash gamma} & $\delta$ & \texttt{\textbackslash delta} & $\epsilon$ & \texttt{\textbackslash epsilon} \\ $\zeta$ & \texttt{\textbackslash zeta} & $\eta$ & \texttt{\textbackslash eta} & $\theta$ & \texttt{\textbackslash theta} & $\iota$ & \texttt{\textbackslash iota} & $\kappa$ & \texttt{\textbackslash kappa} \\ $\lambda$ & \texttt{\textbackslash lambda} & $\mu$ & \texttt{\textbackslash mu} & $\nu$& \texttt{\textbackslash nu} & $\xi$& \texttt{\textbackslash xi} & $\pi$& \texttt{\textbackslash pi} \\ $\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} \\ \bottomrule[1.0pt] \end{tabular} \caption{Upper and lowercase Greek letters} \end{center} \end{table} Both \texttt{equation} and \texttt{displaymath} environments print one-line equations. The difference between them is that formulae set with \texttt{equation} are numbered: {\small \begin{verbatim} \begin{equation} \bar{X} = \frac{\Sigma X}{n} \end{equation} \end{verbatim} } \begin{equation} \bar{X} = \frac{\Sigma X}{n} \end{equation} \begin{verbatim} \begin{displaymath} \bar{X} = \frac{\Sigma X}{n} \end{displaymath} \end{verbatim} \begin{displaymath} \bar{X} = \frac{\Sigma X}{n} \end{displaymath} This is a very short preview of LaTeX's mathematical capabilities. It has extensive facilities for matrices and functions and symbols and diacritics. For documentation on mathematics and symbols in LaTeX, see Berry (2021) and for a comprehensive list of symbols, see Pakin (2021). \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\}}: {\small \begin{verbatim} \documentclass[a4paper]{article} \title{The Lost Secrets of \LaTeXe} \author{Albertus Magnus} \date{\today} \begin{document} \maketitle 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{The Abstract} Abstracts are created by the abstract environment: {\small \begin{verbatim} \begin{abstract} Lorem ipsum dolor sit amet . . . \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} \title{The Lost Secrets of \LaTeXe} \author{Albertus Magnus} \date{\today} \begin{document} \maketitle \clearpage \begin{abstract} \Lorem ipsum dolor sit amet . . . \end{abstract} 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: {\small \begin{verbatim} \tableofcontents \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}: {\small \begin{verbatim} \documentclass[a4paper]{article} \title{The Lost Secrets of \LaTeXe} \author{Albertus Magnus} \date{\today} \begin{document} \maketitle \doublespacing \begin{abstract} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla est purus, ultrices in porttitor in, accumsan non quam. Nam consectetur porttitor rhoncus . . . \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} \subsection{References} Referencing is a fundamental requirement of scholarly writing. A reference list allows readers to verify sources, gives information about the type of source, and allows readers to locate them. In LaTeX, these may be placed in the text manually or generated automatically. \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}. BibLaTeX requires that several packages be present on your LaTeX installation. These are listed in the Required Packages table above. \\ 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. It is saved in \texttt{.bib} format and is located in 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. \\ 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 of the item's database entry. 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} } @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} } \begin{flushleft} Table 21 contains a list of reference types supported by BibLaTeX. \\ \end{flushleft} \begin{table}[h] \small \begin{center} \begin{tabular}{ll} \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} \\ \bottomrule[1.0pt] \end{tabular} \caption{BibLaTeX citations styles} \end{center} \end{table} \begin{flushleft} \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} 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 \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 \texttt{babel} and \texttt{csquotes} are loaded before biblatex. Any 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} \addbibresource{DatabaseName.bib} \begin{document} Document Text. \clearpage \nocite{*} \printbibliography \end{document} \end{verbatim} } 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. \subsection{Appendices} 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} } \begin{flushleft} Options for this package are listed in Table 23: \end{flushleft} \begin{table}[h] \small \begin{center} \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 \\ \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. 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} } \clearpage \section{Presentations with Beamer} Beamer is a LaTeX package for producing presentations. It supports plain LaTeX and pdfLaTeX. A sample presentation script is in Appendix E. As with all LaTeX documents, global parameters are defined in the preamble and the text is placed inside the document environment. Beamer is loaded in the preamble with \texttt{\textbackslash documentclass{}}: {\small \begin{verbatim} \documentclass{beamer} \end{verbatim} The next line specifies the theme of the presentation. Beamer themes define the colours and fonts. Beamer comes with 28 different themes. These are illustrated in the Beamer documentation. The theme is defined by \texttt{\textbackslash usetheme{}}. This comes after \texttt{\textbackslash documentclass{}}. This example selects the Berlin theme: {\small \begin{verbatim} \documentclass{beamer} \usetheme{Berlin} \end{verbatim} } \begin{flushleft} The contents of each slide are placed in the frame environment: \end{flushleft} {\small \begin{verbatim} \begin{document} \begin{frame} Text \end{frame} \end{document} \end{verbatim} } \begin{flushleft} The simplest Beamer presentation is: \end{flushleft} {\small \begin{verbatim} \documentclass{beamer} \begin{document} \begin{frame} Text \end{frame} \end{document} \end{verbatim} } \begin{flushleft} Slide titles may be defined with \texttt{\textbackslash frametitle{}}: \end{flushleft} {\small \begin{verbatim} \begin{frame} \frametitle{} Text \end{frame} \end{verbatim} } Beamer frames can contain lists, tables, graphics etc. These are placed in Beamer presentations in the same way as other LaTeX documents. A title slide with Author, Title, Subtitle, Institute and Date may be generated automatically. The details are placed in the preamble and the command \texttt{\textbackslash titlepage} is placed in the first frame environment: {\small \begin{verbatim} \documentclass{beamer} % Title Page \title{} \subtitle{} \author{} \institute{} \date{} \begin{document} \begin{frame} \titlepage \end{frame} \end{document} \end{verbatim} } A logo can be added to either the title slide or all slides. \texttt{\textbackslash titlegraphic{}} adds one to the title slide: {\small \begin{verbatim} \titlegraphic{\includegraphics{graphicfilename}} \end{verbatim} } This places a graphic file on the bottom right of the title frame. \texttt{\textbackslash logo} places a graphic file at the same location on each slide. {\small \begin{verbatim} \logo{\includegraphics{graphicfilename}} \end{verbatim} \subsection{Overlays} Overlays refer to different states of the same slide. For instance a slide may contain a list with three points that are revealed one at a time. This can be done by adding the \texttt{\textbackslash pause} command after each item: {\small \begin{verbatim} \begin{frame} \frametitle{Lorem ipsum dolor sit amet} \begin{itemize} \item Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. \pause \item Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. \pause \item Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi. \end{itemize} \end{frame} \end{verbatim} } \subsection{Handout generation} Handouts can be generated with the \texttt{\textbackslash documentclass{beamer}} handout option: {\small \begin{verbatim} \documentclass[handout]{beamer} \end{verbatim} } This will create a handout with one slide per page. If handouts are generated, the LaTeX code should be in a separate directory from the main presentation code because the output will be over written. \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. If the document contains references created with BibLaTeX, \texttt{biber} will have to be run to sort them. The following scheme is suggested for documents that contain BibLaTeX references. \texttt{biber} can be omitted if they are not present. \begin{center} \texttt{latex} \\ \texttt{biber} \\ \texttt{latex} \\ \texttt{latex} \\ \end{center} 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} \\ \end{flushleft} \begin{flushleft} In Kile: \\ \end{flushleft} \begin{flushleft} \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: \\ \begin{flushleft} \texttt{Tools $\rightarrow$ Commands $\rightarrow$ DVI->PS} \\ \end{flushleft} \begin{flushleft} In Kile: \\ \end{flushleft} \begin{flushleft} \texttt{Build $\rightarrow$ Convert $\rightarrow$ DVItoPS} \\ \end{flushleft} LaTeX is run from the command line by navigating to the project folder and then run on a marked-up text file. These have a \texttt{.tex} extension. To run it on a file named \texttt{TestFile.tex}: \begin{flushleft} \texttt{latex TestFile.tex} \end{flushleft} \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} \texttt{dvips TestFile.dvi} \end{flushleft} 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{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. \texttt{pdf} files created this way will not contain any hyperlinks and there will be no metadata attached to the file. PDFLaTeX supports these features so is the recommended way to produce \textsc{pdf} files. Hypertext links and \textsc{url}'s 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, or an external website. 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 \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: {\small \begin{verbatim} \usepackage[pdftex, colorlinks=true, allcolours=blue]{hyperref} \end{verbatim} } 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} It appears as \end{flushleft} \begin{flushleft} \url{www.ctan.org} \end{flushleft} 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} } \begin{flushleft} To compile a document from the command line in \textsc{pdf} format, use \texttt{pdflatex}: \end{flushleft} \begin{flushleft} \texttt{pdflatex TestFile.tex} \end{flushleft} To compile a document into \textsc{pdf} format in TeXstudio, go to the Menu: \\ \begin{flushleft} \texttt{Tools $\rightarrow$ Commands $\rightarrow$ \textsc{pdf}LaTeX} \\ \end{flushleft} \begin{flushleft} In Kile: \\ \end{flushleft} \begin{flushleft} \texttt{Build $\rightarrow$ Compile $\rightarrow$ \textsc{pdf}LaTeX} \\ \end{flushleft} \begin{flushleft} If the document contains BibLaTeX references, \texttt{biber} is in the same menu in both editors. \\ \end{flushleft} As with postscript documents, \textsc{pdf}LaTeX will have to be run multiple times to resolve the front and back matter, tables, hyperlinks, etc. \clearpage \section{References} \begin{flushleft} Berry, K (2021) \LaTeXe: An Unofficial Reference Manual. Retrieved from: \\ \texttt{\url{www.latexref.xyz/dev/latex2e.pdf}} \\ \bigskip Carlisle, D.P. (2021). Packages in the `graphics’ bundle. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/graphicx}} \\ \bigskip Clawson, J. (2021). biblatex-mla MLA Style Using Biblatex, Version 2.0. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/biblatex-mla}} \\ \bigskip Fussner, D. (2021). The biblatex-chicago package: Style files for biblatex, Version 2.2. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/biblatex-chicago}} \\ \bigskip Goosens, M., Mittelbach, F., Rahtz, S., Roegel, D. and Voss, H. (2008) \textit{The LaTeX Graphics Companion}. 2nd Edition. Boston: Addison-Wesley. \\ \bigskip Kern, U. (2021).Extending LATEX’s color facilities: the xcolor package v2.13. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/xcolor}} \\ \bigskip Kime, P. (2021). APA BibLaTeX Style. Citation and References macros for BibLaTeX, Version 9.15. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/biblatex-apa}} \\ \bigskip Kime, P., Wemheuer, M., Lehman, P. (2020) The biblatex Package. Programmable Bibliographies and Citations. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/biblatex}} \\ \bigskip Lamport, L. (1986) \textit{LaTeX: A Document Preparation System}. 2nd Edition. Boston: Addison-Wesley.\\ \bigskip Mittelbach, F., Fairbairns, R., Lemberg, W. and the LaTeX Project Team (2016). LaTeX font encodings. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/encguide}} \\ \bigskip Mittelbach, F. and Goosens, M. (2004). \textit{The LaTeX Companion}. 2nd Edition. Boston: Addison-Wesley.\\ \bigskip Mori, L.F. (2007). Tables in LaTeX2e: Packages and Methods. \textit{The PracTeX Journal}, 1, 1-38.\\ \bigskip Pakin, S., (2021). \textit{The Comprehensive LaTeX Symbol List}. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/comprehensive}}\\ \bigskip Th\'{a}nh, H.T., Rahtz, S., Hagen, H., Henkel, H., Schroder, M. and Berry, K. (2021) \textit{The pdfTeX User Manual}. Revision 849. Retrieved from: \\ \texttt{\url{www.ctan.org/pkg/pdftex}} \\ \bigskip International Committee of Medical Journal Editors (2021). Recommendations for the Conduct, Reporting, Editing, and Publication of Scholarly Work in Medical Journals. Retrieved from: \\ \texttt{\url{http://icmje.org/icmje-recommendations.pdf}} \\ \end{flushleft} \clearpage \begin{appendices} \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 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 as Phonecian, Egyptian Hieroglyphics, Linear B and Runic and provides symbols for the phonetic alphabet. \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{Mathematics: AMS-LaTeX} AMS Maths is a production of the American Mathematical Society. It provides a range of enhanced mathematical facilities including substitutes 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}. \clearpage \section{Resources} There are many resources for LaTeX. A short list of helpful texts along with documentation for the packages used in this document are in the reference list. In addition to this, there are significant online resources that are regularly updated. \paragraph{The Comprehensive \TeX Archive Network} This is the home of \LaTeXe\ and contains distributions, additional packages, and documentation. The `Starting out with \TeX, \LaTeX, and friends' page is a good place to start. \begin{flushleft} \texttt{\url{www.ctan.org/starter}} \end{flushleft} \paragraph{The TeX Users Group} The \TeX Users Group (\textsc{tug}) is a not-for-profit group interested in \TeX. Their website has an informative page for those new to LaTeX: `Getting started with TeX, LaTeX, and friends'. This contains information on installing TeX and LaTeX, links to documentation and sample documents. \begin{flushleft} \texttt{\url{http://tug.org/begin.html}} \end{flushleft} \textsc{tug} also hosts the `\LaTeX Font Catalogue'. This is a comprehensive list and sampler of freely available fonts for latin alphabets and documentation on how to use them. \begin{flushleft} \texttt{\url{http://tug.org/FontCatalogue/ }} \end{flushleft} \paragraph{The \TeX faq } The \TeX faq addresses questions about \TeX with informative answers on a wide variety of topics. \begin{flushleft} \texttt{\url{http://texfaq.org}} \end{flushleft} \clearpage \section{A Sample Script for a Postscript Document} {\small \begin{verbatim} % Document Type, text point size and paper size \documentclass[12pt, a4paper]{article} % Enhanced tables \usepackage{booktabs} \usepackage{multirow} % Line Spacing \usepackage{setspace} % Graphic management with the dvips backend \usepackage[dvips]{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} % A list of words that LaTeX didn't hyphenate properly \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 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 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} % 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 \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} % Enhanced tables \usepackage{booktabs} \usepackage{multirow} % 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 \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 numbered list, a table and a hot link % at the end of the first section. \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 \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 Beamer Presentation} {\small \begin{verbatim} \documentclass{beamer} \usetheme{Berlin} % Title Page \title{The Lost Secrets of \LaTeXe} \author{Albertus Magnus} \institute{\textit{Universit\'{e} de Paris}} \date{\today} \titlegraphic{ \includegraphics[scale=0.2]{drawing.eps} } \begin{document} \begin{frame} \titlepage \end{frame} \begin{frame} \frametitle{Morbi ac orci et nisl hendrerit mollis} \begin{enumerate} \item Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. \item Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris. \item Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. \end{enumerate} \end{frame} \begin{frame} \frametitle{Lorem ipsum dolor sit amet} \begin{itemize} \item Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. \pause \item Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. \pause \item Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi. \end{itemize} \end{frame} \end{document} \end{verbatim} } \clearpage \section{GNU Free Documentation License} {\footnotesize \begin{center} Version 1.2, November 2002 Copyright \copyright 2000,2001,2002 Free Software Foundation, Inc. \bigskip 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \bigskip Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. \end{center} \begin{center} Preamble \end{center} The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. \begin{center} 1. APPLICABILITY AND DEFINITIONS \end{center} This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The \textbf{"Document"}, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as \textbf{"you"}. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A \textbf{"Modified Version"} of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A \textbf{"Secondary Section"} is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The \textbf{"Invariant Sections"} are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The \textbf{"Cover Texts"} are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A \textbf{"Transparent"} copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called \textbf{"Opaque"}. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The \textbf{"Title Page"} means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section \textbf{"Entitled XYZ"} means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as \textbf{"Acknowledgements"}, \textbf{"Dedications"}, \textbf{"Endorsements"}, or \textbf{"History"}.) To \textbf{"Preserve the Title"} of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. \begin{center} 2. VERBATIM COPYING \end{center} You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. \begin{center} 3. COPYING IN QUANTITY \end{center} If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. \begin{center} 4. MODIFICATIONS \end{center} You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: \begin{itemize} \item[A.] Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. \item[B.] List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. \item[C.] State on the Title page the name of the publisher of the Modified Version, as the publisher. \item[D.] Preserve all the copyright notices of the Document. \item[E.] Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. \item[F.] Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. \item[G.] Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. \item[H.] Include an unaltered copy of this License. \item[I.] Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. \item[J.] Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. \item[K.] For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. \item[L.] Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. \item[M.] Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. \item[N.] Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. \item[O.] Preserve any Warranty Disclaimers. \end{itemize} If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. \begin{center} 5. COMBINING DOCUMENTS \end{center} You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". \begin{center} 6. COLLECTIONS OF DOCUMENTS \end{center} You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. \begin{center} 7. AGGREGATION WITH INDEPENDENT WORKS \end{center} A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. \begin{center} 8. TRANSLATION \end{center} Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. \begin{center} 9. TERMINATION \end{center} You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. \begin{center} 10. FUTURE REVISIONS OF THIS LICENSE \end{center} The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. \begin{center} ADDENDUM: How to use this License for your documents \end{center} To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: \bigskip \begin{quote} Copyright \copyright YEAR YOUR NAME.\\ 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". \end{quote} \bigskip If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: \bigskip \begin{quote} with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. \end{quote} \bigskip If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. } \end{appendices} \end{document}