Stackedit: No more \newcommand in StackEdit 5

Created on 29 Jan 2018  Â·  14Comments  Â·  Source: benweet/stackedit

In StackEdit 4 I just began each of my documents with a preamble that contained a bunch of custom commands. e.g.

$$
\newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\argmax}[1]{\underset{#1}{\operatorname{argmax}}}
\newcommand{\argmin}[1]{\underset{#1}{\operatorname{argmin}}}
\newcommand{\switch}[3]{\begin{cases} #2 & \text{if } {#1} \\ #3 &\text{otherwise}\end{cases}}
$$

I see that using \newcommand is no longer allowed in StackEdit 5 (guess because Katex is now used instead of MathJax?).

This is kind of a deal-breaker for me. Is there any workaround other than reverting to StackEdit 4? Maybe there's a way to make it use MathJax?

Most helpful comment

KaTeX is really behind MathJaX (Feature wise).
It hurts Students using StackEdit.

Any chance you give us the option to use MathJaX as it used to be?

Thank You.

All 14 comments

Yes the v5 uses katex. We have to wait for this ticket to be closed: https://github.com/Khan/KaTeX/issues/37

KaTeX is really behind MathJaX (Feature wise).
It hurts Students using StackEdit.

Any chance you give us the option to use MathJaX as it used to be?

Thank You.

@RoyiAvital you can use the link https://stackedit.io/editor# to run StackEdit 4, which will allow \newcommand

@petered , Well then other features are missing (Dropbox).
I don't get the idea of reducing features between versions.
StackEdit was great because of its perfect Math support and that was the feature I paid for.
Breaking compatibility doesn't make sense in my opinion, I need to find other solution.

So far Visual Studio Code + Markdown Preview Enhanced extension are the closest I can get to StackEdit as it was.

I'm working on my project Moeditor, a local markdown editor app. Maybe I'll use StackEdit 5's core and add MathJax support.

Note that \newcommand has been implemented in the latest KaTeX: https://github.com/Khan/KaTeX/pull/1382

\newcommand still not working on stackedit5?

Seems not yet, I still get:

KaTeX parse error: Expected 'EOF', got '\newcommand' at position 1: \̲n̲e̲w̲c̲o̲m̲m̲a̲n̲d̲{\pderiv}[2]{\f…

Upgraded to katex v0.10.0-rc.1.

Thanks, now \newcommand works within one "$$" but still not globally...

I still find this to be an issue (Taken from StackEdit landing page):

image

StackEdit used to have perfect compatibility with StackExchange network for Math.
Yet since the move to KaTeX in StackEdit 5.x this doesn't hold anymore.

I really wish for a MathJaX mode with proper scientific writing as we had before in StackEdit.
MathJaX can work with ID / Labels just like KaTeX.

I have been using hackmd for a while but they dont support working offline, so now I am trying stackedit. But without having \newcommand available, I will not take it up more seriously. Any other recommendations? Is there a system that supports offline work and \newcommand/full mathjax?

@alexhkurz , I use VS Code + MarkDown Preview Enhanced.
It works perfectly!

If you can skip the live preview, I think the best is Sublime Text + MarkDown Preview (By @facelessuser).

thanks ... I am just trying VS Code + MarkDown Preview Enhanced ... looks good so far ...

On 20 Oct 2018, at 22:46, Royi notifications@github.com wrote:

@alexhkurz , I use VS Code + MarkDown Preview Enhanced.
It works perfectly!

If you can skip the live preview, I think the best is Sublime Text + MarkDown Preview (By @facelessuser).

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

javadba picture javadba  Â·  7Comments

nobozo picture nobozo  Â·  5Comments

joekaiser picture joekaiser  Â·  5Comments

alankis picture alankis  Â·  4Comments

KOLANICH picture KOLANICH  Â·  4Comments