Skip to content
Markdown to PDF
More free tools

Formulas and flowcharts

Markdown to PDF with math and diagrams

Notes for school, research, and design often hold formulas and flowcharts. Write them as plain text in your Markdown. The page draws them in the preview and in the PDF. The extra code loads only when your document uses it, so plain documents stay fast.

Page options
Page numbers
Front matter

Preview (what the PDF will look like)

The button opens your browser print dialog. Choose Save as PDF as the destination. For a clean page, turn off "Headers and footers". The file is named after your first heading. Everything stays on your device.

Saving a PDF on a phone or tablet

iPhone and iPad (Safari)

  1. Press Download PDF.
  2. On the page preview, spread two fingers apart. The PDF opens full screen.
  3. Tap the Share button, then Save to Files.

Android (Chrome)

  1. Press Download PDF.
  2. At the top of the print screen, set Destination to Save as PDF.
  3. Tap the round PDF button and choose where to save.

Two settings for a clean PDF

Your browser opens its print window next. In that window:

Picture of the print window (not clickable)
Destination Save as PDF Options Headers and footers (off) Background graphics (optional)
  1. Set Destination to Save as PDF.
  2. Turn off Headers and footers.

Math

Put a formula between single dollar signs for a formula inside a line, such as $E = mc^2$. Put it between double dollar signs on their own lines for a large centered formula.

The formula language is the one used by LaTeX, for example \frac{a}{b} for a fraction and \int for an integral. A price such as $5 is not treated as math, because a dollar sign followed by a space or a number is left alone.

Diagrams

Start a code block with the word mermaid after the three backticks. Write the diagram as text inside it. The page draws a flowchart, a sequence diagram, a pie chart, or one of the other types the diagram language supports.

If the diagram has an error, the page shows the message "This diagram could not be drawn" and keeps your text so you can fix it.

Steps

  1. Press Diagram and math sample to see both at work.
  2. Replace the formula and the flowchart with your own.
  3. Check that nothing is cut off in the preview.
  4. Press Download PDF and choose Save as PDF.

In the PDF

  • Formulas and diagrams stay sharp at any zoom, because they are drawn as shapes and not as a picture.
  • A diagram or a block formula is kept on one page, not split in half.
  • Wide diagrams shrink to fit the page. Use landscape if the text gets too small.

Questions

Do I need to install anything for math?

No. The code that draws math and diagrams is part of this site. It loads when your document has a formula or a diagram. Nothing is sent out.

Why is my dollar amount shown as a formula?

A formula needs a dollar sign with no space after it and another with no space before it. If you write "$5 and $10", it stays text. Put a backslash before a dollar sign to be sure.

Which diagrams can I draw?

Flowcharts, sequence diagrams, class diagrams, state diagrams, pie charts, and others from the Mermaid language. Start the code block with the word mermaid.

More ways to use this converter

More free tools from Bingemind