Skip to content

Commit

Permalink
fix: Use blue for links if enabled
Browse files Browse the repository at this point in the history
Remove deprecated/duplicated code in sa4ss.sty that was being
overwritten with the information in the sa4ss template that is called
when compiling the file. This uses information in the yaml header
to turn things on. The default colors for all types of links are now
blue, that is just regular blue as defined by latex so we do not have
to call the color package.

Thanks to @brianlangseth-NOAA for wanting to make colored links, which
made me look at this code.
  • Loading branch information
kellijohnson-NOAA committed Jul 6, 2023
1 parent 2940d43 commit 7bb30d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 22 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sa4ss
Title: Write Stock Assessments for Stock Synthesis
Version: 23.1
Version: 23.2
Authors@R: c(
person(c("Kelli", "F."), "Johnson", , "kelli.johnson@noaa.gov", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-5149-451X")),
Expand Down
8 changes: 4 additions & 4 deletions inst/rmarkdown/templates/sa/resources/sadraft.tex
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@
$endif$
$if(colorlinks)$
colorlinks=true,
linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$,
filecolor=$if(filecolor)$$filecolor$$else$Maroon$endif$,
citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$,
linkcolor=$if(linkcolor)$$linkcolor$$else$blue$endif$,
filecolor=$if(filecolor)$$filecolor$$else$blue$endif$,
citecolor=$if(citecolor)$$citecolor$$else$blue$endif$,
urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,
$else$
hidelinks,
$endif$
Expand Down
17 changes: 0 additions & 17 deletions inst/rmarkdown/templates/sa/skeleton/sa4ss.sty
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,8 @@
% floating
\RequirePackage{float}

% links - dark blue
% hyperxmp works with hyperref and must be loaded before it
\RequirePackage[hyphens]{url}
\RequirePackage[pagebackref]{hyperref}
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
\renewcommand{\backref}[1]{[p#1]}
\RequirePackage{color}
\definecolor{link}{rgb}{0.45,0.51,0.67}
\hypersetup{
colorlinks,
citecolor=link,
filecolor=link,
linkcolor=link,
urlcolor=link
}
% todo: fix this from tagged-article.md
% $if(colorlinks)$
% \PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor}
% $endif$

% Generate date formatted in english
\RequirePackage[english]{datetime2}
Expand Down

0 comments on commit 7bb30d8

Please sign in to comment.