Added colors to frontpage line generated time and page header text

This commit is contained in:
chhan11 2017-05-26 00:53:37 +02:00
parent 4c6c5ec5e3
commit 5fba9fd84b
3 changed files with 106 additions and 11 deletions

View File

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

View File

@ -16,7 +16,8 @@
\title{r17dinh409}
\author{Christoffer | chhan11 <zbcchhan11 at zbc.dk>}
\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

View File

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