Self-Documenting Environments

The flm.docgen module provides a self-documenting environment system that lets feature authors write structured documentation for macros, environments, and specials directly in FLM markup.

The system defines special-purpose constructs (\flmDocArg, {flmDocArguments}, etc.) that produce formatted argument documentation when rendered. I’m planning to use this internally to generate the FLM Standard Syntax reference from the get_flm_doc() methods on each spec info class.

Generate documentation for a specific set of features and parsing options.

class flm.docgen.docgen.FLMEnvironmentDocumentationGenerator(document_title='FLM Environment Documentation')
include_feature_name = True
include_feature_dependencies = True
argument_parser_names_by_classname = {}
document_environment(environment)
document_environment_introduction(environment)
document_epilog()
document_feature(feature)
document_callable_specinfo(specinfo)
document_argument(arg)