custom margin support
This commit is contained in:
parent
73c8dd9ea8
commit
5bc8c037aa
@ -60,6 +60,12 @@
|
|||||||
\newif\ifCU@pageStyleII\CU@pageStyleIIfalse % Set Page StyleI
|
\newif\ifCU@pageStyleII\CU@pageStyleIIfalse % Set Page StyleI
|
||||||
\DeclareOption{PageStyleII}{\CU@pageStyleIItrue}
|
\DeclareOption{PageStyleII}{\CU@pageStyleIItrue}
|
||||||
|
|
||||||
|
% ********************** Custom Margins ************************
|
||||||
|
\newif\ifsetMargin\setMarginfalse % Margins are not set
|
||||||
|
|
||||||
|
\newif\ifCU@custommargin\CU@custommarginfalse % Custom margin
|
||||||
|
\DeclareOption{custommargin}{\CU@custommargintrue}
|
||||||
|
|
||||||
\ProcessOptions\relax%
|
\ProcessOptions\relax%
|
||||||
|
|
||||||
% ********************* Pre-defined Options **********************
|
% ********************* Pre-defined Options **********************
|
||||||
@ -123,13 +129,17 @@
|
|||||||
citecolor=black,
|
citecolor=black,
|
||||||
anchorcolor=black
|
anchorcolor=black
|
||||||
}
|
}
|
||||||
\if@twoside
|
\ifCU@custommargin
|
||||||
|
\setMarginfalse
|
||||||
|
\else
|
||||||
% Odd and Even side Margin staggering for binding and set viewmode for PDF
|
% Odd and Even side Margin staggering for binding and set viewmode for PDF
|
||||||
\RequirePackage[hmarginratio=3:2]{geometry}
|
\RequirePackage[hmarginratio=3:2]{geometry}
|
||||||
|
\setMargintrue
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\if@twoside
|
||||||
\hypersetup{pdfpagelayout=TwoPageRight}
|
\hypersetup{pdfpagelayout=TwoPageRight}
|
||||||
\else
|
\else
|
||||||
% Single side print margin for binding and set view mode for PDF
|
|
||||||
\RequirePackage[hmarginratio=3:2]{geometry}
|
|
||||||
\hypersetup{pdfpagelayout=OneColumn}
|
\hypersetup{pdfpagelayout=OneColumn}
|
||||||
\fi
|
\fi
|
||||||
\else
|
\else
|
||||||
@ -149,8 +159,15 @@
|
|||||||
urlcolor=blue,
|
urlcolor=blue,
|
||||||
citecolor=blue,
|
citecolor=blue,
|
||||||
anchorcolor=green}
|
anchorcolor=green}
|
||||||
|
|
||||||
|
\ifCU@custommargin
|
||||||
|
\setMarginfalse
|
||||||
|
\else
|
||||||
% No Margin staggering on Odd and Even side
|
% No Margin staggering on Odd and Even side
|
||||||
\RequirePackage[hmarginratio=1:1]{geometry}
|
\RequirePackage[hmarginratio=1:1]{geometry}
|
||||||
|
\setMargintrue
|
||||||
|
\fi
|
||||||
|
|
||||||
\hypersetup{pdfpagelayout=OneColumn}
|
\hypersetup{pdfpagelayout=OneColumn}
|
||||||
\fi
|
\fi
|
||||||
|
|
||||||
|
@ -1,3 +1,32 @@
|
|||||||
|
% *****************************************************************************
|
||||||
|
% ******************************* Custom Margin ********************************
|
||||||
|
% Add `custommargin' in the document class option to use this section
|
||||||
|
% Set {innerside margin / outerside margin / topmargin / bottom margin} and many custom size for page layout
|
||||||
|
\ifsetMargin
|
||||||
|
\else
|
||||||
|
\RequirePackage[left=35mm,right=30mm,top=35mm,bottom=25mm]{geometry}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
|
% *****************************************************************************
|
||||||
|
% ******************* Fonts (like different typewriter fonts etc.)*************
|
||||||
|
% Add `customfont' in the document class option to use this section
|
||||||
|
%\renewcommand\rmdefault{psb}
|
||||||
|
\ifsetFont
|
||||||
|
\else
|
||||||
|
\RequirePackage{libertine} % Set your custom font here and use `customfont' in options
|
||||||
|
\fi
|
||||||
|
|
||||||
|
% *****************************************************************************
|
||||||
|
% *************************** Bibliography and References ********************
|
||||||
|
% Add `custombib' in the document class option to use this section
|
||||||
|
\usepackage{cleveref} %Referencing without need to explicitly state fig /table
|
||||||
|
\ifsetBib % True, Bibliography option is chosen in class options
|
||||||
|
\else % If custom bibliography style chosen then load bibstyle here
|
||||||
|
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
% *****************************************************************************
|
% *****************************************************************************
|
||||||
% **************************** Custom Packages *********************************
|
% **************************** Custom Packages *********************************
|
||||||
% *****************************************************************************
|
% *****************************************************************************
|
||||||
@ -39,25 +68,6 @@
|
|||||||
\usepackage{siunitx}
|
\usepackage{siunitx}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% *****************************************************************************
|
|
||||||
% ******************* Fonts (like different typewriter fonts etc.)*************
|
|
||||||
%\renewcommand\rmdefault{psb}
|
|
||||||
\ifsetFont
|
|
||||||
\else
|
|
||||||
\RequirePackage{libertine} % Set your custom font here and use `customfont' in options
|
|
||||||
\fi
|
|
||||||
|
|
||||||
% *****************************************************************************
|
|
||||||
% *************************** Bibliography and References ********************
|
|
||||||
\usepackage{cleveref} %Referencing without need to explicitly state fig /table
|
|
||||||
\ifsetBib % True, Bibliography option is chosen in class options
|
|
||||||
\else % If custom bibliography style chosen then load bibstyle here
|
|
||||||
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
|
||||||
\fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
% ******************************************************************************
|
% ******************************************************************************
|
||||||
% ************************* User Defined Commands ******************************
|
% ************************* User Defined Commands ******************************
|
||||||
% ******************************************************************************
|
% ******************************************************************************
|
||||||
|
10
README.md
10
README.md
@ -14,6 +14,8 @@ phd-thesis-template
|
|||||||
|
|
||||||
* Custom page styles: 3 Different Header / Footer styles
|
* Custom page styles: 3 Different Header / Footer styles
|
||||||
|
|
||||||
|
* Custom margin size
|
||||||
|
|
||||||
|
|
||||||
### Build your thesis
|
### Build your thesis
|
||||||
The template supports PDF, DVI and PS formats. All three formats can be generated
|
The template supports PDF, DVI and PS formats. All three formats can be generated
|
||||||
@ -69,12 +71,16 @@ It support the following custom options:
|
|||||||
Use `print` in the options to activate Print Version with appropriate margins and page layout and view styles.
|
Use `print` in the options to activate Print Version with appropriate margins and page layout and view styles.
|
||||||
Leaving the options field blank will activate Online version.
|
Leaving the options field blank will activate Online version.
|
||||||
|
|
||||||
|
* `custommargin`: You can alter the margin dimension for both print and online version by using the keyword `custommargin` in the options sections. Then you can define the dimensions of the margin in the `preamble.tex` file.
|
||||||
|
|
||||||
* `index`: Including this option in `\documentclass` build the index, which you can put at the and of the thesis.
|
* `index`: Including this option in `\documentclass` build the index, which you can put at the and of the thesis.
|
||||||
|
|
||||||
Instructions on how to use the index can be found [here](http://en.wikibooks.org/wiki/LaTeX/Indexing#Using_makeidx).
|
Instructions on how to use the index can be found [here](http://en.wikibooks.org/wiki/LaTeX/Indexing#Using_makeidx).
|
||||||
|
|
||||||
_Note_: the package `makeidx` is used to create the index.
|
_Note_: the package `makeidx` is used to create the index.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Choosing the Fonts:
|
### Choosing the Fonts:
|
||||||
|
|
||||||
`PhDThesisPSnPDF` currently supports two fonts `Times` and `Latin Modern (default)`.
|
`PhDThesisPSnPDF` currently supports two fonts `Times` and `Latin Modern (default)`.
|
||||||
@ -87,7 +93,7 @@ It support the following custom options:
|
|||||||
|
|
||||||
### Choosing the Bibliography style
|
### Choosing the Bibliography style
|
||||||
|
|
||||||
`PhDThesisPSnPDF` currently supports two styles `AuthorYear` and `Numbered (default)`. Citation style has to be set. You can also specify `CustomBib` style
|
`PhDThesisPSnPDF` currently supports two styles `authoryear` and `numbered (default)`. Citation style has to be set. You can also specify `custombib` style
|
||||||
|
|
||||||
* `authoryear`: For author-year citation eg., Krishna (2013)
|
* `authoryear`: For author-year citation eg., Krishna (2013)
|
||||||
|
|
||||||
@ -238,3 +244,5 @@ You are trying to load an option that is not supported in the PhDThesisClass and
|
|||||||
* Support Libertine fonts + Math
|
* Support Libertine fonts + Math
|
||||||
|
|
||||||
* Scale the section sizes by an order when moving from a4paper to a5paper
|
* Scale the section sizes by an order when moving from a4paper to a5paper
|
||||||
|
|
||||||
|
* Support default option like a4paper, 12pt, etc., if not specified
|
||||||
|
BIN
thesis.pdf
BIN
thesis.pdf
Binary file not shown.
@ -37,6 +37,10 @@
|
|||||||
% `custombib`: Define your own bibliography style in the `preamble.tex` file.
|
% `custombib`: Define your own bibliography style in the `preamble.tex` file.
|
||||||
% `\RequirePackage[square, sort, numbers, authoryear]{natbib}`
|
% `\RequirePackage[square, sort, numbers, authoryear]{natbib}`
|
||||||
%
|
%
|
||||||
|
% ************************* Custom Page Margins ********************************
|
||||||
|
%
|
||||||
|
% `custommargin`: Define your custom margin and other sizes in the geometry package in the preamble.tex.
|
||||||
|
%
|
||||||
% ********************** Choosing the Page Style *********************************
|
% ********************** Choosing the Page Style *********************************
|
||||||
%
|
%
|
||||||
% `default (leave empty)`: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name in Header (Right Even) and Section Name (Left Odd). Blank Footer.
|
% `default (leave empty)`: For Page Numbers in Header (Left Even, Right Odd) and Chapter Name in Header (Right Even) and Section Name (Left Odd). Blank Footer.
|
||||||
|
Loading…
Reference in New Issue
Block a user