diff --git a/MLS.tex b/MLS.tex index 2bcb681a2..606d9b4f2 100644 --- a/MLS.tex +++ b/MLS.tex @@ -2,7 +2,9 @@ \NeedsTeXFormat{LaTeX2e} \usepackage[utf8]{inputenc} \input{preamble.tex} +\ifpdf \addbibresource{mls.bib} +\fi % Define title for use by LaTeXML. % An extended title is defined separately in the 'titlepage'. @@ -168,5 +170,9 @@ \clearpage\phantomsection \addcontentsline{toc}{chapter}{\bibname} +\ifpdf \printbibliography +\else +\bibliography{mls} +\fi \end{document} diff --git a/preamble.tex b/preamble.tex index ba28b7420..209b849f7 100644 --- a/preamble.tex +++ b/preamble.tex @@ -77,17 +77,30 @@ \setcounter{totalnumber}{1000} \raggedbottom +\ifpdf \usepackage{hyperref} +\else +\usepackage[backref=page]{hyperref} % Need backref, since we can't use biblatex. +\fi % The bookmarks are used as table-of-contents in Acrobat % The default (magenta for urls and red for internal links) isn't nice \hypersetup{bookmarksnumbered=true, hidelinks, urlcolor=blue, linkcolor=blue} +\ifpdf \usepackage[ style=authoryear, backref=true, - maxnames=6, + maxnames=6 ]{biblatex} \setlength\bibitemsep{0.5\baselineskip} +\else +% Use BibTeX due to LaTeXML problems with biblatex. +\usepackage[round,authoryear]{natbib} +\bibliographystyle{plainnat} +% Define macro aliases with the names used by bibliatex: +\let\textcite\citet +\let\parencite\citep +\fi \usepackage{multirow} % for multirow entries in tables