Home/ChatGPT Markdown to PDF or HTML
From an AI assistant
Style a ChatGPT answer into a PDF or HTML page
A ChatGPT answer usually arrives as Markdown already: headings, bold labels, a table, sometimes a formula. Paste it in and style it, rather than asking for a finished file.
Copy the answer as Markdown
ChatGPT answers in Markdown, and its copy control gives you that source text, not a picture of the answer. Paste it straight into the source pane at /editor and the preview on the right updates as you type.
Delete the lead-in sentence, keep the rest
Answers often open with a line describing what follows, such as "Here is a one-page guide to composting on a balcony," before the actual heading. That sentence describes the document instead of being part of it, so delete just that first line. Everything from the heading down, including every bold label and list item, is the guide itself.
What renders without any cleanup
Headings, bold and italic text, nested and numbered lists, links and GitHub-flavoured tables render exactly as ChatGPT wrote them. A fenced code block ChatGPT wrote for a script or a config file keeps its syntax highlighting too, for any of twelve supported languages. None of it needs reformatting first; the preview on the right of the editor shows the styled result as soon as the paste lands in the source pane.
Fix math delimiters before you paste
ChatGPT often writes a short formula between \( and \), and a longer one on its own line between \[ and \]. The editor does not read either pair as math, so a formula left in that form stays as plain text in the preview.
Replace \( and \) with a single dollar sign on each side for inline math. Replace \[ and \] with a double dollar sign on each side for a display equation set on its own line. Both forms then render as MathML in the preview and in every export.
Worked example
A ChatGPT answer to a guide request: an intro, two headed sections, a bulleted list with bold lead-ins, a small table, a numbered routine and a closing line.
# A Balcony Composting Guide
Composting in a small space works the same way it does in a backyard bin. It
is just scaled down and covered more carefully so it does not attract flies
or smell. This guide covers what to gather, the right mix, and a routine you
can keep up in about fifteen minutes a week.
## What You Will Need
- **A container with a lid**: a plastic tote, a stackable tumbler, or a
bokashi bucket. Anything from 20 to 40 litres works for one or two people.
- **Brown material**: dry leaves, shredded cardboard, or plain newspaper torn
into strips.
- **Green material**: vegetable peels, fruit scraps, coffee grounds, and tea
bags with the staple removed.
- **A small trowel or stick**: for turning the pile every few days.
- **A tray or saucer**: set under the bin, in case any liquid drains through
the base.
## Getting the Balance Right
Compost needs roughly three parts brown material to one part green material by
volume. Too much green material turns the pile wet and sour; too much brown
material slows it down.
| Material | Examples | Share by volume |
| --- | --- | --- |
| Greens | Vegetable scraps, coffee grounds | 1 part |
| Browns | Dry leaves, shredded paper | 3 parts |
| Avoid | Meat, dairy, oily food | 0 parts |
## A Weekly Routine
1. Add kitchen scraps as they build up, chopped small so they break down
faster.
2. Layer a handful of brown material over any fresh green scraps.
3. Turn the pile with the trowel two or three times a week to add air.
4. Check the moisture: the mix should feel like a wrung-out sponge, not wet or
dusty.
5. Empty finished compost into a planter once it looks dark and crumbly,
usually after six to ten weeks.
## Signs It Is Working
A healthy pile smells earthy rather than sour, and feels warm near the centre
a few days after a large addition of scraps. A sharp, ammonia-like smell
means too much green material went in at once; add more brown material and
turn the pile more often.
Keep the bin out of direct sun in summer so it does not dry out. Start with a
small batch until you get a feel for how fast your particular mix breaks
down.
A Balcony Composting Guide
Composting in a small space works the same way it does in a backyard bin. It
is just scaled down and covered more carefully so it does not attract flies
or smell. This guide covers what to gather, the right mix, and a routine you
can keep up in about fifteen minutes a week.
What You Will Need
- A container with a lid: a plastic tote, a stackable tumbler, or a
bokashi bucket. Anything from 20 to 40 litres works for one or two people.
- Brown material: dry leaves, shredded cardboard, or plain newspaper torn
into strips.
- Green material: vegetable peels, fruit scraps, coffee grounds, and tea
bags with the staple removed.
- A small trowel or stick: for turning the pile every few days.
- A tray or saucer: set under the bin, in case any liquid drains through
the base.
Getting the Balance Right
Compost needs roughly three parts brown material to one part green material by
volume. Too much green material turns the pile wet and sour; too much brown
material slows it down.
| Material |
Examples |
Share by volume |
| Greens |
Vegetable scraps, coffee grounds |
1 part |
| Browns |
Dry leaves, shredded paper |
3 parts |
| Avoid |
Meat, dairy, oily food |
0 parts |
A Weekly Routine
- Add kitchen scraps as they build up, chopped small so they break down
faster.
- Layer a handful of brown material over any fresh green scraps.
- Turn the pile with the trowel two or three times a week to add air.
- Check the moisture: the mix should feel like a wrung-out sponge, not wet or
dusty.
- Empty finished compost into a planter once it looks dark and crumbly,
usually after six to ten weeks.
Signs It Is Working
A healthy pile smells earthy rather than sour, and feels warm near the centre
a few days after a large addition of scraps. A sharp, ammonia-like smell
means too much green material went in at once; add more brown material and
turn the pile more often.
Keep the bin out of direct sun in summer so it does not dry out. Start with a
small batch until you get a feel for how fast your particular mix breaks
down.
Rendered in the Paper theme. Open it in the editor to change the theme or the text.
Ask for headings and a table in the prompt
When you are writing the prompt, ask for real headings rather than bold section titles, and for a table whenever the answer compares more than two things. That shape pastes in and styles right away, without editing the structure by hand afterward.
Pick a theme, then export
The worked example below uses Paper, a warm serif built for long text that stays out of the way. Open it in the editor to try one of the other eleven themes. For a document to send, "Print or save as PDF" opens the browser's print dialog, and choosing "Save as PDF" there produces the file. For a file to host or attach, "Download .html" packages the page as one file, the theme's CSS included and its fonts pulled from Google Fonts.
Style here instead of asking ChatGPT for a PDF
Asking ChatGPT to also lay out the page costs output tokens on that markup. It costs them again every time the colour, the font or a section changes. None of that markup exists yet in the reply sitting in the source pane. Paste it once and restyle or re-export here instead, at no token cost beyond that first paste.
Questions
My ChatGPT answer starts with a sentence describing itself. Should I keep it?
Delete that first line if it only describes what follows, such as "Here is a one-page guide to composting on a balcony." Everything from the first heading down is the document itself.
An equation from ChatGPT is not rendering. What happened?
ChatGPT sometimes writes math between a backslash and a parenthesis, or a backslash and a square bracket, and the editor does not read either as math. Swap those for a single or double dollar sign and it renders as MathML.
What should I ask ChatGPT for so the answer pastes in cleanly?
Ask for real headings instead of bold section titles, and for a table whenever you are comparing more than two things. That shape is what the editor turns into a styled page without any rework.
Will bold text and lists still look right after I paste the answer in?
Yes. Bold and italic text, nested and numbered lists, and GitHub-flavoured tables render immediately in the preview, with no cleanup needed first.