How to format math markdown for pandoc pipeline
- Step 1Confirm your source uses non-dollar math — Check whether equations are written as
\(...\)/\[...\]. If so, Pandoc's default reader will not see them as math — this is the input that needs preparing. - Step 2Paste or upload the Markdown — Drop the
.mdfile or paste the source. The character counter shows your size against the 500,000-character Free limit. - Step 3Set Target style to dollar — Choose
$ inline / $$ block (KaTeX). Despite the KaTeX label, the$/$$output is precisely Pandoc's expected math delimiter convention. - Step 4Run the pass — Process the document.
\(...\)becomes$...$, and\[...\]becomes a blank-line-surrounded$$...$$block — both Pandoc-ready. - Step 5Feed the output to Pandoc — Download or copy the normalized Markdown and run your usual command, e.g.
pandoc input.md -o output.pdf. Math now converts to native LaTeX/typeset output. - Step 6Handle anything Pandoc still rejects manually — If math still doesn't convert, check for AMS environments or escape damage — this tool only normalizes the four delimiter forms and does not edit equation content.
Pandoc math recognition vs this tool's output
Pandoc's default markdown reader recognizes dollar delimiters for math; the backslash forms are not math by default. This tool targets the recognized forms.
| Delimiter form | Pandoc default reader treats it as | After dollar-target pass |
|---|---|---|
$ ... $ | Inline math | Unchanged (already Pandoc-ready) |
$$ ... $$ | Display math | Unchanged (already Pandoc-ready) |
\( ... \) | Literal raw text (not math) | → $ ... $ (now math) |
\[ ... \] | Literal raw text (not math) | → $$ ... $$ block (now math) |
What the prep pass does and doesn't do
Scope of the normalization relative to Pandoc's needs.
| Concern | Handled by this tool? |
|---|---|
Convert \(/\[ to $/$$ | Yes — target dollar |
| Isolate display math on its own block | Yes — blank lines added to converted \[...\] |
Recognize \begin{equation} / align | No — passed through untouched |
| Unescape doubled backslashes | No — content not edited |
Escape stray prose $ for Pandoc | No — does not escape literals |
Skip fenced code (``` ```) | Yes — preserved verbatim |
Tier limits before the Pandoc step
Per-file ceilings by plan; charLimit is independent of byte size.
| Tier | Max file size | Max characters | Files per run |
|---|---|---|---|
| Free | 1 MB | 500,000 | 1 |
| Pro | 10 MB | 5,000,000 | 10 |
| Pro-media | 50 MB | 20,000,000 | 50 |
| Developer | 500 MB | Unlimited | Unlimited |
Cookbook
Before/after prep for Pandoc. Target is always dollar, because Pandoc's default reader keys on $/$$.
MathJax-delimited source → Pandoc-ready
Source from a MathJax wiki uses \(/\[, which Pandoc ignores as math. The dollar pass converts both so pandoc -o out.pdf typesets them.
SOURCE (Pandoc would pass these through as text):
The area \( A = \pi r^2 \) and the volume
\[ V = \tfrac{4}{3}\pi r^3 \]
TARGET: dollar
PANDOC-READY:
The area $ A = \pi r^2 $ and the volume
$$ V = \tfrac{4}{3}\pi r^3 $$Already-dollar source needs no change
If the source already uses $/$$, it is Pandoc-ready and the pass leaves it untouched — safe to run as a guard step.
SOURCE (already Pandoc-ready):
Mean $\bar{x}$ and variance:
$$ s^2 = \frac{1}{n-1}\sum (x_i-\bar x)^2 $$
TARGET: dollar
OUTPUT (unchanged):
Mean $\bar{x}$ and variance:
$$ s^2 = \frac{1}{n-1}\sum (x_i-\bar x)^2 $$Display math promoted to its own block for Pandoc
Pandoc prefers display math isolated. A mid-sentence \[...\] becomes a blank-line-surrounded $$ block.
SOURCE:
The transform is \[ \hat{f}(\xi) = \int f(x)e^{-2\pi i x\xi}\,dx \] in 1D.
TARGET: dollar
PANDOC-READY:
The transform is
$$ \hat{f}(\xi) = \int f(x)e^{-2\pi i x\xi}\,dx $$
in 1D.Out of scope: AMS environment
Pandoc handles \begin{align} via its raw-LaTeX support, but this tool does NOT convert it. The environment passes through; if Pandoc needs delimiters around it, add them manually.
SOURCE:
\begin{align}
a &= b + c \\
d &= e - f
\end{align}
TARGET: dollar
OUTPUT (unchanged — handle in Pandoc directly):
\begin{align}
a &= b + c \\
d &= e - f
\end{align}Verbatim LaTeX example preserved for the manual
A Pandoc how-to that quotes delimiter syntax inside a fenced block. The fence is skipped, so the documentation example survives the prep.
SOURCE: Pandoc reads inline math as $...$, e.g.: ```text Inline: $x^2$ Display: $$y = mx + b$$ ``` Live math like \( z \) in prose is converted. TARGET: dollar PANDOC-READY: Pandoc reads inline math as $...$, e.g.: ```text Inline: $x^2$ Display: $$y = mx + b$$ ``` Live math like $ z $ in prose is converted.
Edge cases and what actually happens
Pandoc ignores `\(`/`\[` math without prep
Pandoc passthroughPandoc's default markdown reader does not treat \(...\) or \[...\] as math, so it copies them through as literal text and they never become typeset equations in PDF/DOCX. Running the dollar target first converts them to $/$$, which Pandoc recognizes.
AMS environments are not converted
Preserved\begin{equation}, \begin{align}, etc. are not among the four recognized delimiter forms, so they pass through untouched. Pandoc can often handle them via raw LaTeX, but this tool will not wrap or transform them — manage those in Pandoc directly.
Doubled backslashes survive
Out of scopeIf copy-paste doubled \\frac to \\\\frac, Pandoc will choke on the bad command even after delimiters are correct. This tool does not unescape backslashes — fix the source or use a find/replace step before the Pandoc run.
Prose dollars not escaped for Pandoc
Out of scopePandoc can mistake a stray $ in prose (a price) as opening math. This tool does not escape literal $ to \$. Escape them yourself, or keep the dollar target (which never inserts new $) and clean currency manually before converting.
Inline backtick math is converted
EditedOnly triple-backtick fences are protected. An inline ` \(x\) shown in a Pandoc tutorial is rewritten. Put quoted delimiter syntax inside ``` fenced blocks to keep it literal in the Pandoc output.
Tilde fences not protected
EditedPandoc supports ~~~ fenced code, but THIS tool's skip logic only recognizes ``` fences. Math inside a ~~~` block will be converted. Use triple-backtick fences for verbatim examples destined for Pandoc.
tex target produces non-Pandoc-default delimiters
Wrong directionChoosing the tex target outputs \(/\[, which Pandoc's default reader does NOT treat as math. For Pandoc prep, always use the dollar target. The tex target is for MathJax destinations, not Pandoc.
Math content spacing untouched
PreservedThe tool changes delimiters only; \( x \) becomes $ x $ with inner spaces intact. Pandoc handles inner spacing fine, so this is harmless, but don't expect tidy-up.
Source exceeds the free limit
RejectedInputs over 500,000 characters on Free are blocked before prep. A book-length manuscript for Pandoc needs Pro (5,000,000) or a pre-split with md-splitter.
Frequently asked questions
What math delimiters does Pandoc expect?
Pandoc's default markdown reader uses $ ... $ for inline math and $$ ... $$ for display math. It does not treat \( ... \) or \[ ... \] as math by default. So to prep for Pandoc, set Target style to dollar and convert any backslash-delimiter math to dollar form.
Why does my math disappear in the Pandoc PDF?
Almost always because the source used \(...\) or \[...\], which Pandoc's default reader passes through as literal text rather than math. Run this tool with the dollar target to convert those to $/$$, then re-run Pandoc and the equations will typeset.
Which Target style do I pick for Pandoc?
Always dollar ($ inline / $$ block). The KaTeX label is just the renderer it is named for, but the $/$$ output is exactly Pandoc's expected convention. Never use the tex target for Pandoc — \(/\[ is not Pandoc's default math syntax.
Does it handle `\begin{equation}` and `align`?
No. Only the four delimiter forms are recognized. AMS environments pass through untouched. Pandoc can handle them via its raw-LaTeX support in many output formats, but this tool will not transform them — manage those in Pandoc directly.
Will it escape stray dollar signs in prose?
No. It does not convert a literal $ (like a price) to \$. Because the dollar target never inserts new dollars, it won't make currency worse, but you should still escape or clean prose dollars manually so Pandoc doesn't read them as math.
Does it fix doubled backslashes from copy-paste?
No. It only relocates delimiters; it does not unescape \\frac to \frac. Fix escape damage in the source or with a find/replace step before running Pandoc.
Are my fenced code examples preserved?
Triple-backtick ``` blocks are skipped, so verbatim LaTeX examples survive into the Pandoc output. Note ~~~ fences and inline backtick spans are NOT protected — use ``` fences for anything that must stay literal.
Does the dollar target isolate display math for Pandoc?
Yes. When it converts \[...\] to $$...$$, it adds a blank line before and after, matching Pandoc's preference for display math on its own block. Equations already in $$ form are left as-is.
Is the equation content altered?
No. Only delimiter characters change; the LaTeX inside and its spacing are preserved exactly. Your equations reach Pandoc semantically unchanged.
Does it upload my file to a server?
No. Prep runs entirely in the browser, so sensitive source documents are normalized locally before they ever touch your Pandoc build pipeline. No account needed for Free.
How big a document can I prep for free?
Free handles 1 MB / 500,000 characters per file, one at a time. Pro raises this to 10 MB / 5,000,000 characters and 10 files; the character limit is enforced separately from byte size.
What tools pair well in a Pandoc workflow?
After normalizing math, run md-lint for structural issues, md-image-path-rewriter to fix asset paths Pandoc must resolve, and md-frontmatter-builder to add the YAML metadata Pandoc reads for title/author/date.
Privacy first
All Markdown processing runs locally in your browser using JavaScript. No file is ever uploaded to JAD Apps servers — only metadata counters are saved for signed-in dashboard stats.