Coder Social home page Coder Social logo

Comments (12)

twavv avatar twavv commented on August 16, 2024 2

Sure, sure, I get it.

From my perspective, I'm just trying to give the best experience possible to the users of my editor (users who are at least partially accustomed to the \( syntax). I'm not arguing that this project should support all things LaTeX (e.g., supporting \begin{align}), but I am arguing that supporting \( is a very pragmatic thing to do.

from remark-math.

Ir1d avatar Ir1d commented on August 16, 2024 1

I totally agree with you. Lets stick with $ and $$

from remark-math.

wooorm avatar wooorm commented on August 16, 2024 1

If someone wants this btw, packages/remark-math can be forked to add that. rehype-katex and such will still work if you expose the same math node in Markdown!

from remark-math.

Ir1d avatar Ir1d commented on August 16, 2024 1

yeah I understand, that's nice. I believe using $ only will be better, even though it takes more time to migrate, it's worth the effort.

from remark-math.

wooorm avatar wooorm commented on August 16, 2024 1

I don’t think it’d be good for markdown to standardize several syntaxes. I think we’re in a position to push for one syntax, as the most popular markdown parser, and I think we should do that. Again: you can do whatever you want with plugins, but I don‘t think we should make it easier.

from remark-math.

wooorm avatar wooorm commented on August 16, 2024

While supporting this wouldn’t be too hard to implement (although brittle: the backslashes, parens, and square brackets will interfere with other Markdown constructs, whereas dollars are not in use), I’m not really in favor of adding it: I prefer that remark (and other markdown parsers) push a single way to do things. Having multiple ways to do a similar extension makes the Markdown you write less portable.

from remark-math.

twavv avatar twavv commented on August 16, 2024

I (a person on the internet) disagree with this decision.

Using \( is not a config option, it's part of LaTeX syntax and is actually ENCOURAGED: https://tex.stackexchange.com/questions/510/are-and-preferable-to-dollar-signs-for-math-mode.

I understand that TeX !== LaTeX but it still feels like a thing that should be supported.

from remark-math.

wooorm avatar wooorm commented on August 16, 2024

We’re not necessarily covering (la)tex here though: it’s about math in markdown in general, which could be mathml or asciimath syntax too.

And, see #39 (comment): you can do this yourself if you want to!

from remark-math.

twavv avatar twavv commented on August 16, 2024

I don't feel like users should have to fork the project to be able to do this. Is it really that complex to implement here? It seems like it's not (but I might be mistaken).

from remark-math.

ChristianMurphy avatar ChristianMurphy commented on August 16, 2024

@travigd there's a fine line here.
Adding configuration for markers may have value to discuss on it's own.

The push back is on reason presented, which appears to be "it's in latex, so it should be here".
That is a non-goal, markdown is not latex.

If you want a latex transformer, contributions towards syntax-tree/ideas#6 are welcome!
If there is a markdown focused reason, it may be worth exploring.

from remark-math.

danny-avila avatar danny-avila commented on August 16, 2024

If someone wants this btw, packages/remark-math can be forked to add that. rehype-katex and such will still work if you expose the same math node in Markdown!

Can you give some examples on how to do this exactly? Looking at the package code, I'm a little lost albeit I haven't made my own plugin before.

from remark-math.

ChristianMurphy avatar ChristianMurphy commented on August 16, 2024

@danny-avila see the guide to plugins and ASTs at https://unifiedjs.com/learn/
And extending the parser at https://github.com/micromark/micromark#creating-a-micromark-extension

from remark-math.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.