Skip to content

Bussproofs #68

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

Open
alex-mashin opened this issue Mar 12, 2025 · 2 comments
Open

Bussproofs #68

alex-mashin opened this issue Mar 12, 2025 · 2 comments
Labels
Expected Behavior This is how MathJax works

Comments

@alex-mashin
Copy link

The Bussproofs extension seem not to work with the tex2mml-page extension. All maths fail with the error "The bussproofs extension requires an output jax with a getBBox() method". Other TeX extensions work.

@dpvc
Copy link
Member

dpvc commented Mar 16, 2025

That is correct. The tex2mml-page command does not load an output jax (conversion to MathML doesn't require one in general). The bussproofs package, however, does require an output jax because it needs to be able to determine the size of the output in order to do its complicated layout.

While it would be possible to modify tex2mml-page to load an output jax, that won't actually help, because the output jax can't produce measurements unless there is an actual DOM to work with, and that requires a browser. The LiteDOM used in the node-based applications doesn't know how to measure the resulting DOM elements.

The upshot is you can't do command-line processing using the bussproofs package using this command. The only choice would be to use something like headless Chrome through puppeteer. There is an tex2svg example in the puppeteer directory that you might be able to modify to accomplish your goal.

@dpvc dpvc added the Expected Behavior This is how MathJax works label Mar 16, 2025
@alex-mashin
Copy link
Author

That is correct. The tex2mml-page command does not load an output jax (conversion to MathML doesn't require one in general). The bussproofs package, however, does require an output jax because it needs to be able to determine the size of the output in order to do its complicated layout.

While it would be possible to modify tex2mml-page to load an output jax, that won't actually help, because the output jax can't produce measurements unless there is an actual DOM to work with, and that requires a browser. The LiteDOM used in the node-based applications doesn't know how to measure the resulting DOM elements.

The upshot is you can't do command-line processing using the bussproofs package using this command. The only choice would be to use something like headless Chrome through puppeteer. There is an tex2svg example in the puppeteer directory that you might be able to modify to accomplish your goal.

Thank you for sharing this most valuable lnsight. I don't know if I ever try to solve this problem (it is not pressing; just a single TeX extension that I cannot use, but was not going anyway). If I ever do, perhaps the solution would be convert to SVG only prooftrees by a separate service (based on Puppeteer, as you suggested), before submitting the web page to the main TeX to MML application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expected Behavior This is how MathJax works
Projects
None yet
Development

No branches or pull requests

2 participants