One Reply to “Literate Programming with LibreOffice”

  1. https://en.wikipedia.org/wiki/Axiom_(computer_algebra_system) contains links to the literate programs that make up the Axiom computer algebra system. They were produced using LaTeX.

    Latex is trivially easy to use. Writing an initial document requires almost no markup. Anything special you might want to do can be found online.

    The Axiom documentation uses a trivial markup, called a ‘chunk’ which has a name. as in

    \begin{chunk}{somename}

    code goes here

    \end{chunk}

    and a program that expects the name of the file (e.g. mydocument.tex) and a chunk name, as in

    tangle mydocument.tex somename

    and writes the result to standard output. You can redirect the output to a file. That’s all the tooling you need. Send me an email and I’ll send you the code to extract chunks. It’s pretty trivial.

    See the page http://axiom-developer.org/axiom-website/documentation.html

    On that page is a link to http://axiom-developer.org/axiom-website/litprog.html which is an example program to write literate programs in HTML. Like your example, this page contains the code to extract itself from the HTML source.

    The gold standard for literate programming is a book called “Physically Based Rendering” which won an Academy Award. If all programs were written that way it would be easy to maintain and modify them. Buy the book (I have no connection to it) and strive to achieve that level of explanation (not “documentation”, not “comments”).

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

This site uses Akismet to reduce spam. Learn how your comment data is processed.