Tweak handling of mathjax argument in gitbook template #937
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This could resolve #915
It is only a suggestion for modificaiton in
bookdown
only. There are other solution to deal with that more broadly for all the formats:pandoc_mathjax_args
in pre processorBut on this PR, here is what has changed based on the analysis in #915 (comment)
This PR changes nothing at the fact gitbook and mathjax does not work when
self_contained = TRUE
Custom url now works. See the value of
src
belowit works also with mathjax local now. See
src
belowwith no mathjax asked, it is still working - no mathjax is used.
with custom template, we can decide to pass the
mathjax-url
variable for use in custom templatecustom templates can use pandoc mathjax-url variable, that corresponds
but it is not used by pandoc - So I guess we should choice what should happen here.
still does work with self_contained = TRUE
with default, the pandoc mathjax default and custom template one are used.
we see that with a custom template it does not change a lot
About other format
It seems
html_chapter
usesdefault.html
that does use themath
pandoc variable. I suppose becauseself_contained
is forced to FALSE.This is one option for gitbook format too if we don't want to support self_contained gitbook with mathjax (as it is not working anyway for now it seems)
@yihui I am waiting on your thoughts on all that to see what we do