markup icon indicating copy to clipboard operation
markup copied to clipboard

Support latex

Open nilsocket opened this issue 4 years ago • 25 comments

It's 2019 now, Gitlab already has latex support in it's markdown flavor.

  1. latex code block
  2. latex inline

This feature is being requested from 2015.

So please, consider to support latex at-least now.

nilsocket avatar Sep 18 '19 21:09 nilsocket

I'd also like to see LaTeX for math equations.

edsonayllon avatar Jan 02 '20 18:01 edsonayllon

That would be great!

devmessias avatar Feb 12 '20 23:02 devmessias

في خميس، 13 فبراير، 2020 في 2:39 ص، كتب bruno messias < [email protected]>:

That would be great!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/github/markup/issues/1294?email_source=notifications&email_token=AOOYZ53WBXGDAI5P74M5773RCSCD7A5CNFSM4IYDWDO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELSZ5RI#issuecomment-585473733, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOOYZ5YWRJGEOE3XJKUYYSLRCSCD7ANCNFSM4IYDWDOQ .

MySiilf avatar Feb 13 '20 02:02 MySiilf

If I understand correctly, a markdown file is rendered by commonmarker as mentioned here. This means, that if math support (LaTeX) is desired, actually there are two options:

  • Request this support at https://github.com/gjtorikian/commonmarker. But it seems like it's not going to happen (comment). Or,
  • Ask Github to use a different rendering tool.

Do I understand it correctly @kivikakk ?

Maybe related is #897

drorata avatar Feb 27 '20 09:02 drorata

I think you’ve understood correctly, except that it’s extremely unlikely GitHub would change from commonmarker since they maintain its upstream. I no longer work at GitHub so I can’t really help further.

kivikakk avatar Feb 27 '20 11:02 kivikakk

Do you mean https://github.com/github/cmark-gfm as the upstream?

drorata avatar Feb 27 '20 18:02 drorata

Yep!

On 28 Feb 2020, at 05:19, Dror Atariah [email protected] wrote:

 Do you mean https://github.com/github/cmark-gfm as the upstream?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kivikakk avatar Feb 27 '20 22:02 kivikakk

I also wish GH to support equations in README.md. This a feature I would use every single day...

Just support equations like in Stack Exchange :

    $$x_{1,2} = -b\frac{\sqrt{b^2-4\cdot a \cdot c}{2a}$$

yves-chevallier avatar May 03 '20 10:05 yves-chevallier

Maybe related is #897

This issue was closed. Looks like Github Markdown people try to simply dodge the issue using "it's not my problem" argument and directing the complaints to a different department (which does the same thing). Pretty sad.

evgenyneu avatar Aug 27 '20 02:08 evgenyneu

Years have passed. Any updates for this?

If latex is supported, github will have the potential to become another ArXiv and more


And also, maybe github should support online jupyter notebook for all languages

kaelzhang avatar Mar 06 '21 15:03 kaelzhang

MS owns GitHub now..., will eventually ruin it.

twang15 avatar Apr 07 '21 04:04 twang15

Markdown was never designed for extensions, so it is probably to much effort to extend gfm for that.

Better choice here is to use RestructuredText/Sphinx that already supports LaTex, unfortunately github seems not to support rst very well.

bschatz avatar Apr 08 '21 05:04 bschatz

@bschatz You don't realize how much this extension can change the world. It is not a matter of how much work it is but what this feature can unlock. All the scientific community could then use markdown (on GitHub), to display equations.

We all dream of being able to display equations on Markdown. It seems the only issue is a matter of security ? Then the picture could be rendered backend. Is it a problem?

yves-chevallier avatar Apr 08 '21 06:04 yves-chevallier

Equations used to work using this method:

https://gist.github.com/a-rodin/fef3f543412d6e1ec5b6cf55bf197d7b

However, just yesterday, none of the images render anymore. Equation formatting used to work just like LateX.

jessemodesto avatar Apr 12 '21 21:04 jessemodesto

I would also like to have this. Any updates?

cossio avatar Jan 27 '22 23:01 cossio

As requested by my boss, I've patched a little of commonmarker to support part of LaTeX math equations (using directly $ ... $ and $$ ... $$). If anyone is interested, please see my forked repo: https://github.com/j7168908jx/commonmarker

j7168908jx avatar Feb 02 '22 09:02 j7168908jx

Please add this feature!

abalter avatar Mar 30 '22 03:03 abalter

#1294از گوشی هوشمند Samsung Galaxy ارسال شده است. -------- پیام اصلی --------از: Ariel Balter @.> تاریخ: ۲۰۲۲/۳/۳۰ ۸:۲۴ (GMT+03:30) گیرنده: github/markup @.> گیرنده کپی: Subscribed @.***> موضوع: Re: [github/markup] Support latex (#1294) Please add this feature!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/github/markup/issues/1294#issuecomment-1082593428", "url": "https://github.com/github/markup/issues/1294#issuecomment-1082593428", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

Masoudahmadi304 avatar Mar 31 '22 13:03 Masoudahmadi304

Using $\LaTeX$ is now supported! https://github.blog/changelog/2022-05-19-render-mathematical-expressions-in-markdown/

laymonage avatar May 19 '22 22:05 laymonage

$y = ax + b$ is rendered correctly.

but,,,

  • $y = ax + b$

seems not working?

hotohoto avatar May 20 '22 14:05 hotohoto

I can also confirm that:

  • or maybe $z^2$

doesn't work. Probably this requires a new bug report ( #1546 )

drorata avatar May 20 '22 14:05 drorata

Does this look too small?

$$\sum_{i=1}^N f_i$$

It does to me. Is there a way to make equations larger?

cossio avatar May 20 '22 14:05 cossio

@cossio

$$2 \times \sum_{i=1}^N f_i$$

That's a little larger.

This should be quite a bit larger.

$$\sum_{i=1}^N (f_i)^2$$

abalter avatar May 20 '22 16:05 abalter

@drorata Seems to work now.

$z^2$

abalter avatar May 20 '22 16:05 abalter

Trying with unicode for some of the characters (∫_0^∞ \sum_{i=1}^n 2 π i q⋅r/ λ dr)

$$∫_0^∞ \sum_{i=1}^n 2 π i q⋅r/ λ \ {\mathrm d}r$$

pkienzle avatar Jun 30 '22 17:06 pkienzle