-
-
Notifications
You must be signed in to change notification settings - Fork 87
Pipeline: Post rendering
Main packages:
core.rendering
,core.template
core.pipeline.output
Rendering modules:
quarkdown-html
Obtained the translation of the AST to the target format from the Renderer, you might notice it is not enough to display to the user. Considering the HTML format, that is just the content that would go inside <body>
, but everything else is missing: metadata, styling, and possibly a runtime.
Here comes the post-renderer, which takes a template (HTML sample), made for an ad-hoc engine, and injects in it all the needed data, such as:
- The content itself, put into
<body>
; - The document target (plain/slides/paged). For each target, different scripts and stylesheets are required;
- User-defined properties, such as title and page format;
- The need to load certain libraries, such as MathJax for rendering LaTeX formulas. This is only done if at least one formula is used.
On top of that, the post-renderer is also responsible for returning the output resources of the compilation. These resources include:
- The generated HTML;
- The group of stylesheets (global stylesheet, layout theme and color theme);
- The group of required runtime scripts.
These resources are then added to those provided by the media storage and ultimately returned by the pipeline. It is then up to the invoker to handle those resources, which in case of CLI are saved to file.
- Figures
- Image size
- TeX formulas
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Including other Quarkdown files
- Importing external libraries
- Localization
- Document metadata
- Theme
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Paragraph style
- Caption position
- Table of contents
- Stacks (row, column, grid)
- Container
- Align
- Float
- Figure
- Clip
- Box
- Collapsible
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more