You would not believe it, but I just created (this week) a Latex TikZ library that helps me to create templates / journal inserts for the use case of handwritten notes. Although I believe in DIN A5 paper, it might be useful for someone:
That is very cool! Do you have a link to that implementation? I would be very interested in the problems that arise when you want to provide a rock solid implementation of this.
Regarding threads: It is correct that the current version of the template has a problem with multi-threaded programs. However, as adding 'thread_local' to the global variable is sufficient to solve the problem, I did not mention this in the original post. However, I updated the blog post in this direction. Furthermore, I added a (run-time) check that ensures that you use DynamicScope<T> only with thread_local.
Regarding Lambdas: I don't think there is a problem here. Dynamically scoped variables promise to return that value that is the most currenly bound in the current execution context. As the resolution is done on dereferencing, this is the exact behavior that DynamicScope<T> provides. This means that a lambda does not (lexically) catch the value of the dynamically-scope variable at definition time, but at the execution time of the lambda.
I already considered that, but until now i did not implement many peripheral devices. But when implemented those, it should be possible. But at the moment i'm rather thinking of an VHDL netlist emulator in TeX.
The dataref package is intended to be useful (and it acutally is). Avremu was only a long trip in sweden without internet, an editor and a reference manual.
Hm, yeah Regular Expressions are great, but they are also fragile and slow. The generator will, from what I se only generate very strict regexes, that will break if the input differs just a little bit.