This is a LaTeX project folder from which to begin working on a new document; its structure avoids clutter and facilitates the use of some packages and tools. Text-wise it contains only a few paragraphs across the sections in order to present the document structure and showing how to use common environments and utilities.
The project folder contains:
- A
.vscode
folder containing some basic configuration for the popular LaTeX Workshop VS Code extension, with two ready-made compilation sequences (one with xelatex and Biber, the other with pdflatex and bibtex) - An
Img
folder in which to place any image to use in the document, which is already configured inPackages.sty
so that invoking an image can be done without path a(e.g.\includegraphics[width=9cm]{IMAGE_NAME}
) - A
Progress
folder (generated by thecompile_diff.ps1
script), there just to showcase its output structure, and which should be deleted before first script use on a new project, otherwise the first diff will be from the template itself - A
Submitted
folder to contain the document as it was submitted, e.g. multiple files submitted at various stages and with particular naming conventions, which are kept apart from the actual project development - A
TeX
folder containing any and all chapter/section files to be imported into the main .tex outside of it (Main.tex
) - A standard TeX
.gitignore
- The four PowerShell scripts from the LaTeX-Diff-Scripts repository, which automate all compilation needs: simple compilation, compilation in a single .tex file, generation of a diff pdf from either a past commit or from the last saved version (automatically generated each time in the Progress folder). The compilation commands in
compile.ps1
should be inspected and modified to suit one's requirements before first use - A
Packages.sty
file for neat inspection and modification of package use and configuration - The main .tex file,
Main.tex
, which is where document structure is organised: the only content directly present is title, author and abstract, then everything else is structure around imports from theTeX
folder (sections and appendices, including acronyms, definitions and bibliography)
Compilation:
- Inspect and configure the commands in
compile.ps1
. The default first and last step is xelatex, which supports font packages; if choosing to use pdflatex instead, the fontspec package will not work, so remove font-related settings inPackages.sty
- See the LaTeX Workshop for info on the 4 scripts and their dependencies (only the diff ones need extra ones)
Packages (see Packages.sty
):
- Prompts to install various packages may appear on first compilation
- The default monospace typeface is set to JetBrains Mono, which needs to be installed. Here are details on its design, and you can find an up-to date version of it with additional symbols on this page. Alternatively select a different typeface or just comment out those lines.
- If not using Biber, edit the bibliography lines accordingly
- Labelling convention: have the object type as the first few characters before a colon ('type:name'):
ch
for Chapter,sec
fo Section and Sub-Section,fig
for Figure,tab
for Table,eq
for Equation,lst
for Listing,def
for Definition,ex
for Example,rem
for Remark, thm for Theorem, lem for Lemma. - Always use 'noitemsep' in list environments, e.g.
\begin{description}[noitemsep]
- 3 empty lines between sections
- For mathematical notation use LaTeX environments such as [ ... ],\begin{equation} ... \end{equation} and the align environment from the amsmath package (instead of TeX primitives such as $$ and eqnarray)