rstudio / pagedown

Paginate the HTML Output of R Markdown with CSS for Print
https://pagedown.rbind.io
Other
892 stars 128 forks source link

Tiny gaps between coloured blocks #258

Open datawookie opened 2 years ago

datawookie commented 2 years ago

Hi!

Thank you for the {pagedown} package. It has transformed many of my workflows.

I rather like templates that include a large coloured margin on one or more sides of the document. However, when I view the resulting PDF there appears to be a fine white line between the various regions (for example, between @bottom-left and @bottom-left-corner). See screenshot below for example.

I suspect that this is a paged.js issues rather than a {pagedown} one, but I was wondering if you have any insight into how I could close these gaps? It's not a fatal problem, but it does detract slightly from the otherwise flawless output.

Thanks, Andrew.

image

cderv commented 2 years ago

Hi,

Maybe my fellow collaborators will know more, but on my side, I would like to be able to reproduce to try understand what those lines are.

Can you share a reproducible example on how you create those borders in a template ? Thanks!

datawookie commented 2 years ago

Hi @cderv, thanks for getting back to me so swiftly. No problem. I've created a repository here. I tried to strip everything down to the bare minimum. Run the render.R script to generate the PDF output. I've included two examples in the repository. Interestingly these differ only in the way that the CSS file is included:

I have no idea why this would make a difference, but it might be an important clue.

Please let me know if you need more information or if you'd like me to try anything out.