-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Summary
LTML currently does not provide a markup-level way to define custom page styles. Users can reference built-in page sizes through the style attribute on <page>, but defining a new PageStyle still requires adding it in Go code.
Problem
This makes custom page sizes and reusable page configurations harder to author and share in LTML documents. It also creates an inconsistency with other style concepts in LTML, which are generally exposed through markup.
Proposal
Add a dedicated <pagestyle> tag that exposes PageStyle definitions in LTML.
Example:
<ltml>
<pagestyle id="statement" width="8.5in" height="11in" margin="0.5in" />
<page style="statement">
...
</page>
</ltml>Desired Behavior
<pagestyle>defines a namedPageStylein the current scope.- Custom page styles can be referenced from
<page style="...">. - Page-scoped definitions remain page-local; document-scoped definitions remain visible to descendant pages.
- Built-in page styles continue to work unchanged.
- This should remove the need to register custom
PageStylevalues in Go code for common LTML authoring cases.
Notes
The current docs already note that PageStyle is effectively not exposed through normal LTML parsing because <page> is consumed as the concrete page element. A separate <pagestyle> tag would avoid that collision cleanly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels