summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/sty2dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-01-28 23:23:36 +0000
committerKarl Berry <karl@freefriends.org>2011-01-28 23:23:36 +0000
commiteb9f81c6f8ed959b7b4543e0d4e28721394512e0 (patch)
treea6e9c495f0674ad1b8a2153b6c1ebd71c6d80380 /Master/texmf-dist/doc/support/sty2dtx
parent602979c95a6c85a4dc3a3e1899da6af89ed603c2 (diff)
new package and script sty2dtx 1.0 (29jan11)
git-svn-id: svn://tug.org/texlive/trunk@21215 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/sty2dtx')
-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.