Created
October 25, 2012 11:46
-
-
Save lukego/3952159 to your computer and use it in GitHub Desktop.
Erlang literate programming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple literate programming. | |
Add comments to your Erlang file with a special %%% syntax, like this: | |
%%% This is a comment that will be formatted in a variable width font with Markdown. | |
%%% You can use *emphasis* and | |
%%% # Headings | |
%%% and even | |
%%% | |
%%% - Lists | |
%%% - of | |
%%% - things | |
%%% | |
%%% while the rest of the code is formatted like normal. | |
Then format the file by using sed to convert to Markdown and pandoc to convert to PDF: | |
sed -E -e 's/^/ /g' -e 's/^ %%% ?//g' | pandoc --toc -o listing.pdf - | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
where is the 'like button' ???