quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.74k stars 305 forks source link

Math in dashboard card titles ignores position in title #10340

Open e-miz opened 1 month ago

e-miz commented 1 month ago

Bug description

Last dashboard issue today, I promise!

image

Inline math in a dashboard card title seems to come after all words in the title.

Inspecting the output shows something's probably gone wrong with the placement of the inline math div:

image

I'm not actually sure how to come up with a workaround for this one, but I can also probably live without math in my card titles.

Steps to reproduce

---
title: "Test Dashboard"
format: dashboard
---

##
::: {.card title="Math $y=mx+b$ between words"}

Math $y=mx+b$ between words

:::

Expected behavior

No response

Actual behavior

No response

Your environment

IDE: VSCode 1.91.1 OS: Windows 10 WSL2

Quarto check output

Quarto 1.5.55
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.55
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2023.10
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/emiz/.TinyTeX/bin/x86_64-linux
      Version: 2023

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.7 (Conda)
      Path: /home/emiz/miniconda3/bin/python
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
mcanouil commented 1 month ago

What if you try without the attribute syntax?

::: {.card}
## Math $y=mx+b$ between words

Math $y=mx+b$ between words
:::
cscheid commented 1 month ago

(incidentally, please keep the issues coming!)

cscheid commented 1 month ago

What if you try without the attribute syntax?

::: {.card}
## Math $y=mx+b$ between words

Math $y=mx+b$ between words
:::

This doesn't work even without math, Quarto doesn't turn the heading into a title:

image
mcanouil commented 1 month ago

Seems inconsistent compared to other div features such as call-outs. I would have swear it was a thing 😅

cscheid commented 1 month ago

Seems inconsistent compared to other div features such as call-outs.

Agreed.