summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Gosselin <sarah@gosselin.xyz>2024-09-04 15:50:36 -0400
committerSarah Gosselin <sarah@gosselin.xyz>2024-09-04 15:50:36 -0400
commite3cc0120f17452a7f210b821ac22edd8282724c0 (patch)
treeac2a5e4361dac705baccc2a1f90de1ea95ce6d63
parenteb413ab8cce4af5f9928046eaee1d1a8c948186d (diff)
Work in progress
-rw-r--r--document.sty25
-rw-r--r--main.tex66
2 files changed, 88 insertions, 3 deletions
diff --git a/document.sty b/document.sty
index 29d5ac8..f4ea5c2 100644
--- a/document.sty
+++ b/document.sty
@@ -9,10 +9,12 @@
\RequirePackage[top=2.5cm,bottom=2.5cm,inner=3cm,outer=2.5cm]{geometry}
\RequirePackage{fancyhdr} % Footer customisation
\RequirePackage{booktabs} % Elegant tables
-\RequirePackage{float} % Accurate positionning of figures
+\RequirePackage{colortbl} % Allow the use of colors in tables
+\RequirePackage{float} % Accurate positionning of figures and tables
\usepackage{titlesec} % Font sizes for sections/subsection
\RequirePackage{setspace} % Line spacing
-\RequirePackage{pdfpages} % Allow to add pdf docs to your latex file
+\RequirePackage{pdfpages} % Allow to add pdf documents to your latex file
+\RequirePackage{hyperref} % Allow references and hyperlinks
% Allows the creations of appendices
\RequirePackage[title,toc,titletoc,page]{appendix}
@@ -21,6 +23,24 @@
% Headers/Footers %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+%\let\oldhref\href
+%\renewcommand{\href}[2]{\oldhref{#1}{\bfseries#2}}
+
+
+\hypersetup{
+ colorlinks=true,
+ linkcolor=cyan,
+ filecolor=magenta,
+ urlcolor=gray,
+ pdfpagemode=FullScreen,
+ }
+
+
+
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+% Headers/Footers %
+%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
\renewcommand{\footrulewidth}{.5pt} % Line at the bottom
\cfoot{\thepage} % Centered page number (footer)
@@ -50,6 +70,7 @@
% Figures/Tables %
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%
+
% Count within sections (third table of section 5 would be Table 5.3)
\counterwithin{figure}{section}
\counterwithin{table}{section}
diff --git a/main.tex b/main.tex
index 7d36c05..52256df 100644
--- a/main.tex
+++ b/main.tex
@@ -11,8 +11,13 @@
\usepackage{tools/engineering}
\usepackage{tools/french}
+% To add a bibliography, first make sure that your file
+% is named "bibliography.bib" and then uncomment the
+% following line.
+
%\addbibresource{bibliography.bib}
+
% Uncomment to compile links and references...
%\nofiles
@@ -26,7 +31,7 @@
\addtolength{\tabcolsep}{-0.4em}
\begin{tabular}{rcl} % Ajouter des auteurs au besoin
Prénom Nom & -- & CIP \\
- %Prénom2 Nom & -- & CIP \\
+ Prénom2 Nom & - & CIP \\
\end{tabular}
}
\teacher{John Doe}
@@ -45,6 +50,65 @@ This is some text...
\subsection{This is a subsection}
This is some more text!
+
+\section{Here are Some Exemples}
+
+\subsection{Making a Table}
+
+Tables are a scary subject to start with in latex.
+This is mostly because their systax seems strange to an untrained eye.
+Fortunately there are tools to make this step easier.
+Consider visiting \href{https://www.tablesgenerator.com/} {tables generator}.
+
+
+Here is an exemple of a complex table directly copied from \href{https://www.tablesgenerator.com/} {tables generator}.
+\\
+Note how the site advices the use of some packages in the commented section.
+Good practice would want these packages added in the \textit{document.sty} file but they can also be added at the begining
+of your \textit{main.tex} file. Adding these lines at a wrong location may result in a warning or your
+document failing to compile.
+
+
+% Please add the following required packages to your document preamble:
+% \usepackage[table,xcdraw]{xcolor}
+% Beamer presentation requires \usepackage{colortbl} instead of \usepackage[table,xcdraw]{xcolor}
+% \usepackage[normalem]{ulem}
+% \useunder{\uline}{\ul}{}
+\begin{table}[h!]
+\begin{tabular}{ccc}
+\multicolumn{3}{c}{A Not So Randomly Generated Title} \\ \hline
+\multicolumn{1}{c|}{\textbf{Yeah}} &
+ \multicolumn{1}{c|}{\textbf{Yah}} &
+ \textbf{Yea} \\ \hline
+\multicolumn{1}{c|}{{\color[HTML]{656565} \textit{Lawful Good}}} &
+ \multicolumn{1}{c|}{{\color[HTML]{656565} \textit{Neutral Good}}} &
+ {\color[HTML]{656565} \textit{Chaotic Good}} \\ \hline
+\multicolumn{1}{c|}{\textbf{Yes}} &
+ \multicolumn{1}{c|}{\textbf{Ya}} &
+ \textbf{Yeet} \\ \hline
+\multicolumn{1}{c|}{{\color[HTML]{656565} \textit{Lawful Neutral}}} &
+ \multicolumn{1}{c|}{{\color[HTML]{656565} \textit{True Neutral}}} &
+ {\color[HTML]{656565} \textit{Chaotic Neutral}} \\ \hline
+\multicolumn{1}{c|}{\textbf{Yep}} &
+ \multicolumn{1}{c|}{\textbf{Ye}} &
+ \textbf{Yuh} \\ \hline
+\multicolumn{1}{c|}{{\color[HTML]{656565} \textit{Lawful Evil}}} &
+ \multicolumn{1}{c|}{{\color[HTML]{656565} \textit{Neutral Evil}}} &
+ {\color[HTML]{656565} \textit{Chaotic Evil}}
+\end{tabular}
+\end{table}
+
+
+% How to insert an image:
+
+% \begin{figure}[t!]
+% \centering
+% \includegraphics[width=0.45\textwidth]{/path/to/image.jpg}
+% \caption{Caption Text}
+% \label{fig: A Relateble Name}
+% \end{figure}
+
+
% \newpage
% \printbibliography[heading=bibintoc]
\end{document}