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

layout-valign only emits top in HTML #7002

Closed
andrewheiss opened this issue Sep 26, 2023 · 1 comment · Fixed by #7010
Closed

layout-valign only emits top in HTML #7002

andrewheiss opened this issue Sep 26, 2023 · 1 comment · Fixed by #7010
Assignees
Labels
bug Something isn't working knitr
Milestone

Comments

@andrewheiss
Copy link

Bug description

layout-valign will create a div with the class quarto-layout-valign-top regardless of the option passed to it.

Steps to reproduce

This generates the same HTML output with layout-valign: bottom, layout-valign: top and layout-valign: center:

---
title: Layout test
---

```{r}
#| label: fig-charts
#| fig-cap: 
#|   - "Speed and Stopping Distances of Cars"
#|   - "Vapor Pressure of Mercury as a Function of Temperature"
#| layout: "[1, 1]"
#| layout-valign: bottom

plot(cars)
plot(pressure)
```

Expected behavior

A div with the class quarto-layout-valign-top, quarto-layout-valign-bottom or quarto-layout-valign-center should be generated.

Actual behavior

This is generated regardless of the layout-valign option:

<div class="cell quarto-layout-panel" data-layout="[1, 1]">
  <div class="quarto-layout-row quarto-layout-valign-top">

Your environment

  • IDE: RStudio 2023.06.2+561
  • OS: macOS Ventura 13.5.2

Quarto check output

Quarto 1.4.382
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.8: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.382
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2022.08
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/andrew/Library/TinyTeX/bin/universal-darwin
      Version: 2022

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.3
      Path: /opt/homebrew/opt/python@3.11/bin/python3.11
      Jupyter: 5.3.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.1
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
      knitr: 1.44
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK
@andrewheiss andrewheiss added the bug Something isn't working label Sep 26, 2023
@cderv
Copy link
Collaborator

cderv commented Sep 26, 2023

Thanks for the report.
It seems that the in-chunk options is not passed to the Markdown output by knitr

::: {.cell layout="[1, 1]"}

```{.r .cell-code}
plot(cars)
plot(pressure)
```

::: {.cell-output-display}
![Speed and Stopping Distances of Cars](test2_files/figure-html/fig-charts-1.png){#fig-charts-1 width=672}
:::

::: {.cell-output-display}
![Vapor Pressure of Mercury as a Function of Temperature](test2_files/figure-html/fig-charts-2.png){#fig-charts-2 width=672}
:::
:::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working knitr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants