pygacity.generate.block module¶
LaTeX compound block class for pygacity
- class pygacity.generate.block.LatexBlock(block_specs: dict)[source]¶
Bases:
objectA LaTeX block with support for external source files, substitutions, and embedded pythontex code.
- copy_referenced_configs(output_dir: str)[source]¶
Copies any referenced configuration files to the specified output directory.
- classmethod from_specs(block_specs: dict) list[LatexBlock][source]¶
Factory that returns a list of LatexBlocks. Handles the old-style ‘enumerate’ shorthand: if block_specs has an ‘enumerate’ key whose value is a list, each item is treated as a question block with question_number assigned sequentially starting from 1.
- load() LatexBlock[source]¶
Loads the block’s text contents from source files if specified, processes substitutions to identify keys, and recursively loads child blocks.
- Returns:
the loaded block instance
- Return type:
LatexCompoundBlock
- resources_root: Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/pygacity/envs/latest/lib/python3.12/site-packages/pygacity/resources')¶
The root path for pygacity resources