#MathML

W3C Developersw3cdevs@w3c.social
2025-06-24

The @w3c MathML Core specification, now at #CandidateRecommendation status, defines a core subset of the #MathML 3 specification designed for reliable, interoperable web browser support. It focuses on mathematical notation rendering, tightly integrating with #HTML, #CSS, and DOM standards to ensure consistency, testability, and minimal implementation complexity. #timetoimplement
▶️ w3.org/TR/mathml-core/

Feedback welcome: github.com/w3c/mathml-core/iss

Explainer: github.com/w3c/mathml-core/blo

Example showing a the formula "y = x^2 if x>= 1 and 2 otherwise" and its related code:
<math>
  <mi>y</mi>
  <mo>=</mo>
  <mrow>
    <msup>
      <mi>x</mi>
      <mn>2</mn>
    </msup>
    <mtext>&nbsp;if&nbsp;</mtext>
    <mrow>
      <mi>x</mi>
      <mo>≥</mo>
      <mn>1</mn>
    </mrow>
    <mtext>&nbsp;and&nbsp;</mtext>
    <mn>2</mn>
    <mtext>&nbsp;otherwise.</mtext>
  </mrow>
</math>

😎 Heute #MathML-Kurs. Zur Motivation #Neubauten-Song via ChatGPT:

Titel: "Formel im Stahl"

(Strophe 1)
Kalte Linien, scharf und klar,
Syntax brennt wie Stahl so starr,
Tief im Code, verborgen, still,
Mathematik formt, was ich will.

(Refrain)
MathML – Struktur aus Licht,
Zeichen flüstern, brechen Sicht,
Klammern klirren, Indizes schrei'n,
Formeln tanzen im Maschinenschein.

(Strophe 2)
<mi>x</mi>, <mo>+</mo>, <mn>1</mn>,
Maschinenherzen schlagen stumm,
Semantische Netze, geflochten, kalt,
In jedem Tag <mrow>, im Datenwald.

(Bridge)
Krachende Schleifen, Echo der Zahl,
Logik blutet, digital –
Wurzelzeichen reißen Raum,
Konstrukte leben, wie im Traum.

(Refrain)

(Outro)
Ohne Klang, doch voller Form,
In jedem Tag, im Datenstrom,
MathML – mein kaltes Lied,
Wo der Code den Geist besiegt.

GripNewsGripNews
2025-05-04

🌗 使用 Pandoc 處理 MathML
➤ Pandoc:數學公式轉換的意外良方
leancrew.com/all-this/2025/05/
作者分享了在個人部落格上使用 Pandoc 將 LaTeX 數學公式轉換為 MathML 的經驗。過去嘗試過多種轉換工具,但都存在限制,最終發現 Pandoc 是一個方便且有效的解決方案。儘管 Pandoc 偶爾會出現一些小問題 (例如極限符號的格式錯誤),但作者透過一個 Python 腳本清理輸出的MathML,以達到最佳的渲染效果。
+ 感覺 Pandoc 真的是個好工具,可以處理很多文件轉換的需求,而且作者分享的 Python 腳本也很實用,可以省去一些手動清理的麻煩。
+ 數學公式的渲染一直是很頭痛的問題,這篇文章介紹的解決方案很有參考價值,尤其是對於需要頻繁在網頁上顯示數學公式的人來說。

N-gated Hacker Newsngate
2025-05-03

🧮🔀 Ah, the eternal struggle of with Pandoc—a riveting tale of tech woe where every tool fails to impress, forcing our hero to manually type MathML like it's 1999. 😂 Pro tip: just blame the converters and hope no one notices.
leancrew.com/all-this/2025/05/

Neat and related: When writing HTML with some math, I don't really want to write MathML by hand (let alone depend on MathJax or something like that). LaTeXML turns out to be helpful again, specifically via the latexmlmath (which btw. can be used above as well, and is faster). Either way, I have quickly hacked together a function that uses latexmlmath to convert TeX-math in a comment into MathML:

(defun mathml-from-tex ()
  "Convert TeX in a comment to MathML in a buffer.
The TeX has to be written in a single-line comment prefixed with a
\"MathML:\" string.  For example:

  <!-- MathML: \frac{-b \\pm \\sqrt{b^2 -4ac}}{2a} -->

Everything until the end of the comment (or line) is passed to
\"latexmlmath\" (part of the LaTeXML suite) and injected into the next
line of the buffer.  A comment indicating the end of the math block is
also added, so that multiple invocations of the command can replace the
old output."
  (interactive)
  (save-excursion
    (goto-char (line-beginning-position))
    (unless (search-forward-regexp
	     (rx (literal comment-start) (* space)
		 "MathML: " (group (* nonl))
		 (literal comment-end))
	     (line-end-position) t)
      (user-error "No instruction found"))
    (if (eobp)
	(insert "\n")
      (forward-line 1))
    (let ((end "EndOfMathML")		;TODO: use </math>
	  (math (match-string 1))
	  (start (point)))
      (when (search-forward-regexp (rx (literal end)) nil t)
	(delete-region start (line-end-position)))
      (save-excursion
	(insert end)
	(save-excursion
	  (insert (if (eolp) "" "\n")))
	(comment-line 1))
      (call-process-region math nil "latexmlmath" nil t t "-"))))

