Code Monkey home page Code Monkey logo

mathpix-markdown-it's People

Contributors

dependabot[bot] avatar iammosespaulr avatar nicodjimenez avatar olgaredozubova avatar sergeykitchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mathpix-markdown-it's Issues

Render SVG+XML in base64 as Img tag

In markdown-it i can override link validator to use svg+xml data type for img tag

see 23 code row https://github.com/markdown-it/markdown-it/blob/064d602c6890715277978af810a903ab014efc73/lib/index.js

standard markdown-it gives only gif | png | jpeg | webp types. i need add jpg and svg+xml

like this

mdit.validateLink = (url: string) => {
    const BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
    const GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|jpg|webp|svg\+xml);/;
    const str = url.trim().toLowerCase();
    return BAD_PROTO_RE.test(str) ? GOOD_DATA_RE.test(str) : true;
};

i want render string like this one
![chart.svg](data:image/svg+xml;base64, ...base64....

how can i do it?

Smiles. Rendering problem. Cation is displayed but anion is not.

  1. Rendering problem. Cation is displayed but anion is not. The molecule is net neutral, so if you're going to show the cation you have to show the anion, or neither.
    Smiles: [C-]#[NH+]

Снимок экрана 2020-12-09 в 10 54 44


By default, smilesDrawer does not draw anion.
SmilesDrawer has setting terminalCarbons: true (Show Terminal Carbons (CH3))

<MathpixMarkdown
  text='<smiles>[C-]#[NH+]</smiles>'
  smiles={{terminalCarbons: true}}
/>

After that the anion will be displayed:
Снимок экрана 2020-12-09 в 10 46 09

Also, If the terminalCarbons setting is enabled - all Carbons will be drawn:

Снимок экрана 2020-12-09 в 10 53 38

Licence Information

Hello!
Thanks a ton for making this valuable library open-source. I am sure that the academic community will greatly benefit from this. Do you mind adding a license to this repo?

SMILES chemistry. Adding the ability to display alternating double and single lines for aromatic rings

Aromaticity can be represented in one of two ways in a SMILES.

  • In the Kekulé form, using alternating single and double bonds, with uppercase symbols for the atoms.
  • An atomic symbol that begins with a lowercase letter is an aromatic atom, such as 'c' for aromatic carbon. When aromatic symbols are used, no bond symbols are needed.

A lowercase aromatic symbol is defined as an atom in the sp2 configuration in an aromatic or anti-aromatic ring system. For example:

Снимок экрана 2020-11-12 в 08 43 04

http://opensmiles.org/spec/open-smiles-3-input.html#4

In the SmilesDraw algorithm, aromatic rings are displayed using a ring or dashed lines (if there are bridge rings in the molecule):
Снимок экрана 2020-11-12 в 08 50 58


Need to add the ability to display aromatic rings (indicated by lowercase characters) using alternating double and single lines:
Снимок экрана 2020-11-12 в 08 57 34

Latex command: "" not working

this latex command will break the rendering: "C = \left{-\frac{1}{2}, \sqrt{2} \right} \not \subset M"

if the "\not" is removed the code will work. is there a workaround or can you guys fix it?

Best,
Elias

Table bug (?)

With PDFLatex, this string:

\begin{tabular}{|c|c|c|c|c|c|}\hline \multirow{2}{*} {} & \multicolumn{2}{|c|} { Latency \( (\mathrm{s}) \)} & \multicolumn{2}{|c|} { Message Sizes \( (\mathrm{MB}) \)} & \multirow{2}{*} { Accuracy \( \% \)} \\ \cline { 2 - 5 } & offline & online & offline & online & \\ \hline ReLU/CNN/MNIST (Figure 12) & 3.58 & 5.74 & 20.9 & 636.6 & 99.0 \\ \hline ReLU/CNN/CIFAR-10 (Figure 13) & 472 & 72 & 3046 & 6226 & 81.61 \\ \hline Sigmoidal/LSTM/PTB (Figure 14) & 13.9 & 4.39 & 86.7 & 474 & cross-entropy loss:4.79 \\ \hline\end{tabular}

renders:

image

However, with mathpix-markdown-it, I'm getting:

image

Support latex inside html

Hi Mathpix Team,

With the option htmlTags={true} on a MathpixMarkdown component it is possible to render html, but it seems not to be possible to write latex inside html. Do you think there is a way to implement this capability?

For example, can you provide any way to render:

<MathpixMarkdown htmlTags={true} text={"<div>$$2+2$$</div>"}

another example:

<ol>
<li>\begin{align*}
&\frac{x+4}{(x+1)(x-2)}
\end{align*}</li>
</ol>

Line breaks not always appearing in rendered output

As of 1.0.74, line breaks in the markdown source are not always resulting in line breaks appearing in the rendered output. The rendered output of

      <MathpixLoader>
        <MathpixMarkdown text={"<span class=\"\">a</span>\n\n<span class=\"\">b</span>"} />
        <hr/>
        <MathpixMarkdown text={"<span class=''>a</span>\n\n<span class=''>b</span>"} />
        <hr/>
        <MathpixMarkdown text={"<span class=\"\">a</span>\n\n<span class=\"\">b</span>"} htmlTags />
        <hr/>
        <MathpixMarkdown text={"<span class=''>a</span>\n\n<span class=''>b</span>"} htmlTags />
      </MathpixLoader>

has changed from the 1.0.73 output:
image

to the 1.0.74+ output:
image

when rendered using the react app example provided at https://github.com/Mathpix/mathpix-markdown-it/tree/master/examples/react-app/use-components.

It seems to be specific to having a span with a class which uses double quotes for the class, but does not depend on whether the span tag is actually rendered as HTML or not (i.e. whether the htmlTags option is set).

Add support for \diagbox{...}{...}

For now, let's not worry about all \diagbox parameters, but only implement the default functionality, which by default creates a backslash within a cell.

For example:

\begin{tabular}{|l|ccc|}
\hline
\diagbox{Time}{Day} & Mon & Tue & Wed \\
\hline
Morning & used & used & \\
Afternoon & & used & used \\
\hline
\end{tabular}

should render this:

image

When converting to TSV / CSV I think we can consider a \diagbox cell to be a single cell, eg Time \ Day

Source maps refer to missing `src` folder in NPM release version

When compiling a project that depends on mathpix-markdown-it, I get a ton of errors like this:

WARNING in ./node_modules/mathpix-markdown-it/lib/markdown/sanitize/consts.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/benjamin/mathpix/mathpix-monorepo/remirror-mathpix/node_modules/mathpix-markdown-it/src/markdown/sanitize/consts.ts' file: Error: ENOENT: no such file or directory, open '/home/benjamin/mathpix/mathpix-monorepo/remirror-mathpix/node_modules/mathpix-markdown-it/src/markdown/sanitize/consts.ts'
 @ ./node_modules/mathpix-markdown-it/lib/markdown/sanitize/index.js 10:15-34
 @ ./node_modules/mathpix-markdown-it/lib/markdown/rules.js 8:17-38
 @ ./node_modules/mathpix-markdown-it/lib/markdown/index.js 12:14-32
 @ ./node_modules/mathpix-markdown-it/lib/mathpix-markdown-model/index.js 10:17-39
 @ ./node_modules/mathpix-markdown-it/lib/index.js 82:31-66

I believe the reason is that the *.js.map files in the lib folder all refer to files in the src folder. However, the NPM bundle only includes lib, not src, causing the source map error above.

For example, the contents of lib/index.js.map are:

{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"], ... }

Rendering of large arrays fails with `MathJax internal buffer size exceeded; is there a recursive macro call?` error

To reproduce paste this into Snip editor:

\[
\begin{array}{l}
\text { Out[40] }=-\left((\Omega 1)-i m \mathrm{R} 1^{2} \delta^{3}\left(\mathrm{R} 1^{2}(1+\delta)^{2}\left(3 \mathrm{R} 1^{2}+\mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right)(1-\mu)-\right.\right. \\
\left.(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(\mathrm{R} 1^{2}+\mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right)\left(1-(1+\delta)^{2} \mu\right)\right) \Omega 1 \mathrm{u} 1[\mathrm{X}]+ \\
\mathrm{R} 1^{2} \delta^{3}\left(-2 \mathrm{a}^{2} \mathrm{R} 1^{2} \delta^{2}(1+\delta)^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}(-1+\mu)-2 \mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{4}\left(1-(1+\delta)^{2} \mu\right)+\right. \\
\left.m^{2}\left(-3 R 1^{4}(1+\delta)^{2}(-1+\mu)+R 1^{2}(R 1+R 1 \times \delta)^{2}\left(-1+(1+\delta)^{2} \mu\right)\right)\right) \Omega 1 \vee 1[x]- \\
i m \mathrm{R} 1 \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(-\mathrm{R} 1^{4}(1+\delta)^{2}(-1+\mu)+\mathrm{R} 1^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(1-(1+\delta)^{2} \mu\right)\right) \Omega 1 \mathrm{ul}^{\prime}[\mathrm{x}]- \\
m^{2} \mathrm{R} 1 \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(-\mathrm{R} 1^{4}(1+\delta)^{2}(-1+\mu)+\mathrm{R} 1^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(-1+(1+\delta)^{2} \mu\right)\right) \Omega 1 \vee 1^{\prime}[\mathrm{x}]+ \\
i m \delta(R 1+R 1 \times \delta)^{2}\left(-R 1^{4}(1+\delta)^{2}(-1+\mu)+R 1^{2}(R 1+R 1 \times \delta)^{2}\left(-1+(1+\delta)^{2} \mu\right)\right) \Omega 1 u 1^{\prime \prime}[x]+ \\
2 \mathrm{R} 1^{2}(2+\delta)(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2} \sigma \sqrt{-\frac{\mathrm{R} 1^{4} \delta^{3}\left(-1+(1+\delta)^{2} \mu\right) \Omega 1^{2}}{\mathrm{~T}(2+\delta)}} \\
\left(i \delta^{2}\left(1+a^{2} \delta^{2}(1+x \delta)^{2}\right) u 1[x]-m \delta^{2} \vee 1[x]-i(1+x \delta)\left(\delta u 1^{\prime}[x]+i m \delta \vee 1^{\prime}[x]+(1+x \delta) u 1^{\prime \prime}[x]\right)\right)+ \\
2(2+\delta) \sqrt{-\frac{\mathrm{R} 1^{4} \delta^{3}\left(-1+(1+\delta)^{2} \mu\right) \Omega 1^{2}}{\mathrm{~T}(2+\delta)}}\left(-\mathrm{R} 1^{4} \delta^{4}\left(3+\mathrm{a}^{2} \delta^{2}(1+\mathrm{x} \delta)^{2}\right)\right. \\
\left(-1+m^{2}+a^{2} \delta^{2}(1+x \delta)^{2}\right) u 1[x]-3 i m R 1^{2} \delta^{4}\left(-R 1^{2}+m^{2} R 1^{2}+a^{2} \delta^{2}(R 1+R 1 \times \delta)^{2}\right) \vee 1[x]- \\
\mathrm{R} 1 \delta^{3}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(3 \mathrm{R} 1^{2}+\mathrm{m}^{2} \mathrm{R} 1^{2}-2 \mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \mathrm{u} 1^{\prime}[\mathrm{x}]+ \\
i m \mathrm{R} 1 \delta^{3}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(-3 \mathrm{R} 1^{2}+\mathrm{m}^{2} \mathrm{R} 1^{2}+\mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \vee 1^{\prime}[\mathrm{x}]+ \\
\delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(3 \mathrm{R} 1^{2}+\mathrm{m}^{2} \mathrm{R} 1^{2}+2 \mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \mathrm{u} 1^{\prime \prime}[\mathrm{x}]+ \\
2 i m \mathrm{R} 1^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2} \vee 1^{\prime \prime}[\mathrm{x}]-2 \mathrm{R} 1 \delta(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{3} \mathrm{u} 1^{(3)}[\mathrm{x}]- \\
\left.\left.\left.i m \mathrm{R} 1 \delta(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{3} \vee 1^{(3)}[\mathrm{x}]-(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{4} \mathrm{u} 1^{(4)}[\mathrm{x}]\right)\right) /\left(\mathrm{a}^{2} \mathrm{R} 1 \delta^{6}(2+\delta)(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{4}\right)\right) \\
\text { Out[41] }=-\left(\int \Omega 1 \left(\mathrm { R } 1 ^ { 2 } \delta ^ { 2 } \left(\mathrm{m}^{2} \mathrm{R} 1^{4}(1+\delta)^{2}(-1+\mu)+\right.\right.\right. \\
\left.m^{2} \mathrm{R} 1^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(1-(1+\delta)^{2} \mu\right)+2 \mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{4}\left(1-(1+\delta)^{2} \mu\right)\right) \Omega 1 \mathrm{u} 1[\mathrm{x}]- \\
\text { im R1 }^{6} \delta^{3}\left(m^{2}+a^{2} \delta^{2}(1+x \delta)^{2}\right)\left(2+\delta+2 x\left(-1+(1+\delta)^{2} \mu\right)+x^{2} \delta\left(-1+(1+\delta)^{2} \mu\right)\right) \Omega 1 \vee 1[x]- \\
m^{2} \mathrm{R} 1 \delta(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(-\mathrm{R} 1^{4}(1+\delta)^{2}(-1+\mu)+\mathrm{R} 1^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(-1+(1+\delta)^{2} \mu\right)\right) \Omega 1 \mathrm{u} 1^{\prime}[\mathrm{x}]+ \\
2 \mathrm{R} 1^{2}(2+\delta)(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2} \sigma \sqrt{-\frac{\mathrm{R} 1^{4} \delta^{3}\left(-1+(1+\delta)^{2} \mu\right) \Omega 1^{2}}{\mathrm{~T}(2+\delta)}} \\
\left(m \delta u 1[x]+i \delta\left(m^{2}+a^{2} \delta^{2}(1+x \delta)^{2}\right) \vee 1[x]+m(1+x \delta) u 1^{\prime}[x]\right)+2(2+\delta) \\
\sqrt{-\frac{\mathrm{R} 1^{4} \delta^{3}\left(-1+(1+\delta)^{2} \mu\right) \Omega 1^{2}}{\mathrm{~T}(2+\delta)}}\left(i \mathrm{~m} \mathrm{R} 1^{2} \delta^{3}\left(-\mathrm{R} 1^{2}+\mathrm{m}^{2} \mathrm{R} 1^{2}+3 \mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \mathrm{u} 1[\mathrm{x}]-\delta^{3}\right. \\
\left(m^{4} R 1^{4}+a^{2} R 1^{2} \delta^{2}(R 1+R 1 \times \delta)^{2}+a^{4} \delta^{4}(R 1+R 1 \times \delta)^{4}-m^{2} R 1^{2}\left(R 1^{2}-2 a^{2} \delta^{2}(R 1+R 1 \times \delta)^{2}\right)\right) \\
v 1[x]+i m R 1 \delta^{2}(R 1+R 1 \times \delta)\left(R 1^{2}+m^{2} R 1^{2}+a^{2} \delta^{2}(R 1+R 1 \times \delta)^{2}\right) u 1^{\prime}[x]- \\
\mathrm{R} 1 \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)\left(\mathrm{m}^{2} \mathrm{R} 1^{2}-\mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \vee 1^{\prime}[\mathrm{x}]-2 i \mathrm{~m} \mathrm{R} 1^{2} \delta(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2} u 1^{\prime \prime}[\mathrm{x}]+ \\
\delta(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\left(\mathrm{~m}^{2} \mathrm{R} 1^{2}+\mathrm{a}^{2} \delta^{2}(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{2}\right) \vee 1^{\prime \prime}[\mathrm{x}]- \\
\left.\left.\left.i m \mathrm{R} 1(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{3} \mathrm{u} 1^{(3)}[\mathrm{x}]\right)\right) / /\left(\mathrm{a}^{2} \mathrm{R} 1 \delta^{5}(2+\delta)(\mathrm{R} 1+\mathrm{R} 1 \times \delta)^{4}\right)\right) 
\end{array}
\]

The content is valid, look at overleaf rendering here:
image

Also, rendering on mathjax demo site kind of works (https://mathjax.github.io/MathJax-demos-web/input-tex2svg.html):
image

Finally, I've found several samples like this which fail with the same error (so it is a matter of size rather than content).

Theorem environments?

It seems like the current version does not support theorem (and theorem-like) environments. Is this feature planned for the future? Thanks!

Add new command `\lcm`

We would like to support a new command called \lcm that is syntactically similar to \longdiv which is a custom latex command that we have.

Reference Image:

Sample Rendered Output:
image

\newcommand\lcm[1]{\underline{\smash{)}#1}}

\[ \begin{array}{r} 2 \lcm{20 \quad 30} \\ \square \lcm{10 \quad 15} \\ \square \quad \square \end{array} \]

The Rendered output here has a few extra artifacts, maybe you could clean that up as well! Like you did for \longdiv
image

Add new include_wolfram layer with wolfram output

The purpose is to provide a search string compatible with WolframAlpha computational engine (https://www.wolframalpha.com/). We can base this on our existing asciimath implementation. The ideal Wolfram output shown in these examples is basically almost identical to text + asciimath (with no delimiters).

Assuming multiplication Use a list instead

solve system of equations

Integrate

int sinxx dx, x=0 infinity

Also note that we want to be able to build a single WolframAlpha search string from the whole MMD string. We can do this via

parseMarkdownByHTML(html)

which could emit type="wolfram_equation" for each sub equation (maybe this could be useful in Snip?), as well as one single type="wolfram" entry for the whole output (for search applications that want to leverage the W/A engine which is the main purpose here).

Note that tentative progress has been made in the mose/wolfram-support branch. Moses and I struggled a little with getting the dev setup working, perhaps some things can be updated to improve the dev experience.

How to use this in React Native?

Can this library be used in react native? I have an app where i need to render the mathpix markdown. If no, any alternative please?

Thanks

Simplify aligned equations when converting to asciimath

Right now this latex:

\begin{aligned}
x+y+z &=0 \\
2 x+3 y+2 z &=-7 \\
-x-2 y-z &=1
\end{aligned}

gets converted to this asciimath:

{:[x+y+z,=0],[2x+3y+2z,=-7],[-x-2y-z,=1]:}

instead of what we want which is a version which flattens the columns:

{:[x+y+z=0],[2x+3y+2z=-7],[-x-2y-z=1]:}

Support inline math equation rendering inside sections and titles

In Overleaf I can do:

image

and I get:

image

Math equations currently don't work with MMD.

Note: LaTeX does not support block delimiters inside sections:

image

image

so we don't need to worry about this case either.

Supporting inline math inside sections and titles, however, is really important! A lot of academic papers use this.

Large Bundle Size

Hi Mathpix Team,

I tried to make a simple markdown editor using the following syntax

import { MathpixMarkdown, MathpixLoader } from "mathpix-markdown-it";

export default function Home() {

   return (
       <MathpixLoader>
              <MathpixMarkdown text={markdown} />
       </MathpixLoader>
   )
}

With Markdown

Page                                       Size     First Load JS
┌ ○ / (777 ms)                             1.56 MB        1.64 MB
├   └ css/149b18973e5508c7.css             655 B
├   /_app                                  0 B            77.4 kB
├ ○ /404                                   195 B          77.6 kB
└ λ /api/hello                             0 B            77.4 kB

Without Markdown

Page                                       Size     First Load JS
┌ ○ / (352 ms)                             7.78 kB          85 kB
├   └ css/149b18973e5508c7.css             655 B
├   /_app                                  0 B            77.2 kB
├ ○ /404                                   194 B          77.4 kB
└ λ /api/hello                             0 B            77.2 kB

When I see the actual editor used in Mathpix Site its much lesser than what I recieve from the methods mentioned.
I am unable to figure out the solution to reduce the bundle size of my app as well as what is causing this significant increase in app size!

Thanks in advance for any kind of help 🙏

Bug converting roots to asciimath

This latex:

\frac{\sqrt[4]{32 z^{6} y^{3}}}{\sqrt[4]{2 z^{2} y^{11}}}

gets converted into asciimath:

(root(32z^(6)y^(3))(4))/(root(2z^(2)y^(11))(4))

Instead, this should be the correct asciimath:

root(4)(32x^(6)y^(3))/(root(4)(2z^(2)y^(11)))

Four spaces before equation syntax doesn't transform it to code block

As you can see below, first should be as formula, but then code block as here in github. But i faced with double render formula

\begin{align}
\sigma^2 = \begin{pmatrix}
\sigma_1^2 & \sigma_{12} \
\sigma_{12} & \sigma_2^2
\end{pmatrix}.
\end{align}

\begin{align}
    \sigma^2 = \begin{pmatrix}
    \sigma_1^2 & \sigma_{12} \\
    \sigma_{12} & \sigma_2^2 
    \end{pmatrix}.
\end{align}

how i can use this mathpix marksdown in our html editor

We are using php and front is normal html how we can utlize this mathpix marksdown into our website please guide we don't have reactjs or angular js in frontend we are using normal html in view please guide us how to utlize this library

Add ability to customize image width via MMD

We want to support the following:

![foo](foo.png){ width=50% }

as well as:

![foo](foo.png){ width="36px" }

Of course height should be keep aspect ratio the same.

Note that is consistent with R markdown/ bookdown.

Add the ability for the user to choose how the aromatic ring is displayed

The ability to display alternating double and single lines for aromatic rings was added in mmd version 1.0.32
for this issue #103

Need to add users the ability to choose how the aromatic ring is displayed (circle or lines)
For example for inline:
<smiles ring = 'circle'>Cc1cc2c(cc1C)[n+]([O-])c(C#N)c(NS(=O)(=O)c3ccc4ccccc4c3)[n+]2[O-]</smiles>
Снимок экрана 2020-11-12 в 18 39 36

<smiles>Cc1cc2c(cc1C)[n+]([O-])c(C#N)c(NS(=O)(=O)c3ccc4ccccc4c3)[n+]2[O-]</smiles>
Снимок экрана 2020-11-12 в 18 39 27

Also need to add it on block:

```smiles(circle)
Cc1cc2c(cc1C)[n+]([O-])c(C#N)c(NS(=O)(=O)c3ccc4ccccc4c3)[n+]2[O-]
```

@nicodjimenez @montanaflynn @iammosespaulr Please let me know what you think about it.

"-" getting converted to \u2212

Steps to reproduce:

const {MathpixMarkdownModel} = require('mathpix-markdown-it');
const Window = require('window');
const window = new Window();
global.window = window;
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
global.DOMParser = new JSDOM().window.DOMParser;
const options = {
      outMath: {
        include_asciimath: true
      }
    };

const text = `\\[3-x\\]`;
const htmlMM = MathpixMarkdownModel.markdownToHTML(text, options);
const parsed = MathpixMarkdownModel.parseMarkdownByHTML(htmlMM);
console.log(parsed[0].value.charCodeAt(1));

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.