Code Monkey home page Code Monkey logo

Comments (13)

goessner avatar goessner commented on September 21, 2024

Be sure to have ...

  • version 2.7.4 installed
  • closed and opened VSCode again after having changed settings.

For me

Vectors in $\RR^2$ have a shape of

$$\vek{x}{y}$$

gives
grafik

btw: KaTeX now supports \R natively, so macro \RR makes sense only for demonstration reasons.

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

Simply does not work for me, on two different computers too. Maybe it's an interaction with one of my installed extensions?

```math
\RR
```

$\RR$

$$
\RR
$$

Produces

image

settings.json section:

    "mdmath.delimiters": "gitlab",
    "mdmath.macros":{
        "\\RR":"\\mathbb{R}",
        "\\vek": "{\\begin{pmatrix}#1\\\\#2\\end{pmatrix}}",
        "\\test":"2+2"
    },

Extensions
image

from mdmath.

goessner avatar goessner commented on September 21, 2024

hmm ... please deactivate all markdown related extensions ... temporarily ...

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

Interesting, it's one of the extensions. Working on figuring out which one right now.

```math
\RR
```

$\RR$

$$
\RR
$$

Produces
image

Not sure why $\RR$ isn't working, but, progress?

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

It's the Markdown All In One extension.

Ugh I bet it's this, right in the Readme:

Please use Markdown+Math for dedicated math support. Be sure to disable math.enabled option of this extension.

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

Fixed.
Code:

```math
\RR \\
\vek{x}{y} \\
\test \\
```

Produces:
image

Settings:

  "markdown.extension.math.enabled": false, //<- This fixes the macro issue
  "mdmath.delimiters": "gitlab",
  "mdmath.macros":{
      "\\RR":"\\mathbb{R}",
      "\\vek": "{\\begin{pmatrix}#1\\\\#2\\end{pmatrix}}",
      "\\test":"2+2"
  },

Sorry for the trouble! Can close this, I think.

from mdmath.

goessner avatar goessner commented on September 21, 2024

Thanks for successfully investigating this. Can you please do me a favor and raise an analog issue regarding macro collision there, while referencing your reproducable steps here ... thanks.

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

I'd be happy to do that, but I'm not exactly clear on what you mean? Could you clarify more precisely what you'd like me to do?

from mdmath.

goessner avatar goessner commented on September 21, 2024

don't worry ... I did it by myself ... thanks again.

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

don't worry ... I did it by myself ... thanks again.

I have another problem, but I wanted to ask you about it before opening a whole issue. Is there any way to get latex macros to render with the markdown file uploaded to gitlab/github? I'm getting the error "There was an error rendering this math block," I assume because gitlab doesn't know how to interpret the macros without them being defined anywhere. Not sure how to resolve this, or if it's even possible?

from mdmath.

goessner avatar goessner commented on September 21, 2024

hmm ... macros are resolved in VSCode Markdown via mdmath via markdown-it-texmath via KaTeX. GitLab should have a completely different math engine. If that doesn't support macros, you are lost. GitHub doesn't have a math engine at all.

The only way I know is working, is to export HTML from mdmath to GitHub pages or something similar with GitLab.

from mdmath.

rjmigliori avatar rjmigliori commented on September 21, 2024

hmm ... macros are resolved in VSCode Markdown via mdmath via markdown-it-texmath via KaTeX. GitLab should have a completely different math engine. If that doesn't support macros, you are lost. GitHub doesn't have a math engine at all.

The only way I know is working, is to export HTML from mdmath to GitHub pages or something similar with GitLab.

That's what I figured. How do you get github to render html (I looked into it a bit online but I'm wondering what your approach is)?

from mdmath.

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.