Skip to content

Commit

Permalink
minor review
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiomtzlosa committed Jan 18, 2024
1 parent 48a3ded commit bd7391b
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 6 deletions.
Binary file modified report.pdf
Binary file not shown.
113 changes: 113 additions & 0 deletions utils/chaptertitle_styles.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% REWORK TITLE CHAPTERS %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\hsp}{\hspace{0pt}}
\newcommand{\chapnumfont}{\bfseries\fontsize{30}{35}\selectfont}%
\newcommand{\chaptitlefont}{\fontseries{b}\fontsize{30}{35}\selectfont}%
\newcommand{\chapnumfontcustom}{\fontseries{b}\scshape\fontsize{30}{35}\selectfont}%
\newcommand{\chaptitlefontcustom}{\bfseries\scshape\fontsize{35}{40}\selectfont}%

\definecolor{gray75}{gray}{0.75}%

\DeclareRobustCommand{\ChapterTitleStyleOne}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% https://tex.stackexchange.com/questions/310413/optimize-chapter-styling
% \definecolor{gray75}{gray}{0.75}
% \titleformat{\chapter}[hang]{\vspace{-4.8cm}\flushright%
% \fontseries{b}\fontsize{80}{100}\selectfont}{\fontseries{b}\fontsize{100}{130}\selectfont \textcolor{gray75}\thechapter\hsp}{0pt}{\\ \vspace{-1cm}\Huge\bfseries}[\titlerule\vspace{-1cm}]%
%
\titleformat{\chapter}[hang]{\vspace{-4.8cm}\flushright%
\fontseries{b}\fontsize{80}{100}\selectfont}{\fontseries{b}\fontsize{100}{130}\selectfont \textcolor{gray75}\thechapter\hsp}{0pt}{\\ \vspace{-1.2cm}\Huge\bfseries}[\titlerule\vspace{-1cm}]
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}

\DeclareRobustCommand{\ChapterTitleStyleTwo}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% https://tex.stackexchange.com/questions/68745/possible-values-for-fontseries-and-fontshape
\titleformat{\chapter}[display]{%
\Large\filcenter%
}{%
\titlerule[0.6ex]\vspace{0.1cm}\titlerule[0.6pt]\vspace{0.5ex}\bfseries%
\chapnumfontcustom\filcenter\chaptername~\thechapter\\%
\titlerule[0.6pt]%
}{-0.1ex}{
\vspace{-1.0cm}\chaptitlefontcustom\hsp\vspace{-1.3cm}
}%
\titlespacing*{\chapter}{0pt}{-32pt}{48pt}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}

\DeclareRobustCommand{\ChapterTitleStyleThree}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% https://tex.stackexchange.com/questions/403898/recreating-the-fancy-chapter-style-of-a-textbook
\newcommand{\chapnumfontSpecial}{%
\fontsize{100}{0}%
\selectfont%
}%

\colorlet{chapnumcol}{black!55}%

\titleformat{\chapter}[display]%
{\bfseries}%
{\begin{tikzpicture}%
\node[minimum width=\textwidth, text=black!25, fill=black!25, inner sep=1, outer sep=0, anchor=south] (rectinit) {\huge CHAPTER};
\node[minimum width=.8\textwidth, text=white, inner sep=1, outer sep=0, anchor=south west, text width=.8\textwidth, align=right] at (rectinit.south west) (chapname) {\huge CHAPTER~~};
\node[minimum width=.2\textwidth, inner sep=0, outer sep=0, anchor=south west, text width=.2\textwidth, align=left] at (chapname.south east) {\chapnumfontSpecial\textcolor{chapnumcol}{\thechapter}};
\end{tikzpicture}}%
{0pt}%
{\vspace{-0.4cm}\chaptitlefontcustom\hsp\vspace{-1.5cm}}%
\titlespacing*{\chapter}{0pt}{-32pt}{48pt}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}

\DeclareRobustCommand{\ChapterTitleStyleFour}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% https://tex.stackexchange.com/questions/530234/how-to-customize-chapter-heading-in-a-fancy-way
\colorlet{rulecolor}{black}
\titleformat{\chapter}[display]
{\filcenter}{\mbox{}\xrfill[0.4ex]{3pt}[rulecolor]\textsc{\large\bfseries\enspace\chaptername \thechapter}\enspace\xrfill[0.4ex]{3pt}[rulecolor]\mbox{}}{0.3ex} {{\color{rulecolor}\titlerule[1pt]}\vskip1.0ex\chaptitlefontcustom}[\medskip{\vskip-0.4ex\color{rulecolor}\titlerule[1pt]\vspace{-1.0cm}}]
\titlespacing*{\chapter}{0pt}{-32pt}{48pt}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}


