This is a collection of "Today I learnt how to …​" memos. Mostly as a reminder to myself how to do something/ how I arrived at solution/ how I found something/ an interesting fact etc.,. YMMV.

This might be even better when used to implement this idea —  "Tell me about a concept you learned recently that’s not a library or tool." —


Syntax Highlighting in ConTeXt

% A simple ConTeXt file showing how to use syntax highlighting
\definevimtyping [PYTHON]  [syntax=python]

{\tfa A Simple Hello world program in Python}
The following program should be syntax highlighted.
def main():
    for i in range(10):
        print i

if __name__ == '__main__':

Convert 1.tex to 1.pdf with:

context 1.tex

The rendered PDF looks like this:

PDF rendering of Syntax highlighted code