mirror of
				https://github.com/Mastermindzh/latex-quickstart.git
				synced 2025-11-04 10:39:58 +01:00 
			
		
		
		
	further separation of front/back matter and added a basic elements chapter
This commit is contained in:
		
							
								
								
									
										140
									
								
								chapters/elementsTestChapter.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										140
									
								
								chapters/elementsTestChapter.tex
									
									
									
									
									
										Normal 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}
 | 
			
		||||
							
								
								
									
										2
									
								
								chapters/frontMatter/acknowledgements.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								chapters/frontMatter/acknowledgements.tex
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
% generate random text to fill the page :)
 | 
			
		||||
\lipsum[1]
 | 
			
		||||
							
								
								
									
										2
									
								
								chapters/frontMatter/introduction.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								chapters/frontMatter/introduction.tex
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
% generate random text to fill the page :)
 | 
			
		||||
\lipsum[1]
 | 
			
		||||
@@ -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]
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								images/programming.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/programming.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								images/programmingLanguages/java.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/programmingLanguages/java.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 126 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								images/programmingLanguages/python.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/programmingLanguages/python.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 132 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								images/programmingLanguages/ruby.jpg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/programmingLanguages/ruby.jpg
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 47 KiB  | 
							
								
								
									
										1
									
								
								includes/backMatter.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								includes/backMatter.tex
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										27
									
								
								includes/frontMatter.tex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								includes/frontMatter.tex
									
									
									
									
									
										Normal 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.
										
									
								
							@@ -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}
 | 
			
		||||
		Reference in New Issue
	
	Block a user