Skip to content
Discussion options

You must be logged in to vote

Note that (as I learned yesterday from another quarto user), \newcommand does work. You just need to adjust your syntax:

---
format: revealjs
---

\newcommand\muy{\mu_y}

We use $\muy$ (@eq-muy) to denote the mean of the $y$ parameter:

$$\muy$$ {#eq-muy}

Specifically, I think the issue you're seeing (on top of raw latex not being emitted in html formats) is that in quarto, we typically don't use \begin{equation}, we use display math ($$) and regular crossreferences ({#eq-muy}).

If you're careful to use \newcommand outside math mode, then the markdown should be portable across formats. This way, you get the following slides by default:

while

$ quarto render test-muy.qmd --to pdf

genera…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

@cscheid
Comment options

@cscheid
Comment options

@cderv
Comment options

@martintburgess
Comment options

Answer selected by cscheid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
revealjs Issues with the revealjs format
4 participants