LaTeX support

Listings package

Literate programming

Literate programming is the writing of computer programs primarily for human beings to read, similar to a work of literature; hence the name "literate programming." This contrasts with the traditional view that a programmer's primary creation is source code to be read by a computer.

Documentation and source code are written into one source file. Both the complete source code and its documentation can be extracted from this file with specific utilities. The information is written and presented in a reading order suitable for human consumption with detailed explanations. The code is automatically rearranged for ordinary processing by other computer tools, such as compilers or interpreters. (From Wikipedia)

The same file may contain both source code and its LaTeX documentation, and can be executed either by the PLaSM interpreter or by a LaTeX typesetting environment. This behavior is readily obtained by toggling between sources and comments though appropriately using the character %, which is both the comment toggle switch in PLaSM, and the start of a comment line in LaTeX.

For better typesetting results, use the LaTeX package Listings to add source code listings to LaTeX documents. It supports highlighting of all the most common languages, including PLaSM, and it is highly customizable.

PLaSM is Free Software and may be distributed under GNU LGPL