Sapana Micro Software

pdf2beamer

A throttled, resumable pipeline from PDF pages to Beamer.

pdf2beamer converts a PDF into a Beamer deck without handing the machine over to the conversion. Finished pages and slides are checkpointed beside the output, so an interrupted run continues from the last completed unit.

10^{2^{-6}}BeamerTeX

Read the paper

The technical report, the Beamer talk, and the operator manual. The source repository stays private. These documents are the public face of the tool.

Open Technical report

Seven pages. Architecture, furniture filter, formulas, checkpoints.

What the pipeline does

Stages are barriers, not a free pipeline. All pages are read before any paragraph is distilled.
1PDF2Render3OCR4Segment5Distill6Polish7Beamer
OCR finishes before distillation, so one model stays resident. Assembly, and pdflatex when requested, always run again on resume.
−3591,333974UnfilteredFiltered
One 343-page preprint. Furniture suppression removed 357 frames. The compiled deck fell from 1,333 pages to 974, and the author stayed on the title page.
\g\mathrm{g}10^{2^{-6}}
An unknown command such as \g becomes a mathrm name. A doubled superscript is braced. Unbalanced braces, and commands such as \input, are escaped as text.
1234567891011121314151617181920212223242526··
Twenty-eight hardware threads on the development machine. The pool leaves the last pair free so the foreground keeps priority. Utility QoS covers the rest.
ReadDistillSavedResume
Finished pages and slides stay beside the output. The same command continues from the last completed unit. --fresh throws that checkpoint away.
Utility QoS and a reserved pair of threads keep the conversion off the foreground. Checkpoints make a long document restartable.

Install

Install Homebrew, then tap the public repository, trust it, and install pdf2beamer. The formula in that tap, Formula/pdf2beamer.rb, downloads the signed v1.0.1 release and installs pdf2beamer, d2s, and the manual page. It requires macOS 27 or newer.

Install Homebrew

Paste the installer into Terminal. On Apple Silicon, Homebrew lives in /opt/homebrew, so the shell needs brew shellenv before the three commands below.

  1. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    Install Homebrew. The script explains what it will do and waits for confirmation. Skip this when brew is already on PATH.

  2. eval "$(/opt/homebrew/bin/brew shellenv)"

    Put Homebrew on PATH for Apple Silicon. Add that line to ~/.zprofile so a new terminal can find brew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> ~/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Install pdf2beamer

  1. brew tap sapana-micro-software/pdf2beamer

    Add the tap that holds the formula and the signed release.

  2. brew trust --tap sapana-micro-software/pdf2beamer

    Homebrew ignores an unofficial tap until you trust it.

  3. brew install sapana-micro-software/pdf2beamer/pdf2beamer

    Install the script, the sealed d2s worker, and the manual page from the v1.0.1 release.

man pdf2beamer

Read the manual page installed with the formula.

brew tap sapana-micro-software/pdf2beamer
brew trust --tap sapana-micro-software/pdf2beamer
brew install sapana-micro-software/pdf2beamer/pdf2beamer
man pdf2beamer

Install the models

The formula installs the ollama program. These two commands download the models from Ollama. Pull each one once. glm-ocr reads page images. gemma3:12b distills paragraphs.

  1. ollama pull glm-ocr

    Download the OCR model. pdf2beamer sends each page with the prompt Text Recognition:.

  2. ollama pull gemma3:12b

    Download the paragraph summarizer used when gemma4:13b is not installed.

ollama pull glm-ocr
ollama pull gemma3:12b

Requirements in the formula

Homebrew installs these when it installs pdf2beamer. The Ruby formula declares them with depends_on. pdflatex is separate: pass --pdf only when MacTeX or BasicTeX is on PATH.

The release worker is codesigned with a hardened runtime and an Apple timestamp. Authority: Apple Development: Kailash Chandra (SZYFREVM6P).

Copyright (C) Shyamal Chandra, 2026. All rights reserved.