Python On Documents is a document preparation system inspired by LaTeX that uses Python as the macro language and a minimal amount of mark-up. The focus is on allowing for technical documents and notes to be created (and shared). The goal is to provide a way to publish to many different targets (HTML, LaTeX, etc.) while still keeping the document mostly intact. To allow for this flexibility, macros can easily be created and used to provide for different types of output and functionality. There are already macros to allow for LaTeX equations, graphviz diagrams, and code highlighting. By using Python as the base language, many libraries are available for use and are easy to integrate.
rough is software to embed macros in PHP code. Add a comment to your code, run the macro command, and rough generates code. The macros are not removed from the source code and can easily be updated. Currently, there are macros to generate get methods, generate set methods, and emulate traits in PHP 5.3.