-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add guidance for math #213
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @maelle,
Thanks for figuring this out! Locally I found that some of the examples rendered at html, so I played around and think I have some better options, let me know what you think!
Co-authored-by: Steffi LaZerte <[email protected]>
Thanks a lot @steffilazerte! Ok to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there was still something funny that I missed the first time, the output showed the pretty math then a line of non-pretty math
So if we just show (don't eval) the first block, then use output = "mathml" for the second (hidden) block, it works.
I think this must be the difference between the blog and the blog guide rendering...?
```{r} | ||
#| echo: fenced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```{r} | |
#| echo: fenced | |
```{{r}} |
\\end{aligned}" | ||
katex::katex_html(string) | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```{r, echo=FALSE} | |
string <- "\\begin{aligned} | |
x_t & \\sim N(-0.5 y_{t-1} + x_{t-1} + z_{t-1}, 0.3^2)\\\\ | |
y_t & \\sim N(0.7x_{t-1}, 0.3^2)\\\\ | |
\\end{aligned}" | |
katex::katex_html(string, output = "mathml") | |
``` | |
@steffilazerte oh right because the blog guide is Quarto... ok to not eval any chunk? |
Well we don't have to, but it was nice to have the math output as an example? |
as you prefer 😁 |
Fix #212