diff --git a/index.Rmd b/index.Rmd index 02657d0..09826a6 100755 --- a/index.Rmd +++ b/index.Rmd @@ -77,6 +77,18 @@ natbib-bibliography-style: ACM-Reference-Format #or plainnat or some .bst file y ### correction highlighting ### corrections: true +### link highlighting ### +colored-not-bordered-links: true # true = highlight text of links - false = highlight links with border + +# Set the link text/bord coloring here, in RGB. +# Comment out a variable to just use whatever the text's existing color is. +# If you wish NOT to highlight links, set colored-not-bordered-links: true, +# and comment out the colors below +urlcolor-rgb: "0,0,139" +citecolor-rgb: "0,33,71" +# linkcolor-rgb: "0,33,71" # coloring normal links looks a bit excessive, as it highlights also all links in the table of contents + + ### binding / margins ### page-layout: nobind #'nobind' for equal margins (PDF output), 'twoside' for two-sided binding (mirror margins and blank pages), leave blank for one-sided binding (left margin > right margin) @@ -119,7 +131,6 @@ frontmatter-linespacing: 17pt plus1pt minus1pt #spacing in roman-numbered pages ### other stuff ### abstractseparate: false # include front page w/ abstract for examination schools? -hidelinks: true # false to highlight clickable links with a colored border includeline-num: false #show line numbering in PDF? diff --git a/templates/template.tex b/templates/template.tex index cea567d..534b85a 100755 --- a/templates/template.tex +++ b/templates/template.tex @@ -34,7 +34,38 @@ %%%%% ADDING LATEX PACKAGES % add hyperref package with options from YAML % -\usepackage[colorlinks=false,pdfpagelabels$if(hidelinks)$,hidelinks$endif$]{hyperref} +\usepackage[pdfpagelabels]{hyperref} +% change the default coloring of links to something sensible +\usepackage{xcolor} + +$if(linkcolor-rgb)$ +\definecolor{mylinkcolor}{RGB}{$linkcolor-rgb$} +$endif$ +$if(urlcolor-rgb)$ +\definecolor{myurlcolor}{RGB}{$urlcolor-rgb$} +$endif$ +$if(citecolor-rgb)$ +\definecolor{mycitecolor}{RGB}{$citecolor-rgb$} +$endif$ + +$if(colored-not-bordered-links)$ +\hypersetup{ + hidelinks, + colorlinks, + linkcolor=$if(linkcolor-rgb)$mylinkcolor$else$.$endif$, + urlcolor=$if(urlcolor-rgb)$myurlcolor$else$.$endif$, + citecolor=$if(citecolor-rgb)$mycitecolor$else$.$endif$ +} + +$else$ +\hypersetup{ + colorlinks=false, + linkbordercolor=$if(linkcolor-rgb)$mylinkcolor$else$.$endif$, + urlbordercolor=$if(urlcolor-rgb)$myurlcolor$else$.$endif$, + citebordercolor=$if(citecolor-rgb)$mycitecolor$else$.$endif$ +} +$endif$ + % add float package to allow manual control of figure positioning % \usepackage{float} @@ -44,7 +75,6 @@ % use soul package for correction highlighting \usepackage{color, soul} -\usepackage{xcolor} \definecolor{correctioncolor}{HTML}{CCCCFF} \sethlcolor{correctioncolor} \newcommand{\ctext}[3][RGB]{%