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

Enable USE_MATHJAX = TRUE #35

Closed
taehyounpark opened this issue Mar 28, 2024 · 6 comments
Closed

Enable USE_MATHJAX = TRUE #35

taehyounpark opened this issue Mar 28, 2024 · 6 comments
Assignees
Labels
feature An entirely new feature.

Comments

@taehyounpark
Copy link

taehyounpark commented Mar 28, 2024

First of all, thank you for this repository! I've looked for everything under the sun for something that would actually handle Doxygen documentation for highly-templated code, only to run into confusing quirks at best or even flat-out erroneous output from several other workflows. m.css together with poxy, gets it perfect!

I just wanted to ask/request how one might be able to insert math equations into the markdown files? As far as I understand, this requires USE_MATHJAX option which is by default false, and poxy (as stated in README) does not allow configs to be changed manually.

Would such an option being allowed in poxy.toml cause any issues with the current locked-down Doxygen configuration? Thanks again in advance!

@taehyounpark taehyounpark added the feature An entirely new feature. label Mar 28, 2024
@marzer
Copy link
Owner

marzer commented Mar 28, 2024

Hiya,

Would such an option being allowed in poxy.toml cause any issues with the current locked-down Doxygen configuration?

I suspect it would be fine. My choice to lock down the config mostly just to limit the chaos that doxygen can actually cause, since their testing process is lacking and there are always many regressions from one version to the next.

I don't have strong opinions on most of the available options - I just by disabled things I personally didn't want when I started wrapping things up in Poxy as a starting point :)

For your particular case it really only depends on whether m.css supports this particular doxygen feature, since poxy doesn't do much in the way of HTML rendering (only minor bugfixes and small features using pre- and post- processes).

@marzer
Copy link
Owner

marzer commented Mar 28, 2024

Ah ok so m.css provides support for math formulas but it does not appear to be based on the Doxygen option USE_MATHJAX, since that requires you to using Doxygen's GENERATE_HTML option, which isn't the case (m.css handles HTML rendering itself using doxygen's XML output mode instead).

Have a look at the math-related information in the m.css Doxygen generator documentation; you might find this already works without needing anything extra :)

@taehyounpark
Copy link
Author

taehyounpark commented Mar 28, 2024

You are right and @f$ x+y @f$ works out of the box. The irony of not having read the documentation 😅 thanks!

@mosra
Copy link

mosra commented Mar 29, 2024

Haha, yes, it's builtin and should "just work", if you have a LaTeX installation set up.

Some background info -- one of the reasons I started making the m.css theme in the first place was because I hated how math equations looked like on most websites, either being blurry / aliased raster images, or flickering and causing page relayouts because it was rendered by some heavy JavaScript on the client side.

So it's instead rendered into a SVG which is then embedded directly into the markup. Here's a "marketing page" for it back from 2018, most / all features shown there including the window-size-dependent layout are possible with Doxygen and the custom @m_class command as well: https://mcss.mosra.cz/admire/math/

@lucasmyers97
Copy link

One follow-up on this: is it possible to use the markdown math syntax (i.e. enclosing $ or ```math blocks) and still use the m.css functionality? I ask with the aim of using a README.md both as a GitHub front page, and the front page of the poxy-generated documentation.

@mosra
Copy link

mosra commented May 21, 2024

If Doxygen itself supports that (which is a GitHub Flawored Markdown extension I think) and correctly passes that to the generated XML, m.css will as well.

There has been a new 1.11 release yesterday, but I can't see anything latex-math-specific in the changelogs. Maybe it's already there, I never really tried. (Also no idea how crashy or buggy it is, I didn't even manage to get 1.9 running properly for my code yet.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature An entirely new feature.
Projects
None yet
Development

No branches or pull requests

4 participants