Skip to content
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
Closed

clashes with LaTeX color package #17

markvanderloo opened this issue Jun 25, 2018 · 5 comments

Comments

@markvanderloo
Copy link
Contributor

@markvanderloo 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
Copy link
Owner

@eddelbuettel 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
Copy link
Collaborator

@aaronwolen 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
Copy link
Contributor Author

@markvanderloo 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
Copy link
Contributor Author

@markvanderloo 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
fixed issue #17
@eddelbuettel
Copy link
Owner

@eddelbuettel 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants