wviechtb / mathjaxr

R package to make use of Mathjax in Rd files
47 stars 6 forks source link

Allow for one-argument versions of \mjeqn and \mjdeqn #2

Closed wviechtb closed 4 years ago

wviechtb commented 4 years ago

The \eqn and \deqn macros already available in R both work as double- and also as single-argument versions, that is, one can use \eqn{latex}{ascii} or \eqn{latexascii} (see: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Mathematics). It would be nice if \mjeqn and \mjdeqn could behave the same way (currently, they only work as double-argument macros).

wviechtb commented 4 years ago

User-defined macros do not allow for this flexibility. Instead, the package now provides single-argument macros \mjseqn{latexascii} and \mjsdeqn{latexascii}.