rjournal / rjtools

Tools for AUTHORS to use for checking and submitting articles to the R Journal
https://rjournal.github.io/rjtools/
Other
31 stars 14 forks source link

Some operators defined in RJournal.sty are not adjusted to the HTML ouput #52

Open bastienchassagnol-servier opened 1 year ago

bastienchassagnol-servier commented 1 year ago

The following operators defined in the style add-in file "RJournal.sty", defined as such:

`\renewcommand{\P}{% \mathop{\operator@font I\hspace{-1.5pt}P\hspace{.13pt}}}

\newcommand{\E}{% \mathop{\operator@font I\hspace{-1.5pt}E\hspace{.13pt}}}

\newcommand{\VAR}{\operatorname{var}}

\newcommand{\COV}{\operatorname{cov}}

\newcommand{\COR}{\operatorname{cor}} ` returns the expected result with the pdf output while not being properly defined with the HTML ouput, as illustrated below in the panel of two figures:

image image

Should we then work around the problem by defining our own operators? For instance, consider the following Rmd defined operator of the covariance: $\operatorname{var}(x)$ which actually returns the expected result in both HTML and pdf outputs:

image image