Use fpdoc. We use it to document all our libraries and there is absolutely nothing that beats it.

http://community.freepascal.org:1000...ml/fpdoc/fpdoc