dtxgen [options] basename.[sty,cls] |
-h,--help | print short help and exit |
-H,--Help | print full documentation via less and 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. |
Usage example:
dtxgen -n 'your name' -m 'your@email.ad' myclass.cls
The script takes some variables such as:
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
.
-h,--help | |
Prints help information and exits. | |
-H,--Help | |
print full documentation via less and exit | |
-V | |
Prints the script's version and exits. |
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.
-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 --␣history option provides a straightforward history section, formatted in a longtable environment. |
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 a README.md file. | |
distclean | remove all files that can be regenerated, |
clean | same, except the style or class file, the |
pdf-documentation, and a README.md file. | |
inst | install in the user's TeX tree, |
install | install in the local TeX tree (uses sudo) |
zip | produce a zip file ready for upload to CTAN |
synopsis: | excheck executable1 [executable2...] |
description: | check if all needed execs are there and getopt is GNU |
apt-file find -x /pdfcrop$ |
synopsis: | handle_options "$@" |
description: | handle the options. |
globals used: | Myname Version |
globals set: | args short date mail name loadclass format |
returns: | the number of remaining arguments |