dtxgen(1)
π NAME π
okay so bestie, welcome to dtxgen(1) from the DekDoc scripts family π
dtxgen β generate a template for a LaTeX self-extracting .dtx file. that's the whole vibe. it makes the skeleton so you don't have to π¦
β¨ Synopsis β¨
dtxgen [options] basename.[sty,cls]
π Options (the quick lil preview) π
-h,--helpβ print short help and exit-H,--Helpβ print full documentation vialessand exit-Vβ print version and exit-s,--short=Xβ set short, one-liner, package description to X-v,--version=Xβ set initial version to X. Default:1.00-d,--date=Xβ set initial versionβs date to X. Default: current date-m,--mail=Xβ set your email address to X. Default:$EMAIL-n,--name=Xβ set your name to X. Default:$NAME-c,--class=Xβ (class packs only) set class to be preloaded to X. Default:article-f,--format=Xβ set latex format to be used for compilation to X. Default:pdflatex-b,--body=Xβ existing style or class X to be used instead of demo-i,--historyβ replace standard Change History section with simpler one.
π«Ά Description π«Ά
so 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's giving very useful for those who plan to create a new Documented LaTeX Source (.dtx) file. no cap π§
Usage example, periodt:
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
.dtxfile, - a date
β¦and it pulls them 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 β bestie that part is on you π β but the dates, basename, author's name and email address are already in place and, depending on whether you used a .cls or a .sty extension in the argument, it is formatted to be either a class or a package source file. iconic behavior tbh π
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. five!! that's a whole squad π
π Options π
dtxgen recognizes the following options:
-h,--helpβ Prints help information and exits.-H,--Helpβ print full documentation vialessand exit-Vβ Prints the script's version and exits.-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|dClass{...}|, 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 default1.00wil 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 theyyyymmddformat, although it will be stored the LaTeX way:yyyy/mm/dd.-f,--format=Xβ Latex format to be used for compilation. The default ispdflatex, but you may need another format, likexelatexoflualatex.-i,--historyβ 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--β£historyoption provides a straightforward history section, formatted in alongtableenvironment.
πΈ Makefile πΈ
The Makefile can be used to compile new versions of your work; it contains the following targets:
allβ (the default) generate the style or class file, the pdf-documentation, and aREADME.mdfile.distcleanβ remove all files that can be regenerated,cleanβ same, except the style or class file, the pdf-documentation, and aREADME.mdfile.instβ install in the user's TeX tree,installβ install in the local TeX tree (usessudo)zipβ produce a zip file ready for upload to CTAN
π Author π
Wybo Dekker (wybodekker@me.com)
β Copyright β
Released under the GNU General Public License (www.gnu.orgcopyleftgpl.html)
ok that's the whole page bestie, go make a .dtx and slay π
β¨
and for the cute sign-off: this is dtxgen version 1.09, dated July 31, 2025, filed under dtxgen(1) ππ¦ bye bestie!! π
π¦ where this page comes from
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- ubuntu resolute: texlive-extra-utils 2025.20260124-1
- ubuntu stonking: texlive-extra-utils 2026.20260711-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms