papr-pdf 0.1.0

A fast, keyboard-first CLI tool to compile Markdown, LaTeX, and plain text files into publication-grade PDFs.
papr-pdf-0.1.0 is not a library.

papr 📄

Lightning-fast CLI tool to compile Markdown, LaTeX, and Plain Text files into publication-grade PDFs.

Crates.io License: MIT OR Apache-2.0

papr gives you an Overleaf-grade typesetting workflow right inside your terminal. It handles:

  • Markdown (.md): Full GitHub Flavored Markdown, embedded KaTeX math ($E=mc^2$), and syntax-highlighted code blocks.
  • LaTeX (.tex): Multi-file project support (\input, \include, \includegraphics) powered by Tectonic / XeTeX with automatic package resolution.
  • Plain Text (.txt): Clean monospaced layout with headers, line wrapping, and page margins.

🚀 Quick Start

Installation

cargo install papr-cli

1. Interactive Mode (No Arguments)

Just type papr and hit Enter:

$ papr
? Select document format to compile:
  ❯ 1. Markdown (.md)
    2. LaTeX (.tex)
    3. Plain Text (.txt)

? Enter path to input file (press [Tab] to autocomplete):
  ❯ chapters/main.tex

✔ Generated: chapters/main.pdf (84.2 KB, 0.38s)

2. Direct Command Mode

# Markdown to PDF
papr README.md

# Multi-file LaTeX to PDF (Overleaf-style)
papr thesis/main.tex

# Plain Text notes to PDF
papr meeting_notes.txt

# Specify custom output path
papr report.md -o ~/Desktop/report.pdf

# Open PDF immediately in your system viewer
papr paper.tex --open

🎨 Themes

For Markdown and Text files, choose between built-in styling themes:

papr document.md --theme academic    # (Default) Classical serif, Latin Modern typography
papr document.md --theme modern      # Clean, minimalist sans-serif
papr document.md --theme github      # GitHub flavored markdown aesthetic
papr document.md --theme dark        # Night mode / OLED friendly

🧩 Overleaf-Style Multi-File Support

When compiling .tex documents with \input{...} or \includegraphics{...}:

my-paper/
├── main.tex
├── figures/
│   └── architecture.png
└── sections/
    ├── intro.tex
    └── results.tex

Run papr my-paper/main.tex and all relative sub-files and images resolve seamlessly!


📦 Publishing to crates.io

To publish updates:

cargo publish

📄 License

Dual-licensed under either of: