New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clashes with LaTeX color package #17

Closed
markvanderloo opened this Issue Jun 25, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@markvanderloo
Copy link
Contributor

markvanderloo commented Jun 25, 2018

This took me a while to find out, so maybe it can be documented somewhere?

If you use

letterhead: /some/file.jpg

rendering the file will give you a LaTeX option clash, because the color package will be included twice: once because knitr already includes the mdframes package, and once just before the wallpaper package is loaded.

However, if you also include the option

colorlinks: true

it all runs fine.

I can do a PR but not sure where you want to put it: in the README and/or under ?linl

@eddelbuettel

This comment has been minimized.

Copy link
Owner

eddelbuettel commented Jun 25, 2018

Hm I think @aaronwolen or I have not encountered that.

Can you post a minimal example exhibiting this? Also, I may even be in favour of turning colorlinks: true on as a default, ie further down the stack making the option redundant. In other words, why have black links in pdf in the first place?

Thoughts?

@aaronwolen

This comment has been minimized.

Copy link
Collaborator

aaronwolen commented Jun 25, 2018

Thanks for reporting! I was able to reproduce the error and agree the clash is caused by wallpaper loading the color package. I'll try to dig into this later this week. Also happy to review a PR!

(@eddelbuettel — you are too damn quick! 😉)

@markvanderloo

This comment has been minimized.

Copy link
Contributor

markvanderloo commented Jun 25, 2018

Ok, I think that this line is the culprit. If you remove the second line in this snippet of the template:

$if(letterhead)$
\usepackage[dvipsnames]{color}
\usepackage{wallpaper}
\ThisULCornerWallPaper{1}{$letterhead$}
$endif$

All works. Not sure what else could go wrong. I don't know what this option is for. I created a fork with an update. I'll send a PR so you can evaluate it better.

@markvanderloo

This comment has been minimized.

Copy link
Contributor

markvanderloo commented Jun 25, 2018

@eddelbuettel I wouldn't be in favour of removing the colorlinks option completely the default setting is not so important for me. I like at least the references in plain black (the hyperref defaults are terrible). OTOH these are letters: probably no references needed..

eddelbuettel added a commit that referenced this issue Jun 25, 2018

@eddelbuettel

This comment has been minimized.

Copy link
Owner

eddelbuettel commented Jun 26, 2018

Now merged (with minor cleanups) so closing. Thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment