Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 12 May 09:40
· 34 commits to main since this release

v0.8.0

Highlights

  • Replaced the old fixed-layout Sheet(...) model with page-positioned drawing items:
    • Shape(...)
    • TextBox(...)
    • ImageBox(...)
    • Document(..., page_items=[...])
  • Added inline drawing placement for Shape, TextBox, and ImageBox with placement="inline".
  • Added richer table and figure layout controls:
    • Table(split=True/False)
    • repeated header rows for split tables
    • placement hints such as here, tbp/float, top, bottom, and page
    • PDF float handling so short tables can move after nearby prose when appropriate
  • Added row, column, and cell styling for tables, including background color, text color, bold, italic, and horizontal/vertical alignment.
  • Added SubFigure(...) and SubFigureGroup(...) with labeled subfigure references.
  • Added separate caption and in-text reference labels for tables and figures, making labels such as Figure, Fig., localized names, or custom abbreviations easier to manage.
  • Added Part(...) for book-like top-level divisions and improved heading hierarchy behavior across generated contents pages.
  • Added explicit references for more block types, including paragraphs, equations, code blocks, boxes, headings, tables, and figures.
  • Added syntax-highlighted CodeBlock(...) rendering backed by Pygments, plus PDF code wrapping and cleaner language labels.
  • Added compact inline chip helpers:
    • tag(...)
    • badge(...)
    • status(...)
    • keyboard(...)
  • Added prose and math script helpers:
    • subscript(...)
    • superscript(...)
    • prescript(...)
    • LaTeX-style \prescript{...}{...}{...} inside Math(...) and Equation(...)
  • Added LaTeX/Notion-like layout blocks:
    • VerticalSpace(...) / vspace(...)
    • Divider(...) / hrule(...)
  • Added reusable component and manuscript presets under docscriptor.presets, including callouts, compact/key-value tables, nomenclature boxes, and a generic JournalArticleTemplate(...).
  • Expanded the usage guide, journal paper example, and template preset examples to cover the new layout, reference, table, drawing, preset, and inline formatting APIs.

Compatibility Notes

  • Sheet(...) has been removed. Use Document(..., page_items=[...]) with Shape, TextBox, and ImageBox for fixed page overlays, or use normal flow blocks such as Box, Table, and Figure when Word editability matters.
  • Publisher-specific template preset examples were simplified into a generic journal article preset surface. The included template example is intentionally broad and should still be adapted to each journal's instructions for authors.

Renderer Notes

  • DOCX contents now use native Word TOC fields where appropriate.
  • DOCX, PDF, and HTML rendering now handle more reference targets, caption/reference label customization, subfigure labels, table placement, code highlighting, inline chips, vertical spacing, dividers, and front scripts consistently.
  • PDF code blocks wrap to the available page width instead of overflowing.

Dependencies

  • Added Pillow as a runtime dependency for inline chip rendering.
  • Added Pygments as a runtime dependency for syntax highlighting.