Expand description
The standard features of stdlib, one feature per submodule;
the standard backend features are in
stdlib::backends.
Each submodule documents one feature (FlmFeature):
the commands and environments it provides to authors and what they produce, and the
elements, tables, stages, lowering rules and settings it registers.
stdlib::add_features adds all of them but
compose, which a host registers (see below). A program may
register a feature without the rest of the standard features: a feature declares what it uses
of a feature it can do without as a peer declaration
(PeerName), so the registry still builds without
that feature. Some features need others, however (for example, the stages of refs
read the tables of refpoints and index), and a plan that runs such a feature’s
stages fails when a feature it needs is absent
(PlanError::NeedsUndeclared). See
features and packages, and
the extension guide for writing a feature.
§The features an author writes with
These features declare the commands and environments an author writes:
textstyles: the inline formatting commands\emph,\textbf,\textitand\texttt.literals: the commands that stand for one character of text (\%,\#,\&,\$,\,\{,\},\textbackslash), the character~(a non-breaking space), and\@, a spacing hint that produces nothing.headings: the heading commands\sectionto\subparagraph, and the heading kinds and heading commands a program declares.math: inline and display mathematics: the display-math environments and their equation lines, the text commands of mathematics,\eqref, and equation numbering. No feature of this package processes mathematics: a registry adds one, such as the feature of the packagemath_passthrough.refs: labels and references: the\labelfield (a macro a construct reads as data; see fields),\ref,\hyperref, and the stages that compute anchors and resolve references.verbatim: content taken exactly as written:\verbtext,\verbcode,\verba, and the environmentsverbatimtextandverbatimcode.lists: the list environmentsitemize,enumerateanddescription, their\items, and the label beside each item.xnotes: footnotes and the other kinds of text set apart from the running text (xnotes),\footnote{…}by default, and the lists in which they are shown.href: hyperlinks to an address outside the document:\href,\urland\email.defterm: defined terms: thedeftermenvironment, which defines a term where it is explained, and\term, a link to that definition.theorems: the theorem-like environmentstheorem,lemma,definition,proofand the theorem kinds a program configures, numbered, with a heading and a proof’s back-reference.quote: quotations:quote,blockquote,addressand the quote environments a program configures, with their quotation sections (\text,\lines,\attributed,\block).annotations: a reviewer’s highlights and comments, one command per reviewer a program configures; none by default.graphics:\includegraphics[options]{path}, an image, in a float’s body or, when the configuration allows it, anywhere in the text.floats:figure,tableand the float types a program configures: a block of content shown where it is written, with a caption and labels, numbered under its type’s policy.cells: tables of cells, thecellsenvironment filled with\celland\celldata, in the body of atablefloat or, when the configuration allows it, anywhere a block can be written.citations:\cite[note]{keys}, each cited work numbered by first appearance and shown as a citation mark, and the list of cited works.input:\input{file}, the content of another file, brought in where the command is written.userdefs: the macros, environments and special character sequences an author or a program defines by substitution (user definitions), and the stages that expand them.metadata: the document’s metadata (title, authors and date), which a program sets on the document and the feature shows before the content.toc: the table of contents, the table of the listed headings and the piece that shows them as nested lists before the content.
§The features other features build on
These features declare no command. They contribute rewrites, tables and stages that other features and the backends read:
blocks: the block-structure rewrite stage, which lays content out in paragraphs and blocks, and the check of the tree contract.index: the element index, the table of the nodes whose elements carry each aspect, which the stages that look for such nodes read.refpoints: the table of every reference point of a run, as the elements declared them, which therefsandnumberingfeatures read.numbering: counters, counter styles, and the number of every numbered reference point: the service slots in which features declare their counters, counter styles and parent sets, the numbering options (NumberingOptions, set on a document or on a render request) that say what a counter is numbered within, the stage that counts, and the counter tableflm.counters.
§A feature a host registers
This feature is not added by stdlib::add_features; a host
that wants it registers it in a package of its own:
compose: the service slots of the template engines and of the compose templates, the template enginecontent-only, and one stage per output made of output regions, which assembles the output’s entry artifact through the chosen compose template. It provides the same capability as each backend’s final stage, so a registry holding it needs a plan request that prefers one of the two.
Modules§
- annotations
- The
annotationsfeature: a reviewer’s marks in a document, passages highlighted and remarks written into the text, under commands that a host configures, one per reviewer. - blocks
- The
blocksfeature lays out every document tree in paragraphs and blocks and resolves its text, in a rewrite stage that a plan includes when its capability is demanded or required, and it checks the tree contract. - cells
- The
cellsfeature (Cells): tables of cells. A table of cells is acellsenvironment, a grid of rows and columns that an author fills one cell at a time with\cell, or by rows with\celldata. - citations
- The
citationsfeature: citing works by key, numbering the cited works in order of first citation, showing a citation mark where each citation is written, and listing the cited works after the document’s content. - compose
- The feature
compose: the stages that assemble each output’s entry artifact from the output’s regions through a compose template, a text with named places for those regions, and the service slots of the template engines and of the compose templates. - defterm
- The
deftermfeature: defined terms. An author defines a term where it is explained, with thedeftermenvironment, and links to that term definition from anywhere in the document with\term. - floats
- The
floatsfeature: figures, tables and other floats, blocks of content shown with an optional caption, labels and a number. - graphics
- This module defines the
graphicsfeature (Graphics), which provides the command\includegraphics[options]{path}. The command inserts an image, that is, an external picture file, into the document. For instance,\includegraphics[alt=A plot, width=5cm]{figures/plot.png}inserts the picture of the filefigures/plot.png, 5cm wide, with the alternative textA plot. A path can also be an address, such ashttps://example.org/a.svg. - headings
- This module defines the
headingsfeature, which provides the commands that create the headings of a document,\sectionto\subparagraphby default. A program can declare its own heading kinds and heading commands in the configuration of the feature,HeadingsConfig. - href
- This module defines the
hreffeature (Href), which provides three commands that insert a link to an address outside the document: - index
- This module defines the
indexfeature, which provides the element index. The element index is a table that lists, for each frozen tree of a run, the nodes of the tree together with their elements. A stage reads the element index to find the nodes that it works on, without walking the trees itself. - input
- The
inputfeature:\input{file}, which brings the content of another file into the document where the command is written. - lists
- The
listsfeature (Lists): list environments whose items are begun by\item, the label shown beside each item, and references to items. By default the list environments areitemize,enumerateanddescription. - literals
- The
literalsfeature: the commands that stand for one character of text, and\@. - math
- The
mathfeature: mathematics written in LaTeX notation, its display-math environments, its equation lines and their numbers. - metadata
- The
metadatafeature: the document’s metadata (its title, its authors, its date, and any other key the author writes about the document) and the three pieces that show the title, the authors and the date before the document’s content. - numbering
- The
numberingfeature: counters, counter styles, and the number that every numbered reference point of a document carries; and the functions that write a counter value as content, which a caller may use without the feature. - quote
- The
quotefeature: quotations, blocks set apart from the running text whose content is organized in quotation sections (a quoted passage, lines set as written, an attribution, ordinary paragraphs). The feature declares the quote environmentsquote,blockquoteandaddressby default, and any other quote environment a host configures. - refpoints
- This module defines the
refpointsfeature, which collects the reference points of a document in the tableREFPOINTS(flm.refpoints). - refs
- The
refsfeature: labels and references. An author attaches a label to a construct with\label{sec:intro}and refers to it with\ref{sec:intro}, and the feature turns each reference into a link to the labeled place, showing that place’s number or title. - textstyles
- The
textstylesfeature: the inline formatting commands\emph,\textbf,\textitand\texttt. - theorems
- The
theoremsfeature: the theorem-like environments of mathematical writing. These are numbered, titled block environments such astheorem,lemmaanddefinition, and theproofenvironment, whose title can refer back to the statement it proves. Every environment is declared from the feature’s configuration (TheoremsConfig), so a host can add environments of its own (anexercise) or remove shipped ones. - toc
- The
tocfeature: the document’s table of contents, as a table of entries a program can read and as a piece a backend places before the content. - userdefs
- The
userdefsfeature: it registers every user definition of its configuration as an element, the rewrite stages that expand their use sites, and the lowering rules that write the use sites a plan keeps. - verbatim
- The
verbatimfeature: content shown exactly as the author wrote it, through three macros and two environments. - xnotes
- The
xnotesfeature: footnotes, and the other kinds of note set apart from the running text, written\footnote{…}by default.