Pinpbluetext is Red-ish; shouldn't it be blue?
Closed this issue · 4 comments
Hi,
By default links are colored in RGB{101,0,0}
(or #650000
), which is crimson red or something.
Shouldn't it be blueish ? The color name is pinpbluetext
.
I've changed it locally to RGB{0,0,101}
(or #000065
) and it looks nice, and seems to reflect PNAS color codes.
Many thanks for pinp; I use it almost daily!
(EDIT: I realize that github automatically adds a little color next to the HTML color code, which is pretty cool.)
Hm. When I do (per the package README.md
, and all on one line her broken)
Rscript -e 'library(rmarkdown); \
draft("quickcheck.Rmd", template="pdf", package="pinp", edit=FALSE); \
render("quickcheck.Rmd")
the indeed links are red. I think they always have been per the style we inherited from PNAS. Do you remember, @coatless ?
Yet:
edd@rob:/tmp/pinptest$ grep pnasbluetext *
pinp.cls:\definecolor{pnasbluetext}{RGB}{0,101,165} %
pinp.cls:\RequirePackage[colorlinks=true, allcolors=pnasbluetext]{hyperref}
pinp.cls:\renewcommand\UrlFont{\color{pnasbluetext}\sffamily}
pinp.cls:%\definecolor{pnasbluetext}{RGB}{0,101,165} %
pinp.cls:%\definecolor{pnasbluetext}{RGB}{0,115,209} % Not used
pinp.cls:\mdfdefinestyle{pnassigstyle}{linewidth=0.7pt,backgroundcolor=pnasblueback,linecolor=pnasbluetext,fontcolor=pnasbluetext,innertopmargin=6pt,innerrightmargin=6pt,innerbottommargin=6pt,innerleftmargin=6pt}
grep: quickcheck_cache: Is a directory
grep: quickcheck_files: Is a directory
quickcheck.tex:\definecolor{pnasbluetext}{RGB}{101,0,0} %
edd@rob:/tmp/pinptest$
it seems we want a value from the cls file to win but we loose to something that comes from the template file.
Looking at template.tex
the full segment is actually
pinp/inst/rmarkdown/templates/pdf/resources/template.tex
Lines 26 to 30 in 62fef2b
so the key is to have linkcolor
defined. So when I add
linkcolor: 000065
to the YAML header it works (and that is what the manual page suggests).
So I think you convinced that the code (I just quoted) is wrong and needs a different alternate value.
And yes that GitHub shows the color is very cool :)
So I just fixed that in the commit referenced above. Comments welcome: @coatless @ikashnitsky
Well thanks, that was fast ;)
Hitting me at first morning coffee is apparently an effective strategy :)