Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add guidance for math #213

wants to merge 4 commits into from

Conversation

maelle
Copy link
Collaborator

@maelle maelle commented Jan 26, 2023

Fix #212

@maelle maelle requested a review from steffilazerte January 26, 2023 12:57
Copy link
Collaborator

@steffilazerte steffilazerte left a 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!

authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
authortechnical.Rmd Outdated Show resolved Hide resolved
@maelle
Copy link
Collaborator Author

maelle commented Jun 12, 2023

Thanks a lot @steffilazerte! Ok to merge?

Copy link
Collaborator

@steffilazerte steffilazerte left a 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

image

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...?

Comment on lines +410 to +411
```{r}
#| echo: fenced
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```{r}
#| echo: fenced
```{{r}}

\\end{aligned}"
katex::katex_html(string)
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```{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")
```

@maelle
Copy link
Collaborator Author

maelle commented Jun 13, 2023

@steffilazerte oh right because the blog guide is Quarto... ok to not eval any chunk?

@steffilazerte
Copy link
Collaborator

Well we don't have to, but it was nice to have the math output as an example?

@maelle
Copy link
Collaborator Author

maelle commented Jun 15, 2023

as you prefer 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add math guidance
2 participants