I have just completed writing my very own LaTex package, how can i make the package to be self documented like maybe from comments in the package code?
Assuming you've written the package as a
.sty file, a good start at a combined source code/documentation is provided by the Perl script
sty2dtx (requires Perl). The script also works for document classes with the
--type class switch.
perl sty2dtx.pl < mypkg.sty > mypkg.dtx
perl sty2dtx.pl mypkg.sty mypkg.dtx
Refer to the README for a complete list of supported options.
The script generates a
.dtx file for use in the workflow described in How to Package Your LaTeX Package. The generated
.dtx forms a starting point by showing any comments in your
.sty file as text in documentation generated by running
(pdf)latex on the
This will give you a good starting point for a package in the literate programming style, with generated documentation in the style of many LaTeX packages. From here, it's up to you to add content to the documentation within the base framework provided by