Skip to content

How do I get inline math to render in an html block? #10041

Answered by mcanouil
jbrick55 asked this question in Q&A
Discussion options

You must be logged in to vote

The thing is that you are putting plain markdown inside an HTML block that you ask to be treated as plain HTML. So you are basically saying, "I don't want Quarto/Pandoc setup for this block".
See for instance the MathJax documentation: https://docs.mathjax.org/en/latest/basic/mathematics.html#tex-and-latex-input

Overall, you should either write completely using HTML or use fenced divs, but definitely not mixing markups together.

Quarto document HTML
---
title: "Quarto Playground"
format: html
---

```{=html}
<button
  class="btn btn-outline-success collapsed"
  type="submit" data-bs-toggle="collapse"
  data-bs-target="#collapseExample3"
  aria-expanded="false"
  aria-controls="collapseEx…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@jbrick55
Comment options

@mcanouil
Comment options

@jbrick55
Comment options

@mcanouil
Comment options

Answer selected by jbrick55
@jbrick55
Comment options

@mcanouil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
html Issues with HTML and related web technology (html/css/scss) math any issue related to math support in specific formats
2 participants