Documentation is added to the code as LaTeX source, commented out by the conventional Fortran90 mechanism, i.e., the exclamation point ``!''. Documentation is set off in different regions of the code by ProTeX markers listed in table A.1. The markers always start in the second column of the code (the exclamation point indicating a comment is in the first). This requirement makes it nearly impossible that these trigrams are misinterpreted if they happen to occur in the documentation.
Markers start or terminate a unit of the documentation, and must occur in the corresponding section of code. They also have varying scopes of applicability (see Table A.1).
| Marker | Meaning | Documentation applicability |
| BOI | Beginning of introduction | Introduction only |
| EOI | End of introduction | |
| BOP | Beginning of prologue | module, procedure, include file |
| EOP | End of prologue | |
| BOC | Beginning of code | code inside a procedure |
| EOC | End of code | |
The introduction is used only when a section of code must be documented above and beyond the normal requirements, e.g., for the introduction to a module or a main program. The prologue is the standard documentation unit for a subroutine or function. The code section isolates the actual executable statements from the rest of the code. Isolating the executable statements with tt BOC and EOC is optional: if they are present the statements will be added verbatim into the resulting document, if absent it will be excluded (unless this feature is overridden with a protex command line option).
In addition to the markers, there are keywords which initiate a field of documentation which refers to a specific theme. Keywords start with an exclamation point within a Fortran90 comment line, that is, they are in a sense comments within a comment.
We separate the keywords into those applicable to the introduction and those applicable to the prologue. There are no keywords applicable to the executable statements, since this code is taken verbatim into the LaTeX document, if at all.