Skip to content
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

Integration with Quarto HTML Book #1

Closed
thealanjason opened this issue Oct 16, 2023 · 3 comments
Closed

Integration with Quarto HTML Book #1

thealanjason opened this issue Oct 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@thealanjason
Copy link

Thank you for this wonderful extension.

I would be really happy if this works along with the quarto book project type.

Could this be possible?

@ute
Copy link
Owner

ute commented Feb 21, 2024

Thank you for this suggestion, @thealanjason!
I guess you mean that equations should be numbered by chapter, right?
It would be difficult to achieve that with mathjax only, since the numbering of chapters is done file by file by quarto.
I am actually developing some of my extensions for writing course notes, as a book project, and it is quite hackish to get hold of the chapter numbers (custom-numbered-blocks, qquestion. This one is an exception, meant as a proof of concept for using mathjax built-in capabilities following a suggestion by @eeholmes.

I would love myself to be able to use the filter on book projects, especially, using equation tags. However, it means bypassing quarto's (and pandoc's ?) own cross-referencing algorithm and could result in a mess when mixing both. If you have an idea, or even a PR, this would be most welcome!

Sorry for the late reply, I did not notice this issue.

Edit:

I think I can fix this one soon :-)

@ute ute added the enhancement New feature or request label Feb 21, 2024
@ute
Copy link
Owner

ute commented Feb 21, 2024

Note to self, or to a helpful new contributor:
setting section numbers in mathjax is possible
change mathjax3.js in assets folder accordingly, and include book processing stuff (like in qquestion)

@ute
Copy link
Owner

ute commented Apr 21, 2024

I have added a workaround for books, @thealanjason: a mathjax (LaTeX) function \setNewSection that needs to be invoked in the start of a new chapter. You can add this to the first equation in a chapter.

I close this issue now, but might add some automatism later to enable chapter numbering out of the box.

@ute ute closed this as completed Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants