Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions docs/reference/assemble.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Assemble
# Assembly helpers

::: rtflite.assemble
Utilities for combining existing RTF or DOCX outputs.

::: rtflite.assemble.assemble_rtf
options:
show_root_heading: false
show_source: false

::: rtflite.assemble.assemble_docx
options:
show_root_heading: false
show_source: false

::: rtflite.assemble.concatenate_docx
options:
members:
- assemble_rtf
- assemble_docx
- concatenate_docx
show_root_heading: true
show_root_heading: false
show_source: false
10 changes: 5 additions & 5 deletions docs/reference/convert.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Convert
# Format conversion

::: rtflite.convert
Convert generated RTF files to other document formats using LibreOffice.

::: rtflite.convert.LibreOfficeConverter
options:
members:
- LibreOfficeConverter
show_root_heading: true
show_root_heading: false
show_source: false
17 changes: 17 additions & 0 deletions docs/reference/encoding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Encoding pipeline

Encoding orchestrators that drive the strategy-based pagination and rendering flow.

## RTFEncodingEngine

::: rtflite.encoding.RTFEncodingEngine
options:
show_root_heading: false
show_source: false

## UnifiedRTFEncoder

::: rtflite.encoding.UnifiedRTFEncoder
options:
show_root_heading: false
show_source: false
17 changes: 9 additions & 8 deletions docs/reference/low-level.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# Low-level API
# Core utilities

Lower-level components and utilities for advanced users who need fine-grained control.
Low-level components for configuring defaults and working with assets.

## Configuration

Core configuration and constants.
## Configuration & constants

::: rtflite.core.RTFConfiguration
options:
show_root_heading: false
show_source: false

::: rtflite.core.RTFConstants
::: rtflite.core.RTFDefaults
options:
show_root_heading: false
show_source: false

## Figure Utilities
::: rtflite.core.RTFConstants
options:
show_root_heading: false
show_source: false

Utilities for reading and processing figures.
## Figure utilities

::: rtflite.figure.rtf_read_figure
options:
Expand Down
29 changes: 19 additions & 10 deletions docs/reference/page-layout.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Page Layout Components
# Page layout components

Components for defining page structure, headers, footers, and overall document layout.
Components for defining page structure, headers, footers, and supporting text blocks.

## RTFPage

Defines page dimensions, margins, and layout settings.
Defines page dimensions, margins, orientation, and pagination settings.

::: rtflite.input.RTFPage
options:
Expand All @@ -13,16 +13,16 @@ Defines page dimensions, margins, and layout settings.

## RTFPageHeader

Creates headers that appear at the top of pages.
Header text that appears at the top of pages. Supports field codes for page numbering.

::: rtflite.input.RTFPageHeader
options:
show_root_heading: false
show_source: false

## RTFPageFooter
## RTFPageFooter

Creates footers that appear at the bottom of pages.
Footer text that appears at the bottom of pages.

::: rtflite.input.RTFPageFooter
options:
Expand All @@ -31,16 +31,25 @@ Creates footers that appear at the bottom of pages.

## RTFTitle

Defines document and table titles.
Document and table titles displayed above the main content.

::: rtflite.input.RTFTitle
options:
show_root_heading: false
show_source: false

## RTFSubline

Subject lines that sit beneath the title and above the table body.

::: rtflite.input.RTFSubline
options:
show_root_heading: false
show_source: false

## RTFFootnote

Creates footnotes for tables and documents.
Footnote text displayed after the table content.

::: rtflite.input.RTFFootnote
options:
Expand All @@ -49,9 +58,9 @@ Creates footnotes for tables and documents.

## RTFSource

Adds source information to documents.
Source information displayed at the bottom of the document.

::: rtflite.input.RTFSource
options:
show_root_heading: false
show_source: false
show_source: false
54 changes: 50 additions & 4 deletions docs/reference/pagination.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Pagination

Advanced pagination features for multi-page documents.
Metadata-driven pagination utilities and strategies used by the unified encoder.

## RTFPagination

Main pagination controller for handling page breaks and content distribution.
Core pagination settings used to calculate available space on each page.

::: rtflite.pagination.RTFPagination
options:
Expand All @@ -13,9 +13,55 @@ Main pagination controller for handling page breaks and content distribution.

## PageBreakCalculator

Calculates optimal page break positions.
Calculates row metadata, page assignments, and optimal break points.

::: rtflite.pagination.PageBreakCalculator
options:
show_root_heading: false
show_source: false
show_source: false

## Pagination contexts and registry

::: rtflite.pagination.PaginationContext
options:
show_root_heading: false
show_source: false

::: rtflite.pagination.PageContext
options:
show_root_heading: false
show_source: false

