further separation of front/back matter and added a basic elements chapter

This commit is contained in:
Mastermindzh 2017-05-28 23:18:36 +02:00
parent 4281da6cda
commit 94d2a1f9df
13 changed files with 202 additions and 27 deletions

View File

@ -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}

View File

@ -0,0 +1,2 @@
% generate random text to fill the page :)
\lipsum[1]

View File

@ -0,0 +1,2 @@
% generate random text to fill the page :)
\lipsum[1]

View File

@ -1,7 +1,7 @@
% generate random text to fill the page :) % generate random text to fill the page :)
\lipsum[1] \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}. The introduction can be found on page \pageref{sec:introduction}.
\subsection{First subsection} \subsection{First subsection}
\lipsum[1-3] \lipsum[1-3]

BIN
images/programming.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

1
includes/backMatter.tex Normal file
View File

@ -0,0 +1 @@

27
includes/frontMatter.tex Normal file
View File

@ -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}

Binary file not shown.

View File

@ -13,20 +13,31 @@
\usepackage[utf8]{inputenc} \usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage{lipsum} \usepackage{lipsum}
\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{caption}
\usepackage{subcaption}
% Title packages
\usepackage{graphicx}
\graphicspath{ images/}
\usepackage{titlesec} \usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge\bfseries}{\thechapter. }{0pt}{\Huge} \titleformat{\chapter}{\normalfont\huge\bfseries}{\thechapter. }{0pt}{\Huge}
\titlespacing{\chapter} {0pt}{0pt}{10pt} \titlespacing{\chapter} {0pt}{0pt}{10pt}
\usepackage{lastpage} % Table packages
\usepackage{fancyhdr} \usepackage[none]{hyphenat}
\fancypagestyle{plain}{ \usepackage{tabularx}
\fancyfoot[R]{Page \thepage\ of \pageref{LastPage}}} \usepackage{multirow}
\cfoot{} \captionsetup[table]{skip=5pt}
% Graphics packages
\usepackage{graphicx}
\usepackage{float}
\graphicspath{images/}
@ -54,31 +65,23 @@
\begin{titlepage} \begin{titlepage}
\printTitlePage \printTitlePage
\end{titlepage} \end{titlepage}
% -------------------------- % --------------------------
% Front matter % Front matter (includes introduction)
% -------------------------- % --------------------------
\pagenumbering{roman} \include{includes/frontMatter}
\chapter*{Abstract}\label{sec:abstract}
% Table of Contents
\tableofcontents
\thispagestyle{empty}
% -------------------------- % --------------------------
% Main matter % Main matter
% -------------------------- % --------------------------
\pagenumbering{arabic} \chapter{Text test chapter}\label{sec:first}
\chapter{Introduction}\label{sec:introduction} \input{chapters/textTestChapter}
\input{chapters/introduction}
\setcounter{page}{1}
\chapter{First Chapter}\label{sec:first}
\input{chapters/testChapter}
\chapter{Second Chapter}\label{sec:second} \chapter{Elements test chapter}\label{sec:second}
\input{chapters/testChapter} \input{chapters/elementsTestChapter}
% --------------------------
% Back(end) matter
% --------------------------
\end{document} \end{document}