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

Overruling at-page statement using default-page.css #41

Open
RLesur opened this issue Jan 1, 2019 · 0 comments
Open

Overruling at-page statement using default-page.css #41

RLesur opened this issue Jan 1, 2019 · 0 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@RLesur
Copy link
Collaborator

RLesur commented Jan 1, 2019

Paged.js takes into account only the first @page {...} statement it finds.

So, if the user wants to overrule the @page statement using a custom.css file, it is:

  • possible with html_paged(css = c('custom.css', 'default-page')
  • impossible with html_paged(css = c('default-page', 'custom.css')

This is a low priority bug but I'm unsatisfied by this behavior that violates the CSS precedence property.

I see two ways to modify this behavior:

  • isolate the @page statement in a specific CSS file that could be removed by the user.
  • include the @page statement in the pandoc template and create variables for paper size and margins (maybe the same as in the pandoc's default LaTeX template).

We also can wait for the bugfix in Paged.js.

@RLesur RLesur added the bug an unexpected problem or unintended behavior label May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant