#StackBounty: #latex3 #dtx How to create a boilerplate dtx file for a package using LaTeX3 (similar to dtxgen for LaTeX2e)

Bounty: 100

I’m interested in making a package using LaTeX3, but I can’t (a) find documentation on how to generate a new dtx file for it or (b) find a template for creating a dtx file for a package using LaTeX3 (probably using l3doc).

Is there a utility (like dtxgen for LaTeX2e) or template for LaTeX3 packages?

An example of the kind of thing I’m after.

When making a LaTeX package (e.g. mynewpackage), my first step is usually to run

$ dtxgen mynewpackage.sty

Which creates a Makefile and mynewpackage.dtx (among other files). By default this uses docstrip and uses the class ltxdoc for the documentation. Both of these are good but LaTeX3 introduces a few changes including:

  • The use of l3docstrip to introduce new features such as @@ being replaced by __<module name> (got from expl3.pdf from https://www.ctan.org/pkg/l3kernel)
  • Uses ProvidesExplPackage instead of ProvidesPackage (got from Write new package with LaTeX2e or LaTeX3)
  • Using l3doc class instead of ltxdoc (just seems to make sense, since it has support for documenting LaTeX3 functions clearly)

Currently, I have been unable to find either a complete reference of all the changes one should make to enable full LaTeX3 support.

Is there a script to generate an initial dtx file with all the recommended changes for LaTeX3 and/or a place where all the necessary changes are documented?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.