Used in combination with page margin content, the new .lastheading function allows for persistent headings, such as chapter titles or section names, to be displayed in the page margins of paged and slides documents.
The .pagemargin function now accepts new positions:
topoutsidecorner, topoutside, topinsidecorner, topinside, bottomoutsidecorner, bottomoutside, bottominsidecorner, bottominside.
Contrary to fixed positions such as topright or bottomleft, these mirror positions adapt based on whether the page is left or right, great for printing.
.pagemargin {topoutside}
**This** is a margin content.
The function also no longer has topcenter as the default position.
Specific elements can be assigned custom CSS class names by means of the classname parameter, available in .container (for blocks) and .text (for inlines).
.container classname:{my-custom-class}
This is a block with a custom class.
---
This is an .text {inline text} classname:{my-custom-class} with a custom class.
.css
.my-custom-class {
padding: 8px;
background: linear-gradient(to right, pink 0%, lightblue 100%);
}
[!TIP]
You can return custom elements from user-defined functions for enhanced reusability and readability!
.font calls can now be stacked to create multiple font configurations, which are applied in order. Each configuration acts as a fallback for the next one, in case the current font does not contain glyphs for certain characters.
This is particularly useful for multi-language documents. For example, you may set a primary font for Latin characters and a fallback font for CJK characters:
.codespan {text} can now be used to create inline code spans, similar to backticks (`text`).
Just like .code as an alternative to triple-backtick code blocks, the difference is that .codespan supports function calls, allowing
for dynamic content, whereas backticks do not.
Β
Faster frontend and PDF generation
The web frontend underwent a complete rewrite, with performance and maintainability in mind.
The number of synchronous tasks has been reduced, making initial page load faster, with impact on PDF generation time as well.
What's Changed
[dev] refactor: improve robustness of module management by @iamgio in https://github.com/iamgio/quarkdown/pull/214
refactor/feat: TypeScript frontend migration + persistent headings implementation by @iamgio in https://github.com/iamgio/quarkdown/pull/220
feat: emojis and table generation by rows by @iamgio in https://github.com/iamgio/quarkdown/pull/224
build(deps-dev): bump happy-dom from 20.0.0 to 20.0.2 in /quarkdown-html by @dependabot[bot] in https://github.com/iamgio/quarkdown/pull/225
feat: allow stacking font configurations by @iamgio in https://github.com/iamgio/quarkdown/pull/226
feat: add classname parameter to .container by @iamgio in https://github.com/iamgio/quarkdown/pull/227
feat: add classname parameter to .text by @iamgio in https://github.com/iamgio/quarkdown/pull/228
feat: page margins mirror positions by @iamgio in https://github.com/iamgio/quarkdown/pull/230
[dev] refactor(ts): add page abstraction, simplify page numbers and page margins handlers by @iamgio in https://github.com/iamgio/quarkdown/pull/231
Full Changelog: https://github.com/iamgio/quarkdown/compare/v1.10.0...v1.11.0