diff --git a/chapters/elementsTestChapter.tex b/chapters/elementsTestChapter.tex new file mode 100644 index 0000000..1d467fb --- /dev/null +++ b/chapters/elementsTestChapter.tex @@ -0,0 +1,140 @@ +% generate random text to fill the page :) +\lipsum[1] + +\section{Images} +Behold this beautiful floating figure: + +\begin{figure}[H] + % always put label neat the top (after caption!) or your reference will not work as expected. + \caption[Programming is magic]{Programming is magic} + \label{fig:programmingMagic} + \centering + \includegraphics[height=300px]{images/programming.png} + % caption[Optional caption][Local caption] References ONLY go in the local caption! + +\end{figure} + +\subsection{Solid evidence} +Figure \ref{fig:programmingMagic} proves that programming is magic. + +\subsection{Multiple images} +\begin{figure}[H] + \centering + \begin{subfigure}[b]{0.3\textwidth} + \centering + \includegraphics[width=\textwidth]{images/programmingLanguages/java.jpg} + \caption{Java} + \label{Java} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.3\textwidth} + \centering + \includegraphics[width=\textwidth]{images/programmingLanguages/ruby.jpg} + \caption{Ruby} + \label{fig:ruby} + \end{subfigure} + \hfill + \begin{subfigure}[b]{0.3\textwidth} + \centering + \includegraphics[width=\textwidth]{images/programmingLanguages/python.png} + \caption{Python} + \label{fig:python} + \end{subfigure} + \caption{Three programming languages} + \label{fig:three graphs} +\end{figure} + + +\section{Tables} +Down below you'll find a couple of tables. +\begin{table}[H] + \label{tab:basicTable} + \centering + \caption[A basic table]{A basic table} + \begin{tabular}{l c r} %alignments + Language & Compiled & Difficulty \\ \hline + Javascript & \ & easy \\ + Ruby / Python & \ & normal \\ + Java & X & hard \\ + Scala & X & nightmare \\ + \end{tabular} +\end{table} + + +\subsection{A series of tables} + + +\begin{table}[H] + \label{tab:knotsAndCrosses} + \centering + \caption[Three Knots and Crosses games]{Three Knots and Crosses games} + \begin{tabular}{|c | c | c|} %alignments + \hline + O & X & O \\\hline + X & O & X \\\hline + X & O & X \\\hline + \end{tabular} + \begin{tabular}{|c | c | c|} %alignments + \hline + O & X & - \\\hline + X & O & - \\\hline + - & - & O \\\hline + \end{tabular} + \begin{tabular}{|c | c | c|} %alignments + \hline + X & O & X \\\hline + O & X & O \\\hline + O & X & O \\\hline + \end{tabular} +\end{table} + + +\subsection{Complicated tables} +\begin{table}[H] + \label{tab:complicatedTable} + \centering + \def\arraystretch{1.5} % padding + \caption[A complicated table]{A complicated table generated with: \url{http://www.tablesgenerator.com}} +\begin{tabular}{|l|c|c|c|c|} + \hline + \textbf{Language} & \multicolumn{1}{l|}{\textbf{typing}} & \multicolumn{1}{l|}{\textbf{Object oriented}} & \multicolumn{1}{l|}{\textbf{GC}} & \multicolumn{1}{l|}{\textbf{Difficulty}} \\ \hline + Javascript & dynamic & & X & easy \\ \hline + Ruby/Python & dynamic & X & X & normal \\ \hline + \multicolumn{5}{|c|}{\textit{\textbf{Compiled languages}}} \\ \hline + Java & static & X & X & hard \\ \hline + Scala & dynamic & X & X & nightmare \\ \hline +\end{tabular} +\end{table} +\begin{table}[H] + \label{tab:unitConversion} + \centering + \caption[Unit conversion table]{Unit conversion table} + \begin{tabular}{|r|l|} + \hline + 7C8 & hexadecimal \\ + 3710 & octal \\ \cline{2-2} + 11111001000 & binary \\ + \hline \hline + 1992 & decimal \\ + \hline + \end{tabular} +\end{table} + +\begin{table}[H] + \label{tab:unitConversion} + \centering + \caption[Spanning in both directions simultaneously]{Spanning in both directions simultaneously} + \begin{tabular}{cc|c|c|c|c|l} + \cline{3-6} + & & \multicolumn{4}{ c| }{Primes} \\ \cline{3-6} + & & 2 & 3 & 5 & 7 \\ \cline{1-6} + \multicolumn{1}{ |c }{\multirow{2}{*}{Powers} } & + \multicolumn{1}{ |c| }{504} & 3 & 2 & 0 & 1 & \\ \cline{2-6} + \multicolumn{1}{ |c }{} & + \multicolumn{1}{ |c| }{540} & 2 & 3 & 1 & 0 & \\ \cline{1-6} + \multicolumn{1}{ |c }{\multirow{2}{*}{Powers} } & + \multicolumn{1}{ |c| }{gcd} & 2 & 2 & 0 & 0 & min \\ \cline{2-6} + \multicolumn{1}{ |c }{} & + \multicolumn{1}{ |c| }{lcm} & 3 & 3 & 1 & 1 & max \\ \cline{1-6} + \end{tabular} +\end{table} diff --git a/chapters/introduction.tex b/chapters/frontMatter/abstract.tex similarity index 100% rename from chapters/introduction.tex rename to chapters/frontMatter/abstract.tex diff --git a/chapters/frontMatter/acknowledgements.tex b/chapters/frontMatter/acknowledgements.tex new file mode 100644 index 0000000..2f5aa08 --- /dev/null +++ b/chapters/frontMatter/acknowledgements.tex @@ -0,0 +1,2 @@ +% generate random text to fill the page :) +\lipsum[1] \ No newline at end of file diff --git a/chapters/frontMatter/introduction.tex b/chapters/frontMatter/introduction.tex new file mode 100644 index 0000000..2f5aa08 --- /dev/null +++ b/chapters/frontMatter/introduction.tex @@ -0,0 +1,2 @@ +% generate random text to fill the page :) +\lipsum[1] \ No newline at end of file diff --git a/chapters/testChapter.tex b/chapters/textTestChapter.tex similarity index 78% rename from chapters/testChapter.tex rename to chapters/textTestChapter.tex index 93b2443..00f5861 100644 --- a/chapters/testChapter.tex +++ b/chapters/textTestChapter.tex @@ -1,7 +1,7 @@ % generate random text to fill the page :) \lipsum[1] -\section{First section} +\section{First section with a very \\long name for testing purposes} The introduction can be found on page \pageref{sec:introduction}. \subsection{First subsection} \lipsum[1-3] diff --git a/images/programming.png b/images/programming.png new file mode 100644 index 0000000..d4e3e7f Binary files /dev/null and b/images/programming.png differ diff --git a/images/programmingLanguages/java.jpg b/images/programmingLanguages/java.jpg new file mode 100644 index 0000000..a8aa02d Binary files /dev/null and b/images/programmingLanguages/java.jpg differ diff --git a/images/programmingLanguages/python.png b/images/programmingLanguages/python.png new file mode 100644 index 0000000..6eaff92 Binary files /dev/null and b/images/programmingLanguages/python.png differ diff --git a/images/programmingLanguages/ruby.jpg b/images/programmingLanguages/ruby.jpg new file mode 100644 index 0000000..f74db60 Binary files /dev/null and b/images/programmingLanguages/ruby.jpg differ diff --git a/includes/backMatter.tex b/includes/backMatter.tex new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/includes/backMatter.tex @@ -0,0 +1 @@ + diff --git a/includes/frontMatter.tex b/includes/frontMatter.tex new file mode 100644 index 0000000..06a3a2b --- /dev/null +++ b/includes/frontMatter.tex @@ -0,0 +1,27 @@ +\pagenumbering{roman} + +\chapter*{Abstract}\label{sec:abstract} +\input{chapters/frontMatter/abstract} +\addcontentsline{toc}{chapter}{\numberline{}Abstract} + +\chapter*{Acknowledgements}\label{sec:acks} +\input{chapters/frontMatter/acknowledgements} +\addcontentsline{toc}{chapter}{\numberline{}Acknowledgements} + +% Table of Contents +\tableofcontents +\listoffigures \label{list:listOfFigures} +\addcontentsline{toc}{chapter}{\numberline{}List of figures} +\listoftables \label{list:listOfTables} +\addcontentsline{toc}{chapter}{\numberline{}List of tables} + + +\chapter{Introduction}\label{sec:introduction} +\input{chapters/frontMatter/introduction} +\setcounter{page}{1} + \fancypagestyle{plain}{ + \fancyfoot[R]{Page \thepage\ of \pageref{LastPage}} +} +\cfoot{} +\pagenumbering{arabic} +\pagestyle{plain} \ No newline at end of file diff --git a/latex-quickstart.pdf b/latex-quickstart.pdf index 390d9ed..b487de9 100644 Binary files a/latex-quickstart.pdf and b/latex-quickstart.pdf differ diff --git a/latex-quickstart.tex b/latex-quickstart.tex index 141a6c1..77fec39 100644 --- a/latex-quickstart.tex +++ b/latex-quickstart.tex @@ -13,20 +13,31 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lipsum} +\usepackage{lastpage} +\usepackage{fancyhdr} +\usepackage{caption} +\usepackage{subcaption} - -\usepackage{graphicx} -\graphicspath{ images/} - +% Title packages \usepackage{titlesec} \titleformat{\chapter}{\normalfont\huge\bfseries}{\thechapter. }{0pt}{\Huge} \titlespacing{\chapter} {0pt}{0pt}{10pt} -\usepackage{lastpage} -\usepackage{fancyhdr} -\fancypagestyle{plain}{ -\fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}} -\cfoot{} +% Table packages +\usepackage[none]{hyphenat} +\usepackage{tabularx} +\usepackage{multirow} +\captionsetup[table]{skip=5pt} + +% Graphics packages +\usepackage{graphicx} +\usepackage{float} +\graphicspath{images/} + + + + + @@ -54,31 +65,23 @@ \begin{titlepage} \printTitlePage \end{titlepage} - % -------------------------- - % Front matter + % Front matter (includes introduction) % -------------------------- - \pagenumbering{roman} - \chapter*{Abstract}\label{sec:abstract} + \include{includes/frontMatter} - % Table of Contents - \tableofcontents - \thispagestyle{empty} - % -------------------------- % Main matter % -------------------------- - \pagenumbering{arabic} - \chapter{Introduction}\label{sec:introduction} - \input{chapters/introduction} - \setcounter{page}{1} - - \chapter{First Chapter}\label{sec:first} - \input{chapters/testChapter} + \chapter{Text test chapter}\label{sec:first} + \input{chapters/textTestChapter} - \chapter{Second Chapter}\label{sec:second} - \input{chapters/testChapter} + \chapter{Elements test chapter}\label{sec:second} + \input{chapters/elementsTestChapter} + % -------------------------- + % Back(end) matter + % -------------------------- \end{document} \ No newline at end of file