public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* History of the math syntax
@ 2022-05-20  7:06 Albert Krewinkel
       [not found] ` <87pmk88xxr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Krewinkel @ 2022-05-20  7:06 UTC (permalink / raw)
  To: pandoc-discuss

GitHub recently introduced support for the `$`/`$$` Markdown math
syntax: <https://github.blog/2022-05-19-math-support-in-markdown/>

This made me wonder when and how this TeX syntax made its way into
Markdown. I tried to dig through the history of old projects like pandoc
and MultiMarkdown, but didn't get very far. All I could find is that
pandoc has been supporting TeX math syntax for at least 15 years.

Maybe someone here can satisfy my curiosity?

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found] ` <87pmk88xxr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2022-05-20 11:35   ` Beni Cherniavsky-Paskin
       [not found]     ` <CALJxei+=6CLro5VK9o-u2JaX46d3n8XcFtiDASOU3gUtMkOD5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2022-05-20 17:46   ` John Gabriele
  2022-05-20 18:01   ` John MacFarlane
  2 siblings, 1 reply; 7+ messages in thread
From: Beni Cherniavsky-Paskin @ 2022-05-20 11:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 5175 bytes --]

[I'm only familiar with these projects after they existed, happy to be
corrected if my reconstruction is wrong]

I _suspect_ MultiMarkdown was the first.  It started out as a fork of
Gruber's Markdown.pl, and IIRC the whole point of "multi" in the name was
the novelty (at least in context of markdown) of having multiple output
formats, including LaTeX.
(googling...) See:
https://github.com/fletcher/MultiMarkdown/wiki/MultiMarkdown-Syntax-Guide#math-support
https://github.com/fletcher/MultiMarkdown/wiki/Version-Histor
https://fletcher.github.io/MultiMarkdown-6/introduction.html#whatarethedifferentversionsofmultimarkdown
Surprisingly however, early versions until 3.0 emitted LaTeX (including
math!), by XSLT conversion from HTML including MathML!
(The first git commit I can find
https://github.com/fletcher/MultiMarkdown/commit/f7fcb4af5fdb83f58feaf4b8ec93bf689ca25fc6,
not sure where if pre-git code is available)

From there, math support spread to many other implementations, with
experimentation both in source syntax and output techniques...
(MultiMarkdown itself switched formula input syntax from AsciiMath to TeX,
and changed delimiters.)

Early markdown extensions were pretty much free-for-all.  Projects emulated
other projects but there was no formal standard (othen than Gruber's
original doc, which was effectively frozen), and no central place to
coordinate.

FWIW https://github.com/cben/mathdown/wiki/Math-in-MarkDown has no timeline
but lists _a lot_ of implementations with _some_ math support.  Incomplete,
by this point I would not be surprised if it has less than half of
implementations out there. (It's a wiki, additions welcome!)
As any github wiki, it has git history which (very roughly) correlates with
order of appearance — but mostly the order in which I found time to
investigate them... Bias: tools I had no access to, such as Mac-only ones,
are less present and more lagging.

I don't know if Pandoc was 2nd or later with math support, but it was
certainly widely influential — it set a high bar both in breadth and
qualify of markdown extensions 👏, so I expect most people extending
markdown later, in any direction, were at least aware of it.

Some sites within Stack Exchange also adopted $math$ support (I guess
mathoverflow was the first?) which also must have been influential in the
communities using formulas.
* See my wiki, there is curious inconsistency with
electronics.stackexchange.com, they alone chose \$...\$ for inline.  Not
sure what to learn from that case, perhaps that inter-operability was
valued less than suiting particular community's situation.

Then CommonMark appeared (jgm, thank you again ;-).  While the spec itself
is focused on nailing down original syntax + few very central additions
(e.g. fenced blocks), it did provide a shared forum where people interested
in markdown can collaborate on harmonizing syntax extensions.
Math has been discussed a lot:
https://talk.commonmark.org/t/mathematics-extension/457
https://talk.commonmark.org/t/mathjax-extension-for-latex-equations/698
https://talk.commonmark.org/t/ignore-latex-like-math-mode-or-parse-it/1926
https://talk.commonmark.org/t/can-math-formula-added-to-the-markdown/3140
https://talk.commonmark.org/t/math-rendering-re-visited/4086

As for GitHub's announcement, I'm happy they're recently adopting popular
extensions (such as Mermaid), though I wish they sent some kind of "intent
to implement" on commonmark forum ahead of shipping.
Due to their weight in markdown space, any syntax they adopt is likely to
become The definite syntax...


пт, 20 мая 2022 г. в 10:28, Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>:

> GitHub recently introduced support for the `$`/`$$` Markdown math
> syntax: <https://github.blog/2022-05-19-math-support-in-markdown/>
>
> This made me wonder when and how this TeX syntax made its way into
> Markdown. I tried to dig through the history of old projects like pandoc
> and MultiMarkdown, but didn't get very far. All I could find is that
> pandoc has been supporting TeX math syntax for at least 15 years.
>
> Maybe someone here can satisfy my curiosity?
>
> --
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/87pmk88xxr.fsf%40zeitkraut.de
> .
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CALJxei%2B%3D6CLro5VK9o-u2JaX46d3n8XcFtiDASOU3gUtMkOD5w%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 7568 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found]     ` <CALJxei+=6CLro5VK9o-u2JaX46d3n8XcFtiDASOU3gUtMkOD5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-05-20 11:37       ` Beni Cherniavsky-Paskin
  0 siblings, 0 replies; 7+ messages in thread
From: Beni Cherniavsky-Paskin @ 2022-05-20 11:37 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

> pandoc has been supporting TeX math syntax for at least 15 years.

