Debian Codegraph @

texmf-dist/doc/man/man1/dtxgen.1

raw
1 .TH dtxgen 1 "July 31, 2025" "dtxgen version 1.09" "DekDoc scripts"
2 .SH NAME
3
4 dtxgen - generate template for LaTeX self-extracting .dtx file
5
6 .SH Synopsis
7
8 .B dtxgen [options] basename.[sty,cls]
9
10 .SS Options
11
12 .B -h,--help
13 .RS
14 print short help and exit
15 .RE
16 .B -H,--Help
17 .RS
18 print full documentation via less and exit
19 .RE
20 .B -V
21 .RS
22 print version and exit
23 .RE
24 .B -s,--short=X
25 .RS
26 set short, one-liner, package description to X
27 .RE
28 .B -v,--version=X
29 .RS
30 set initial version to X.
31 .RE
32 .RS
33 Default: 1.00
34 .RE
35 .B -d,--date=X
36 .RS
37 set initial version’s date to X.
38 .RE
39 .RS
40 Default: current date
41 .RE
42 .B -m,--mail=X
43 .RS
44 set your email address to X.
45 .RE
46 .RS
47 Default: $EMAIL
48 .RE
49 .B -n,--name=X
50 .RS
51 set your name to X.
52 .RE
53 .RS
54 Default: $NAME
55 .RE
56 .B -c,--class=X
57 .RS
58 (class packs only) set class to be preloaded to X.
59 .RE
60 .RS
61 Default: article
62 .RE
63 .B -f,--format=X
64 .RS
65 set latex format to be used for compilation to X.
66 .RE
67 .RS
68 Default: pdflatex
69 .RE
70 .B -b,--body=X
71 .RS
72 existing style or class X to be used instead of demo
73 .RE
74 .B -i,--history
75 .RS
76 replace standard Change History section with simpler one.
77 .RE
78
79 .SH Description
80 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.
81
82 Usage example:
83
84 dtxgen -n 'your name' -m '[email protected]' myclass.cls
85
86 The script takes some variables such as:
87 .IP ‣ 2
88 name and email address of the author,
89 .IP ‣ 2
90 a short description of the class or package generated from the .dtx file,
91
92 .IP ‣ 2
93 a date
94
95 .PP
96 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.
97
98 If you have an environment with your name and email address defined in NAME and EMAIL, you could simply type:
99
100 dtxgen myclass.cls
101
102 and you would end up with five files: myclass.dtx, myclass.cls, myclass.pdf, README.md, and Makefile.
103
104 .SH Options
105 dtxgen recognizes the following options:
106
107 .B -h,--help
108 .RS
109 Prints help information and exits.
110 .RE
111 .B -H,--Help
112 .RS
113 print full documentation via less and exit
114 .RE
115 .B -V
116 .RS
117 Prints the script's version and exits.
118 .RE
119 -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.
120
121 -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.
122
123 -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.
124
125 -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|.
126
127 -v,--version=X Set the initial version; by default 1.00 wil be used.
128
129 -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|.
130
131 -f,--format=X Latex format to be used for compilation. The default is pdflatex, but you may need another format, like xelatex of lualatex.
132
133 .B -i,--history
134 .RS
135 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.
136 .RE
137
138 .SH Makefile
139 The Makefile can be used to compile new versions of your work; it contains the following targets:
140
141 .B all
142 .RS
143 (the default) generate the style or class file,
144 .RE
145 .RS
146 the pdf-documentation, and a README.md file.
147 .RE
148 .B distclean
149 .RS
150 remove all files that can be regenerated,
151 .RE
152 .B clean
153 .RS
154 same, except the style or class file, the
155 .RE
156 .RS
157 pdf-documentation, and a README.md file.
158 .RE
159 .B inst
160 .RS
161 install in the user's TeX tree,
162 .RE
163 .B install
164 .RS
165 install in the local TeX tree (uses sudo)
166 .RE
167 .B zip
168 .RS
169 produce a zip file ready for upload to CTAN
170 .RE
171
172 .SH Author
173 Wybo Dekker ([email protected])
174
175 .SH Copyright
176 Released under the GNU General Public License (www.gnu.org\fIcopyleft\fRgpl.html)