From 5fba9fd84bd97ba09a059bdabb432512e3b71521 Mon Sep 17 00:00:00 2001 From: chhan11 Date: Fri, 26 May 2017 00:53:37 +0200 Subject: [PATCH] Added colors to frontpage line generated time and page header text --- layout/color.tex | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ main.tex | 3 +- structure.tex | 35 +++++++++++++++------ 3 files changed, 106 insertions(+), 11 deletions(-) diff --git a/layout/color.tex b/layout/color.tex index 6e7abd1..b8baee2 100644 --- a/layout/color.tex +++ b/layout/color.tex @@ -2,3 +2,82 @@ \definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codepurple}{rgb}{0.58,0,0.82} \definecolor{backcolour}{rgb}{0.95,0.95,0.92} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% +--------------------------------------+ % +% | The following colours is available | % +% | with \usepackage[dvipsnames]{xcolor} | % +% +--------------------------------------+-------------------------------+ +% | http://www.maths.adelaide.edu.au/anthony.roberts/LaTeX/ltxusecol.php | +% +----------------------------------------------------------------------+ +% Apricot % +% Aquamarine % +% Bittersweet % +% Black % +% Blue % +% BlueGreen % +% BlueViolet % +% BrickRed % +% Brown % +% BurntOrange % +% CadetBlue % +% CarnationPink % +% Cerulean % +% CornflowerBlue % +% Cyan % +% Dandelion % +% DarkOrchid % +% Emerald % +% ForestGreen % +% Fuchsia % +% Goldenrod % +% Gray % +% Green % +% GreenYellow % +% JungleGreen % +% Lavender % +% LimeGreen % +% Magenta % +% Mahogany % +% Maroon % +% Melon % +% MidnightBlue % +% Mulberry % +% NavyBlue % +% OliveGreen % +% Orange % +% OrangeRed % +% Orchid % +% Peach % +% Periwinkle % +% PineGreen % +% Plum % +% ProcessBlue % +% Purple % +% RawSienna % +% Red % +% RedOrange % +% RedViolet % +% Rhodamine % +% RoyalBlue % +% RoyalPurple % +% RubineRed % +% Salmon % +% SeaGreen % +% Sepia % +% SkyBlue % +% SpringGreen % +% Tan % +% TealBlue % +% Thistle % +% Turquoise % +% Violet % +% VioletRed % +% White % +% WildStrawberry % +% Yellow % +% YellowGreen % +% YellowOrange % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file diff --git a/main.tex b/main.tex index 005757c..090abf0 100644 --- a/main.tex +++ b/main.tex @@ -16,7 +16,8 @@ \title{r17dinh409} \author{Christoffer | chhan11 } \date{May 22 - June 30, 2017\\% - {\tiny\texttt{Generated: \utccurrenttime}}} + {\tiny\texttt{\color{GreenYellow}Generated: \utccurrenttime}}% +} \titlepic{\includegraphics[width=0.3\textwidth]{profilepic/pic1}} \maketitle diff --git a/structure.tex b/structure.tex index fd8b994..94b2897 100644 --- a/structure.tex +++ b/structure.tex @@ -6,7 +6,7 @@ \usepackage{geometry} \usepackage{listings} \usepackage{color} -\usepackage[dvipsnames]{xcolor} +\usepackage[usenames,dvipsnames]{xcolor} \usepackage{graphicx} \usepackage[numbers,square,sectionbib,comma,nonamebreak,elide]{natbib} \usepackage{float} @@ -23,6 +23,8 @@ \usepackage{url} \usepackage{babel} \usepackage[showisoZ]{datetime2} +\usepackage{lastpage} + \bibliographystyle{unsrtnat} %styles list https://www.sharelatex.com/learn/Natbib_bibliography_styles @@ -39,22 +41,36 @@ % 3. High-quality PDF \DeclareGraphicsExtensions{.jpg,.png,.pdf} -% Define fancy header and footer -\pagestyle{fancy} -\fancyhf{} -\fancyhead[LE,RO]{ZBC} -\fancyhead[RE,LO]{\rightmark} -\fancyfoot[CE,CO]{\leftmark} -\fancyfoot[LE,RO]{\thepage} + +\fancypagestyle{fancybook}{% + \fancyhf{}% + % Note the ## here. It's required because \fancypagestyle is making a macro (\ps@fancybook). + % If we just wrote #1, TeX would think that it's the argument to \ps@fancybook, but + % \ps@fancybook doesn't take any arguments, so TeX would complain with an error message. + % You are not expected to understand this. + \renewcommand*{\sectionmark}[1]{ \markright{\thesection\ ##1} }% + \renewcommand*{\chaptermark}[1]{ \markboth{\chaptername\ \thechapter: ##1}{} }% + % Increase the length of the header such that the folios + % (typography jargon for page numbers) move into the margin + \fancyhfoffset[LE]{6mm}% slightly less than 0.25in + \fancyhfoffset[RO]{6mm}% + % Put some space and a vertical bar between the folio and the rest of the header + \fancyhead[LE]{\color{GreenYellow}\thepage\hskip3mm\vrule\hskip3mm\leftmark}% + \fancyhead[RO]{\color{GreenYellow}\rightmark\hskip3mm\vrule\hskip3mm\thepage}% +} +\pagestyle{fancybook} % Use the roman numeric system for pagenumbers \pagenumbering{roman} + \subimport{.}{commands} % Import user-defined commands + \input{layout/color} %user-defined colors + \lstdefinestyle{mystyle}{ backgroundcolor=\color{backcolour}, commentstyle=\color{codegreen}, @@ -74,8 +90,7 @@ tabsize=4 } -\renewcommand{\headrulewidth}{2pt} %width of header line is by default 0px. -\renewcommand{\footrulewidth}{1pt} %width of footer line is by default 0px. + \geometry{a4paper,margin=2cm} \setlength{\columnsep}{1.5cm} %space between columns \setlength{\headheight}{15pt}