github oomol-lab/pdf-craft v1.0.2

latest releases: v2.6.7, v2.6.6, v2.6.5...
11 months ago

This release brings improvements to EPUB generation, inline LaTeX support, and enhanced handling of footnotes and tables.

What's Changed

New Features

  • Inline LaTeX Expression Support - Added support for preserving inline LaTeX mathematical expressions in both Markdown and EPUB outputs. A new inline_latex parameter (default: True) allows you to control this behavior for EPUB conversion

  • Assets in Footnotes - Footnotes can now contain images and other assets, which are properly preserved during conversion

Improvements

  • Enhanced Table of Contents Generation - Improved EPUB table of contents generation to analyze hierarchical structure based on font sizes, replacing the previous flat list format

  • Parameter Naming - Renamed parameters for better clarity:

    • model → ocr_size
    • Type: DeepSeekOCRModel → DeepSeekOCRSize
    • #265

    This change better reflects that the parameter controls the OCR model size rather than being a generic "model" reference.

Bug Fixes

  • Fixed table rendering issues - #272
  • Improved LaTeX escape handling - #270

Breaking Changes

⚠️ API Parameter Changes: The model parameter has been renamed to ocr_size in transform_markdown() and transform_epub() functions. Additionally, the type DeepSeekOCRModel has been renamed to DeepSeekOCRSize.

Migration:

# Old (v1.0.1)
transform_epub(
    pdf_path="input.pdf",
    epub_path="output.epub",
    model="gundam"
)

# New (v1.0.2)
transform_epub(
    pdf_path="input.pdf",
    epub_path="output.epub",
    ocr_size="gundam"
)

Full Changelog: v1.0.1...v1.0.2

Don't miss a new pdf-craft release

NewReleases is sending notifications on new releases.