This section provides guidance on how to use common LaTeX features. For more complex usage, see Other Elements.
Table of Contents
You can define headings at levels one through four, as follows:
/chapter{chapter name}
/section{section name}
/subsection{subsection name}
/subsubsection{subsubsection name}
Write paragraphs in plaintext, separated by newlines:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam auctor diam augue, at fermentum mauris cursus eget.
Fusce mauris dolor, egestas quis molestie ac, semper et libero. Pellentesque varius eros in dui porta suscipit.
To insert an image, use the following code block:
\begin{center}
\includegraphics[width=\linewidth]{your_image}
\captionof{figure}{Example image}
\end{center}
In the example above:
your_image.png
in the ./images/
folder.Note: This repository’s .gitignore
*ignores images by default. If you want to include them in version control, omit images/*
.*
Solent-Harvard style requires custom drivers for each type of source. These exist for the following source types:
@online
)@book
)@inproceedings
)@article
)@misc
)References go in the refs.bib
file in BibTeX format. You can generate these with a reference management tool such as RefWorks or Zotero.
References in this file will be automatically formatted and parsed into the document upon creation.
Use \cite{id}
anywhere in your document to cite a source.
When the author name is in the text, use \citeyear{id}
to exclude the author name from the citation.
The minted
package can be used to automatically highlight code, but there are some prerequisites if you are doing this locally. For this reason, it is disabled by default, but can be enabled by uncommenting the following lines in master.tex
:
% Code
% \usepackage{minted}
Then, you will need to set up the pygments
syntax highlighter. Assuming you have Python 3 installed, the following commands will do this (depending on your OS).
python3 -m /path/to/venv
source /path/to/venv/bin/activate
pip install pygments
You will need to re-run the second command to activate the virtual environment every time you close the terminal.
Then, you can add minted
blocks which typically look something like this:
\begin{minted}[linenos,breaklines]{<your_programming_language>}
<your_code_here>
\end{minted}
However, there are lots of other options. More information is available on Overleaf.
The guides listed below explain how to implement some other common typesetting features, courtesy of Overleaf.