-
Notifications
You must be signed in to change notification settings - Fork 61
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
Math markup #55
Comments
Could you post a minimally reproducible example of an Rmd that does not work as expected. Both knitrBootstrap and normal Rmarkdown use Mathjax to render mathematical symbols, so I am not sure why you are seeing a difference without an example. Thanks! |
output: theme.chooser: TRUECalibration and inversion regressionThe most commonly recommended method for calibration is least squares (non-)linear regression (using a data set consisting of calibrators of known concentration and their signal readings) followed by calculation of the unknown sample concentrations from the inverse of the estimated function. This is sometimes called inverse regression, but note that the inverse function is not being directly estimated. Common calibration curve models. See below for parameter definitions:
Note: In our R scripts, we will use more descriptive labels for the parameters of the logistic models than used by Dunn and Wild or Findlay. These will serve as a memory aid, but also single letter labels are at high risk of being confused with or replaced by a data set or temporary variable.
Thanks! |
From http://docs.mathjax.org/en/latest/start.html#tex-and-latex-input it states that the default escape for Tex math in MathJax is |
Thanks, that solves the problem in some parts. (BTW, thank you for the package. The source toggle is brilliant!) render() does accept inline equations using $ ... $, however. It produces a more compact table. I tried it using the 'Knit' button with and without your YAML block to reduce any possible variability from my side. Here is the .Rmd:
Here is the relevant html portion using knitrBootstrap (i.e. 'Knit' with the YAML block):
Here is the html using the default settings (i.e. 'Knit' without the YAML block):
In the table, for some reason the first cell is parsed differently than the other cells. In the paragraph, the equation blocks end up as left-justified regular italics instead of centered in MathJax style. |
The inline I should probably set that option as well so that the syntax is compatible, thanks for the report! |
There are some other gotchas with inline math using MathJax. Since a single '$' often appears in not-math-typesetting contexts, some versions of MathJax don't acknowledge it as a signal to start typesetting an inline equation. Usually one of |
If I use the regular style of
And indeed the equations are not printed. If I use two $ as suggested above, then the equation become centered and I cannot use them with text in between or inline anymore. Is there a way for me to fix this? Because other than that, knitr bootstrap look very nice. the only other things that does not work is bibtex citations but for my website this is not (yet so important) but I cannot use it if latex equations are not rendered correctly. If you know how I could fix this @jimhester , please give me a hint. Some equations seems to work for reasons I do not understand, e.g. this works even though it is embedded similar to the other latex equations. Thanks jimhester for the package! |
I noticed certain texmath entries in .Rmd docs are being marked up differently in knitrBootstrap than in RStudio's HTML parser (correct term?):
knitrBootstrap: .... (lots of these)
Rstudio's HTML: (.....) (the usual mathjax notation)
I'm getting better results with the second syntax; a table filled with equations renders properly with RStudio's knit button, but not with knitrBootstrap (specified with YAML block). Would it be possible to use the same markup in knitrBootstrap as in RStudio's HTML method for math?
The text was updated successfully, but these errors were encountered: