📝 Didactic Notes

This skill helps educators document pedagogical design decisions in LaTeX materials using didactic notes and the \ltnote command to clarify reasoning.

QUICK INSTALL
npx playbooks add skill dbosk/claude-skills --skill didactic-notes

Didactic Notes instructions

Didactic Notes: Literate Pedagogy

This skill documents pedagogical design decisions in educational materials, analogous to how literate programming documents code design decisions.

Reference Files

This skill includes detailed references in references/:

| File | Content | Search patterns |
|------|---------|-----------------|
| latex-examples.md | Restatable LOs, citations, complete examples | restatable, \cref{}, biblatex |
| beamer-patterns.md | Mode splits, overlays, verbose environments | \mode<article>, uncoverenv, \textbytext |
| semantic-environments.md | Environment selection, generalizations | definition, remark, example, block |
| note-scope-and-visibility.md | Note vs. prose (what students never see), where to anchor a note, the margin queue (no page breaks), no pre-announced summary | \ltnoteoff, margin queue, sidecaption |
| footnotes-and-citations.md | Margin footnotes & verbose margin references in dual beamer/article builds; the fatal "Float(s) lost" from a citation inside a <presentation>-only frame and its \only<presentation> fix; mode-adaptive citation commands (\autocite, verbose style) | footnotesinmargin, Float(s) lost, \only<presentation>, \autocite, style=verbose |

CRITICAL gotcha: in a memoir article that also builds beamer slides, didactic
puts footnotes (and \autocite verbose references) in the margin. Citations
inside ordinary frames work fine (margin in article, slide-foot in beamer) —
but a citation/footnote inside a slide-only \begin{frame}<presentation> frame
causes a fatal ! LaTeX Error: Float(s) lost. at \end{document}: \begin{frame}<presentation>
suppresses the frame's output in the article but still executes the body, so
the citation emits an orphaned margin float. Preferred fix: make the frame a true
mode gate — wrap the whole slide-only frame in \mode<presentation>{\begin{frame}...\end{frame}}
(plain \autocite inside is then fine). Alternatively keep \begin{frame}<presentation>
and filter each citation with \only<presentation>{\autocite{...}} (inline; not
inline \mode<presentation>{...}, which inserts paragraph breaks). Do not
reach for \AtBeginEnvironment{frame}{\footnotesatfoot} — it needlessly drops the
article's in-frame margin footnotes to the foot. See
references/footnotes-and-citations.md before debugging any "Float(s) lost".

Core Principle

**Document not just what you teach, but why you teach it that way.**

Just as literate programming makes code reasoning explicit, didactic notes make pedagogical reasoning explicit using \ltnote{...} from the LaTeX didactic package.

Placement: the note comes before what it discusses

Write the \ltnote immediately before the passage, exercise, example or
frame it discusses — as a literate program's documentation chunk precedes
its code — never after it. A margin note starts at its anchor, so a note
anchored before the passage has its top aligned with the passage and
prints beside it (when the margin is not crowded); anchored after, it
starts where the passage ends and hangs below what it talks about
(author, 2026-09-26: "I've always wondered why the learning theory notes
are so low … They should be written just before"). A note about a whole
section goes right after the section heading, before the first
paragraph; a note about a frame goes before the frame in the article
flow (or at the top of the frame body if it must stay inside). Moving
a note never changes the student text.

The form: \leavevmode\ltnote{%…}% on the lines immediately before the
first word of what the note discusses — the paragraph, or the body of the
exercise/example environment (inside it, before its first word). The
\leavevmode starts the paragraph first, so the note is top-aligned with
it, a paragraph right after a heading stays flush (a bare \ltnote there
uses up the heading's no-indent flag and indents it), no heading is
stranded at a page foot, and no extra \topsep gap appears before an
environment. A bare note between two paragraphs (vertical mode) aligns
one line too high.

Name what the note is about: an \ltnote that discusses a particular
exercise, example, definition or program refers to it with \cref
(\cref{ovn:reflektion}, \cref{ex:bank}), adding the \label if it
is missing. A queued note that prints a page later, or one of several
notes side by side, is then unambiguous (author, 2026-09-26: "please
add a \cref so that we know which one is means. In fact, make that a
general rule"). \ltnote prints only in the article, so the beamer
"sats" problem of \cref to an example does not arise there; \cref
to an unnumbered environment still prints ??, so check the build.

A variation-pattern note names every side it contrasts. A note built
on "Vad som varierar" / "Vad som hålls invariant" \crefs, in its first
lines, the exercises, examples and solutions it contrasts, not only
one side — and the solutions themselves need a \label to be reachable,
since solution is otherwise unnumbered (chunk-authoring.md, "cref
traps") (author, repeating an earlier comment, 2026-09-29: "What is this
about? \cref to examples and exercises.").

Notes in the author's voice are Swedish prose, not quotes. A review
comment that motivated a design decision is paraphrased in the note's own
language, without a date stamp in parentheses; do not paste the author's
English review words into a published teacher edition (author,
2026-09-28: "Paraphrase in Swedish").

Give the reason, not the revision history. A note states why the
material is as it is, not how it got there: no "i den tidigare
versionen", "stod förr", "är struken/tillagd", "den gamla övningens …" —
that history is in Git. Mention an earlier design only when the contrast
is itself a point for the teacher (e.g. it failed in class in a way worth
knowing), and then state that point, not the edit (author, 2026-09-28:
"only give the reasons without the history, we can find the history in
Git---unless there is a good point in bringing up we did things
differently before").

Text that only makes sense with the notes shown is teacher-only. A
passage outside an \ltnote that refers to what only the notes say (e.g.
an appendix checklist naming "marginalens lärarnoter", a quote or claim
that appears only in a note) is wrapped so it prints only when notes are
on (\ifbool{ltnote}{…}{} or the deck's equivalent), so the student
edition never points at text it lacks (author, 2026-09-28). The reverse
holds for a design principle the material applies (SRP, KISS, DRY): it is
subject matter the student is meant to learn, so it is named in the prose
where it is applied, with its reference in a footnote (a pointer to the
appendix that backs it), not only in an \ltnote (author, 2026-10-02:
"just name them in the prose, with footnotes for references, as it's
intended the students read those"). The note may still say why the
principle is applied here.

Scope: \ltnote documents the material's design, not the subject

\ltnote is meta-commentary about **how and why the teaching text itself is
written** — which example was chosen, the order of presentation, a
variation/invariance pattern, what a question is meant to reveal. It is the
authorial reasoning that a reader of the finished material should not see, but a
future author or educator should.

It is not a place for substantive content about the subject being taught or
the system being documented — including design decisions and the references that
justify them. Those are part of the material and belong in the body text,
even when the justification cites learning-science literature.

The test: if the note explains a choice about the writing, it is an
\ltnote. If it states how the thing being described works (or why it was
built that way), it is body text.

**Watch the case where the subject is pedagogy.** When the document's topic is
a teaching design — a research paper or methods writeup analysing how to teach
something, e.g. a variation-theory analysis of misconceptions — the pedagogical
analysis (\enquote{what varies}, \enquote{what stays invariant}, why this
contrast works) is how the thing being described works, so it is body text,
not an \ltnote. Reflexively moving variation labels into notes here would hide
the paper's own argument. In such a document \ltnote is reserved for decisions
about the paper itself: section order, example choice, where a topic is placed.
The variation-theory skill carries the worked LaTeX example.

The same holds when the pedagogical design is a tangled artifact of a
literate source: a .nw file that tangles to student-facing teaching material
(e.g. a tutorial .md) and weaves to a maintainer/educator chapter. The
students never see the woven prose, so the prose is not the teaching text —
it is the document about the teaching text, and its reader's object of
learning is the tutorial's design. Each layer teaches the layer below it:
the tangled tutorial teaches the student the subject; the woven prose
teaches the teacher how the tutorial teaches; an \ltnote teaches the
future author how the prose targets the teacher's learning. So the
tutorial's variation patterns, critical aspects, and sequencing rationale are
body text in the woven chapter, and \ltnote is reserved for the
chapter's own construction. See the worked example below.

Example: a literate program (.nw)

A literate program's prose teaches the code to a maintainer, so \ltnote
still applies — but to the exposition, not the code. A note about **why the
narrative is ordered as it is** (why function A is explained before function B,
why a concept is introduced in this chapter rather than a later one, why the
whole is shown before the parts) is reasoning about the writing, so it belongs in
an \ltnote. A design decision about the code itself — even one grounded in
pedagogy research — is content, and it (with its citations) goes in the
narrative:

% BODY TEXT (correct) — a design decision and the evidence for it:
The map carries no subject; subject rides on the entities a room holds, so one
labyrinth can interleave subjects rather than trap a learner in a single one.
Interleaving aids retention by spacing repeated
encounters~\autocite{taylor2010interleaved,cepeda2006distributed}.

% \ltnote (correct) — reasoning about the writing itself:
\ltnote{%
  Introduced before the maze chapter so the reader meets ``no subject'' while
  the data model is still fresh; the interleaving payoff is only sketched here
  and developed where placement is implemented.
}

Putting the citation-bearing design rationale inside the \ltnote is the
common mistake: it is content, not a note about the writing. It is also fragile
— \ltnote expands to a \marginpar, and under verbose citation styles
\autocite/\textcite inside a margin float emit footnotes that fail fatally
with ``Float(s) lost''. Keep substantive citations in the body; when a note
itself must cite, use \parencite (see Citing Pedagogical Research below).

Example: a literate tutorial (.nw tangling to teaching material)

When the .nw tangles to a student-facing tutorial, the woven chapter's
object of learning is the tutorial's design, so the variation analysis is
body prose there — the reverse of the reflex trained by ordinary educational
LaTeX:

% BAD — the chapter's own subject matter hidden in a note:
This tutorial covers playback and tagging.
\ltnote{%
  We use contrast on the starting point of playback: first the whole
  log, then playback from a tag, holding the recorded project invariant.
}

% BODY TEXT (correct) — the tutorial's design is what the chapter teaches:
The tutorial varies the starting point of playback — first the whole
log, then playback from a tag — while the recorded project stays
invariant, so the learner discerns that tags are navigation anchors
into the existing history, not metadata on the side.

% \ltnote (correct) — how the chapter describes the tutorial:
\ltnote{%
  The chapter walks the steps in the tutorial's own order rather than
  grouping them by CLI command, so a teacher can read it side by side
  with a student's session.
}

Quick Example

Without didactic notes:

\begin{activity}\label{PredictOutput}
  What do you think this function returns?
\end{activity}

With didactic notes:

\begin{activity}\label{PredictOutput}
  What do you think this function returns?
\end{activity}

\ltnote{%
  Following try-first pedagogy, we ask students to predict before
  explaining. This creates contrast between their mental model and
  the actual behavior, helping them discern the critical aspect.
}

Anti-pattern: visible variation labels

Pedagogical labels such as \enquote{What varies} and \enquote{What stays
invariant} belong in notes, not in the student-facing body text.

Bad:

These two examples form a deliberate contrast.

\begin{description}
\item[What varies] Whether [[base_url]] is passed explicitly.
\item[What stays invariant] The helper, the question, and the layout.
\end{description}

Good:

\ltnote{%
  \textbf{Variation pattern}: Contrast
  \textbf{What varies}: Whether [[base_url]] is passed explicitly.
  \textbf{What stays invariant}: The helper, the question, and the layout.
}

The didactic Package

Package Setup

\usepackage[marginparmargin=outer]{didactic}

Options:

  • marginparmargin=outer - Place margin notes on outer margins
  • inner=20mm, outer=60mm - Set margin widths
  • notheorems - Disable automatic theorem environments

The \ltnote Command

Creates margin notes documenting pedagogical rationale:

\ltnote{%
  We want to investigate what people think literate programming is.
  This will help us understand the correctness of their prior knowledge.
}

Learning Objectives with Restatable

Use restatable environment for learning objectives that can be referenced throughout:

\begin{restatable}{lo}{FilesLOPersistence}\label{FilesLOPersistence}%
  Förklara skillnaden mellan primärminne och sekundärminne.
\end{restatable}

Key points:

  • Use mnemonic labels (e.g., FilesLOPersistence, not FilesLO1)
  • Add \label{MnemonicLabel} for \cref{} support
  • The % after opening brace prevents unwanted whitespace

Referencing LOs

Method 1: \cref{} (Recommended for detailed notes):

\ltnote{%
  Relevanta lärandemål:
  \cref{FilesLOPersistence}

  \textbf{Kritiska aspekter för} \cref{FilesLOPersistence}:
  \begin{itemize}
    \item \textbf{Persistens}: Data överlever avstängning
  \end{itemize}
}

Method 2: Starred commands (Compact):

\ltnote{%
  Relevanta lärandemål:
  \FilesLOPersistence*

  \textbf{Kontrast}: Typ av minne (primär vs sekundär).
}

CRITICAL: LO commands cannot be inside \begin{itemize} or other list environments.

When to Use \ltnote

Document:

  1. Learning objectives addressed: Reference with \cref{} or starred commands
  2. Pedagogical strategies: "We use try-first pedagogy to activate prior knowledge"
  3. Variation theory patterns: Contrast, generalization, fusion
  4. Critical aspects students should discern
  5. **Design trade-offs about the material**: which example, what order, how to

phrase it — not design decisions about the system or subject being
documented, which belong in the body text (see Scope above)

  1. Assessment purposes: "This question gauges prior knowledge"
  2. Mentipy question intent: What a live poll, QR question, or open-text prompt should reveal
  3. Future improvements: Notes for refining material

When using Mentipy in slides or handouts, document why that question appears
at that moment, what responses are expected to reveal, and how the result will
shape the explanation or discussion that follows. (Writing the poll itself:
the mentipy skill.)

Writing Effective Notes

CRITICAL: Connect to Learning Objectives

Variation patterns must be tied to specific learning objectives:

\ltnote{%
  Relevanta lärandemål:
  \cref{FilesLOPersistence}

  \textbf{Variationsmönster}: Kontrast

  \textbf{Vad som varierar}: Typ av minne (primär vs sekundär)
  \textbf{Vad som hålls invariant}: Behovet att lagra data

  \textbf{Kritiska aspekter för} \cref{FilesLOPersistence}:
  \begin{itemize}
    \item \textbf{Persistens}: Studenten måste urskilja att filer
      löser problemet med datapersistens.
  \end{itemize}
}

Structure Your Notes

  1. State learning objectives: What should students learn?
  2. Reference theory: Connect to established learning principles
  3. Explain the mechanism: How does this design support objectives?
  4. Note alternatives: What else could work?

Language Consistency

CRITICAL: Match the language of \ltnote content to the surrounding document.

% Good - Swedish document with Swedish notes
\ltnote{%
  \textbf{Variationsmönster}: Kontrast
  Vi varierar operationen medan vi håller mönstret invariant.
}

% Use \foreignlanguage for English terms without translation
\ltnote{%
  Vi använder \foreignlanguage{english}{try-first pedagogy} här...
}

Choosing Between Detailed and Compact Notes

Use detailed notes with \cref{} when:

  • Writing comprehensive annotations
  • Explaining multiple critical aspects
  • Need prose-style integration

Use compact notes with starred commands when:

  • Space is limited
  • Quick overview needed
  • Simple annotations suffice

Citing Pedagogical Research

Cite in an \ltnote only when the citation justifies an **authoring or teaching
choice** — why this sequence, why try-first here. Use biblatex commands rather
than hardcoded references, and **inside \ltnote always cite with
\parencite**:

\ltnote{%
  We vary the operation while holding the pattern invariant, so learners
  can discern it \parencite{MartonPang2006}.
}

Why \parencite and nothing else: \ltnote is a \marginpar, and under
the standard ltnotes setup (style=verbose,citestyle=verbose) both
\autocite and \textcite emit footnotes — a footnote inside a margin
float is orphaned and the article/memoir job dies with the fatal,
location-less ! LaTeX Error: Float(s) lost. \parencite prints the full
reference inline, which is exactly right in a margin note. \textcite/
\autocite remain correct in body text. Details and the diagnosis:
references/footnotes-and-citations.md.

If the citation instead supports a claim in the material or a **design
decision about the subject/system being documented, cite it in the body
text**, not the note (see Scope above).

Best practice: Use a separate ltnotes.bib for pedagogical references when
the project keeps them apart; otherwise add them to the project's main .bib.

Integration with Learning Theories

Variation Theory

Document how material creates patterns of variation:

\ltnote{%
  \textbf{Mönster}: Generalisering
  \textbf{Varierar}: Programmeringsspråk (Python vs Java)
  \textbf{Invariant}: Algoritmisk princip
}

Try-First Pedagogy

Explain when and why you ask students to attempt before explaining:

\ltnote{%
  Following try-first pedagogy, we ask students to predict the output
  before running the code. This creates a knowledge gap that makes the
  subsequent explanation more meaningful.
}

Cognitive Load Theory

Note considerations about cognitive load:

\ltnote{%
  We introduce only two parameters here to manage cognitive load.
  Additional parameters will be introduced after students master the
  basic pattern.
}

Semantic Environments

See references/semantic-environments.md for details.

Key environments: activity, exercise, question, `

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.