2023-02-27 11:07:49 +01:00
2022-12-31 19:36:49 +01:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass [
2023-02-27 11:07:49 +01:00
11pt,
fleqn,
a4paper,
oneside
2022-12-31 19:36:49 +01:00
]{ TheLuaChameleonBook}
% Book PDF metadata
\hypersetup {
2023-02-27 11:07:49 +01:00
pdftitle={ The Art of Computer Programming Vol. 1 - Some Exercises} ,
pdfauthor={ Samuel ORTION} ,
pdfsubject={ An Attempt to solve some of the exercises from the Book of Donald E. KNUTH} ,
pdfkeywords={ computer science, mathematics, algorithmic} ,
pdfcreator={ LaTeX} ,
2022-12-31 19:36:49 +01:00
}
\definecolor { primarycolor} { RGB} { 0, 128, 0}
\addbibresource { sample.bib} % Bibliography file
\makeglossaries
\makeindex
2023-01-03 08:42:54 +01:00
\input { preamble.tex}
2023-02-27 11:07:49 +01:00
\input { definitions.tex}
2023-01-03 08:42:54 +01:00
\setcounter { tocdepth} { 2}
2022-12-31 19:36:49 +01:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin { document}
%------------------------------------------------------------------------------
% TITLE PAGE
%------------------------------------------------------------------------------
\titlepage % Output the title page
{ \includegraphics [width=\paperwidth] { background.pdf} } % Code to output the background image, which should be the same dimensions as the paper to fill the page entirely; leave empty for no background image
{ % Title(s) and author(s)
\centering \sffamily % Font styling
2023-01-03 08:42:54 +01:00
{ \Huge \bfseries The Art of Computer Programming Vol. 1 - Some Exercises \par } % Book title
2022-12-31 19:36:49 +01:00
\vspace { 16pt} % Vertical whitespace
2023-01-03 08:42:54 +01:00
{ \LARGE An Attempt to solve some of the exercises\\ from the Book of Donald E. KNUTH\par } % Subtitle
2022-12-31 19:36:49 +01:00
\vspace { 24pt} % Vertical whitespace
2023-01-03 08:42:54 +01:00
{ \huge \bfseries Samuel ORTION\par } % Author name
2022-12-31 19:36:49 +01:00
}
%----------------------------------------------------------------------------------------
% COPYRIGHT PAGE
%----------------------------------------------------------------------------------------
\thispagestyle { empty} % Suppress headers and footers on this page
~\vfill % Push the text down to the bottom of the page
\noindent Copyright \copyright \ 2022 Samuel \textsc { Ortion} \\ % Copyright notice
\noindent \textsc { Published by \texttt { Chameleon Press} } \\ % Publisher
\noindent \texttt { \href { https://samuel.ortion.fr/} { samuel.ortion.fr} } \\ % URL
2023-02-27 11:07:49 +01:00
\noindent Answers Licensed under the Creative Commons Attribution-NonCommercial 4.0 License.
2022-12-31 19:36:49 +01:00
% You may not use this file except in compliance with the License. You may obtain a copy of the License at \url{https://creativecommons.org/licenses/by-nc-sa/4.0}. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \textsc{``as is'' basis, without warranties or conditions of any kind}, either express or implied. See the License for the specific language governing permissions and limitations under the License.\\ % License information, replace this with your own license (if any)
% \noindent \textit{First printing, October 2022} % Printing/edition date
%----------------------------------------------------------------------------------------
% TABLE OF CONTENTS
%----------------------------------------------------------------------------------------
\pagestyle { empty} % Disable headers and footers for the following pages
% \tableofcontents % Output the table of contents
% \listoffigures % Output the list of figures, comment or remove this command if not required
% \listoftables % Output the list of tables, comment or remove this command if not required
\pagestyle { fancy} % Enable default headers and footers again
\cleardoublepage % Start the following content on a new page
%----------------------------------------------------------------------------------------
% CONTENT
%----------------------------------------------------------------------------------------
% \chapterimage{orange2.jpg} % Chapter heading image
\chapterspaceabove { 6.75cm} % Whitespace from the top of the page to the chapter title on chapter pages
\chapterspacebelow { 7.25cm} % Amount of vertical whitespace from the top margin to the start of the text on chapter pages
%----------------------------------------
% INTRODUCTION
%----------------------------------------
\part * { Introduction}
\input { content/introduction.tex}
%----------------------------------------
% CHAPTERS
%----------------------------------------
\input { content/chapters/include.tex}
%----------------------------------------
% CONCLUSION
%----------------------------------------
\part * { Conclusion}
\input { content/conclusion.tex}
%----------------------------------------------------------------------------------------
\stopcontents [part] % Manually stop the 'part' table of contents here so the previous Part page table of contents doesn't list the following chapters
%----------------------------------------------------------------------------------------
% BIBLIOGRAPHY
%----------------------------------------------------------------------------------------
\chapterimage { } % Chapter heading image
\chapterspaceabove { 2.5cm} % Whitespace from the top of the page to the chapter title on chapter pages
\chapterspacebelow { 2cm} % Amount of vertical whitespace from the top margin to the start of the text on chapter pages
%------------------------------------------------
\chapter * { Bibliography}
\markboth { \sffamily \normalsize \bfseries Bibliography} { \sffamily \normalsize \bfseries Bibliography} % Set the page headers to display a Bibliography chapter name
\addcontentsline { toc} { chapter} { \textcolor { primarycolor} { Bibliography} } % Add a Bibliography heading to the table of contents
\section * { Articles}
\addcontentsline { toc} { section} { Articles} % Add the Articles subheading to the table of contents
\printbibliography [heading=bibempty, type=article] % Output article bibliography entries
\section * { Books}
\addcontentsline { toc} { section} { Books} % Add the Books subheading to the table of contents
\printbibliography [heading=bibempty, type=book] % Output book bibliography entries
%----------------------------------------------------------------------------------------
% INDEX
%----------------------------------------------------------------------------------------
\cleardoublepage % Make sure the index starts on an odd (right side) page
\phantomsection
\addcontentsline { toc} { chapter} { \textcolor { primarycolor} { Index} } % Add an Index heading to the table of contents
\printindex % Output the index
\tableofcontents
%----------------------------------------------------------------------------------------
% GLOSSARY
%----------------------------------------------------------------------------------------
\printglossaries % Output the glossary
%----------------------------------------------------------------------------------------
% APPENDICES
%----------------------------------------------------------------------------------------
%\chapterimage{.jpg} % Chapter heading image
\chapterspaceabove { 6.75cm} % Whitespace from the top of the page to the chapter title on chapter pages
\chapterspacebelow { 7.25cm} % Amount of vertical whitespace from the top margin to the start of the text on chapter pages
\begin { appendices}
\renewcommand { \chaptername } { Appendix} % Change the chapter name to Appendix, i.e. "Appendix A: Title", instead of "Chapter A: Title" in the headers
%------------------------------------------------
%------------------------------------------------
%------------------------------------------------
\end { appendices}
\printglossary
\end { document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%