Modular Documents

MarkCharm Team

September 8, 2026

1 Document Composition

MarkCharm supports modular document composition using {$INCLUDE}. Split large documents into manageable chapters and assemble them at compile time.

1.1 Main Document

This is the main file. The chapter below is included from a separate file:

2 Included Chapter: Technical Overview

This chapter lives in a separate file (chapter.mc) and is pulled into the main document via {$INCLUDE chapter.mc}.

2.1 Architecture

The system follows a layered architecture:

Layer Responsibility
Frontend Parsing and AST building
Engine Transforms and plugins
Backend HTML/PDF/DOCX export

2.2 Performance

Key performance metrics:

3 Conclusion

The included chapter was seamlessly integrated into this document. All numbering, cross-references, and formatting work across file boundaries.

3.1 Benefits of Modular Documents