Skip to content

Keep the paired README plots side by side on the pkgdown site#104

Merged
kassambara merged 1 commit into
masterfrom
docs/readme-side-by-side
Jul 10, 2026
Merged

Keep the paired README plots side by side on the pkgdown site#104
kassambara merged 1 commit into
masterfrom
docs/readme-side-by-side

Conversation

@kassambara

Copy link
Copy Markdown
Owner

The README paired-plot chunks (fig.show = hold, out.width = 49%) inherited the global fig.align = center, so knitr tagged each image with style display: block; margin: auto. GitHub strips inline styles, so on GitHub the images stay inline and sit side by side; the pkgdown site keeps the style and stacks them vertically.

Setting fig.align = default on those five chunks (basic, boxed, cluster, triangle, insig) drops the display: block, so the paired plots render side by side in both renderers. Single-figure chunks are untouched and stay centered. Only the style attribute changes in README.md; the figures themselves are unchanged.

The side-by-side chunks set out.width = "49%" with fig.show = "hold", but
inherited the global fig.align = "center", so knitr tagged each image
display: block. GitHub strips the inline style (images stay inline, side by
side), but pkgdown keeps it and stacks them. Set fig.align = "default" on
those chunks so the paired plots sit side by side in both renderers.
@kassambara kassambara merged commit 1addb13 into master Jul 10, 2026
5 checks passed
@kassambara kassambara deleted the docs/readme-side-by-side branch July 10, 2026 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant