Custom fonts

This commit is contained in:
Krishna Kumar 2013-11-23 16:43:15 +00:00
parent 664507f1a5
commit 790fbf1b39
5 changed files with 28 additions and 8 deletions

View File

@ -39,6 +39,12 @@
\newif\ifCU@times\CU@timesfalse % Times with Math Support
\DeclareOption{times}{\CU@timestrue}
\newif\ifCU@palatino\CU@palatinofalse % Palatino with Math Support
\DeclareOption{palatino}{\CU@palatinotrue}
\newif\ifCU@customfont\CU@customfontfalse % Custom Font with Math Support
\DeclareOption{customfont}{\CU@customfonttrue}
% ************************** Bibliography ***********************
\newif\ifsetBib\setBibfalse % Using Custom Bibliography
@ -51,6 +57,10 @@
\newif\ifCU@custombib\CU@custombibfalse % Custom Bibliography
\DeclareOption{custombib}{\CU@custombibtrue}
\DeclareOption*{
\ClassWarning{PhDThesisPSnPDF}{Unknown option '\CurrentOption'}
}
\ProcessOptions\relax%
\ifCU@bookmode
@ -204,6 +214,7 @@
\else
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
\setBibtrue
\ClassWarning{PhDThesisPSnPDF}{No bibliography style was specified. Default numbered style is used. If you would like to use a different style, use `authoryear' or `numbered' in the options in documentclass or use `custombib` and define the natbibpackage with required style in the Preamble.tex file}
% Generate a warning message here
\fi
\fi
@ -219,9 +230,21 @@
% Font Selection
\ifCU@times
\RequirePackage{mathptmx} % times roman, including math (where possible)
\setFontfalse
\else
\setFonttrue
\else
\ifCU@palatino
\RequirePackage[sc]{mathpazo} % Palatino
\linespread{1.05} % Requires a longer line space
\setFonttrue
\else
\ifCU@customfont
\setFontfalse
\else
\ClassWarning{PhDThesisPSnPDf}{Using default font Latin Modern. If you would like to use other pre-defined fonts use `times' or `palatino' or load a custom font in preamble by specifying `customfont' in the class options}
\RequirePackage{lmodern}
\setFonttrue
\fi
\fi
\fi
\input{glyphtounicode}

View File

@ -43,10 +43,9 @@
% *****************************************************************************
% ******************* Fonts (like different typewriter fonts etc.)*************
%\renewcommand\rmdefault{psb}
% \usepackage{libertine} % Linux Libertine Font - no Math support
\ifsetFont
\else
\RequirePackage{lmodern} % LatinModern as Default with math (where possible)
\RequirePackage{libertine} % Set your custom font here and use `customfont' in options
\fi
% *****************************************************************************

View File

@ -177,9 +177,7 @@ You can run the following command:
# TODO list
* Support Libertine fonts and set the default font in the classfile
* Work on how to change the default option in bibliography
* Support Libertine fonts + Math
* Support custom margins

Binary file not shown.

View File

@ -1,4 +1,4 @@
\documentclass[a4paper,12pt,twoside,numbered,print,index]{Classes/PhDThesisPSnPDF}
\documentclass[a4paper,12pt,twoside,times,numbered,print,index]{Classes/PhDThesisPSnPDF}
% ********************************* Preamble **********************************
% Preamble: Contains packages and user-defined commands and settings