user defined commands to preamble

This commit is contained in:
Krishna Kumar 2013-11-17 01:25:23 +00:00
parent 89c882fa10
commit d1abeb7641
4 changed files with 65 additions and 55 deletions

View File

@ -1,15 +1,15 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Class ``PhD Thesis PSnPDF''
%%
%% Version: v1.0
%% Authors: Krishna Kumar
%% Date: 2013/11/16
%% Based on: King's LaTeX workshop by Krishna, CUED V1.1 Template by Harish Banderi
%% and Alex Ridge's idea to form a unified template
%% License: GPL V2.0 https://www.gnu.org/licenses/gpl-2.0.html
%% GitHub Repo: https://github.com/kks32/phd-thesis-template/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
%% Class ``PhD Thesis PSnPDF'' %%
%% %%
%% Version: v1.0 %%
%% Authors: Krishna Kumar %%
%% Date: 2013/11/16 %%
%% Based on: King's LaTeX workshop by Krishna, CUED V1.1 Template by H. Banderi %%
%% and Alex Ridge's idea to form a unified template %%
%% License: GPL V2.0 https://www.gnu.org/licenses/gpl-2.0.html %%
%% GitHub Repo: https://github.com/kks32/phd-thesis-template/ %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ******************** Class Identification *********************
%\NeedsTeXFormat{LaTeX2e}
@ -124,48 +124,52 @@
\hypersetup{pdfpagelayout=OneColumn}
\fi
% ******************************************************************************
% ******************************** Packages ************************************
% ******************************************************************************
% ************************ packages *****************************************
% Layout, Formatting and Headers
% ******************** Layout, Formatting and Headers **************************
\def\pdfshellescape{1}
\RequirePackage{lscape} % Supports Landscape Layout
\RequirePackage{lscape} % Supports Landscape Layout
\RequirePackage{setspace} % Define line spacing in para
\RequirePackage{fancyhdr} % Define custom header
% Conditional Statements
% *************************** Conditional Statements **************************
\RequirePackage{ifthen} % Used in LaTeX Class files for conditional statements
\RequirePackage{ifpdf} % Check for pdfLaTeX
% Table of Contents and Appendix
\RequirePackage{tocbibind} % add Bibliography, List of figures and tables to contents
\RequirePackage{appendix} % add appendix
% *********************** Table of Contents and Appendix************************
% add Bibliography, List of figures and tables to contents
\RequirePackage{tocbibind}
\RequirePackage{appendix} % add appendix
% Graphics and Figures
% **************************** Graphics and Figures ****************************
\RequirePackage[usenames, dvipsnames]{color}
\RequirePackage{epstopdf} % Convert eps figures to pdf
\ifpdf % Graphicx package for figures
% Convert eps figures to pdf
\RequirePackage{epstopdf}
\ifpdf
\RequirePackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.png, .jpg, .pdf}
\pdfcompresslevel=9
\else
%\RequirePackage{epsfig}
\RequirePackage{graphicx}
\DeclareGraphicsExtensions{.eps, .ps}
\fi
% URL Package and Definition
% **************************** URL Package and Definition ***********************
\RequirePackage{url}
% Redefining urlstyle to use smaller fontsize in References with URLs
\def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\urlstyle{leo}
%To copy ligatures and Fonts
% *************************** To copy ligatures and Fonts ***********************
\RequirePackage{textcomp}
\RequirePackage[ansinew]{inputenc}
\RequirePackage[T1]{fontenc}
@ -175,12 +179,10 @@
\pdfglyphtounicode{f_l}{FB02}
\pdfglyphtounicode{f_f_i}{FB03}
\pdfglyphtounicode{f_f_l}{FB04}
\pdfgentounicode=1
% ******************** Setting PDF Meta-Data *************************
% ****************************** Setting PDF Meta-Data **************************
\ifpdf
\AtBeginDocument{
\hypersetup{
@ -192,7 +194,7 @@
}
\fi
% ******Clear Header Style on the Last Empty Odd pages ****************
% ****************Clear Header Style on the Last Empty Odd pages ****************
\renewcommand{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else%
\hbox{}%
\thispagestyle{empty} % Empty header styles
@ -200,7 +202,7 @@
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
% *********************** Create the index ****************************
% ******************************* Create the index ******************************
\ifCU@index
\RequirePackage{makeidx}
\makeindex
@ -212,7 +214,7 @@
\newcommand{\printthesisindex}{}
\fi
% ******************************* Nomenclature ***********************
% *********************************** Nomenclature ******************************
\usepackage{nomencl}
\makenomenclature
\renewcommand\nomgroup[1]{%
@ -253,10 +255,10 @@
%\renewcommand{\headrulewidth}{0.5pt}
%\renewcommand{\footrulewidth}{0pt}
%\addtolength{\headheight}{0.5pt}
%\fancypagestyle{plain}{
% \fancyhead{}
% \renewcommand{\headrulewidth}{0pt}
%}
\fancypagestyle{plain}{
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
}
\newcommand{\submissiontext}{{A thesis submitted for the degree of}}

View File

@ -56,3 +56,23 @@
%% Subfigure (note: this must be included after the `caption` package).
%%\
%\usepackage{subfig}
% ******************************************************************************
% ************************* User Defined Commands ******************************
% ******************************************************************************
% Set spacing as 1.5 line spacing for the PhD Thesis
\onehalfspace
% ********************** Adding TOC and List of Figures ************************
% To hide sections from appearing in TOC add \tochide\section{Section name}
\newcommand{\nocontentsline}[3]{}
\newcommand{\tochide}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% To restrict the length of the figure caption in List of figures use:
% \caption[Caption that you want to appear in TOC]{Actual caption of the figure}
% \section[short]{title}

Binary file not shown.

View File

@ -39,10 +39,8 @@
\keywords{{Material Point Method} {Lattice Boltzmann} {Multi-scale} {Multiphase} {Granular Flows}}
% Uncomment to set spacing as 1.5 line spacing
% \onehalfspace
%**************************Front Matter********************************************* %
% ********************************Front Matter************************************
\begin{document}
\frontmatter
@ -57,15 +55,7 @@
\include{Acknowledgement/acknowledgement}
\include{Abstract/abstract}
%*************** Adding TOC and List of Figures *********************************** %
% To hide sections from appearing in TOC add \tochide\section{Section name}
\newcommand{\nocontentsline}[3]{}
\newcommand{\tochide}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
% To restrict the length of the figure caption in List of figures use:
% \caption[Caption that you want to appear in TOC]{Actual caption of the figure}
% \section[short]{title}
% *********************** Adding TOC and List of Figures *************************
\tableofcontents
@ -74,7 +64,7 @@
\listoftables
\makenomenclature
%******************************Main Matter******************************************* %
% ***********************************Main Matter***********************************
\mainmatter
\include{Chapter1/chapter1}
@ -85,26 +75,24 @@
%\include{Chapter6/chapter6}
%\include{Chapter7/chapter7}
%****************************Back Matter********************************************** %
% ***********************************Back Matter***********************************
\backmatter
\appendix
\include{Appendix1/appendix1}
\include{Appendix2/appendix2}
%*******************************Bibliography******************************************%
% ***********************************Bibliography**********************************
\begin{spacing}{0.9}
\bibliographystyle{apalike}
%\bibliographystyle{plainna}
\renewcommand{\bibname}{References} % changes default name Bibliography to References
\renewcommand{\bibname}{References}% changes default name Bibliography-> References
\cleardoublepage
\bibliography{References/References}
\end{spacing}
%************************************************************************************* %
%******************************* Index *********************************************** %
%%
% *************************************** Index ***********************************
\printthesisindex
\end{document}