I'm sure this must be a duplicate but the questions I've found don't quite address the question I have.
Related questions include:
- How to modify package documentation
- How to document style files for the use of author and collaborators
- Automatic linking of keywords in TikZ documentation
I know that the .dtx/.ins formula is the traditional method, but I do not want to use a method which requires me to re-extract the .sty file, for example, in order to test it every time I make a change. I know I can automate this using make or whatever but the time and faff would drive me nuts.
[I've also seen people suggest that it may not be the best option any more. For example, people point out that the existence of compressed archives makes the inclusion of documentation in the same file as the code less of an advantage, or say that well-commented code with separate user documentation is a better option than an integrated approach.]
So my question is how best to document the code of a package qua code if not using the .dtx/.ins approach. Note that I know almost nothing about documenting or even typesetting code. I have typeset a very, very little code just using a verbatim environment or whatever. Once.
Should the code just be documented in the source file via comments? Or should it be typeset somehow? Or...?
EDITED in light of David Carlisle's comments to exclude the .dtx/.ins option.
.dtx? That is, how does it stay in sync with a.sty, for example? I've never really understood how it works. I found a question about usingsty2dtxbut that doesn't explain what you do if you later change the.styfile, presumably having filled out details in the.dtxfile in the meantime. – cfr May 10 '15 at 21:17.styfrom a.dtxbut if you make all changes to the.dtx, then you have to re-extract the.styevery time to test a change? – cfr May 10 '15 at 23:07makeorl3buildor something – David Carlisle May 10 '15 at 23:09.dtxmethod, then ;). Would definitely drive me nuts. – cfr May 10 '15 at 23:11functionalpackage, then use some\dochighinputcommand to typeset the source code (with code highlighting I guess) and extract documentation etc.. – user202729 Aug 08 '22 at 07:13