Forester setup for Discrete Math lecture notes [005W]

I spent a bunch of time this week writing Discrete Math lecture notes in Forester, and tweaking my Forester setup to make the process more efficient and the results prettier.

  • I used Pandoc to write a janky script that takes my existing LaTeX lecture notes and makes a first pass at converting them into Forester syntax. There's still lots more features I could add, and it's nowhere near being a complete, general-purpose pandoc writer (I'm not sure it will ever be), but it already saves me time.
  • After asking for advice on the forester-discuss mailing list and getting a helpful response, I created some simple Forester macros for typesetting calculational proofs, like so:

    2n - 1 > 7
    \leftrightarrow \quad \quad \quad { add 1 to both sides }
    2n > 8
    \leftrightarrow \quad \quad \quad { divide both sides by 2 }
    n > 4

  • When teaching my Discrete Math students to write proofs, I emphasize the way the proofs should be structured, i.e. nested. I have not yet gone so far as teaching them via a proof assistant like Lean or Agda—I'm not sure I ever will—but I get as close as possible while still writing proofs on paper. I spent a bit of time tweaking some CSS to be able to easily typeset things like this: This works by creating a new taxon called "Subproof" and using CSS to hide the header and draw a bar on the side. I'm not sure if there's a better way to accomplish this, but it works pretty well for now.