Program documentation with syntax highlighting
(Content of this page replaces earlier never fineshed content about FM-8 peculiarities. See information about this abandouned topic for exampe here.)
Every programmer uses a special program editor to develop code. To avoid common errors in coding, these editors highlight various syntactical elements of a program or script: variables, constants, function-names, keywords etc.
Hence documenting a program or script should make use of these functions. My favourite method is this:
- Print the desired code snippet or the whole code to pdf.
- Import (part) of that pdf into FrameMaker (by reference).
- Describe the conents of this picture.
Examples
- ExtendScript (available for FrameMaker since version 10)
- Auto Hotkey (AHK) Script
- Windows ini file
PDF of a sample documentation done in FrameMaker.
My tools
Program/text editor: EditPad Pro. It comes with a host of syntax definitions. There is also a tool to develop/modify syntax definitions.
Publishing: FrameMaker since version 4. See the various pages on this site.