Thank you for your interest in contributing to Modern C++ Programming! This course is open-access and welcomes contributions from the community.
If you find any typos, conceptual errors, broken links, or sections to improve, please open an issue using the Issues panel. Include:
- The chapter and slide number (or topic).
- A clear description of the problem.
- A suggested fix, if you have one.
The course slides are authored in Typst. You can contribute directly by modifying the Typst source files and submitting a pull request.
The Typst sources are located in the typst/ directory of the Modern-CPP-Programming repository:
typst/
├── config.typ # Shared macros and theme configuration
├── 01.Introduction.typ # Chapter 1 source
├── 02.Preparation.typ # Chapter 2 source
├── ... # Other chapters
├── 01.Introduction/ # Assets (images) for Chapter 1
├── 02.Preparation/ # Assets (images) for Chapter 2
├── ...
└── common/ # Shared assets
Each chapter consists of:
- A
.typfile (e.g.,01.Introduction.typ) containing the slide content. - A directory with the same base name (e.g.,
01.Introduction/) containing images and other assets used by that chapter.
Install Typst by following the official instructions. You can install it via:
- CLI:
cargo install typst-cli(requires Rust), or download a prebuilt binary from releases. - Web app: typst.app for quick editing (no local setup needed).
The project uses several Typst packages which are automatically resolved on compilation. The presentation framework used for draw the slides is touying.
The following fonts should be installed on your system to get the best visual experience:
- Latin Modern Sans
- Latin Modern Mono
- Latin Modern Roman Caps (part of the Latin Modern family)
- Font Awesome 7 Free (
Free-Regular-400.otf)
The recommended way to work with Typst sources is through VS Code or Cursor with the Tinymist extension:
- Install Typst (see Install Typst above) — Tinymist requires a local Typst installation.
- Install the Tinymist Typst extension from the Visual Studio Marketplace (also available on Open VSX for Cursor).
- Open any
.typfile to get syntax highlighting, autocompletion, error diagnostics, and live preview.
Tinymist provides:
- Live PDF preview directly in the editor.
- Autocompletion for Typst syntax, symbols, and packages.
- Error diagnostics and linting as you type.
- Outline view for navigating the document structure.
- Content view with slide thumbnails (useful for this project).
See the Tinymist documentation for full configuration options.
To compile a chapter to PDF:
typst compile 01.Introduction.typTo watch for changes and recompile automatically:
typst watch 01.Introduction.typ- Fix typos and grammar: straightforward corrections are always welcome.
- Improve explanations: if a concept could be explained more clearly, feel free to rephrase.
- Update for new standards: contributions that cover new C++ standard features (C++23, C++26) are appreciated.
- Add examples: minimal, focused code examples that illustrate a specific feature or pitfall.
- Include references: when adding or improving content, cite authoritative sources (e.g., the C++ standard, cppreference.com, official papers, well-known books) to strengthen the argument, improve reliability, and give proper attribution.
- Keep slides concise and non-verbose - use short, structured descriptions paired with code.
- Code examples should be minimal - demonstrate one feature or issue without digressing.
- Place images in the corresponding chapter directory (e.g., images for Chapter 3 go in
03.Basic_Concepts_I/). - Use consistent naming:
snake_stylefor all file names, except for.typfiles. Descriptive names for images.
- Fork the Modern-CPP-Programming repository.
- Create a branch with a descriptive name (e.g.,
fix/ch03-typo-integral-typesoradd/ch11-cpp26-feature). - Make your changes to the Typst source files.
- Verify that the modified chapter compiles without errors.
- Submit a pull request with a clear description of what you changed and why.
- Changes compile cleanly with
typst compile. - Slide content remains concise and follows the existing style.
- Code examples are correct and compile with a modern C++ compiler.
- New images are placed in the correct chapter directory.
AI-generated content is not allowed. All contributed text, code examples, explanations, and images must be authored by the contributor. This applies to content produced by ChatGPT, Copilot, Claude, or any other generative AI tool.
AI tools may be used for:
- Reviewing and proofreading (spelling, grammar, typos).
- Evaluating code examples. Compilation must be verified with a C++ compiler. The expected behavior must be verified by executing the code. We suggest using Compiler Explorer for these purposes.
- Suggesting improvements that the contributor then rewrites in their own words.
Contributors must understand and be able to explain every change they submit. Pull requests that appear to be bulk AI-generated content will be rejected.
By contributing, you agree that your contributions will be licensed under the same terms as the project:
- Course content (slides, text, images): CC BY 4.0
- Code examples: MIT License