::: rtflite.pagination.StrategyRegistry
options:
show_root_heading: false
show_source: false

::: rtflite.pagination.PaginationStrategy
options:
show_root_heading: false
show_source: false

## Built-in strategies

::: rtflite.pagination.strategies.defaults.DefaultPaginationStrategy
options:
show_root_heading: false
show_source: false

::: rtflite.pagination.strategies.grouping.PageByStrategy
options:
show_root_heading: false
show_source: false

::: rtflite.pagination.strategies.grouping.SublineStrategy
options:
show_root_heading: false
show_source: false

## Page feature processing

::: rtflite.pagination.processor.PageFeatureProcessor
options:
show_root_heading: false
show_source: false
4 changes: 2 additions & 2 deletions docs/reference/rtf-document.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# RTFDocument

The `RTFDocument` class is the main entry point for creating RTF documents with rtflite. It orchestrates all components to generate properly formatted RTF output.
Main entry point for creating complete RTF documents using the unified encoding pipeline. Use this class to combine pages, headers/footers, titles, tables, and figures into production-ready output.

::: rtflite.encode.RTFDocument
options:
show_root_heading: false
show_source: false
show_source: false
8 changes: 4 additions & 4 deletions docs/reference/strwidth.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# String width

::: rtflite.strwidth
Measure string widths using the metric-compatible fonts bundled with rtflite.

::: rtflite.strwidth.get_string_width
options:
members:
- get_string_width
show_root_heading: true
show_root_heading: false
show_source: false
16 changes: 8 additions & 8 deletions docs/reference/tables.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Table Components
# Table components

Components for creating and formatting tables in RTF documents.
Components for creating table structures, spanning rows, and embedded figures.

## RTFBody

Defines the main table body with data and formatting options.
Configures table bodies, including grouping, spanning rows, and metadata-driven pagination.

::: rtflite.input.RTFBody
options:
Expand All @@ -13,7 +13,7 @@ Defines the main table body with data and formatting options.

## RTFColumnHeader

Creates column headers for tables.
Column header definitions. Supports multi-row headers via nested sequences.

::: rtflite.input.RTFColumnHeader
options:
Expand All @@ -22,16 +22,16 @@ Creates column headers for tables.

## RTFFigure

Embeds figures and images in RTF documents.
Embeds figures and images alongside or in place of tabular content.

::: rtflite.input.RTFFigure
options:
show_root_heading: false
show_source: false

## Row Components
## Row components

Lower-level components for row construction.
Lower-level components for constructing rows and cells manually when needed.

### Row

Expand All @@ -52,4 +52,4 @@ Lower-level components for row construction.
::: rtflite.row.Border
options:
show_root_heading: false
show_source: false
show_source: false
26 changes: 13 additions & 13 deletions docs/reference/text-formatting.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Text & Formatting
# Text & formatting

Components and utilities for text styling and formatting in RTF documents.
Base attribute models and utilities for styling text and table cells.

## Text Attributes
## Text attributes

Base attributes for text formatting.
Shared text styling options consumed by headers, footers, titles, and table cells.

::: rtflite.attributes.TextAttributes
options:
show_root_heading: false
show_source: false

## Table Attributes
## Table attributes

Attributes specific to table formatting.
Table-specific attributes layered on top of text styling (borders, column widths, pagination flags).

::: rtflite.attributes.TableAttributes
options:
show_root_heading: false
show_source: false

## Text Content
## Broadcast value

Component for handling text content in cells.
Utility for broadcasting scalar or vector values across table dimensions.

::: rtflite.row.TextContent
::: rtflite.attributes.BroadcastValue
options:
show_root_heading: false
show_source: false

## Broadcast Value
## Text content

Utility for broadcasting values across rows and columns.
Low-level text container used inside custom rows and cells.

::: rtflite.attributes.BroadcastValue
::: rtflite.row.TextContent
options:
show_root_heading: false
show_source: false
show_source: false
5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ nav:
- API reference:
- Core:
- RTFDocument: reference/rtf-document.md
- Encoding pipeline: reference/encoding.md
- Configuration & constants: reference/low-level.md
- Components:
- Page layout: reference/page-layout.md
- Tables: reference/tables.md
- Text & formatting: reference/text-formatting.md
- Utilities:
- Format conversion: reference/convert.md
- Assembly helpers: reference/assemble.md
- String width: reference/strwidth.md
- Advanced:
- Pagination: reference/pagination.md
- Assemble: reference/assemble.md
- Low-level API: reference/low-level.md
- Changelog: changelog.md
- Coverage: coverage/
- Contributing: contributing.md
Expand Down