Simple Standard Features Import

Helper module to gather a collection of standard features, without enabling all the on-demand module loading mechanism. (E.g., this module is Transcrypt-friendly, but flm.run is probably not.)

flm.stdfeatures.standard_features(*, baseformatting=True, href=True, verbatim=True, math=True, headings=True, heading_section_commands_by_level=None, heading_numbering_section_depth=None, heading_section_numbering_by_level=None, heading_counter_formatter=None, refs=True, external_ref_resolvers=None, enumeration_environments=True, enumeration_environments_dict=None, endnotes=True, citations=True, external_citations_providers=None, eq_counter_formatter=None, footnote_counter_formatter=None, citation_counter_formatter=None, use_simple_path_graphics_resource_provider=True, floats=True, float_types=None, defterm=True, render_defterm_with_term=True, theorems=False, substmacros_definitions=None, quote_environments=False)

Build a standard set of features with reasonable defaults.

By default, the following features are enabled: baseformatting, href, verbatim, math, headings, refs, enumeration, endnotes, floats, graphics, defterm.

The following are disabled by default but can be enabled: theorems (pass theorems=True or a dict of options), substmacros (pass substmacros_definitions={...}), quote (pass quote_environments=True or a dict of options), citations (pass citations=True along with external_citations_providers).

Each feature can be disabled by setting its parameter to False (e.g., headings=False).

Parameters:
  • baseformatting – Enable base text formatting macros (\emph, \textbf, \textit, etc.). Set to False to disable.

  • href – Enable hyperlink macros (\href, \url, \email). Set to False to disable.

  • verbatim – Enable verbatim/code macros (\verbcode). Set to False to disable.

  • math – Enable math mode (\(...\), equation environment, etc.). Set to False to disable.

  • headings – Enable section heading macros (\section, \paragraph, etc.). Set to False to disable.

  • heading_section_commands_by_level – Custom mapping of heading levels to command definitions, forwarded to FeatureHeadings as section_commands_by_level. If None, uses the feature default.

  • heading_numbering_section_depth – Maximum heading depth at which automatic numbering is applied, forwarded as numbering_section_depth. If None, uses the feature default.

  • heading_section_numbering_by_level – Custom mapping of heading levels to per-level numbering settings, forwarded as section_numbering_by_level. If None, uses the feature default.

  • heading_counter_formatter – Counter formatter specification for heading numbering, forwarded as counter_formatter.

  • refs – Enable cross-references (\ref, \label). Set to False to disable.

  • external_ref_resolvers – List of external reference resolver objects forwarded to FeatureRefs.

  • enumeration_environments – Enable list environments (enumerate, itemize, description). Set to False to disable.

  • enumeration_environments_dict – Custom enumeration environment definitions dict forwarded to FeatureEnumeration as enumeration_environments.

  • endnotes – Enable footnotes. Set to False to disable.

  • citations – Enable citation support. Requires external_citations_providers to also be set.

  • external_citations_providers – List of external citation provider objects forwarded to FeatureExternalPrefixedCitations.

  • eq_counter_formatter – Counter formatter specification for equation numbering, forwarded to FeatureMath.

  • footnote_counter_formatter – Counter formatter for footnotes. Defaults to 'alph'.

  • citation_counter_formatter – Counter formatter for citations. Defaults to 'arabic'.

  • use_simple_path_graphics_resource_provider – Register FeatureSimplePathGraphicsResourceProvider as the graphics resource provider. Set to False if providing a custom provider.

  • floats – Enable figure and table floats. Set to False to disable.

  • float_types – Custom float type definitions forwarded to FeatureFloats.

  • defterm – Enable definition term macros (\defterm). Set to False to disable.

  • render_defterm_with_term – Forwarded to FeatureDefTerm. Controls whether the defining term text is rendered alongside the definition.

  • theorems – Enable theorem-like environments. Pass True for defaults, or a dict of keyword arguments forwarded to FeatureTheorems.

  • substmacros_definitions – Dict of substitution macro/environment/ specials definitions forwarded to FeatureSubstMacros. If falsy, the feature is not registered.

  • quote_environments – Enable quote environments. Pass True for defaults, or a dict of keyword arguments forwarded to FeatureQuote. False disables.

Returns:

A list of Feature instances.