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

Arithmatex: allow specifying parent element #1453

Closed
facelessuser opened this issue Sep 20, 2021 · 1 comment
Closed

Arithmatex: allow specifying parent element #1453

facelessuser opened this issue Sep 20, 2021 · 1 comment
Labels
C: arithmatex Related to the arithmatex extension. S: triage Issue needs triage. T: feature Feature.

Comments

@facelessuser
Copy link
Owner

I've recently switched to using the generic form for MathJax and such. It infuriates me that the mkdocs-minify-plugin doesn't allow ignoring certain tags via classes etc. What this means is that our math, which is wrapped in a <div> gets minified which can break some blocks and there is no real way to prevent this without writing my own, similar plugin (which I'm not going to do).

Granted, I understand it is built on a library that does not expose this ability either, and I don't think that library has seen updates in quite some time. So, I don't blame them for not having such a feature.

So, a new option will be added to allow the configuring of the wrapper HTML element. In our case, we want <pre>. Doing this causes the minifier to skip minimizing the whitespace. We will also add a new SuperFences formatter for Arithmatex that should one day replace all the others as it is configurable. It will basically add the same functionality for people who prefer using fences for math. Works in MkDocs as well.

        - name: math
          class: arithmatex
          format: !!python/object/apply:pymdownx.arithmatex.fence_format ['generic', 'pre']

Anyways, I wasn't planning this, but with the recent change to MkDocs Material instant mode for our docs, and then the moving to the generic mode in Arithmatex, I either had to give up HTML minification, or math, so I chose neither 🙂.

@facelessuser facelessuser added T: feature Feature. C: arithmatex Related to the arithmatex extension. labels Sep 20, 2021
@gir-bot gir-bot added the S: triage Issue needs triage. label Sep 20, 2021
@facelessuser
Copy link
Owner Author

Closed by 5d9fc4d and cbef4da.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: arithmatex Related to the arithmatex extension. S: triage Issue needs triage. T: feature Feature.
Projects
None yet
Development

No branches or pull requests

2 participants