From e3cc0120f17452a7f210b821ac22edd8282724c0 Mon Sep 17 00:00:00 2001 From: Sarah Gosselin Date: Wed, 4 Sep 2024 15:50:36 -0400 Subject: Work in progress --- document.sty | 25 +++++++++++++++++++++-- main.tex | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 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,14 +9,34 @@ \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} +%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% +% 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 % %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% @@ -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} -- cgit v1.2.3