Skip to content

Global Katex \newcommand #71

Answered by yhatt
fdegrave asked this question in Q&A
Feb 3, 2021 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

[UPDATED]

Hey @fdegrave, I've updated Marp's math handling in marp-team/marp-core#212, to persist KaTeX macros, that have defined as global, between math typesetting in a Markdown. It has shipped as Marp Core v1.4.1, and that has bundled into the latest update of Marp tools, CLI v0.23.1 and VS Code extension v0.17.1!

KaTeX has supported following commands to define new command as globally:

\gdef, \xdef, \global\def, \global\edef, \global\let, and \global\futurelet will persist between math expressions.

-- https://katex.org/docs/supported.html#macros

As you can see from this quote, please notice that \newcommand you're using cannot persist the command.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@fdegrave
Comment options

@yhatt
Comment options

yhatt Feb 4, 2021
Maintainer

Comment options

You must be logged in to vote
1 reply
@fdegrave
Comment options

Answer selected by yhatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants