pptx
Create and edit slide decks, generate slides from templates, and extract text.
ANanthropics/skills203k3,265 new stars in the last 7 days
Finish rebuilding a PDF as an editable LaTeX project after the app's importer has made its first pass. Reconstructs sectioning, math, tables, figures, and the bibliography one section at a time, verifying each against the original and keeping a progress log so the work survives across chats.
The app's PDF importer has already run. It read the text layer, ordered it by column,
joined lines into paragraphs, guessed headings from font size, pulled the images out into
assets/, and wrote main.tex. What it cannot do is understand the document: it has no
tables, no citations, no equation structure, and no idea which heading is which level.
That is the job here. Rebuild the document section by section, verify each section against the original, and never write anything the original does not contain.
The one rule. Everything in the rebuild has to be visible in the original. A plausible
sentence, a rounded number, a guessed citation, an invented table cell: all of these are
worse than a gap marked TODO. When you cannot read something, say so in the progress log.
list_files to see what the importer produced: main.tex, assets/*.png, and possibly
nothing else.read_file the first eighty lines of main.tex. The importer's preamble is a short
fixed block (article, inputenc, fontenc, geometry, amsmath, graphicx,
hyperref). If you see pandoc markers instead, this is a Word or Markdown import: use
import-refine.compile. The importer's output normally builds. If it does not, fix the build first
(load_skill("oleafly-latex-build") for the error catalog) before any reconstruction.import/pdf-progress.md if it exists. Somebody, possibly you in an earlier chat,
already did part of this. Resume from the first section not marked done.You cannot rebuild what you cannot see. get_pdf_text reads the project's compiled
PDF, which is your rebuild, not the source. Establish the original separately, in this
order:
read_file with page,
for example {"path": "source.pdf", "page": 6}, returns the text from page 6 on, with a
[p. N] line before each page. Columns and tables come back as plain lines, so use it to
check wording and numbers, not layout. If the result has a note saying the PDF has no
text layer, it is a scan: go back to route 2.Record which route you used at the top of the progress log. A rebuild done from memory of an earlier turn is not a rebuild.
Create import/pdf-progress.md before the first edit, from the template in
references/progress-log.md. One row per section: page range, status, what is left.
Update it after every section, in the same turn as the edit. This is what makes the work
resumable, and a long document will not finish in one conversation. Mirror the same rows
into update_todos for the current session.
One pass over the whole document before any detailed work.
project_map for the current heading tree, or search_project for \section and
\subsection if the engine does not offer the index.abstract
environment), then heading levels top to bottom.compile.Do not fix math, tables, or citations yet. The skeleton pass is what makes the rest navigable.
For each section, in document order:
search_project for the section heading, then read_file
with an offset around it.replace_in_file for surgical changes, write_file only when a whole section
is being replaced. The recipes for each kind of content are in
references/reconstruction-patterns.md.import/pdf-progress.md.One section per turn is a reasonable pace. Say which section you are on.
Two checks, both against the original:
Text. get_pdf_text returns your compiled PDF page by page, capped at 2000 characters
per page and 20000 characters overall. That cap means it is a section-level check, not a
whole-document one. Compare the section you just rebuilt: are the headings, numbers, and
symbols the same as the original page? A number that differs is a transcription error, and
it matters more than any formatting issue on the page.
Layout. verify_pdf_pages rasterises up to six pages of your compiled PDF for a vision
model. Use it when the question is visual: does the two-column flow match, did a table
overflow the margin, did a figure land on the right page. It needs the "Allow PDF page
capture for AI" setting and a model that can see images; when either is missing, the tool
says so. Then fall back to the text check and tell the user which pages you could not
inspect visually.
Do not verify by re-reading your own source. It will always agree with itself.
The reference list arrives as a plain section of paragraphs at the end, and every in-text
citation is literal text ([14], (Smith and Chen, 2020)).
verify_citation with that
identifier. It returns canonical BibTeX. Use the returned entry, not the text you read
off the page.oleafly-literature-sweep. It
searches and verifies. Do not write a BibTeX entry from the rendered text alone: an
extractor drops initials and merges authors, and a wrong entry is a wrong citation.references.bib, replace each literal citation with
\cite{key}, add the bibliography commands, and delete the plain reference section.project_map for unresolved citation keys.If an entry cannot be verified, leave the literal text in place and list it in the progress log under "unresolved". Do not invent a key to make the build quiet.
Once the content is right, hand the preamble to import-refine step 3. The importer's
preamble is engine agnostic and carries inputenc and T1 fontenc that Oleafly's
Unicode engine does not want, and by now the document needs booktabs, amsmath extras,
and the bibliography packages that the reconstruction introduced.
| What you hit | What to do |
|---|---|
| A page with no text and no attached image | Nothing can be recovered. Mark the page blocked in the progress log with the reason, and move on. Do not write plausible content. |
| A scanned document (no text layer anywhere) | Say so immediately. The app does not do OCR. Rebuilding from page images alone is possible but slow, so ask the user whether it is worth it before starting. |
| Two-column text interleaved on a page | The column split failed there. Reorder by hand against the original, or ask the user to re-import that page range with the column setting forced. |
| A formula you cannot read at the attached resolution | Ask for a higher resolution crop of that region. Do not approximate an equation. |
| The build breaks and stays broken after three attempts | Stop, revert to the last compiling state, write what failed into the progress log, and report it. |
| The document is over about thirty pages | Agree a page range with the user for this session and log the rest as not started. |
| Path | What goes in it |
|---|---|
import/pdf-progress.md | Section table with status, the ground-truth route, unresolved items. |
main.tex (or the project's main document) | The rebuild. |
references.bib | Verified entries only. |
assets/ | Extracted figures, renamed from imageN.png to something meaningful. |
import/pdf-progress.md is done or blocked with a stated reason.\cite key or listed as unresolved.references/reconstruction-patterns.md: the rebuild recipe for each kind of content, and
what the importer gets wrong about it.references/progress-log.md: the progress log template and how to resume from one.Read them with read_skill_file("pdf-to-latex", "references/reconstruction-patterns.md").
Create and edit slide decks, generate slides from templates, and extract text.
ANanthropics/skills203k3,265 new stars in the last 7 days
Create and edit Word docs with TOC, page numbers, headers and more.
ANanthropics/skills203k3,265 new stars in the last 7 days
Read and edit PDFs: extract text and tables, merge, split, rotate, and fill forms.
ANanthropics/skills203k3,265 new stars in the last 7 days
Co-write specs, proposals and decision docs through a structured, iterative workflow.
ANanthropics/skills203k3,265 new stars in the last 7 days
Read and edit spreadsheets: add columns, compute formulas, format, and clean messy data.
ANanthropics/skills203k3,265 new stars in the last 7 days
Create posters and visual art as PNG or PDF, guided by a design philosophy.
ANanthropics/skills203k3,265 new stars in the last 7 days