I am looking to create a set of tutorials and am considering including Anki notes (spaced-repetition flashcards) alongside them to give readers an additional resource and facility to remember the information. I'm considering using Scribble to write these tutorials and was wondering if it is possible to define a function/macro to handle this?
Wants:
- Write/embed Anki notes into the Scribble document, e.g.
@anki-basic["What is 2+2?" "4"]
,@anki-cloze{2+2 = {{c1::4}}}
, etc. - Conditional output based on what format we are rendering to. When rendering to HTML (ideally would support PDF and any default Scribble output format), output a standard Scribble representation of the content. When "rendering" to Anki, eventually become comma-separated values or even Anki's custom note data format.
Example: When rendering to a visual format (not Anki data), @anki-basic["What is 2+2?" "4"]
would become:
@itemlist[@item[@emph{What is 2 + 2?}]
@item{4}]
I've also looked at Pollen, and its Branching tag functions look perfect for my use case. However I quite like the scribble/manual
look, so if possible I would rather add this feature on top of Scribble than do everything custom, which Pollen seems geared for.