you can use fpdoc to generate documentation in several different formats like html, chm, LaTex, Man or pdf. It is used for the FreePascal docs.
If I needed documentation, I use makeskel, edit that and subsequently use fpdoc to generate html and display it in ThtmlViewer, CEF or one of the pdf viewer components. MakeSkel generates a skeleton in XML for any unit and has entries for all the identifiers in a unit.
See the documentation for fpdoc.
Once you are done, you can also generate the same docs in other supported formats. These FreePascal standard tools are often overlooked.
They are excellent and well structured.
Note that fpdoc can also be used for end-user documentation instead of the code centered docs that I described above, so also for how-to' s , And it is very easy to use,
I recommend it and prefer it above any of the previous suggestions.
Better than working with rtf format...