Skip to content

Images and Tables Layout Update - #73

Merged
drnachio merged 8 commits into
mainfrom
develop
Jun 10, 2026
Merged

Images and Tables Layout Update#73
drnachio merged 8 commits into
mainfrom
develop

Conversation

@drnachio

Copy link
Copy Markdown
Owner

No description provided.

drnachio and others added 8 commits June 10, 2026 11:22
…troduce utility functions

- Enhanced `clearMeasurementCache` to also clear the text width cache for accurate measurements post font loading.
- Updated `measure/plain.ts` to utilize `measureTextWidth` for hyphen width calculation and improved last line detection logic.
- Introduced `pickSpanFont` utility to streamline font selection in `tokenizeSpans`.
- Refactored `injectRefSpans` and `injectMathSpans` to use a shared `injectPlaceholderSpans` function for cleaner code and reduced duplication.
- Improved source mapping and whitespace normalization logic for better performance and accuracy.
- Added `computePageTextExtent` to calculate the vertical extent of text on a page, aiding in layout adjustments.
- Introduced `buildHeadingLevelMap` for efficient heading level lookups during document building.
- Enhanced list indentation calculations to support shared logic for unordered and ordered lists.
…r el ancho de los espacios en líneas finales para cumplir con la semántica de Knuth-Plass.
- Introduced DiagramStyleSection in the sidebar for configuring SVG diagram styles.
- Added new labels for diagram styling in defaultLabels and labels types.
- Implemented diagram style configuration in the PostextConfig and resolved it in the pipeline.
- Created functions to handle default diagram styles and strip defaults.
- Added applySingleInkToSvg function for recoloring SVGs based on the selected ink color.
- Implemented PDF resource byte handling for SVGs with single-ink recoloring.
- Added tests for single-ink functionality to ensure correct color mapping.
- Updated lastUpdated and readingTime in English and Spanish documentation for the Sandbox.
- Enhanced descriptions in the Sandbox documentation to include resource and font management.
- Modified the activity bar description to reflect new panel options.
- Adjusted the sidebar panel descriptions and added details about resource management.
- Removed "coming soon" labels from default labels and types as resource management is now documented.
…ackends

Clicking a :ref (e.g. "Tab. 1.1") now jumps to the referenced resource:

- PDF: body-text refs record /Link annotations (previously only refs in
  captions/table cells were linked; body refs were styled but inert).
- HTML: refs emit <a href="#pt-res-…"> and each resource embed emits a
  zero-size id anchor, so standalone HTML output navigates natively.
- Sandbox (Canvas + HTML previews): clicking a ref smooth-scrolls to the
  resource (hit-testing mirrors the renderers' justify-fill math, covers
  captions, table cells, and float bands); hovering shows a pointer cursor.
  Scrolling is constrained to the axes the container actually exposes, and
  the multi-column HTML viewer clears any residual vertical scroll left
  over from single-column mode.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Introduced a new configuration option `balancing` in headings to enable vertical column balancing.
- Implemented logic to distribute extra baseline-grid lines above headings to ensure columns end flush with the page bottom.
- Updated the UI to include controls for enabling/disabling column balancing and setting the maximum lines per heading.
- Enhanced the document building process to account for column balancing during layout passes.
- Added tests to validate the functionality of column balancing and its impact on layout.
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
postext Building Building Preview, Comment Jun 10, 2026 5:15pm

Request Review

@drnachio
drnachio merged commit 5050dc3 into main Jun 10, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant