mathpix / mathpix-markdown-it Goto Github PK
View Code? Open in Web Editor NEWMarkdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
License: MIT License
Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
License: MIT License
If there's a good reason these files can't just be generated on demand, usage should be documented in the README.md file.
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?
Is this supported by MathJax?
[C-]#[NH+]
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:
Also, If the terminalCarbons
setting is enabled - all Carbons will be drawn:
Why we are not supporting fully latex support we only support Mathjax which is not more advanced yet please do something in matter and make Mathpix more suitable for other users
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?
Aromaticity can be represented in one of two ways in a SMILES.
A lowercase aromatic symbol is defined as an atom in the sp2 configuration in an aromatic or anti-aromatic ring system. For example:
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):
Need to add the ability to display aromatic rings (indicated by lowercase characters) using alternating double and single lines:
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
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:
However, with mathpix-markdown-it, I'm getting:
We currently use [email protected]
This should fix this issue #181
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>
Hi,
I'm trying to use mathpix-markdown-it with remix.run framework, but I get error:
.
I "solved" it by just commenting out lines with errors, but then I get another error:
I "solved" this one by adding this line to root.tsx:
But then again I got another error:
.
I don't know what to do anymore.
Here is reproduceable: https://codesandbox.io/s/relaxed-torvalds-mknke?file=/app/routes/index.jsx
The svg format should start with <svg ...>
and end with </svg>
.
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:
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).
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:
When converting to TSV / CSV I think we can consider a \diagbox cell to be a single cell, eg Time \ Day
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"], ... }
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:
Also, rendering on mathjax demo site kind of works (https://mathjax.github.io/MathJax-demos-web/input-tex2svg.html):
Finally, I've found several samples like this which fail with the same error (so it is a matter of size rather than content).
mathpix-markdown-it/package.json
Line 63 in f7f0830
github is blocked in my country.but npm mirror still work
It seems like the current version does not support theorem (and theorem-like) environments. Is this feature planned for the future? Thanks!
how we can use this markdown to edit maths equation please guide me
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:
\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
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).
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.
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
Any reply will be appreciated!
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]:}
In Overleaf I can do:
and I get:
Math equations currently don't work with MMD.
Note: LaTeX does not support block delimiters inside sections:
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.
Maybe this is easy so solve?
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>
)
}
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
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 🙏
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)))
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}
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
Some tests for checking svg was crashed for master branch
https://app.circleci.com/pipelines/github/Mathpix/mathpix-markdown-it/217/workflows/5f72c66b-3801-4f42-90cb-d65d1b393d80/jobs/141/tests
But these tests run correctly for the staging branch and locally
https://app.circleci.com/pipelines/github/Mathpix/mathpix-markdown-it/216/workflows/2857cbe2-942e-4e79-893a-60d053c14b0b/jobs/139/tests
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.
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>
<smiles>Cc1cc2c(cc1C)[n+]([O-])c(C#N)c(NS(=O)(=O)c3ccc4ccccc4c3)[n+]2[O-]</smiles>
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.
(Deleted)
Related issue: https://github.com/Mathpix/mathpix/issues/1630
Basically rendering \pounds
does not work, error is undefined control sequence.
For examples <smiles inchi="...">CCC</smiles>
should render properly - currently it doesn't.
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));
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.