Skip to content

How to override format: html: cap-location: margin #1211

@jjallaire

Description

@jjallaire

Discussed in #1172

Originally posted by harrelfe June 17, 2022
I specify cap-location: margin in my Quarto book yaml. For the few figures that have multiple panels this causes the figures to no longer be rendered in a matrix but rather as larger individual plots. Is there a way to override cap-location for one code chunk? Here's some test code:


title: "Test"
format:
html:
self-contained: true
cap-location: margin

#| label: fig-test
#| fig.width: 8
#| fig.height: 8
#| fig.scap: 'Four examples of residual plots'
#| fig.cap: 'Using residuals to check some of the assumptions of the simple linear regression model.'
#| fig-subcap:
#|   - "Non-constant $\\sigma^2$, which might call for transforming $y$"
#|   - "Constant $\\sigma^2$ but systemic failure of the linearity assumption"
#|   - "Ideal situation of white noise (no trend, constant variance)"
#|   - "$q-q$ plot demonstrating approximate normality of residuals, for a sample of size $n=50$.  Horizontal reference lines are at zero, which is by definition the mean of all residuals."
#| layout-ncol: 2
plot(rnorm(20)); plot(runif(20)); hist(rnorm(100)); hist(rexp(100))

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions