3 ms·
This is fascinating; I (well, with some support from my advisor IIRC!) implemented some things like this in latex for my thesis, but it was very limited. It sti
by avivo 4y ago
This is fascinating; I (well, with some support from my advisor IIRC!) implemented some things like this in latex for my thesis, but it was very limited. It still did help me keep track of all the variables and letters.
I'm curious why not do this in MDX instead? Would that have been possible? It seems like it might be a good base that can then interact with other things (e.g. I'd love to just use this in https://motif.land https://motif.land).
- wcrichton 4y agoI originally tried using MDX. But in my experience, JSX syntax is better suited for writing websites than writing documents. The <Tag></Tag> syntax is more verbose than @Tag{}. I ended up having to do lots of raw string embedding too, like <Component>{r`content...`}</Component> which is even worse. Basically you either had a really concise syntax for special Markdown-supported operations, or you had a really annoying syntax for non-special operations. Nota instead provides a uniform somewhat-nice syntax for both. Additionally, I found the composition semantics between Markdown and JSX somewhat confusing. Random whitespace and newlines would sometimes have a very significant effect on the resulting document. It wasn't really clear when you would be in Markdown mode vs. JSX mode. FWIW the Nota React components (e.g. @Definition and @Ref) could be used with MDX. The Nota syntax and Nota runtime are separate.