-
-
Notifications
You must be signed in to change notification settings - Fork 147
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 symbols in add_header_above escaped when rjtools generates a LaTeX pdf #836
Comments
I found the issue: the second block of code should have been wrapped separately as a code chunk. I think this really is a bug in
Unfortunately, this messes up the HTML display. I'd guess there's probably some ugly workaround which figures out which format is being produced and uses the appropriate expression there. I'll see if I can find a better bug fix. |
Hi that's very helpful, thank you for taking a look and for the clarification. |
I have a bug fix for this, which I'll be uploading soon. At the moment I'm just looking for the same kind of issue in other functions that allow user input to modify content of tables. |
You should be able to get the fixed version using
It is version 1.4.0.4. Once CRAN has a higher version, regular |
Thanks a lot I appreciate |
Conscious this has been closed but just a quick comment to state the obvious, probably, just in case it helps other users:
To summarise
I confirm everything works fine now. Again thanks a lot for this fix, it really helps |
@Dr-Eti : That's strange that you required a setting for |
Don't think so - I've done standard checks as advised e.g., here https://stackoverflow.com/questions/70908295/failed-to-install-unknown-package-from-github.
returned nothing (literally ""). Resetting that woulnd't make any change, hence why I thought I'd share what happend to work for me. I was very puzzled |
I am trying to use an R Journal article template (package rjtools) for my Rmd. When "knitting", this template joinlty produces an html and a LaTeX pdf.
The issue concerns the use of LaTeX of math symbols as part of the column headers text, when such headers are introduced via KableExtra's add_header_above(). For some reason, rjtools won't render correclty those math symbols in the pdf, even though - and this is the strange part - the same syntax will work if used elsewhere in the same table.
I am aware of several posts on e.g., StackExchange for which the answer usually boils down to something along the lines of setting the "escape" parameter in kbl, and doubling "\" for certain LaTeX macros. Yet it seems to me this is not what is at play here.
Below is how a dummy Rmd that replicates the problem looks like. The html should be fine, but the pdf generated by LaTeX should. Grateful if you could advise
The text was updated successfully, but these errors were encountered: