custombib with error catcher
This commit is contained in:
parent
1a530a2057
commit
1154f0e460
@ -365,28 +365,42 @@ supported!}
|
||||
\ClassWarning{PhDThesisPSnPDF}{Bibliography has already been loaded.
|
||||
Check document class options.}
|
||||
\else % Load Custombib from preamble
|
||||
\message{custombib option is chosen}
|
||||
\useCustomBibtrue
|
||||
\setBibtrue % Need to evaluate is bibliography is loaded
|
||||
\AtBeginDocument{
|
||||
\@ifpackageloaded{natbib}{true}{
|
||||
\@ifpackageloaded{biblatex}{true}{
|
||||
\ClassWarning{PhDThesisPSnPDF}{%
|
||||
Custom bibliography is chosen, but no corresponding package
|
||||
(biblatex/natbib) has been loaded. Please load the
|
||||
appropriate bibliography package in the preamble.}
|
||||
}
|
||||
}
|
||||
}
|
||||
\setBibtrue
|
||||
\fi
|
||||
\else % set default to numbered
|
||||
\message{custombib option is NOT chosen}
|
||||
\ifPHD@biblatex
|
||||
\RequirePackage[backend=biber, style=numeric-comp,
|
||||
citestyle=numeric, sorting=none, natbib=true]{biblatex}
|
||||
\setBiBLaTeXtrue
|
||||
\setBiBLaTeXfalse
|
||||
\else
|
||||
\RequirePackage[numbers,sort&compress]{natbib}
|
||||
\fi
|
||||
\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 natbib package or
|
||||
biblatex package with required style in the Preamble.tex file}
|
||||
\setBibfalse
|
||||
\fi % custombib
|
||||
\fi % numbered
|
||||
\fi % author year
|
||||
|
||||
|
||||
\ifsetBib
|
||||
\else
|
||||
\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 natbib package or
|
||||
biblatex package with required style in the Preamble.tex file}
|
||||
\fi
|
||||
|
||||
% *********************** To copy ligatures and Fonts **************************
|
||||
\RequirePackage{textcomp}
|
||||
|
@ -5,8 +5,8 @@
|
||||
% Set {innerside margin / outerside margin / topmargin / bottom margin} and
|
||||
% other page dimensions
|
||||
\ifsetCustomMargin
|
||||
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
|
||||
\setFancyHdr % To apply fancy header after geometry package is loaded
|
||||
\RequirePackage[left=37mm,right=30mm,top=35mm,bottom=30mm]{geometry}
|
||||
\setFancyHdr % To apply fancy header after geometry package is loaded
|
||||
\fi
|
||||
|
||||
% *****************************************************************************
|
||||
@ -15,9 +15,9 @@
|
||||
% Add `customfont' in the document class option to use this section
|
||||
|
||||
\ifsetCustomFont
|
||||
% Set your custom font here and use `customfont' in options. Leave empty to
|
||||
% load computer modern font (default LaTeX font).
|
||||
\RequirePackage{libertine}
|
||||
% Set your custom font here and use `customfont' in options. Leave empty to
|
||||
% load computer modern font (default LaTeX font).
|
||||
\RequirePackage{libertine}
|
||||
\fi
|
||||
|
||||
% *****************************************************************************
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
% Add `custombib' in the document class option to use this section
|
||||
\ifuseCustomBib
|
||||
\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
||||
%\RequirePackage[square, sort, numbers, authoryear]{natbib} % CustomBib
|
||||
|
||||
% If you would like to use biblatex for your reference management, as opposed to the default `natbibpackage` pass the option `custombib` in the document class. Comment out the previous line to make sure you don't load the natbib package. Uncomment the following lines and specify the location of references.bib file
|
||||
|
||||
|
BIN
thesis.pdf
BIN
thesis.pdf
Binary file not shown.
Loading…
Reference in New Issue
Block a user