Bibliography custom and pre-defined in cls file
This commit is contained in:
parent
6c5ea5de97
commit
49ad0f49db
@ -25,20 +25,32 @@
|
||||
\DeclareOption{report}{\CU@bookmodefalse}
|
||||
\DeclareOption{book}{\CU@bookmodetrue}
|
||||
|
||||
% ****************** Define a Print/Online Version ******************
|
||||
% ****************** Define a Print/Online Version **************
|
||||
\newif\if@print\@printfalse
|
||||
\DeclareOption{print}{\@printtrue}
|
||||
|
||||
% ************************** Define index ************************
|
||||
% ************************** Define index ***********************
|
||||
\newif\ifCU@index\CU@indexfalse
|
||||
\DeclareOption{index}{\CU@indextrue}
|
||||
|
||||
% ************************** Font Option *************************
|
||||
\newif\ifFontNotSet\FontNotSetfalse % Font is not set
|
||||
% ************************** Font Option ************************
|
||||
\newif\ifsetFont\setFontfalse % Font is not set
|
||||
|
||||
\newif\ifCU@times\CU@timesfalse % Times with Math Support
|
||||
\DeclareOption{times}{\CU@timestrue}
|
||||
|
||||
% ************************** Bibliography ***********************
|
||||
\newif\ifsetBib\setBibfalse % Using Custom Bibliography
|
||||
|
||||
\newif\ifCU@authoryear\CU@authoryearfalse % Author-Year citation
|
||||
\DeclareOption{authoryear}{\CU@authoryeartrue}
|
||||
|
||||
\newif\ifCU@numbered\CU@numberedfalse % Numbered citiation
|
||||
\DeclareOption{numbered}{\CU@numberedtrue}
|
||||
|
||||
\newif\ifCU@custombib\CU@custombibfalse % Custom Bibliography
|
||||
\DeclareOption{custombib}{\CU@custombibtrue}
|
||||
|
||||
\ProcessOptions\relax%
|
||||
|
||||
\ifCU@bookmode
|
||||
@ -178,6 +190,26 @@
|
||||
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
|
||||
\urlstyle{leo}
|
||||
|
||||
% ********************************** Bibliography *******************************
|
||||
\ifCU@authoryear
|
||||
\RequirePackage[round, sort, numbers, authoryear]{natbib} %author year
|
||||
\setBibtrue
|
||||
\else
|
||||
\ifCU@numbered
|
||||
\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
|
||||
\setBibtrue
|
||||
\else
|
||||
\ifCU@custombib
|
||||
\setBibfalse
|
||||
\else
|
||||
\RequirePackage[numbers,sort&compress]{natbib} % Default - numbered
|
||||
\setBibtrue
|
||||
% Generate a warning message here
|
||||
\fi
|
||||
\fi
|
||||
\fi
|
||||
|
||||
|
||||
|
||||
% *************************** To copy ligatures and Fonts ***********************
|
||||
\RequirePackage{textcomp}
|
||||
@ -187,9 +219,9 @@
|
||||
% Font Selection
|
||||
\ifCU@times
|
||||
\RequirePackage{mathptmx} % times roman, including math (where possible)
|
||||
\FontNotSetfalse
|
||||
\setFontfalse
|
||||
\else
|
||||
\FontNotSettrue
|
||||
\setFonttrue
|
||||
\fi
|
||||
|
||||
\input{glyphtounicode}
|
||||
|
@ -44,15 +44,18 @@
|
||||
% ******************* Fonts (like different typewriter fonts etc.)*************
|
||||
%\renewcommand\rmdefault{psb}
|
||||
% \usepackage{libertine} % Linux Libertine Font - no Math support
|
||||
\ifFontNotSet
|
||||
\ifsetFont
|
||||
\else
|
||||
\RequirePackage{lmodern} % LatinModern as Default with math (where possible)
|
||||
\fi
|
||||
|
||||
% *****************************************************************************
|
||||
% *************************** Bibliography and References ********************
|
||||
\usepackage{cleveref} %Referencing without need to explicitly state fig /table
|
||||
\ifsetBib % True it's already set do nothing
|
||||
\else % custom bibliography style chosen so enter bibstyle here
|
||||
\RequirePackage[square, sort, numbers, authoryear]{natbib} %author year
|
||||
%\RequirePackage[numbers,sort&compress]{natbib} % numbered citation
|
||||
\fi
|
||||
|
||||
|
||||
|
||||
|
19
README.md
19
README.md
@ -69,6 +69,18 @@ It also supports some custom options:
|
||||
|
||||
* `default (empty)`: When no font is specified, `Latin Modern` is used as the default font with Math Support. The default font is set in preamble with the following condition `ifFontNotSet` is True then default is set as `Latin Modern`. User can change this default font in the preamble.
|
||||
|
||||
### 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
|
||||
|
||||
* `authoryear`: For author-year citation eg., Krishna (2013)
|
||||
|
||||
* `numbered`: (Default Option) For numbered and sorted citation e.g., [1,5,2]
|
||||
|
||||
* `custombib`: Define your own bibliography style in the `preamble.tex` file.
|
||||
`\RequirePackage[square, sort, numbers, authoryear]{natbib}`
|
||||
|
||||
|
||||
## Custom Settings
|
||||
|
||||
* The depth of table of contents can be set using:
|
||||
@ -159,11 +171,16 @@ You can run the following command:
|
||||
|
||||
# Known Issue(s) / Bugs
|
||||
|
||||
* No known bugs. Let me know, if you find any!
|
||||
* No know bug(s) so far. If you find any let me know or even better if you can patch it and contribute to the development of the LaTeX Template
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# TODO list
|
||||
|
||||
* Support Libertine fonts and set the default font in the classfile
|
||||
|
||||
* Work on how to change the default option in bibliography
|
||||
|
||||
* Support custom margins
|
||||
|
||||
* Support custom headers
|
||||
|
BIN
thesis.pdf
BIN
thesis.pdf
Binary file not shown.
Loading…
Reference in New Issue
Block a user