jackyzha0 / quartz

🌱 a fast, batteries-included static-site generator that transforms Markdown content into fully functional websites
https://quartz.jzhao.xyz
MIT License
6.69k stars 2.45k forks source link

Heading and LaTeX in callout title not displayed correctly #1275

Open eikowagenknecht opened 2 months ago

eikowagenknecht commented 2 months ago

Describe the bug

> [!quote] Callout with `code`, **emphasis** and a formula in the title: $\frac{\sqrt{k}}{A \cdot B}$
> Callout content with `more code` and another formula: $\frac{\sqrt{k}}{A \cdot B}$

> [!quote] ## Heading 2 in a callout
> Callout content with `more code` and another formula: $\frac{\sqrt{k}}{A \cdot B}$

Result: grafik

To Reproduce Use above markdown, see rendering

Expected behavior Like Obsidian renders it:

grafik

Screenshots and Source See above

Desktop (please complete the following information):

jcdiv47 commented 3 weeks ago
  1. On my side I actually was able to properly render a LaTeX formula in callout title with the exact code you provided. Not really sure if it matters, but I am using KaTeX to render.

screenshot-20240823-105001

  1. For a heading in callout title, I think a workaround is to use HTML tags, i.e.,
> [!quote] <h2>Heading 2 in a callout</h2>

renders

screenshot-20240823-105037