"newcommand" in header-includes does not do anything

Timmy's Avatar

Timmy

01 Jul, 2025 02:50 PM

In Pandoc markdown, it is standard (and recommended) to put \newcommand definition in the frontmatter under "header-includes". They do not seem to do anything in Marked 2. For example, even with

---
header-includes:
  - \newcommand{\CC}{\mathbb{C}}
  - \newcommand{\RR}{\mathbb{R}}
  - \newcommand{\ZZ}{\mathbb{Z}}
---
at the begining of the file, \CC is displayed as red \CC.
  1. Support Staff 1 Posted by Brett on 06 Jul, 2025 01:43 PM

    Brett's Avatar

    Are you using Pandoc as your custom processor? This won't do anything if not. If you are, be sure to go to Settings->Advanced and have Marked ignore YAML front matter so that it gets passed to Pandoc.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac