How to standardize display math block spacing
- Step 1Target a KaTeX/remark-math pipeline — Standalone-block normalization is a
dollar-target behavior. Confirm your publishing renderer uses$/$$(KaTeX, remark-math, GitHub math) so the blank-line surrounds help rather than hurt. - Step 2Paste or upload the manuscript — Drop a
.md/.mdxfile or paste the chapter. The character counter tracks against the 500,000-character Free limit. - Step 3Set Target style to dollar — Choose
$ inline / $$ block (KaTeX). This is the option that converts\[...\]into blank-line-surrounded$$...$$blocks. - Step 4Run the normalization pass — Process the document. Every
\[...\]becomes a standalone$$block; every\(...\)becomes$...$inline. - Step 5Verify display blocks are isolated — Scan the output: each display equation should have a blank line above and below. Equations that were ALREADY
$$...$$won't have gained blank lines — add those manually. - Step 6Publish or hand off — Copy or download the result. The standalone display blocks now typeset correctly in your KaTeX-based publishing pipeline.
Display-block normalization by input form
What gets the standalone blank-line treatment. Only \[...\] converted on the dollar target gains surrounding blank lines.
| Input display block | Target dollar result | Gets blank-line surrounds? |
|---|---|---|
\[ ... \] mid-sentence | → blank line + $$ ... $$ + blank line | Yes |
$$ ... $$ already present | left unchanged | No (not re-spaced) |
\( ... \) (inline) | → $ ... $ | No (stays inline) |
\begin{equation}... | left unchanged | No (not recognized) |
Inline vs display handling (dollar target)
How the pass keeps inline and display math distinct in one run.
| Math role | Source delimiter | Normalized to | Layout effect |
|---|---|---|---|
| Inline | \(...\) | $...$ | Stays in the text flow |
| Display | \[...\] | $$...$$ | Promoted to a standalone block |
| Display (already $$) | $$...$$ | $$...$$ (unchanged) | Layout untouched |
Tier limits (markdown family)
Per-file ceilings by plan; the character limit 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 fragments focused on display-block layout. The blank-line standalone treatment happens only when \[...\] is converted on the dollar target.
Inline-jammed display block promoted to standalone
An equation written \[ ... \] in the middle of a sentence rendered inline. Target dollar lifts it onto its own block with blank lines.
BEFORE:
The partition function \[ Z = \sum_i e^{-\beta E_i} \] governs everything.
TARGET: dollar
AFTER:
The partition function
$$ Z = \sum_i e^{-\beta E_i} $$
governs everything.Two adjacent display blocks stay separate
Non-greedy matching converts each \[...\] independently, so consecutive equations don't merge into one block.
BEFORE: \[ a = b + c \] \[ d = e - f \] TARGET: dollar AFTER: $$ a = b + c $$ $$ d = e - f $$
Inline and display normalized together
One pass keeps the two roles distinct: \(...\) becomes inline $...$, \[...\] becomes a standalone $$ block.
BEFORE:
For a particle of mass \(m\), the energy is
\[ E = \tfrac{1}{2} m v^2 \]
at speed v.
TARGET: dollar
AFTER:
For a particle of mass $m$, the energy is
$$ E = \tfrac{1}{2} m v^2 $$
at speed v.Existing $$ block is NOT re-spaced
A cramped $$...$$ with no blank lines around it is left exactly as-is — the tool only adds blank lines to blocks it converts from \[...\].
BEFORE: Text before. $$ x = y $$ Text after. TARGET: dollar AFTER (unchanged — add blank lines manually if needed): Text before. $$ x = y $$ Text after.
Display equation in a code sample is preserved
A typesetting how-to that shows \[...\] inside a fenced block. The fence is skipped, so the example keeps its original delimiters.
BEFORE:
Display math uses \[ ... \], for example:
```markdown
\[ \oint \vec{E}\cdot d\vec{A} = \frac{Q}{\epsilon_0} \]
```
TARGET: dollar
AFTER:
Display math uses
$$ ... $$
, for example:
```markdown
\[ \oint \vec{E}\cdot d\vec{A} = \frac{Q}{\epsilon_0} \]
```Edge cases and what actually happens
Already-`$$` blocks don't gain blank lines
By designThe blank-line standalone treatment is applied only when converting \[...\] on the dollar target. A pre-existing $$...$$ that is cramped against prose is left as-is. If it renders inline, add the surrounding blank lines manually or run a formatting pass with md-prettifier.
tex target does NOT isolate display blocks
ExpectedConverting $$...$$ to \[...\] (the tex target) does not add blank lines around the new block. If your destination needs isolated display math, the dollar direction is the one that adds blank lines; for the tex direction, insert them by hand.
`\begin{equation}` environments aren't promoted
PreservedOnly \[...\] and $$...$$ are recognized as display math. An AMS \begin{equation}...\end{equation} is left untouched and won't be wrapped in blank lines. Convert it to delimiters first if your renderer needs block treatment.
Single `$` inside a display block on tex target
Invalid pairingIf you run the tex target on already-dollar content that also contains stray single $ in prose, the inline rule may pair a real display-adjacent dollar with a prose dollar. Prefer the dollar target for display-block normalization; reserve tex for clean inputs.
Display math inside an inline code span
EditedInline backtick spans are not protected. A ` \[x\] shown inline will be converted (and gain blank lines), which usually breaks the surrounding code. Move display-math examples into ``` fenced blocks.
Tilde-fenced display math is converted
Edited~~~ fences aren't recognized by the skip logic, so a display equation inside one is promoted to a $$ block. Use triple-backtick fences for any block that must stay verbatim.
Inner alignment/spacing preserved
PreservedThe tool moves delimiters and adds outer blank lines but never reformats the equation's internals — \\ line breaks, & alignment markers, and inner spaces are kept exactly. Layout inside the block is your responsibility.
Display math split across a fence boundary
RejectedIf a \[ opens before a ``` fence and \]` closes after it, the fence-splitting breaks the segment and the block won't convert cleanly. Keep each display equation entirely outside code fences.
Chapter exceeds character limit
RejectedOver 500,000 characters on Free, the document is blocked. A long methods-heavy chapter can hit this — upgrade to Pro (5,000,000) or split the file with md-splitter before normalizing.
Frequently asked questions
How do I make display equations render as standalone blocks?
Set Target style to $ inline / $$ block (KaTeX) and run the pass. Every \[...\] is rewritten to $$...$$ with a blank line before and after, which is the form block renderers need to typeset display math on its own line.
Does it add blank lines around equations that are already `$$...$$`?
No. The blank-line standalone treatment is applied only to \[...\] blocks it converts. A pre-existing $$...$$ is left exactly as-is, so if it is cramped against prose you must add the blank lines yourself or run a prettify pass.
Will adjacent display equations get merged?
No. Matching is non-greedy, so each \[...\] pair is converted independently. Two equations on consecutive lines become two separate $$ blocks, not one combined block.
Does the tex target also isolate display blocks?
No. Converting $$...$$ to \[...\] does not add surrounding blank lines. Only the dollar direction adds them. For block isolation, use the dollar target.
Are inline equations affected?
Yes, in the same pass: \(...\) becomes $...$. Inline math stays in the text flow; only display \[...\] is promoted to a standalone block, keeping the two roles distinct.
What happens to `\begin{equation}` blocks?
They are left untouched — only \[, $$, \(, and $ are recognized. If your renderer needs the equation as delimiter-wrapped block math, convert the environment to \[...\] manually first, then run this pass.
Does it reformat the math inside the block?
No. Internal alignment (&), line breaks (\\), and spacing are preserved exactly. The tool only changes the outer delimiters and adds blank lines around converted \[...\] blocks.
Is code in my document safe?
Triple-backtick fenced blocks are skipped, so display-math examples shown as code are preserved. Inline backtick spans and ~~~ fences are NOT protected — keep block examples in ``` ``` fences.
Does this upload my manuscript anywhere?
No. Processing is entirely in-browser, so pre-print papers and unpublished proofs never leave your machine. No account is required for the Free tier.
How large a chapter can I normalize?
Free handles 1 MB / 500,000 characters per file, one at a time. Pro raises that to 10 MB / 5,000,000 characters and 10 files. The character limit is checked separately from file size.
What if a display block straddles a code fence?
Keep each display equation fully outside ``` fences. If \[ opens before a fence and \]` closes after it, the fence-aware splitting interrupts the match and the block won't convert cleanly.
What pairs well for academic publishing?
Use md-toc-generator to build navigation, md-prettifier to normalize overall whitespace including stubborn $$ blocks, and md-to-pdf-academic to produce a print-ready serif PDF.
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.