I spent part of my childhood in Winsford, a salt mining town in the UK (its other claim to fame being that it was where Neville Southall played before Everton). Every time I pass a yellow bin of salt for gritting the roads, I get to feel a little bit of nostalgia (before falling over because councils no longer have enough money to grit the roads and pavements).
Many years ago working on natural language to SQL, when we had ambiguities this is how we’d clarify things with the user (albeit with the minimal amount of brackets necessary).
I’m sure somebody posted a link to E-Prime here recently (a form of English where all forms of ‘to be’ are forbidden) and this conversation is a wonderful example of the kinds of conflicts that it helps avoid.
Do you intend to one day support all the paged media bits in pagedjs? I assume it works with their polyfill but it’d be great to have a built in more performant option.
Can you give an example? I'm not that familiar with pagedjs, just pulled it for the benchmark.
My library has support for @page rules, but that's actually pretty basic. I needed more advanced headers/footers and added support for in-html headers/footers like this:
In your <body> you cna define headers/footers by wrapping content in a <section> tag. For example:
<body>
<section>
<header>... any HTML here, full CSS support</header>
<div> Some normal flow content</div>
<footer>Your footer HTML</footer>
</section>
</body>
This structure is purely optional, but it's a really convinient way of designing pages with different styles in the same document.
An HTML file can have any number of these sections meaning you can generate a PDF with different headers/footers.
Some other bits: It has support for 100% height that match the entire page, it can handle forced page breaks inside flexbox containers (Chrome doesn't even try ... just ignores it) and also follows page-break: avoid correctly - so it doesn't randomly split table rows for example.
Things like string-set and string (repeating section headers on each page), counter and target-counter (embedding page number references) etc. Prince and pagedjs support all the CSS3 paged media bits I've found myself needing, just wondering if that was on the roadmap.
Left usenet, left IRC, left LiveJournal, skipped MySpace, left Facebook, left the blogosphere, will leave Twitter and BlueSky. You’re either in touching distance of grass or you’re not, none of this matters.
This is one of those things that I’m glad remains highly personal and stochastic. Programming languages thrive when people are able and willing to create value with them. People thrive when there are options and they can find a language that sings to them.
reply