diff --git a/README.md b/README.md index 328bdc9..c158768 100644 --- a/README.md +++ b/README.md @@ -50,15 +50,16 @@ The `options` that can be added as a comma-separated list are: - `nocopyright`: disable the copyright notice on the title page. - `ragged`: use ragged right edge, rather than justified, text. Ragged text may may be better for accessibility. +- `bibstyle`: a valid [bibliiography style][4] (keyword argument). Defaults to + `phys` if not specified. +- `nohyperref`: disable hyperlinks in document. You should then ensure you have loaded and configured the packages you need for -writing your document. There are a couple things you need to be aware of to e +writing your document. There are a couple things you need to be aware of: - You must use `unicode-math` if you are using math. - Different graphics packages (such as `tikz` and `pgfplots` can also be used), but make sure you are using accessible colors. -- You can change the [bibliography style][4] to one appropriate to your - discipline using the `style` option to `biblatex`. If you would like to use other packages, you must make sure it is `compatible` with tagging. You can check the status of a large number of packages through diff --git a/authesis.cls b/authesis.cls index ace4fd7..e845eaa 100644 --- a/authesis.cls +++ b/authesis.cls @@ -53,6 +53,10 @@ \DeclareOptionX{bibstyle}[phys]{ \PassOptionsToPackage{style=#1}{biblatex} } +% Hyperlinks +\newif\ifusehyperref +\usehyperreftrue +\DeclareOptionX{nohyperref}{\usehyperreffalse} \ProcessOptionsX\relax % Default formatting @@ -66,6 +70,22 @@ \setlength{\parindent}{1.5em} \fi +% hyperlink formatting +\usepackage{xcolor} +\definecolor{hyperrefblue}{HTML}{3333ff} +\RequirePackage{hyperref} +\hypersetup{ + pdfusetitle, + bookmarksnumbered, + colorlinks=true, + allcolors=hyperrefblue, + linktoc=page +} +\ifusehyperref\else +\hypersetup{draft} +\fi +\urlstyle{same} + % Section header styles, modified from report.cls \def\@makechapterhead#1{% \vspace*{3\baselineskip}% diff --git a/main.tex b/main.tex index ea4375d..15e2018 100644 --- a/main.tex +++ b/main.tex @@ -13,7 +13,8 @@ % * thesis: Master's thesis rather than dissertation % * nocopyright: Disable copyright notice % * ragged: Use ragged right edge rather than justified text (better for accessibility) -% * bibstyle: biblatex bibliography style +% * bibstyle: biblatex bibliography style (keyword argument) +% * nohyperref: Disable hyperlinks \documentclass{authesis} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -35,8 +36,6 @@ % Set the bibliography style using the bibstyle option of the class. % Most other options can be changed here using % \ExecuteBibliographyOptions{} -\usepackage[hidelinks,pdfusetitle]{hyperref} -\urlstyle{same} \addbibresource{./references.bib} % Footnotes