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

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

Closed
dragonstyle opened this issue Jun 17, 2022 Discussed in #1172 · 0 comments
Closed

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

dragonstyle opened this issue Jun 17, 2022 Discussed in #1172 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dragonstyle
Copy link
Collaborator

dragonstyle commented Jun 17, 2022

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
---


```{r}
#| 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))
```

@dragonstyle dragonstyle self-assigned this Jun 17, 2022
@jjallaire jjallaire added this to the Future milestone Jun 21, 2022
@dragonstyle dragonstyle modified the milestones: Future, v1.3 Sep 9, 2022
@dragonstyle dragonstyle added the bug Something isn't working label Mar 1, 2023
@dragonstyle dragonstyle modified the milestones: v1.3, v1.4 Mar 2, 2023
dragonstyle added a commit that referenced this issue Dec 13, 2023
Last bit of fix to #1173

@cscheid already did all the heavy liftin to fix all this in his work on float refs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants