biblatex check and lineno

This commit is contained in:
Krishna Kumar 2014-08-07 19:03:13 +01:00
parent c479d57fa9
commit 706804b20d
4 changed files with 41 additions and 12 deletions

View File

@ -82,7 +82,6 @@
options in case you have defined two bibliography styles.}
\else
\PHD@biblatextrue
\setBibtrue
\fi
}
@ -116,9 +115,15 @@
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\useCustomBibtrue
\setBibtrue
\else
\ifPHD@biblatex
\ClassWarning{PhDThesisPSnPDF}{Bibliography selection conflict: A
bibliography style aleady specified. Please check the document class
options in case you have defined two bibliography styles.}
\else
\useCustomBibtrue
\setBibtrue
\fi
\fi
}
@ -326,7 +331,31 @@ supported!}
\renewcommand{\frontmatter}{\nolinenumbers}
\renewcommand{\mainmatter}{\linenumbers}
\renewcommand{\backmatter}{\linenumbers}
\fi
% Fix display lineno issue in mathmode
\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
\renewenvironment{#1}%
{\linenomath\csname old#1\endcsname}%
{\csname oldend#1\endcsname\endlinenomath}%
}%
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
\patchAmsMathEnvironmentForLineno{#1}%
\patchAmsMathEnvironmentForLineno{#1*}%
}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}
\fi % End \ifPDH@lineno
% Creates a Watermark Draft at the specified location.

View File

@ -94,12 +94,12 @@
% 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
% \RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=true]{biblatex}
% \bibliography{References/references} %Location of references.bib only for biblatex
\RequirePackage[backend=biber, style=numeric-comp, citestyle=numeric, sorting=nty, natbib=true]{biblatex}
\bibliography{References/references} %Location of references.bib only for biblatex
\fi

Binary file not shown.

View File

@ -11,7 +11,7 @@
% ******************************* PhD Thesis Template **************************
% Please have a look at the README.md file for info on how to use the template
\documentclass[a4paper,12pt,times,numbered,print,index]{Classes/PhDThesisPSnPDF}
\documentclass[a4paper,12pt,biblatex,custombib,times,print,index]{Classes/PhDThesisPSnPDF}
% ******************************************************************************
% ******************************* Class Options ********************************
@ -166,10 +166,10 @@
% Bibliography style previews: http://nodonn.tipido.net/bibstyle.php
% Reference styles: http://sites.stat.psu.edu/~surajit/present/bib.htm
\bibliographystyle{apalike}
%\bibliographystyle{apalike}
%\bibliographystyle{plainnat} % use this to have URLs listed in References
\cleardoublepage
\bibliography{References/references} % Path to your References.bib file
%\bibliography{References/references} % Path to your References.bib file
% If you would like to use BibLaTeX for your references, pass `custombib' as
@ -177,7 +177,7 @@
% specified in the preamble.tex file in the custombib section.
% Comment out the lines related to natbib above and uncomment the following line.
% \printbibliography[heading=bibintoc, title={References}]
\printbibliography[heading=bibintoc, title={References}]
\end{spacing}