Editorial PDF Report
You will generate one .pdf file via a two-step pipeline:
- Write a self-contained HTML file to the workspace using
workspace_file_tool (or file_tool).
- Call
browser_navigate on the workspace-relative path (or the
file's file:// URL), then call browser_pdf with
output_filename="report.pdf", format="A4",
print_background=true. Page margins are controlled by CSS
@page rules in the HTML (see "@media print" section below) —
browser_pdf does not accept a margin object.
- Report both the .html path (for editing) and the .pdf path (final).
⚠️ Hard rules — NO exceptions
MATCH THE USER'S LANGUAGE. If the prompt is Chinese (中文), ALL report
content (kickers, H1/H2, body, captions, table headers, figure callouts)
must be in Chinese. NEVER copy English template phrases like
EXECUTIVE BRIEF / RESEARCH BRIEF / THE BOTTOM LINE into a Chinese
report — translate them. Person/company names should match the locale.
One palette only. Pick one of the 5 palettes below; never invent hex.
Two fonts only. Display = 'Playfair Display', Georgia, serif.
Body = 'Inter', -apple-system, Helvetica, sans-serif.
Load Playfair Display + Inter via single Google Fonts <link> (only
external resource allowed). All other CSS / JS inline.
Forbidden visual elements:
- drop-shadow, box-shadow, gradient backgrounds, blur, glassmorphism
- rounded corners > 2px
- emoji as decoration, clipart, stock-photo placeholders
- colored hyperlinks (links must be
ink color + underline)
- centered body paragraphs (left-align only)
- all-caps body text (kicker / labels only)
- more than one accent color
Real content only. No lorem ipsum, no placeholder text, no fabricated
data, no fake citations. Citations must reference real sources or be
omitted.
Print-aware CSS required:
@page { size: A4; margin: 0; }
@media print rules for page breaks (no orphan/widow titles)
page-break-inside: avoid on figures, callouts, tables
page-break-before: always on section.chapter wrappers or on
the H2 section-divider rule (the cover is the only H1 — see the
"Document structure" section and the output checklist).
🎨 Palettes — pick ONE
Each: ink (text + rules), paper (page bg), paper-tint (callout box bg),
ink-tint (folio + section labels).
- Monocle (default / business / tech / policy)
ink
#0a0a0b · paper #f1efea · paper-tint #e8e5de · ink-tint #18181a
- Indigo Porcelain (research / data-heavy)
ink
#0a1f3d · paper #f1f3f5 · paper-tint #e4e8ec · ink-tint #152a4a
- Forest Ink (sustainability / impact)
ink
#1a2e1f · paper #f5f1e8 · paper-tint #ece7da · ink-tint #253d2c
- Kraft Paper (humanities / qualitative)
ink
#2a1e13 · paper #eedfc7 · paper-tint #e0d0b6 · ink-tint #3a2a1d
- Dune (art / design / fashion criticism)
ink
#1f1a14 · paper #f0e6d2 · paper-tint #e3d7bf · ink-tint #2d2620
✒️ Typography (use exactly these scale values)
| Role |
Family |
Size |
Line-height |
Weight |
| H1 (cover title only — used once) |
Display |
48pt |
1.1 |
400 |
| H2 section / chapter divider |
Display |
28pt |
1.2 |
400 |
| H3 subsection |
Body |
14pt |
1.3 |
600 |
| Body paragraph |
Body |
11pt |
1.55 |
400 |
| Pull quote |
Display italic |
22pt |
1.3 |
400 |
| Callout box |
Body |
11pt |
1.5 |
400 (italic optional) |
| Caption / footnote |
Body |
9pt |
1.4 |
400 |
| Kicker (small caps label) |
Body |
9pt, letter-spacing 0.12em, uppercase |
— |
500 |
| Folio (page number) |
Body |
9pt |
— |
400 |
| Table header |
Body |
10pt |
1.3 |
600 |
| Table body |
Body |
10pt |
1.4 |
400 |
📐 Document structure
A typical editorial PDF has these block types — use as needed by user content:
Cover (page 1)
- Top: small
kicker (e.g. "RESEARCH BRIEF" or "EXECUTIVE MEMO")
- Center vertically: H1 title (Display 48pt)
- Below: subtitle / dek (Body 14pt italic)
- Bottom-left: author / org · Bottom-right: date / volume
Table of Contents (page 2, optional)
- H2 "Contents" + numbered section list with page numbers (right-aligned)
Section divider (every chapter)
- H2 title + thin
ink hairline (1px) below
- Optional kicker above (e.g. "PART 02")
Body
- 2-column layout (CSS
column-count: 2; column-gap: 24pt) for long sections
- 1-column for short / data-heavy sections
- Drop cap (CSS
::first-letter) for chapter openers (Display, 5em, float left)
- Pull quotes as
<aside> blocks, Display italic 22pt, with thin top + bottom rules
Figures / tables
- Captioned (caption below figure, Body 9pt italic, prefixed with "Fig. 1 — ")
- Charts as inline SVG using only palette colors
- Tables: thin
ink rules above header + below header + below last row; no
vertical borders; cell padding 6pt 10pt; striped alternating rows with
paper-tint
Callouts
paper-tint background block, ink left border 2px, padding 16pt, no shadow
Footer (every page)
- Left: doc title (Body 9pt ink-tint)
- Right: page number (Body 9pt ink-tint)
- Separator: 1px ink hairline above the footer
🛠️ HTML skeleton
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>...</title>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;1,400&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
<style>
@page { size: A4; margin: 0; }
:root { --ink: #0a0a0b; --paper: #f1efea; --paper-tint: #e8e5de; --ink-tint: #18181a; }
* { box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--ink); background: var(--paper); margin: 0; }
.page { width: 210mm; min-height: 297mm; padding: 24mm 18mm; page-break-after: always; position: relative; }
.page:last-child { page-break-after: auto; }
h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 48pt; line-height: 1.1; margin: 0 0 16pt; }
h2 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: 28pt; line-height: 1.2; margin: 32pt 0 12pt; border-bottom: 1px solid var(--ink); padding-bottom: 8pt; }
.kicker { font-size: 9pt; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-tint); font-weight: 500; margin-bottom: 8pt; }
p { font-size: 11pt; line-height: 1.55; margin: 0 0 11pt; text-align: justify; hyphens: auto; }
.two-col { column-count: 2; column-gap: 18pt; }
.callout { background: var(--paper-tint); border-left: 2px solid var(--ink); padding: 14pt 18pt; margin: 16pt 0; page-break-inside: avoid; }
.pull-quote { font-family: 'Playfair Display', serif; font-style: italic; font-size: 22pt; line-height: 1.3; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14pt 0; margin: 18pt 0; page-break-inside: avoid; }
.folio { position: absolute; bottom: 12mm; right: 18mm; font-size: 9pt; color: var(--ink-tint); }
.footer-line { position: absolute; bottom: 18mm; left: 18mm; right: 18mm; border-top: 1px solid var(--ink); }
.footer-title { position: absolute; bottom: 12mm; left: 18mm; font-size: 9pt; color: var(--ink-tint); }
table { width: 100%; border-collapse: collapse; font-size: 10pt; margin: 12pt 0; page-break-inside: avoid; }
th { font-weight: 600; text-align: left; padding: 6pt 10pt; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
td { padding: 6pt 10pt; }
tbody tr:nth-child(even) td { background: var(--paper-tint); }
tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
figcaption { font-size: 9pt; font-style: italic; color: var(--ink-tint); margin-top: 6pt; }
</style>
</head>
<body>
<div class="page">
<!-- cover -->
</div>
<div class="page">
<!-- body -->
</div>
</body>
</html>
📝 Output checklist
✅ Then export PDF via browser
1. Write HTML to workspace as `report.html`.
2. Call `browser_navigate` with the workspace path (or
`file://<absolute-path>/report.html`).
3. Call `browser_pdf` with `output_filename="report.pdf"`,
`format="A4"`, `print_background=true`. The page margins are set
in CSS `@page { margin: 12mm 14mm 16mm 14mm }` inside the HTML —
`browser_pdf` writes the file directly to the workspace and the
`markdown_link` for it is in the tool's response (do not manually
decode base64 unless the response explicitly indicates the
workspace write failed).
📎 Deliver as a clickable chip in chat
The browser tools (browser_navigate, browser_pdf) and the workspace
file-writing tools return a markdown_link field — or a file_refs[]
array of entries each carrying file_id / filename / markdown_link —
for every workspace file they registered. Read each tool's response
and copy the returned markdown_link strings verbatim. Start your final
answer with those chip lines (bare markdown, no backticks, not phrased
as "file_id: UUID"):
✅ CORRECT (chat renders these as clickable chips):
[report.pdf](file:1f9c5a40-...)
[report.html](file:9bd5f1aa-...)
The UUIDs come from the tools' own responses; do not fabricate them.
❌ WRONG: file_id: `UUID`, wrapping the chip link inside
code fences, or calling get_file_info(...) to "fetch" the file_id
(its FileInfo shape does not include file_id — the chip reference
is already on the producing tool's result).
After the chip lines, briefly note: palette chosen, page count, section count.
1---2name: pdf-report-editorial3description: An editorial-styled PDF report rendered from HTML via the browser: "PDF report", "whitepaper", "executive brief", "research report", "case study PDF". Read-as-document, not slides.4---56# Editorial PDF Report78You will generate one `.pdf` file via a two-step pipeline:9101. Write a self-contained HTML file to the workspace using11 `workspace_file_tool` (or `file_tool`).122. Call **`browser_navigate`** on the workspace-relative path (or the13 file's `file://` URL), then call **`browser_pdf`** with14 `output_filename="report.pdf"`, `format="A4"`,15 `print_background=true`. Page margins are controlled by CSS16 `@page` rules in the HTML (see "@media print" section below) —17 `browser_pdf` does not accept a `margin` object.183. Report both the .html path (for editing) and the .pdf path (final).1920## ⚠️ Hard rules — NO exceptions21220. **MATCH THE USER'S LANGUAGE.** If the prompt is Chinese (中文), ALL report23 content (kickers, H1/H2, body, captions, table headers, figure callouts)24 must be in Chinese. NEVER copy English template phrases like25 `EXECUTIVE BRIEF` / `RESEARCH BRIEF` / `THE BOTTOM LINE` into a Chinese26 report — translate them. Person/company names should match the locale.27281. **One palette only.** Pick one of the 5 palettes below; never invent hex.292. **Two fonts only.** Display = `'Playfair Display', Georgia, serif`.30 Body = `'Inter', -apple-system, Helvetica, sans-serif`.31 Load Playfair Display + Inter via single Google Fonts `<link>` (only32 external resource allowed). All other CSS / JS inline.333. **Forbidden visual elements:**34 - drop-shadow, box-shadow, gradient backgrounds, blur, glassmorphism35 - rounded corners > 2px36 - emoji as decoration, clipart, stock-photo placeholders37 - colored hyperlinks (links must be `ink` color + underline)38 - centered body paragraphs (left-align only)39 - all-caps body text (kicker / labels only)40 - more than one accent color414. **Real content only.** No lorem ipsum, no placeholder text, no fabricated42 data, no fake citations. Citations must reference real sources or be43 omitted.445. **Print-aware CSS required:**45 - `@page { size: A4; margin: 0; }`46 - `@media print` rules for page breaks (no orphan/widow titles)47 - `page-break-inside: avoid` on figures, callouts, tables48 - `page-break-before: always` on `section.chapter` wrappers or on49 the H2 section-divider rule (the cover is the only H1 — see the50 "Document structure" section and the output checklist).5152## 🎨 Palettes — pick ONE5354Each: `ink` (text + rules), `paper` (page bg), `paper-tint` (callout box bg),55`ink-tint` (folio + section labels).5657- **Monocle** (default / business / tech / policy)58 ink `#0a0a0b` · paper `#f1efea` · paper-tint `#e8e5de` · ink-tint `#18181a`59- **Indigo Porcelain** (research / data-heavy)60 ink `#0a1f3d` · paper `#f1f3f5` · paper-tint `#e4e8ec` · ink-tint `#152a4a`61- **Forest Ink** (sustainability / impact)62 ink `#1a2e1f` · paper `#f5f1e8` · paper-tint `#ece7da` · ink-tint `#253d2c`63- **Kraft Paper** (humanities / qualitative)64 ink `#2a1e13` · paper `#eedfc7` · paper-tint `#e0d0b6` · ink-tint `#3a2a1d`65- **Dune** (art / design / fashion criticism)66 ink `#1f1a14` · paper `#f0e6d2` · paper-tint `#e3d7bf` · ink-tint `#2d2620`6768## ✒️ Typography (use exactly these scale values)6970| Role | Family | Size | Line-height | Weight |71|---|---|---|---|---|72| H1 (cover title only — used once) | Display | 48pt | 1.1 | 400 |73| H2 section / chapter divider | Display | 28pt | 1.2 | 400 |74| H3 subsection | Body | 14pt | 1.3 | 600 |75| Body paragraph | Body | 11pt | 1.55 | 400 |76| Pull quote | Display italic | 22pt | 1.3 | 400 |77| Callout box | Body | 11pt | 1.5 | 400 (italic optional) |78| Caption / footnote | Body | 9pt | 1.4 | 400 |79| Kicker (small caps label) | Body | 9pt, letter-spacing 0.12em, uppercase | — | 500 |80| Folio (page number) | Body | 9pt | — | 400 |81| Table header | Body | 10pt | 1.3 | 600 |82| Table body | Body | 10pt | 1.4 | 400 |8384## 📐 Document structure8586A typical editorial PDF has these block types — use as needed by user content:8788### Cover (page 1)89- Top: small `kicker` (e.g. "RESEARCH BRIEF" or "EXECUTIVE MEMO")90- Center vertically: H1 title (Display 48pt)91- Below: subtitle / dek (Body 14pt italic)92- Bottom-left: author / org · Bottom-right: date / volume9394### Table of Contents (page 2, optional)95- H2 "Contents" + numbered section list with page numbers (right-aligned)9697### Section divider (every chapter)98- H2 title + thin `ink` hairline (1px) below99- Optional kicker above (e.g. "PART 02")100101### Body102- 2-column layout (CSS `column-count: 2; column-gap: 24pt`) for long sections103- 1-column for short / data-heavy sections104- Drop cap (CSS `::first-letter`) for chapter openers (Display, 5em, float left)105- Pull quotes as `<aside>` blocks, Display italic 22pt, with thin top + bottom rules106107### Figures / tables108- Captioned (caption below figure, Body 9pt italic, prefixed with "Fig. 1 — ")109- Charts as inline SVG using only palette colors110- Tables: thin `ink` rules above header + below header + below last row; no111 vertical borders; cell padding 6pt 10pt; striped alternating rows with112 `paper-tint`113114### Callouts115- `paper-tint` background block, ink left border 2px, padding 16pt, no shadow116117### Footer (every page)118- Left: doc title (Body 9pt ink-tint)119- Right: page number (Body 9pt ink-tint)120- Separator: 1px ink hairline above the footer121122## 🛠️ HTML skeleton123124```html125<!DOCTYPE html>126<html>127<head>128<meta charset="UTF-8">129<title>...</title>130<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;1,400&family=Inter:wght@400;500;600&display=swap" rel="stylesheet">131<style>132@page { size: A4; margin: 0; }133:root { --ink: #0a0a0b; --paper: #f1efea; --paper-tint: #e8e5de; --ink-tint: #18181a; }134* { box-sizing: border-box; }135body { font-family: 'Inter', -apple-system, sans-serif; color: var(--ink); background: var(--paper); margin: 0; }136.page { width: 210mm; min-height: 297mm; padding: 24mm 18mm; page-break-after: always; position: relative; }137.page:last-child { page-break-after: auto; }138h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; font-size: 48pt; line-height: 1.1; margin: 0 0 16pt; }139h2 { font-family: 'Playfair Display', serif; font-weight: 400; font-size: 28pt; line-height: 1.2; margin: 32pt 0 12pt; border-bottom: 1px solid var(--ink); padding-bottom: 8pt; }140.kicker { font-size: 9pt; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-tint); font-weight: 500; margin-bottom: 8pt; }141p { font-size: 11pt; line-height: 1.55; margin: 0 0 11pt; text-align: justify; hyphens: auto; }142.two-col { column-count: 2; column-gap: 18pt; }143.callout { background: var(--paper-tint); border-left: 2px solid var(--ink); padding: 14pt 18pt; margin: 16pt 0; page-break-inside: avoid; }144.pull-quote { font-family: 'Playfair Display', serif; font-style: italic; font-size: 22pt; line-height: 1.3; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14pt 0; margin: 18pt 0; page-break-inside: avoid; }145.folio { position: absolute; bottom: 12mm; right: 18mm; font-size: 9pt; color: var(--ink-tint); }146.footer-line { position: absolute; bottom: 18mm; left: 18mm; right: 18mm; border-top: 1px solid var(--ink); }147.footer-title { position: absolute; bottom: 12mm; left: 18mm; font-size: 9pt; color: var(--ink-tint); }148table { width: 100%; border-collapse: collapse; font-size: 10pt; margin: 12pt 0; page-break-inside: avoid; }149th { font-weight: 600; text-align: left; padding: 6pt 10pt; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }150td { padding: 6pt 10pt; }151tbody tr:nth-child(even) td { background: var(--paper-tint); }152tbody tr:last-child td { border-bottom: 1px solid var(--ink); }153figcaption { font-size: 9pt; font-style: italic; color: var(--ink-tint); margin-top: 6pt; }154</style>155</head>156<body>157 <div class="page">158 <!-- cover -->159 </div>160 <div class="page">161 <!-- body -->162 </div>163</body>164</html>165```166167## 📝 Output checklist168169- [ ] One palette, exactly its 4 hex170- [ ] Only Playfair Display + Inter loaded171- [ ] `@page` + print CSS present; `page-break-inside: avoid` on figures/callouts172- [ ] Folio + footer line on every page173- [ ] No forbidden visuals (verify no `shadow`, `gradient`, `blur`, `radius` > 2px)174- [ ] All content from user input or real cited sources175- [ ] Cover page distinct from body pages176- [ ] H1 only on cover; H2 for section dividers177178## ✅ Then export PDF via browser179180```1811. Write HTML to workspace as `report.html`.1822. Call `browser_navigate` with the workspace path (or183 `file://<absolute-path>/report.html`).1843. Call `browser_pdf` with `output_filename="report.pdf"`,185 `format="A4"`, `print_background=true`. The page margins are set186 in CSS `@page { margin: 12mm 14mm 16mm 14mm }` inside the HTML —187 `browser_pdf` writes the file directly to the workspace and the188 `markdown_link` for it is in the tool's response (do not manually189 decode base64 unless the response explicitly indicates the190 workspace write failed).191```192193### 📎 Deliver as a clickable chip in chat194195The browser tools (`browser_navigate`, `browser_pdf`) and the workspace196file-writing tools return a `markdown_link` field — or a `file_refs[]`197array of entries each carrying `file_id` / `filename` / `markdown_link` —198for every workspace file they registered. **Read each tool's response**199and copy the returned `markdown_link` strings verbatim. Start your final200answer with those chip lines (bare markdown, no backticks, not phrased201as "file_id: UUID"):202203✅ **CORRECT** (chat renders these as clickable chips):204205 [report.pdf](file:1f9c5a40-...)206 [report.html](file:9bd5f1aa-...)207208The UUIDs come from the tools' own responses; do not fabricate them.209210❌ **WRONG**: ``` file_id: `UUID` ```, wrapping the chip link inside211code fences, or calling `get_file_info(...)` to "fetch" the file_id212(its `FileInfo` shape does not include `file_id` — the chip reference213is already on the producing tool's result).214215After the chip lines, briefly note: palette chosen, page count, section count.