FLM Feature flm.feature.cite¶
Citation support via external citation providers.
Implements the \cite macro with support for prefixed citation keys
(e.g. arxiv:1234.56789), optional extra text (e.g. \cite[Thm.~3]{key}),
endnote-based reference lists, and automatic sorting and compression of
citation ranges.
- class flm.feature.cite.FeatureExternalPrefixedCitations(external_citations_providers: Sequence[Any] | None, counter_formatter: None | TypeCounterFormatter | Literal['alph', 'Alph', 'roman', 'Roman', 'arabic', 'fnsymbol', 'unicodesuperscript', 'unicodesubscript'] | TypeFormatNumTemplate | TypeCounterFormatterSpecDict = 'arabic', citation_delimiters: tuple[str, str] | None = None, citation_optional_text_separator: str = '; ', references_heading_title: str = 'References', sort_and_compress: bool = True)¶
Bases:
FeatureFeature providing the
\citemacro backed by external citation providers. Citations are rendered as endnotes with configurable counter formatting and delimiters, and consecutive citation numbers can be sorted and compressed into ranges.- feature_optional_dependencies: Set[str] | Sequence[str] | None = ['endnotes']¶
If non-None, then this is a list (or set) of feature names that may enhance the functionality of the present feature. If these features are activated, they will be initialized prior to the present feature.
- use_endnotes = True¶
- class DocumentManager(feature, doc, **kwargs)¶
Bases:
FeatureDocumentManagerBase
- class RenderManager(feature_document_manager, render_context, **kwargs)¶
Bases:
FeatureRenderManagerBase- get_citation_content_flm(cite_prefix, cite_key, resource_info)¶
- get_citation_endnote(cite_prefix, cite_key, resource_info)¶
- render_citation_marks(cite_items, node)¶
- set_external_citations_providers(external_citations_providers)¶
- add_external_citations_provider(external_citations_provider)¶
- add_latex_context_definitions()¶
- class flm.feature.cite.CiteMoreArgsParser¶
Bases:
LatexArgumentsParser- parse(latex_walker, token_reader, parsing_state, **kwargs)¶
- class flm.feature.cite.TackOnMultipleCiteCommandsMacroParser(citemacronames)¶
Bases:
LatexTackOnInformationFieldMacrosParser- get_macro_arg_parser(macroname)¶
- class flm.feature.cite.CiteMacro(macroname)¶
Bases:
FLMMacroSpecBaseMacro spec for the
\citecommand.Parses one or more citation keys (comma-separated), an optional extra-text argument (
\cite[extra]{key}), and any immediately following\citecalls that are tacked on viaTackOnMultipleCiteCommandsMacroParser. Parsed citation items are stored on the node asnode.flmarg_cite_itemsand rendered through the citations render manager.- allowed_in_standalone_mode: bool = False¶
Whether or not this node is allowed in standalone mode, i.e., whether or not this node can be rendered independently of any document object.
- postprocess_parsed_node(node)¶
- render(node, render_context)¶
- recompose_pure_latex(node, recomposer)¶