summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/sty2dtx/README
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/support/sty2dtx/README')
-rw-r--r--Master/texmf-dist/doc/support/sty2dtx/README32
1 files changed, 32 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/sty2dtx/README b/Master/texmf-dist/doc/support/sty2dtx/README
new file mode 100644
index 00000000000..5ea1cc55a6c
--- /dev/null
+++ b/Master/texmf-dist/doc/support/sty2dtx/README
@@ -0,0 +1,32 @@
+Copyright (c) 2010-2011 Martin Scharrer <martin@scharrer-online.de>
+This is open source software under the GPL v3 or later.
+
+Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX source),
+by surrounding macro definitions with 'macro' and 'macrocode' environments.
+The macro name is automatically inserted as an argument to the 'macro'
+environemnt.
+Code lines outside macro definitions are wrapped only in 'macrocode'
+environments. Empty lines are removed.
+The script is not thought to be fool proof and 100% accurate but rather
+as a good start to convert undocumented style file to .dtx files.
+It does not generate a complete .dtx file, just the code section.
+
+Usage:
+ perl sty2dtx.pl infile [infile ...] outfile
+or
+ perl sty2dtx.pl < file.sty > file.dtx
+
+
+The following macro definitions are detected when they are at the start of a
+line (can be prefixed by \global, \long, \protected and/or \outer):
+ \def \edef \gdef \xdef
+ \newcommand{\name} \newcommand*{\name}
+ \newcommand\name \newcommand*\name
+ \renewcommand{\name} \renewcommand*{\name}
+ \renewcommand\name \renewcommand*\name
+ \providecommand{\name} \providecommand*{\name}
+ \providecommand\name \providecommand*\name
+ \@namedef{\name} \@namedef\name
+
+The macro definition must either end at the same line or with a '}' on its own
+on a line.