bradhowes / remarkable-katex Goto Github PK
View Code? Open in Web Editor NEWA Remarkable plugin for converting $...$ and $$...$$ in Markdown text into math HTML using KaTeX.
License: MIT License
A Remarkable plugin for converting $...$ and $$...$$ in Markdown text into math HTML using KaTeX.
License: MIT License
hi, thinks for this project, is it could render this
$$\begin{tikzpicture}[scale=1.0544]\small
\begin{axis}[axis line style=gray,
samples=120,
width=9.0cm,height=6.4cm,
xmin=-1.5, xmax=1.5,
ymin=0, ymax=1.8,
restrict y to domain=-0.2:2,
ytick={1},
xtick={-1,1},
axis equal,
axis x line=center,
axis y line=center,
xlabel=$x$,ylabel=$y$]
\addplot[red,domain=-2:1,semithick]{exp(x)};
\addplot[black]{x+1};
\addplot[] coordinates {(1,1.5)} node{$y=x+1$};
\addplot[red] coordinates {(-1,0.6)} node{$y=e^x$};
\path (axis cs:0,0) node [anchor=north west,yshift=-0.07cm] {0};
\end{axis}
\end{tikzpicture}$$
just like https://upmath.me/,
https://github.com/parpalak/upmath.me
hello,
good work with developing a great plugin! I'm excited to try it out, however I am having trouble properly displaying the rendered formulas
I include the plugin in my react project just as you instructed here, however the formula does not render properly, for instance for the input
$$\sqrt{a}$$
I get this html
<span class="katex-display"><span class="katex"><span class="katex-mathml"><math>
<semantics>
<mrow>
<msqrt>
<mrow>
<mi>
a
</mi>
</mrow>
</msqrt>
</mrow>
<annotation encoding="application/x-tex">
\sqrt{a}
</annotation>
</semantics></math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.8491550000000001em;"></span><span class="strut bottom" style="height:1.04em;vertical-align:-0.190845em;"></span><span class="base displaystyle textstyle uncramped"><span class="mord sqrt"><span class="sqrt-sign" style="top:-0.009155000000000024em;"><span class="style-wrap reset-textstyle textstyle uncramped">√</span></span><span class="vlist"><span style="top:0em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:1em;"></span></span><span class="mord displaystyle textstyle cramped"><span class="mord mathit">a</span></span></span><span style="top:-0.769155em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:1em;"></span></span><span class="reset-textstyle textstyle uncramped sqrt-line"></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:1em;"></span></span></span></span></span></span></span></span></span>
And renders as
I am guessing stylesheet or client side javascript might be missing, I'm not entirely sure how to inclue all that using remarkable
Could you maybe share source of your blog or some more complete example?
Open curly brace (without a matching "closing" brace) will break the parse even when escaped.
I'm getting the string from a json file like this:
$\\left\\{ \\begin{matrix}a + b + b = c \\\\ a + b = c\\end{matrix}\\right.$
won't parse
$\\left[ \\begin{matrix}a + b + b = c \\\\ a + b = c\\end{matrix}\\right.$
parses correctly
Changing the parser on lines 100 and 102 like this will make it work:
while (pos < max) {
const char = state.src.charAt(pos);
if (char === '{' && state.src.charAt(pos-1) !== '\\') {
escapedDepth += 1;
} else if (char === '}' && state.src.charAt(pos-1) !== '\\') {
escapedDepth -= 1;
if (escapedDepth < 0) { return false; }
I'm not very familiar with katex/math so i'm not sure if it would break something else, but i can make a PR with the change if that's ok!
$\colorbox{aqua}{$F=ma$}$
currently parses as two math chunks, $\colorbox{aqua}{$
and $}$
, which is not correct.
Would you be willing to either add, or review a PR to add, proper brace handling so that this properly parses? For an example of how this can be done, see https://github.com/KaTeX/KaTeX/blob/master/contrib/auto-render/splitAtDelimiters.js
This bug is currently hampering the actual KaTeX documentation, which uses your plugin (!). See KaTeX/KaTeX#2280 (review)
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.