Build a PowerPoint .pptx file with python-pptx, on this deployment, without the deck engine. Use when the deliverable is a .pptx on disk: presentation, deck, slides, pitch deck, keynote, report deck, 幻灯片, 演示文稿, 做一份 PPT, 出一个 pptx, 汇报材料. Carries what is specific to this deployment -- which tools exist, which parameters they take, and what the gates refuse -- and nothing a competent author already knows. Pairs with design-editorial-and-presentations, which owns content order and editorial judgement. Not for a deck bound to one of the packaged templates: that route runs on Raven-PPT and uses ppt-script-authoring.
The deliverable is a .pptx file on disk. Not a web page, an image, a PDF, or a Markdown
outline. Name its absolute path in the reply.
| Need | Call | Note |
|---|---|---|
| Facts the material does not carry | web_search, then web_fetch the page | there is no other search |
| A real logo, product shot, published chart | image_search | direct image URL, pixel size and source page per hit; see references/assets.md |
| A picture that does not exist yet | image_generate | reference pictures go in images, up to six |
| An icon | raven_ppt.services.assets.icons | 1304 outline icons, see references/assets.md |
| A figure or table from a paper | PyMuPDF on raven-python | from the PDF you were given, else one you downloaded; crop the region or pull the embedded image; see references/assets.md |
| A formula | add_formula from raven_ppt.services.assets.formulas, on raven-python | one line of TeX in, a picture in the deck's ink at true size out; see references/assets.md |
| Symbols inside a sentence | math_runs from the same module | _A, ^2, θ* become real sub- and superscript runs; see references/assets.md |
| Render a page to look at it | soffice --headless --convert-to pdf, then pdftoppm |
With no image key configured, image_generate says so. Say which pages would have had a
picture and carry them on type, grid, rule and colour.
Every page is drawn here, with python-pptx: the grid, the title row, the type, the marks, the
diagrams, the pictures and their treatment. Nothing about a page is settled by a default.
raven_ppt.services.assets holds the icon set, add_formula and math_runs; take those and
draw the rest.
On this route there is no ANTI-SLOP-CHECK.md, no contract and no Task State. Do not initialize or update one.
local/deck-to-pptx (this file) and local/design-editorial-and-presentations, which owns
the content order and the editorial judgement. Read both before the first page.
Language, audience, length, ground. Take each from the first of these that settles it: the request; what memory recalled about this user; the defaults. Defaults: the language the request is written in; a general audience; about 20 pages; a light ground.
Ask with ask_user only for a decision none of the three settles and the deck cannot start
without: at most one call, before any other work, recommending the default. Where there is
no user to ask (the request came from another agent), take the defaults. Say in the reply
which of the four were defaults.
Use what the user handed over as much as you can, before anything the rules below go and
get: their documents and data are the material, their pictures are the pictures. A .pptx
they attached is a template, and a deck on a template is the engine's work, not this
skill's: the host routes it there before this skill is read.
references/assets.md says how.
An icon is a mark and not an illustration: about 0.7in, one weight and one colour across
the deck, and no filled disc behind it.image_generate the brand material in images. Do not describe it in words.
Crop the reference to the mark first. A reference outranks the prompt: hand it a
web hero, an og image or a screenshot and it will reproduce that page -- the wordmark,
the headline, the buttons -- however firmly the prompt says no text. Say what to take
from the reference (its palette, its texture, its light) and that its layout, its type
and its furniture are not to be reproduced.no text, no letters, no numbers. All words on a page are set by the typography.references/assets.md). Given no PDF: web_search the
title, download the PDF from the publisher or arXiv, crop from that. image_search for the
published figure only when no PDF can be had.add_formula(slide, tex, left_in, top_in, size_pt=...), one formula per call, size_pt = the body size beside it.p(θ | D_A), F_i, θ*): math_runs(paragraph, text, size_pt=...).λ: typed._A or ^2 as characters in a text box.13.333 x 7.5in is 16:9. Keep content 0.7in clear of every edge.
| Role | Size |
|---|---|
| Cover title | 32-48pt |
| Page title | 28-40pt |
| Section opener | 28-36pt, over a 14pt muted label |
| Statement, quote | 24-32pt, at most three lines |
| Hero number | 48-100pt, one per page |
| Card heading | 16-20pt |
| Body | 14-18pt |
| Caption, label, footer | 11-12pt |
Body under 14.0pt is reported and under 10.8pt is refused; footers may go to 8.0pt. If it does not fit at these sizes, split the page or cut it -- never shrink the type.
Colour carries the hierarchy that size does: ink for the body, muted for what supports it, the accent for what the page is saying -- the word in the title that matters, the figure, the row or the node that answers and so on.
A connector lands on a box at both ends. A line into empty space is a node you did not draw, and nothing checks for it.
A hand-drawn table does not reflow. Every box is placed absolutely, so a cell that wraps to two lines does not push the row below it down -- it runs under the rule drawn at a fixed y, and the rule crosses its second line. Measure the tallest cell in the row, set the row height from that, then place the rule. Set every element in a row from one baseline, and put every ground down before any word, or the fill covers the copy.
Run the build script with raven-python, the interpreter on PATH that has pptx and
raven_ppt; python3 does not. Check with raven-python -c "import pptx, raven_ppt". Do
not look for a .venv, build a venv, or install python-pptx.
spAutoFit with word_wrap=False makes LibreOffice re-centre the text. Remove
a:spAutoFit and a:normAutofit from bodyPr when alignment has to hold.
shape.shadow.inherit = False on every drawn shape, or the theme stamps a drop shadow.
Remove the p:style element from a freeform, or the theme restyles its stroke.
slide_layouts[6] is the blank layout. A layout with placeholders puts furniture on the
page that nothing asked for.
Set slide_width and slide_height before adding pages. 13.333 x 7.5in is 16:9.
e6c0344
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.