\DeclareRobustCommand{\ChapterTitleStyleFive}{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% https://tex.stackexchange.com/questions/163052/customizing-chapters-title
\newcommand{\chaptitlefontcustomOther}{\bfseries\scshape\fontsize{35}{40}\selectfont}%

\titleformat{\chapter}[block]
{\filright}
{\parbox{\widthof{\Huge\sffamily\MakeUppercase{\chaptername}}}{%
\filcenter\Large\usefont{T1}{phv}{m}{n}\Huge\MakeUppercase{\chaptername}\vskip -0.6cm%
\fontsize{90pt}{90pt}\selectfont\thechapter%
}\enspace%
}
{15pt}
{\chaptitlefontcustomOther\usefont{T1}{phv}{b}{n}\vrule width 2pt \enspace%
\parbox{\textwidth-\widthof{\LARGE\sffamily\MakeUppercase{\chaptername}\enspace}}{\filright}%
\vspace*{-1.0cm}%
}
\titlespacing*{\chapter}{0pt}{-32pt}{48pt}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
}

\def\SetChapterTitleStyle#1{%
\IfEqCase{#1}{%
{1}{\protect\ChapterTitleStyleOne\relax}%
{2}{\protect\ChapterTitleStyleTwo\relax}%
{3}{\protect\ChapterTitleStyleThree\relax}%
{4}{\protect\ChapterTitleStyleFour\relax}%
{5}{\protect\ChapterTitleStyleFive\relax}%
}[\protect\ChapterTitleStyleOne\relax]%
}%
10 changes: 6 additions & 4 deletions utils/fancy_styles.tex
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@
}

%% REWORK TITLE CHAPTERS
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{0pt}}
\titleformat{\chapter}[hang]{\vspace{-4.8cm}\flushright
\fontseries{b}\fontsize{80}{100}\selectfont}{\fontseries{b}\fontsize{100}{130}\selectfont \textcolor{gray75}\thechapter\hsp}{0pt}{\\ \vspace{-1cm}\Huge\bfseries}[\titlerule\vspace{-1cm}]
% \definecolor{gray75}{gray}{0.75}
% \newcommand{\hsp}{\hspace{0pt}}
% \titleformat{\chapter}[hang]{\vspace{-4.8cm}\flushright
% \fontseries{b}\fontsize{80}{100}\selectfont}{\fontseries{b}\fontsize{100}{130}\selectfont \textcolor{gray75}\thechapter\hsp}{0pt}{\\ \vspace{-1cm}\Huge\bfseries}[\titlerule\vspace{-1cm}]

%\titleformat{\chapter}[display]{}{}{2ex}{
% \begin{center}
Expand All @@ -209,4 +209,6 @@
% \end{center}
%}

\SetChapterTitleStyle{1} %% Set the chapter title style from 1 to 5

}{\protect\clearpage}
10 changes: 8 additions & 2 deletions utils/imports.tex
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
%\usepackage{patchcmd}
%\usepackage{parskip}
\usepackage{fix-cm} % mandatory for Package cover
\usepackage{titlesec} % mandatory for Package cover
\usepackage{titlesec} % mandatory for Package cover
%\PassOptionsToPackage{pagestyles}{titlesec}
%\PassOptionsToPackage{clearempty}{titlesec}
%\PassOptionsToPackage{explicit}{titlesec}
\usepackage[T1]{fontenc} % mandatory for Package cover
\usepackage{adjustbox} % mandatory for alt colour cover
\usepackage[superscript, biblabel, nomove]{cite} % citation package and style -> https://tex.stackexchange.com/questions/79591/superscripts-in-bibliography-with-bibtex#79599
Expand All @@ -41,7 +44,8 @@
\usepackage[monochrome]{xcolor}
\else
\usepackage[dvipsnames, table]{xcolor}
\usepackage{color, colortbl}
\usepackage{xcolor}
% \usepackage{color, colortbl}
\fi

\ifdefined\mainmatter
Expand Down Expand Up @@ -82,6 +86,8 @@
\usepackage[bottom]{footmisc}
\usepackage{setspace}
\usepackage[percent]{overpic}
\usepackage{xhfill}
\usepackage{eqparbox}
%\usepackage{everypage}
%\usepackage{bophook} % important for top footnote space
%\usepackage[printwatermark]{xwatermark}
Expand Down
3 changes: 3 additions & 0 deletions utils/macros.tex
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,9 @@
%%% Affirmation
\input{utils/declaration}

%%% Different chapter title styles used in utils/fance_styles
\input{utils/chaptertitle_styles}

%%% FancyHDR page style
\input{utils/fancy_styles}

Expand Down

0 comments on commit bd7391b

Please sign in to comment.