I also write mixed language notes in markdown and arrived at a different solution. It’s a little heavier (it uses curly braces as delimiters), but the payoff is that you can mix content. For example, a paragraph can have more than one language, which appears to not be possible with sigils.
I feel like this is reimplementing something that should already be possible with pandoc markdown somehow.
Though I haven't tried implementing my own pandoc filters yet so I can't comment on how useful/annoying it is to make your own.
Why not prepend the paragraphs with the tag, I feel like it would be easier on the human and the parser
Neat
I eagerly await the HN commenter insisting the project would have gone better in Org markup. ;)
There can be so many applications of this that use `:xxx` for more in-depth explanations, comments, multi-code versions of textbooks, etc. I really hate when trying to debug Python dependency issues when 90% of the solution imagine that I use Conda. This could really help generate help with far less clutter.
It could help for a project I had for a while to have a “bilingual” textbook. I remember studying economics and finding the formalism interesting, but way too strict, ridiculously so. Thankfully, one of our professors was “bilingual”: she wrote the usual equations on the board, but read them explicitly as what they were meant to convey, which is far less strict. It wasn’t “prices grown linearly” because the production function happened to be linear like the board read, it was “prices have a tendency to go up”. Suddenly, the gap between the actually needed assumption (very loose) and the example became more clear.
I think not enough people teach technical topics with that distinction between:
* the textbook listing a theorem with the strictest possible assumptions that says that, with enough time, this should converge;
* in practice, the fact that many cases far from that assumption behave the way you’d like for the theorem to make sense.
Having an option to write an accessible version with simple math, and a more nuanced version that can be re-read later is really fantastic.