custom margin support

This commit is contained in:
Krishna Kumar 2013-11-25 11:11:21 +00:00
parent 73c8dd9ea8
commit 5bc8c037aa
5 changed files with 62 additions and 23 deletions

View File

@ -60,6 +60,12 @@
\newif\ifCU@pageStyleII\CU@pageStyleIIfalse % Set Page StyleI
\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%
% ********************* Pre-defined Options **********************
@ -123,13 +129,17 @@
citecolor=black,
anchorcolor=black
}
\if@twoside
\ifCU@custommargin
\setMarginfalse
\else
% Odd and Even side Margin staggering for binding and set viewmode for PDF
\RequirePackage[hmarginratio=3:2]{geometry}
\setMargintrue
\fi
\if@twoside
\hypersetup{pdfpagelayout=TwoPageRight}
\else
% Single side print margin for binding and set view mode for PDF
\RequirePackage[hmarginratio=3:2]{geometry}
\hypersetup{pdfpagelayout=OneColumn}
\fi
\else
@ -149,8 +159,15 @@
urlcolor=blue,
citecolor=blue,
anchorcolor=green}
\ifCU@custommargin
\setMarginfalse
\else
% No Margin staggering on Odd and Even side
\RequirePackage[hmarginratio=1:1]{geometry}
\setMargintrue
\fi
\hypersetup{pdfpagelayout=OneColumn}
\fi

View File

@ -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 *********************************
% *****************************************************************************
@ -39,25 +68,6 @@
\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 ******************************
% ******************************************************************************

View File

@ -14,6 +14,8 @@ phd-thesis-template
* Custom page styles: 3 Different Header / Footer styles
* Custom margin size
### Build your thesis
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.
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.
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.
### Choosing the Fonts:
`PhDThesisPSnPDF` currently supports two fonts `Times` and `Latin Modern (default)`.
@ -87,7 +93,7 @@ It support the following custom options:
### 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)
@ -238,3 +244,5 @@ You are trying to load an option that is not supported in the PhDThesisClass and
* Support Libertine fonts + Math
* Scale the section sizes by an order when moving from a4paper to a5paper
* Support default option like a4paper, 12pt, etc., if not specified

Binary file not shown.

View File

@ -37,6 +37,10 @@
% `custombib`: Define your own bibliography style in the `preamble.tex` file.
% `\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 *********************************
%
% `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.