KAUST - Lab report template
Author
Huaiyuan Ma
Last Updated
há 2 meses
License
Creative Commons CC BY 4.0
Abstract
A simple template aiming to provide KAUST student with a easy way to start writing reports.
\documentclass{report}
\usepackage{float}
\usepackage{graphicx}
\usepackage[
backend=biber,
style=numeric
]{biblatex}
\usepackage{csquotes}
\title{A Template of KAUST Lab Report}
\addbibresource{./bibliography.bib}
\begin{document}
\logo{logos/kaust.jpg}
\ttitle{Title} % Title of the file
\subject{Subject} % Subject name
\topic{Topic} % Topic name
\participants{
\studentinfo{Author 1}{123456}{author.one@kaust.edu.sa}
\hfill
\studentinfo{Author 2}{123456}{author.two@kaust.edu.sa}
\hfill
\studentinfo{Collaborator 1}{123456}{collab.one@kaust.edu.sa} \\
\vspace{1cm}
\tutorinfo{Tutor 1}{BEST}{tutor.one@kaust.edu.sa}
\hspace{10px}
\tutorinfo{Tutor 2}{BEST}{tutor.two@kaust.edu.sa}
} % You can place many participants in this area, and also names of the tutors, but it is recommended to adjust layout accordingly to make it look better. Notice that for tutor the second position is department, and for students and collaborators it's student ID.
\buildmargins % display margins
\buildcover % create the front cover of the document
\toc % creates the table of contents
%------------ Report body ----------------
\section{Example}
\subsection{Image}
An example of single figure display is in figure \ref{single_figure}, and an example of multiple figure is displayed in figure \ref{multifig_example}, which you can also refer them individually as \ref{multifig_sub1}, \ref{multifig_sub2}, and \ref{multifig_sub3}.
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.35]{images/example_image_1.png}
\caption{This is an example of a single image, and an example of citation\cite{rapisarda_2020_the}}
\label{single_figure}
\end{figure}
\begin{figure}[htbp]
\centering
\begin{subfigure}{0.35\textwidth}
\includegraphics[width=\textwidth]{images/multifig_sub1.jpg}
\caption{}
\label{multifig_sub1}
\end{subfigure}
\hfill
\begin{subfigure}{0.35\textwidth}
\includegraphics[width=\textwidth]{images/multifig_sub2.jpg}
\caption{}
\label{multifig_sub2}
\end{subfigure} \\
\begin{subfigure}{0.35\textwidth}
\includegraphics[width=\textwidth]{images/multifig_sub3.jpg}
\caption{}
\label{multifig_sub3}
\end{subfigure}
\caption{This is an example of multi-figure layout}
\label{multifig_example}
\end{figure}
\subsection{Math}
In latex, equation, align, and gather are the three most commonly used environments of math equations.
The \texttt{equation} environment is often used for single equations:
\begin{equation}
E = mc^2
\label{eq_einstein}
\end{equation}
The \texttt{align} environment is used for multiple equations with alignment:
\begin{align}
f(x) & =x^{T}x - x^{T}z_{2} - z_{2}^{T}x + z_{2}^{T}z_{2} - x^{T}x + x^{T}z_{1} + z_{1}^{T}x - z_{1}^{T}z_{1} \notag \\
& =2z_{1}^{T}x - 2z_{2}^{T}x + \lVert z_{2} \rVert^{2} - \lVert z_{1} \rVert^{2}
\label{eq_align}
\end{align}
Equations \eqref{eq_align} demonstrate the alignment of multiple equations, and you may also notice that "notag" can silence the automatically produced tag.
The \texttt{gather} environment is used for multiple equations without alignment:
\begin{gather}
p = q + r \\
s = t + u + v \\
w = x + y + z
\label{eq_gather}
\end{gather}
Equations \eqref{eq_gather} show multiple equations without alignment.
\subsection{Table}
An example of basic table is as follows:
\begin{table}[h]
\begin{tabular}{|l|c|c|c|}
\hline
\diagbox{Obs}{Var} & Var A & Var B & Var C \\
\hline
Obs A & 1 & 2 & 3 \\
\hline
Obs B & 1 & 2 & 3 \\
\hline
Obs C & 1 & 2 & 3 \\ \hline
\end{tabular}
\end{table}
If you prefer three line table, you can use the package "booktabs" to do the job. An example is as follows:
\begin{table}[h]
\begin{tabular}{lccc}
\toprule
Obs & Var A & Var B & Var C \\
\midrule
Obs A & 1 & 2 & 3 \\
Obs B & 1 & 2 & 3 \\
Obs C & 1 & 2 & 3 \\
\bottomrule
\end{tabular}
\end{table}
\subsection{External PDF}
You can display external PDF in the report.
\includepdf[pages={1}, scale=0.7, frame=true, pagecommand={\thispagestyle{fancy}}]{external_pdf/Lorem Ipsum.pdf} %If we don't set pagestyle to fancy, footer and header will not be displayed.
\section{Acknowledgment}
I want to express my sincere gratitude to the creator of "\href{https://www.overleaf.com/latex/templates/university-of-melbourne-feit-report-template/ztcvdhjtgyvk}{University of Melbourne (FEIT) - Report template}" for some of my codes and the overall design are based on his work.
\printbibliography
\end{document}