huh, I may be wrong then, pandoc's support maybe pre-dated MultiMarkdown?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found] ` <87pmk88xxr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  2022-05-20 11:35   ` Beni Cherniavsky-Paskin
@ 2022-05-20 17:46   ` John Gabriele
       [not found]     ` <09be80a5-7851-4739-b1ad-1418e31d2126-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
  2022-05-20 18:01   ` John MacFarlane
  2 siblings, 1 reply; 7+ messages in thread
From: John Gabriele @ 2022-05-20 17:46 UTC (permalink / raw)
  To: 'Oliver Demetz' via pandoc-discuss

On Fri, May 20, 2022, at 3:06 AM, Albert Krewinkel wrote:
> GitHub recently introduced support for the `$`/`$$` Markdown math
> syntax: <https://github.blog/2022-05-19-math-support-in-markdown/>
>
> This made me wonder when and how this TeX syntax made its way into
> Markdown. I tried to dig through the history of old projects like pandoc
> and MultiMarkdown, but didn't get very far. All I could find is that
> pandoc has been supporting TeX math syntax for at least 15 years.
>
> Maybe someone here can satisfy my curiosity?

My understanding is that TeX equations have been in markdown since about the same time as that chocolate bar ended up in the jar of peanut butter. :)

Aside from that, I think I remember seeing TeX-formatted mathematics in GNU's Texinfo format.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found] ` <87pmk88xxr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  2022-05-20 11:35   ` Beni Cherniavsky-Paskin
  2022-05-20 17:46   ` John Gabriele
@ 2022-05-20 18:01   ` John MacFarlane
  2 siblings, 0 replies; 7+ messages in thread
From: John MacFarlane @ 2022-05-20 18:01 UTC (permalink / raw)
  To: Albert Krewinkel, pandoc-discuss


Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:
> GitHub recently introduced support for the `$`/`$$` Markdown math
> syntax: <https://github.blog/2022-05-19-math-support-in-markdown/>
>
> This made me wonder when and how this TeX syntax made its way into
> Markdown. I tried to dig through the history of old projects like pandoc
> and MultiMarkdown, but didn't get very far. All I could find is that
> pandoc has been supporting TeX math syntax for at least 15 years.
>
> Maybe someone here can satisfy my curiosity?

Math support is in pandoc 0.1 (I checked the source code).  That was 2006.

Looking in the old markdown-discuss list, I see a message from
Rob Shearer in September 2007 that sums up the current state of
play for math in markdown:

> - [MultiMarkdown][] has some mathematics support based on [asciimath] 
> [] notation using double-angle-brackets as delimiters:  
> `<<...asciimath...>>`. I'm afraid I can't find any asciimath  
> documentation that tells me how to do set notations in that format...
> - Python-markdown's [mdx_math][] extension seems to use latex  
> notation with HTML-style tags, like `<math>\{ x \mid x^2 \in S \}</ 
> math>`. This use of tags strikes me as quite un-Markdownish.
> - [Pandoc][] handles LaTeX math between dollar signs (which is  
> standard LaTeX notation): `$\{ x \mid x^2 \in S \}$`.

So I think pandoc did originate the syntax GitHub is now using,
about 16 years ago.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found]     ` <09be80a5-7851-4739-b1ad-1418e31d2126-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
@ 2022-05-20 19:30       ` Jeremy Theler
       [not found]         ` <6d21260464c325b05285477edbb53c1f30ddbc1c.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jeremy Theler @ 2022-05-20 19:30 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

On Fri, 2022-05-20 at 13:46 -0400, John Gabriele wrote:
> 
> Aside from that, I think I remember seeing TeX-formatted mathematics
> in GNU's Texinfo format.
> 

Doesn't the "tex" in "texinfo" refer to Donald Knuth's TeX?

--
jeremy


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: History of the math syntax
       [not found]         ` <6d21260464c325b05285477edbb53c1f30ddbc1c.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
@ 2022-05-21  1:03           ` John Gabriele
  0 siblings, 0 replies; 7+ messages in thread
From: John Gabriele @ 2022-05-21  1:03 UTC (permalink / raw)
  To: 'Oliver Demetz' via pandoc-discuss

On Fri, May 20, 2022, at 3:30 PM, Jeremy Theler wrote:
> On Fri, 2022-05-20 at 13:46 -0400, John Gabriele wrote:
>> 
>> Aside from that, I think I remember seeing TeX-formatted mathematics
>> in GNU's Texinfo format.
>> 
>
> Doesn't the "tex" in "texinfo" refer to Donald Knuth's TeX?

I don't really know the history here, but my guess is that Texinfo was made so that you could read it in the terminal, as well as get nice output for a printed manual (with TeX being the backend for that target).

Here's the docs regarding putting mathematics into Texinfo: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Inserting-Math.html

Anyhow, I think that formatting mathematics in plain text (typed in by a human) is a solved problem (LaTeX). Glad to see that Github's markdown now allows and renders it, and I've been grateful for a long while that Pandoc does as well.

-- John


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-21  1:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-20  7:06 History of the math syntax Albert Krewinkel
     [not found] ` <87pmk88xxr.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-05-20 11:35   ` Beni Cherniavsky-Paskin
     [not found]     ` <CALJxei+=6CLro5VK9o-u2JaX46d3n8XcFtiDASOU3gUtMkOD5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-20 11:37       ` Beni Cherniavsky-Paskin
2022-05-20 17:46   ` John Gabriele
     [not found]     ` <09be80a5-7851-4739-b1ad-1418e31d2126-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2022-05-20 19:30       ` Jeremy Theler
     [not found]         ` <6d21260464c325b05285477edbb53c1f30ddbc1c.camel-24em0bpozeFWk0Htik3J/w@public.gmane.org>
2022-05-21  1:03           ` John Gabriele
2022-05-20 18:01   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).