Markdown to PDF with LaTeX

Inline $…$ and display $$…$$ math typeset at KaTeX quality and printed as vector glyphs with embedded fonts. No TeX install. Preview free.

Pro · preview is free

Problem set 3 — solutions

Q1. Show that the geometric series converges for |r|<1.

Starting from the partial sum Sn=a1−rn1−r and taking the limit gives

∑k=0∞ark=limn→∞Sn=a1−r,|r|<1.

Q2. The Gaussian integral is ∫−∞∞e−x2dx=π, which follows from squaring and switching to polar coordinates.

— 1 —

Converted in your browser. Your file never leaves your device.
1

Paste Markdown with LaTeX

Use $…$ inline and $$…$$ for display equations. \(…\), \[…\] and ```math fences are accepted too.

2

Check the typeset preview

Equations render as you type. Switch to Times New Roman if you want the classic paper look; math uses a matching serif face.

3

Download PDF

Math is written as vector glyphs with fonts embedded, so it prints sharp and stays selectable.

How LaTeX in Markdown becomes typeset math in a PDF

The obvious way to get LaTeX into a PDF is to run LaTeX. That means installing TeX Live or MiKTeX, which is two to four gigabytes, and it means your Markdown has to survive a Pandoc conversion into a .tex file where a stray underscore or a table with merged cells can stop the build. Most people who write $E=mc^2$ in a Markdown note do not want a TeX toolchain. They want the equation to look right on paper.

MDtoDOCX takes the route that KaTeX and MathJax pioneered for the web and applies it to print. Each math span is parsed into a layout tree, laid out with the same TeX spacing rules (thin spaces around relations, thick spaces around binary operators, correct sub- and superscript shifts) and emitted as positioned glyphs. When the page is printed to PDF, those glyphs become vector outlines. The result is indistinguishable from LaTeX output for the command set that Markdown authors actually use, and it needs no installation at all.

Which LaTeX commands are supported

The full KaTeX function list: fractions and binomials, roots, sums, products, integrals with limits, \lim, Greek and Hebrew letters, blackboard bold and calligraphic alphabets, \left and \right delimiters that stretch, \text{} for words inside math, accents, arrows, and the matrix, pmatrix, bmatrix, cases, aligned and array environments. Macros defined with \newcommand at the top of the document are expanded. Unsupported commands are shown in a highlighted monospace span with the offending token, never dropped, so you can see exactly what to change.

Fonts are embedded, not substituted

Math typesetting depends on a font with the right glyphs and the right metrics. MDtoDOCX embeds a Latin Modern-derived math font in every PDF that contains equations, and subsets it to the glyphs used, so a problem set with fifty equations adds about 60 KB. Because the font travels with the file, the integral signs, the stretched brackets and the script letters look the same in Preview on a Mac, in Adobe Reader on Windows, and on the department's laser printer. This is the difference between a PDF you can hand in and one that arrives with tofu boxes.

Display equations and page breaks

A display equation is a block that must not be split. Each $$…$$ block is kept whole; if it does not fit at the bottom of a page it moves to the next one together with the sentence that introduces it, so you never see "gives" at the foot of page 3 and the formula alone at the head of page 4. Multi-line aligned environments are treated as a single block. Optional equation numbers sit flush right, the way amsmath places them, and are counted per document.

Print clarity

Because equations are vector outlines and not bitmaps, they are sharp at any zoom and at any printer resolution. The text inside remains selectable: you can copy an equation out of the PDF and paste it into another document as Unicode. Body text and math share a baseline grid, so an inline fraction does not push its line apart; MDtoDOCX uses the same \frac shrink rules as TeX for inline mode and switches to full-size layout only in display mode.

Free preview, Pro download

Typesetting runs in your browser and the preview is free. Downloading a PDF with rendered LaTeX is a Pro feature; free downloads keep the LaTeX source in a monospace span so nothing is lost. The same LaTeX becomes native Word equations in Markdown to Word with LaTeX. For symbols, matrices and spacing details see Markdown to PDF with math, and for plans see Pricing.

MDtoDOCX vs Pandoc + LaTeX vs browser print

What mattersMDtoDOCXPandoc → pdflatexPrint a MathJax page
Install size02–4 GB TeX distribution0
Time to first PDFSecondsMinutes to hours on first setupSeconds
Math qualityKaTeX-class, TeX spacingReferenceDepends on browser
Math fonts embeddedYes, subsettedYesOften substituted
Display equation kept on one pageYesYesNo
Tables, task lists, fenced codeNativeFragile in .texNative
Error on unknown commandShown inline, PDF still producedBuild stopsRed text

Frequently asked questions

Does Markdown to PDF support LaTeX?
Yes. Inline $…$ and display $$…$$ LaTeX is typeset with TeX spacing rules and printed as vector glyphs. The supported command set matches KaTeX, which covers fractions, roots, sums, integrals, matrices, cases, aligned environments and Greek letters.
Do I need to install LaTeX or TeX Live?
No. Everything runs in your browser. There is no TeX distribution, no Pandoc and no command line involved.
Is Markdown to PDF with LaTeX free online?
The typeset preview is free with no account. Downloading the PDF with rendered equations is a Pro feature. A 7-Day Pass costs $4.9 if you only need it for one assignment.
Are equations images or real text in the PDF?
Real vector text. You can select an equation in the PDF and copy it as Unicode, and it stays sharp at any zoom or print resolution.
Which fonts are used for math?
A Latin Modern-derived math font, embedded and subsetted in the PDF so it renders identically on every device. Body text uses the font you pick in the options bar.
Can I number my equations?
Yes. Turn on Equation numbers in the options bar and each display equation gets a right-aligned (1), (2), … label. Use \tag{…} for a custom label.
What if I use a command that is not supported?
The unsupported token is shown in a highlighted monospace span in both preview and PDF so you can spot it. The rest of the equation and the document still render.
Can I use \newcommand macros?
Yes. Define macros in a $$…$$ block at the top of the document and they are expanded throughout.
Will a long display equation be split across pages?
No. Display equations and aligned environments are kept on one page together with the line that introduces them.