Skip to content

Papercut 0.8.0

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Nov 19:07
· 26 commits to main since this release

Added

  • ColumnFlow / <x-doc::column-flow>: text set in columns, like Word's. columns(), columnWidths(), columnGap() and columnRule() (Blade columns, widths, column-gap, rule) set the count (1 to 45), unequal widths, the column gap (36pt by default) and a rule. Content fills each column, then the next page, and the last page ends level. It can sit on the page or inside any box, but not in a table cell, a row, another flow or a header, footer, background or overlay. ColumnBreak / <x-doc::column-break /> sends what follows to the next column.
  • Markup: in original style mode a div with column-count or columns (a count) becomes a column flow, with column-gap and column-rule setting its gap and rule; those two are dropped with a note when there's no count, and other column CSS is dropped with a note.
  • HTML export uses CSS columns. Word export writes real section columns for a flow on the page (a flow inside a box comes out as one column, with a note).
  • The Tailwind translator on the docs site maps columns-N, gap-x-* and divide-x to a column flow.
  • A gallery tile for the column flow, with rule and widths variants.
  • A Versions and compatibility page in the guide: what the version promise covers, and what it doesn't.

Changed

  • The Papercut\Backend interfaces, the Papercut\Paint display list, the layout engine (Papercut\Layout), the tree walk (Papercut\Tree), the HTML writer, StyleResolver, PageThemes, FontRegistry and the text layout classes, the exporter classes and Exporter (export with toPdf(), toHtml() or export(new DocxExporter())), ComputedStyle, the Word export's internals and the Laravel package's component, command, preview and rendering classes are marked @internal: custom backends aren't supported. Making a PhpPdfBackend with its options and passing it to PdfOptions(backend:) still is. examples/core/hello.php, which draws with the backend directly, is now labelled a contributor demo.
  • A paper example (examples/core/documents/paper.php and examples/laravel/views/paper.blade.php): a two-page academic paper on A4 with a full-width title and abstract, a two-column body with a table and a figure that ends level, and a full-width closing note, with PDF, HTML and Word output.

Fixed

  • A box with a percentage min-width or max-width that isn't stretched across its column (align-self or the column's align set to start, center or end) resolved it against its own content, not the column. It's now a share of the column, as width became in 0.7.0.