.TH dtxgen 1 "July 31, 2025" "dtxgen version 1.09" "DekDoc scripts" .SH NAME dtxgen - generate template for LaTeX self-extracting .dtx file .SH Synopsis .B dtxgen [options] basename.[sty,cls] .SS Options .B -h,--help .RS print short help and exit .RE .B -H,--Help .RS print full documentation via less and exit .RE .B -V .RS print version and exit .RE .B -s,--short=X .RS set short, one-liner, package description to X .RE .B -v,--version=X .RS set initial version to X. .RE .RS Default: 1.00 .RE .B -d,--date=X .RS set initial version’s date to X. .RE .RS Default: current date .RE .B -m,--mail=X .RS set your email address to X. .RE .RS Default: $EMAIL .RE .B -n,--name=X .RS set your name to X. .RE .RS Default: $NAME .RE .B -c,--class=X .RS (class packs only) set class to be preloaded to X. .RE .RS Default: article .RE .B -f,--format=X .RS set latex format to be used for compilation to X. .RE .RS Default: pdflatex .RE .B -b,--body=X .RS existing style or class X to be used instead of demo .RE .B -i,--history .RS replace standard Change History section with simpler one. .RE .SH Description dtxgen creates a template for a self-extracting .dtx file, based on the model described by Joseph Wright (www.texdev.net\fI2009\fR10\fI06\fRa-model-dtx-file/). It is useful for those who plan to create a new Documented LaTeX Source (.dtx) file. Usage example: dtxgen -n 'your name' -m 'your@email.ad' myclass.cls The script takes some variables such as: .IP ‣ 2 name and email address of the author, .IP ‣ 2 a short description of the class or package generated from the .dtx file, .IP ‣ 2 a date .PP from environment variables, or from command line options and generates, among more, a template for the .dtx file with some minimal examples. Of course, the user will have to replace those examples with the real work, but the dates, basename, author's name and email address are already in place and, depending on whether you use used a .cls or a .sty extension in the argument, it is formatted to be either a class or a package source file. If you have an environment with your name and email address defined in NAME and EMAIL, you could simply type: dtxgen myclass.cls and you would end up with five files: myclass.dtx, myclass.cls, myclass.pdf, README.md, and Makefile. .SH Options dtxgen recognizes the following options: .B -h,--help .RS Prints help information and exits. .RE .B -H,--Help .RS print full documentation via less and exit .RE .B -V .RS Prints the script's version and exits. .RE -s,--short=X A short, one-liner, description for the class or package. By default, the string /A new LaTeX class/ or /A new LaTeX package/ will be used. -n,--name=X Your name (first name, followed by surname). Alternatively, you can set a default value in the environment variable |NAME|; if you do so and still use this option, the option's value wills have priority. -m,--mail=X Your email address. Alternatively, you can set a default value ins the environment variable |EMAIL|; if you do so and still use this option, the option's value will have priority. -c,--class=X For class templates only: inserts a |\LoadClass{...}|, so that the new class will start with the properties of the |...| class. The default is |article|. -v,--version=X Set the initial version; by default 1.00 wil be used. -d,--date=X Set the initial version's date. By default, the current date will be used. The date should be entered in the |yyyymmdd| format, although it will be stored the LaTeX way: |yyyy/mm/dd|. -f,--format=X Latex format to be used for compilation. The default is pdflatex, but you may need another format, like xelatex of lualatex. .B -i,--history .RS Create a section History instead of the standard Change History section. The standard Change History allows very detailed reports, but most people contine themselves to global remarks about changes between versions, appearing at one place in the document. The --␣history option provides a straightforward history section, formatted in a longtable environment. .RE .SH Makefile The Makefile can be used to compile new versions of your work; it contains the following targets: .B all .RS (the default) generate the style or class file, .RE .RS the pdf-documentation, and a README.md file. .RE .B distclean .RS remove all files that can be regenerated, .RE .B clean .RS same, except the style or class file, the .RE .RS pdf-documentation, and a README.md file. .RE .B inst .RS install in the user's TeX tree, .RE .B install .RS install in the local TeX tree (uses sudo) .RE .B zip .RS produce a zip file ready for upload to CTAN .RE .SH Author Wybo Dekker (wybodekker@me.com) .SH Copyright Released under the GNU General Public License (www.gnu.org\fIcopyleft\fRgpl.html)