Skip to content

Macros with arguments #2589

Answered by ronkok
gr-qft asked this question in General
Discussion options

You must be logged in to vote

Try an example:

const math = katex.renderToString(expr, {
    displayMode: false,
    macros: {
        "\\addBar": "\\bar{#1}",
        "\\bold": "\\mathbf{#1}"
    }
  });

That should enable something like \addBar{y} + \bold{H} to return

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by kevinbarabash
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants