Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Comments on How can I check texts using mathjax?

Parent

How can I check texts using mathjax? [closed]

+1
−0

Closed as not constructive by watchmaker‭ on Oct 19, 2025 at 23:31

This question cannot be answered in a way that is helpful to anyone. It's not possible to learn something from possible answers, except for the solution for the specific problem of the asker.

This question was closed; new answers can no longer be added. Users with the Vote on Holds ability may vote to reopen this question if it has been improved or closed incorrectly.

How can I check texts using latex/mathjax (intended for this site, but not restricted to that) on my own system before getting online and spending time on try&error?

The focus is on mathjax, which is akin to or even a subset of latex.

LaTeX induces the problem of not knowing what packages the recipients have installed. We had some fun creating blackboard fonts for Greek letters using metafont, but I totally missed that others didn't have those fonts and my papers wouldn't compile.

(Only tag I found was latex, but that's not a perfect match.)

History

2 comment threads

Can yo specify if you are looking for a solution for latex or for a solution for mathjax? (3 comments)
preview or linter? (6 comments)
Post
+2
−0

Mathjax is a JS program that runs on websites and renders fenced Latex code.

If you just want to see how it renders, there are countless web repls out there. https://www.mathjax.org/#demo is one, this site is another. From your question, it sounds like you are trying to debug a complex Mathjax piece and the web repls don't give you enough detail about what's broken. Most people just use some Latex compiler, and then trust that "if it works in Latex it should work in Mathjax" - this has the same environment issue though.

You can run Mathjax locally with nodejs, that is probably the most direct way. Their own docs explain it: https://docs.mathjax.org/en/latest/web/hosting.html But if your problem is predicting what Latex packages are supported on some 3rd party site (like Codidact) this probably doesn't immediately help as you would need to know the details of what they provide.

To be more precise, it seems like Mathjax doesn't handle Latex packages because it doesn't implement full Latex. Instead they implement some Latex in JS, and provide a limited interface to extend it. See https://docs.mathjax.org/en/latest/input/tex/macros.html#tex-macros and https://docs.mathjax.org/en/latest/input/tex/extensions.html. So if your issue is matching the environment of some website, the only surefire way is to figure out specifically how their Mathjax is set up and replicating on your side with Mathjax.

That said, and while I'm also curious now if there's a way to do it, Mathjax seems like something where you just keep it simple and hope you get lucky and it just works. If you have some complex Latex, rather than fighting Mathjax, you could just convert it to a PNG or PDF (with a real latex tool) and put that online.

History

1 comment thread

Or, use MathML in the first place (5 comments)
Or, use MathML in the first place
Olin Lathrop‭ wrote 11 months ago

MathML solves this problem nicely. If it's available, it will be implemented according to a standard. Most current (Oct 2025) browsers support it just fine. The problem is that it's still not commonly supported for user-editable web sites, including here on Codidact.

Eventually MathML will be the right way to write equations in HTML documents. In the mean time it is worth bugging website administrators to allow MathML while falling back to Mathjax or pre-rendered images for now.

watchmaker‭ wrote 11 months ago

Looks good at first glance, and bugging admins is one of my favorite hobbies ;-) .

Do you have a hint on how to install it on linux? My ubuntu gives no suggestions when I simply try to call MathML.

Olin Lathrop‭ wrote 11 months ago

You don't "install" MathML. Either your browser supports it or it doesn't. Most do nowadays. I suppose there may be a browser out there where it is supported with an add-on until the next rev when it will be supported natively, but most mainstream browsers already support MathML natively.

watchmaker‭ wrote 11 months ago

So, I just have to open a file in my browser and see if it works? Has some backdraws if the browser can handle more then mathML can, so I would be fooled to think it would work with MathML only.

matthewsnyder‭ wrote 11 months ago

Mathematical Markup Language (MathML) is an XML-based language for describing mathematical notation.

Oh God it's terrifying... They even have a Latex version in https://developer.mozilla.org/en-US/docs/Web/MathML/Guides/Deriving_the_quadratic_formula for comparison and it's like 50 times longer lol