FLM Feature flm.feature.annotations

Annotation macros for highlighting text and adding inline comments.

Each annotation macro supports two forms: highlighted text (\mac{...} or \mac ... \endmac) and inline comments (\mac[...]). Multiple annotators can be defined, each with their own initials and color index. When hide_all_annotations is set, highlights show only the underlying text and comments are suppressed.

class flm.feature.annotations.FeatureAnnotations(macrodefs: Mapping[str, TypeAnnotationMacroDef] | None = None, hide_all_annotations: bool = False)

Bases: Feature

Feature that registers custom annotation macros for multiple authors. Each macro supports text highlighting and inline comment syntax, with an optional hide_all_annotations mode to strip annotations from output.

feature_name: str | None = 'annotations'

A name that should uniquely identify this feature.

feature_title: str | None = 'Support for simple annotations in text (comments and highlighted text)'

Descriptive name or title for this feature.

feature_flm_doc = "\n    Supports the definition of custom macros to mark annotations from multiple\n    authors.\n\n    Say we define an annotation macro '\\abc'.  There are two types of\n    annotations each macro such as '\\abc' supports:\n\n       \\abc{This piece of text is highlighted}\n       \\abc This piece of text is highlighted, alternative syntax \\endabc\n\n       \\abc[This is an inline comment.]\n\n    Highlighted text refers to pieces of the document that are highlighted in a\n    particular color; inline comments are any remarks that concern the\n    surrounding text and which would typically be deleted before completing the\n    document.\n    "
add_latex_context_definitions() TypeDictWithLatexContextDefinitions
class RenderManager(feature_document_manager, render_context, **kwargs)

Bases: FeatureRenderManagerBase

initialize(hide_all_annotations: None | bool = None)
flm.feature.annotations.FeatureClass = <class 'flm.feature.annotations.FeatureAnnotations'>

Feature that registers custom annotation macros for multiple authors. Each macro supports text highlighting and inline comment syntax, with an optional hide_all_annotations mode to strip annotations from output.