Let's say I have an experimental Asymptote module that I want to make available through CTAN. I can think of several options for this:
Create a package that uses a
filecontents*
environment to install the module in the current directory.Somehow find an appropriate place in the TDS(?) structure where Asymptote will automatically look for modules. This would be ideal if
- Such a place existed (outside the
asymptote/base
folder, which I am guessing is not intended for additions), and - I knew anything at all about the TDS structure. (Judging from other questions, this is something that is hard to get right unless you know what you are doing.)
- Such a place existed (outside the
Create a package, which must be loaded after the
asymptote
package, that uses anasydef
environment to include all my Asymptote code in all the Asymptote images throughout the tex document. This would be the easiest, but I think it's the least desirable of the three methods described. For one thing, it prevents the user from choosing whichasy
environments actually need the extra overhead of loading my module. For another, it can only be used for diagrams inside a tex file; I personally prefer to write all but the simplestasy
code in a separate.asy
file first, since it is easier to debug that way.
Are any of these reasonable? In particular, is there anything I could do for the second option?
Is CTAN even a suitable option for publishing an Asymptote module?
base
) and contain a lot of code that is basic to the functioning of Asymptote. There may be modules that many would find useful, but that the developers do not think should be included in the code base--for instance, if the module is a temporary measure that is expected to be replaced, or is useful but not yet polished ("version 0.3").