latex implementation


Komentarze: 32

  • Amaroq the Kitsune

    LaTeX? Hmm...
    I think while they're at it, they should implement Wolfram Mathematica~

  • PrblyNot

    Having a way to type equations would be really useful.

  • phone-zee

    please do this. I am a mathematician and would love to be able to talk about math with my mathematician friends.

  • Rodo

    I would love this. I needed it now, so I found this post xD

  • joshuas3

    Could be toggled with a forward-slash command, like `/latex ...`. Seeing as most bots that implement it by rendering the result server-side use node.js, it doesn't seem _too_ difficult to implement in the Discord client.

  • ImperatorS79

    This could look like mathim and only include the math part of latex.

    I agree this would really be a plus since I always have to use latex2png ^^.

  • Commander GreyFox

    i think this would be good if there was an educational edition of discord, then teachers could have servers and kids could help eachother with their homework and ask the teacher questions while they aren't at school. it would also be a good way for a sick kid to get their homework or notes when they're out for the day

  • Derkades

    It wouldn't be very hard to add, they just need to include

    For the formatting, I'd suggest using $ $ for inline and $$ $$ for block comments (like in the Joplin note app). Example:

    Some inline $\vec{v}$ vector.

    Block for big equation:
    \vec{a} = \vec{b} \times \begin{pmatrix}0 & 1 \\ 2 & 3\end{pmatrix}

  • bob666

    There is MathBot
    I can’t believe this Feature request will happen as it would be effectively deciding to pivot to what is essentially an education focus when games are such a lucrative domain (and they are killing it).

  • Puerøsøla

    There's also TeXit

    It would be nice if this actually happened though. Bot solutions are all well and good, but they aren't as natural as in-text solutions.

  • Sprax

    Also, you can only use Bots on servers. Having it in private chat or groups would be awesome too.

    I don't see any problem in implementing this to be honest :/

  • tillahoffmann

    If you're happy to use tampermonkey or greasemonkey, you can use the following script to render equations on discord (see below for an example):

  • ImperatorS79

    "I can’t believe this Feature request will happen as it would be effectively deciding to pivot to what is essentially an education focus when games are such a lucrative domain (and they are killing it)."

    What ? Once it is done it is done, you just need to redirect some commands to a pre-existing small latex equation renderer (It has been proven in this thread that they exist). It will not shift the focus of the program don't be crazy. It just a cool add for people who are gamer and student, teacher, reseacher, whatever .

  • Stephen

    Software is never ‘done’ if you want it to keep working. It always requires continual maintenance. That said- I’d be happy to be proven wrong because of all the benefits you mention.

  • ImperatorS79

    Well, unless you modify so much the program every update that you break everything each time, once a fonctionality is done you do not have so much to do.

    You could even use mathjax (Discord is web based, am I right ?) and have literally nothing to do.

  • Enevevet

    I really think mathjax would be welcome, especially with covid-19 and all the virtual classes that are being created. It just takes two line to implement MathJax at least on web/desktop application, isn't ?

  • sheephunt2000

    KaTeX would be better than MathJax, given how much less intensive it is; FB Messenger uses KaTeX in their implementation.

  • Enevevet

    The thing is that MathJax let you modify the renderer and so you can easily display plain source equation which is really more convenient for equation communication and modification.

  • Anigma

    I would love to see a LaTeX implementation in Discord. Not just for mathematical symbols but also for greek letters, unit formatting and convenient text formatting.

  • flash

    It's absurd Discord advertises itself as a place where people talk yet they refuse to add STEM main "talk" language: LaTeX. It's not even complicated, just add in support for KATEX or MathJAX

  • InTheGames

    Would love for LaTeX to get implemented like all the others in this post!

  • Spruce

    Yes, this would be very helpful for students, teachers, mathematicians, etc.


    As it has been said above, the dollar symbol ($<place math here>$) should be used to mark LaTeX. For centered LaTeX (meaning it leans to the center instead of the side), mark it as this: \[<place math here>\]

  • Enevevet

    In LaTeX, you have to use or :

    • $<math>$ for inline mathematical elements and $$<math>$$ for equation-like elements.
    • \(<math>\) for inline mathematical elements and \[<math>\] for equation-like elements.

    Mixing these is really non-user friendly.

    Also, people would less trigger math-mode if the second type of tags was used.
    Imagine talking about prices, typing two dollars in a sentence and the math-mode is triggered. It would be horrible.

  • osterhoutan

    Yes this would be great!

    It could be done easily using markdown syntax using mathjax, katex, or even github's math rendering system, all of which use simplified varieties of LaTeX's/TeX's math notation syntax.

    Side notes and known caveats w/ each:

    GitHub's math rendering system,

    only outputs images rather than mathml, html, or (best option for accessibility) mathml & html, like the other two options, preventing easy copying and limiting reasonable support given discords current multimedia.  As it just inputs the info from the parameter in the requesting URL into a template of the LaTeX standalone class and outputs to png.


     For overall support, ease of use, customizability (for compatibility and use), would be a great pick but unfortunately it is the slowest of all the options. 
      It also allows limited macro definitions in both LaTeX and TeX styles, which are usually global to the instance of the MathJax system being used, so you would either need to sanities the input for non math mode things, or be careful in how you set things up.  It would likely not be difficult to make these customizations server and/or channel specific so that admins can set up custom macros.


      Not as customizable as MathJax, but it is noticeably lighter weight, and simpler to implement (though more restrictive and manual of a process).
      However, it currently has some significant rendering and consistency errors/bugs.  Between modifying the syntax, names, and functionality of std LaTeX lib items, as well as some commonly used packages, as well as, having (currently as of 2021/04/06) issues with sizing and rendering of sub scripts and superscripts, and many other things that resize and move elements around.  It can be said that the package is just not as mature as the other two.


    Anyway, I really hope to see this implemented one day, as using things like the math bot are just not as good of solutions, for discussion, as implementing some system like the ones mentioned above that are commonly used for rendering math from markdown syntax (even json segmented markdown like discord has, see ipnb files for the jupyter systems).


  • Huldar

    Just leaving a comment since I would also like the tech people at discord to implement tex in their tech. Thanks.

  • Famiu

    I really want LaTeX support for Discord as well. I talk about math a lot and so it'll be really nice.

  • Costantino Sfoungaris

    I'm glad to see this is being discussed. I work in a software & engineering company that uses Discord for its internal communication and adding equation rendering would be immense help.

  • Arc

    I would like to second this. One does not simply neglect STEM's main communication language and claim to be a "place" for conversation.

  • Elvira

    very interested, Thanks


Zaloguj się, aby dodać komentarz.