We’ve just a made a change to the syntax for embedding MathJax equations in R Markdown documents. The change was made to eliminate some parsing ambiguities and to support future extensibility to additional formats.

The revised syntax adds a “latex” qualifier to the $ or $$ equation begin delimiter. It looks like this:

This change was the result of a few considerations:

- Some users encountered situations where the $
*<equation>*$ syntax recognized standard text as an equation. There was an escape sequence (\$) to avoid this but for users not explicitly aware of MathJax semantics this was too hard to discover.
- The requirement to have no space between equation delimiters ($) and the equation body (intended to reduce parsing ambiguity) was also confusing for users.
- We want to eventually support ASCIIMath and for this will require an additional qualifier to indicate the equation format.

RStudio v0.96.227 implements the new MathJax syntax and is available for download now.

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** RStudio Blog**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** News