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

MathJax in emails #254

Open
dmi3kno opened this issue Mar 14, 2021 · 5 comments · May be fixed by #298
Open

MathJax in emails #254

dmi3kno opened this issue Mar 14, 2021 · 5 comments · May be fixed by #298

Comments

@dmi3kno
Copy link

dmi3kno commented Mar 14, 2021

Hi,
Thank you for the package! This has a promise of making scientific emailing easy and enjoyable!
I am trying to incorporate math formulas into my emails and I understand that it is turned off (mathjax=null) in the template. I tried turning it on (mathjax="default") and then rmarkdown complains

#> Warning message:
#> MathJax doesn't work with self_contained when not using the rmarkdown "default" template. 

There's this closed issue in rmarkdown that suggests it should be possible to work around the default template limitation. One solution could be to start blastula template from "default" and subsequently modify it into the form envisaged by the package. I tried supplying the "default" template argument, but of course I just get an unreadable wall of text instead of an email.

Did you ever look into what it would take to enable mathjax in blastula? Can we at least catch the equation tags, created by $mathjax$ and change the font to Serif?

@cderv
Copy link
Collaborator

cderv commented Mar 14, 2021

For reference, the issue mentioned above is : rstudio/rmarkdown#727

Some improvement needs to be done in rmarkdown regarding math support, to follow Pandoc updates on this. It is possible that this can help with self-contained document and remove the constraint. So maybe help for blastula ? I don't really know if a lib like mathjax can work inside email though... 🤔

Anyway, happy to think about it if things need to be done in rmarkdown.

@dmi3kno
Copy link
Author

dmi3kno commented Feb 8, 2023

The main reason I use blastula is to send academic emails and they are sort of useless without math. Could we please brainstorm how it could be possible to create a self-contained document with mathjax, please?

@cderv
Copy link
Collaborator

cderv commented Feb 8, 2023

@rich-iannone I think we can make time for that in the coming weeks. Don't you think ?

@cderv cderv moved this from Backlog to To discuss / To plan in R Markdown Team Projects Feb 8, 2023
@cderv cderv linked a pull request Feb 8, 2023 that will close this issue
@cderv
Copy link
Collaborator

cderv commented Feb 8, 2023

@dmi3kno you can try the PR

pak::pak("rstudio/blastula@math-support")

This is a POC of what is really easy to do to bring support in a rmarkdown format. I don't know at all if that works good for email at the end.

As you'll see in PR description there is a second solution possible - if that is supported for email. This require testing as it would require inserting a CSS inline if possible.

Anyway, thanks for pinging us again - this motivate me to make a quick try.

@rich-iannone
Copy link
Member

Thanks @cderv for this work! It's looking really good so far in the PR. I will test it out with live emails (I can show you some of this in a meeting).

@cderv cderv moved this from To discuss / To plan to Backlog in R Markdown Team Projects Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

3 participants