rstudio / pagedown

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

aside chunk behaviour/positioning #307

Open xvazquezc opened 1 year ago

xvazquezc commented 1 year ago

Hi there,

I've been working on my CV with pagedown for a while and I found out that the position of the ::: aside ::: chunks is quite unpredictable, or, at least, I wasn't able to find any docs providing a clear explanation about what to expect, other than it will appear on the side panel. In general, it seems that the aside chunk aligns with the first line after the h3, but it only really works if the aside contents are small.

For example, using the sample CV from the package, if I place the (large-ish) aside chunk after the Teaching heading or at the end of that section, the final position is the same

Screenshot from 2023-02-21 11-58-34

but if I place it between the two teaching experience entries, it appears way higher image

This seems to be corrected to some extent if the aside chunk is very short, although it will never appear associated with the headers/section titles. This is placing it right after the section header as before: image

In another note, if you want to use some header for easier formatting, the headers in the aside chunk, inherit the properties of #main image

and if you use h3, it also breaks the formatting of #main: image


As a couple of final notes, 1) I was trying to have an additional "Skills" section in the second page, but on top of the issues to the headers, I don't know if an specific chunk could be placed in a desired position, e.g. top. Any idea how could be done?

and 2) I'm not sure if this has to do anything with some of the behaviour of .aside, but while inspecting the CV code I found that the h2 sections inside #main seem to bleed into the side panel (it doesn't happen with h1 or h3 though): image

Any comments would be greatly appreciate.

Cheers, Xabi

cderv commented 1 year ago

I believe this is a change in Pandoc 2.8 that breaks the aside.

Pandoc 2.7.3 works as expected with this aside feature