Limitations

Limitations

htmlbag deliberately does not implement parts of HTML/CSS that would require fundamentally different layout machinery. This page lists what’s missing and where the line is.

Side floats with text wrap

CSS float: left|right — floats that sit alongside body text with text wrapping around them — is not supported. It requires a paragraph builder that handles variable line widths over a vertical range (TeX’s \parshape). htmlbag’s paragraph builder runs at fixed width per paragraph; lifting that constraint is a separate project.

Multi-column layout

CSS column-count / column-width are not supported. The page builder operates on one column.

Running headers and footers from body content

CSS running() / element() functions (GCPM) are not supported. These let a header at the top of every page show e.g. the current chapter title pulled from the body — the data flow is body → page chrome, which the current pipeline doesn’t model.

Page master alternation

Different masters for left/right/first/blank pages (CSS @page :left / :right / :first / :blank) are not implemented. Every page uses the same master.

Inline images with text wrap

<img style="float: left"> rendering with text wrapping around the image is not supported (same root reason as side floats).

Static-typing-mode XPath

Internal — only relevant if you embed htmlbag’s XPath usage. The underlying goxpath engine implements XPath 1.0 / 2.0 basic semantics; XPath 2.0 strict static-typing mode (XPST0005 errors for empty-by-construction expressions) is not enforced.

What this means in practice

A single-column document with figures, tables, lists, footnotes, multiple top/bottom floats per page, and a unified page master is fully covered. A multi-column document with running chapter titles, side-anchored figures with wrapped text, and left/right page asymmetry needs work that goes beyond the insert system.