I also attach a quick demo, see below.

#emacs #latex #mathml

2025-04-11

♿️ Discover how to make STEM content truly accessible on the web using MathML and specialized math fonts — ensuring equations and formulas are readable for allwith Norbert Preining at #FOSSASIASummit2025

🔗 Click here youtu.be/DIwvqSFQtOw?si=UHeOSK to watch on the FOSSASIA YouTube channel
#WebAccessibility #STEM #MathML #InclusiveWeb #FOSSASIA

2025-04-04

MathML gets stripped out from HTML posts :(

#MathML #Chuckya

2025-03-21

Mathup: Easy MathML authoring tool with a quick to write syntax.

mathup.xyz/

Lovely new experiment.

#mathml #math

N-gated Hacker Newsngate
2025-03-21

🚀 Behold, the marvel of Mathup: an "easy" tool that combines the thrill of writing cryptic code with the excitement of needing a decoder ring to read it. 😵 Why not just use MathJax? 🤔 Because that would be too easy, and who needs convenience when you can have chaos? 🎉
mathup.xyz/

Hacker Newsh4ckernews
2025-03-21

Mathup: Easy MathML authoring tool with a quick to write syntax

mathup.xyz/

Es könnte sich aber lohnen, das CSS von #Mathup zu analysieren. Offenbar biegen sie die eher maue #MathML-Optik mit Chromium-Browsern etwas besser hin. Etwa die auch hier bereits erwähnten zu kleinen Summen- und Integralzeichen, obwohl man Attribute wie stretchy und largeop verwendet hat.

Vielleicht wird unter der Haube auch mit SVG gefrickelt, wie von #MathJax bekannt.

Der am wenigsten nervige Browser für native Formeln und auch sonst ist noch immer Firefox. 🔥

runarberg.github.io/mathup/

#Mathup überzeugt bei ersten Tests nicht mit einem älteren Safari unter iOS 15.8.3. Kann man sich halt nicht immer aussuchen.

Dabei hat diese Version kein Problem mit #MathML an sich. Siehe Auszug zum Code meines Entwickler-Magazin-Artikels (wobei die Klammern höher sein sollten).

Etwas Natives mit JS zu simulieren ist wohl eher keine so gute Idee.

Formel (Lösung quadratischer Gleichungen) mit nativem MathML im Safari unter iOS 15.8.3Formel (Lösung quadratischer Gleichungen) mit nativem MathML im Safari unter iOS 15.8.3

#Mathup klingt für mich eher interessant als Hilfsmittel für die statische Erzeugung von #MathML und nicht als Alternative zu #MathJax.

Die Stärke von MathML ist ja gerade, sich unabhängig von JS zu machen.
mastodon.cloud/@lavxnews/11416

2025-03-14

Heute geht's nicht um KI, sondern nur um π

Der Pi Day wird jährlich am 14. März gefeiert.

wiki.selfhtml.org/wiki/JavaScr

#mathml #svg #fedilz

Icon für den PI Day mit der Kreiszahl π
Marius Gundersengundersen
2025-03-09

I played around with and yesterday, and made this example of how to animate solving an equation. It was pretty straight forward to get to work, but I wish I had some control over the transitions. Now the elements move in a straight line, it would be cool of i could make them follow an arc.

codepen.io/mariusgundersen/pen

Edit: does not work in Firefox yet, but probably by the end of 2025

Joe Crawfordartlung@xoxo.zone
2025-02-26

Thanks @Meyerweb & @fractalkitty in particular for helping me understand the uses of both #MathML and #LaTex ( and #MathJax ) at yesterday's #IndieWeb Front End Study Hall. I updated lab.artlung.com/mathml/ a bit.

原来可以安装 Native MathML 插件强迫 #Wikipedia#MathML 渲染公式,而不是 svg

<math>
<msup>
<mi>a</mi>
<mn>2</mn>
</msup>
<mo>+</mo>
<msup>
<mi>b</mi>
<mn>2</mn>
</msup>
<mo>=</mo>
<msup>
<mi>c</mi>
<mn>2</mn>
</msup>
<!-- youtube.com/watch?v=iK9bhyl6B_ -->
</math>

#MathML #Knorkator

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst