dtxgen(1) | DekDoc scripts | dtxgen(1) |
NAME¶
dtxgen - generate template for LaTeX self-extracting .dtx file
Synopsis¶
dtxgen [options] basename.[sty,cls]
Options¶
-h,--help
Description¶
dtxgen creates a template for a self-extracting .dtx file, based on the model described by Joseph Wright (www.texdev.net20091006a-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:
- ‣
- name and email address of the author,
- ‣
- a short description of the class or package generated from the .dtx file,
- ‣
- a date
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.
Options¶
dtxgen recognizes the following options:
-h,--help
-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 | 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.
-i,--history
Makefile¶
The Makefile can be used to compile new versions of your work; it contains the following targets:
all
Author¶
Wybo Dekker (wybodekker@me.com)
Copyright¶
Released under the GNU General Public License (www.gnu.orgcopyleftgpl.html)
July 31, 2025 | dtxgen version 1.09 |