Skip to content

NitraxMathematicalKeyboard/stem-lecture-notes-myst

Repository files navigation

STEM Lecture Notes

stem-lecture-notes is a professional, printable MyST Typst template for mathematics, physics, engineering, scientific memos, course handouts, and exam review notes.

It provides a configurable cover page, numbered sections and equations, cross-references, citations, bibliography, figures, tables, code, footnotes, academic theorem blocks, exercises and solutions, A4/US Letter output, and an optional compact review mode. The design is deliberately minimal and uses #4F71BE as a restrained accent color.

Requirements

  • Node.js 20 or later
  • MyST Markdown (mystmd)
  • The latest stable Typst release

Typst should be installed from its official release channel. The MyST documentation advises against the outdated npm Typst packages.

Installation

Use the Git repository directly from a MyST export:

version: 1
project:
  title: Engineering Mechanics
  authors:
    - name: Ada Lovelace
  exports:
    - format: typst
      template: https://github.com/NitraxMathematicalKeyboard/stem-lecture-notes-myst
      output: exports/notes.pdf
      course: MECH 201
      professor: Prof. Grace Hopper
      institution: Faculty of Engineering
      semester: Fall 2026
      paper_size: a4
      compact: false

For local template development, clone this repository and set template to its relative directory.

Build and validation

npm install
npm run validate

The individual commands are:

node scripts/validate-template.mjs
cd example && npx myst build --check-links --strict --ci --typst

The example builds write an A4 PDF to example/exports/stem-lecture-notes-example.pdf and a compact US Letter PDF to example/exports/stem-lecture-notes-compact-letter.pdf. CI repeats the template check and both full PDF builds on every push and pull request.

Content blocks

Use standard MyST syntax so the source remains portable:

:::{prf:theorem} Fundamental result
:label: thm-result

State the theorem here.
:::

```{exercise} Practice problem
:label: ex-practice

State the exercise here.
```

````{solution} ex-practice
Write the solution here.
````

Supported proof kinds include prf:definition, prf:theorem, prf:proposition, prf:lemma, and prf:example. Standard MyST exercise, solution, note, and important directives are styled consistently. Exercise/solution PDF export requires the official exercise-admonition-pdf MyST plugin; the example configuration includes it.

Customization

The export accepts these options:

Option Type Default Purpose
course string document title Course title/code and running header
professor string empty Instructor on the cover
institution string empty Institution or department
semester string empty Term on cover/header
paper_size a4 or us-letter a4 Physical page size
compact boolean false Denser review-sheet typography
show_toc boolean true Include the table of contents
toc_depth number 3 Heading depth in the contents

Edit style.typ when maintaining a fork that needs different typography or colors. Keep document-specific content in MyST configuration rather than hard-coding it into the template.

Limitations

  • The primary and supported output is Typst/PDF; the template does not control HTML styling.
  • Interactive notebook widgets are represented by their static MyST output in PDF.
  • Dropdown state is an HTML behavior and does not hide content in print.
  • Exercise and solution rendering depends on the MyST PDF exercise plugin noted above.
  • The bundled font stack uses fonts distributed with Typst; substitutions can slightly change pagination.
  • jtex check 1.0.21 still assumes template.tex and therefore cannot validate a Typst-only template. npm run check:template invokes the same current MyST template.yml schema validator directly instead.

Troubleshooting

  • typst not found: install the latest Typst release and ensure the executable is on PATH.
  • Template cannot be resolved: use a full GitHub URL or a correct relative directory containing template.yml.
  • Exercises are missing or produce warnings: add the exercise-admonition-pdf plugin to project.plugins.
  • Citation is unresolved: ensure the BibTeX file is listed under project.bibliography and the citation key matches.
  • A build changed pagination: confirm the same Typst and MyST versions are used locally and in CI.

License

MIT. See LICENSE.

This template is maintained by Nitrax Mathematical Keyboard, a compact physical keyboard for faster mathematical and scientific input.

About

A professional MyST Typst template for printable STEM lecture notes.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors