From cd9e18d2b2ef2ef55b279f86d9b3f3e5a7b711ac Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 2 Feb 2011 01:04:28 +0000 Subject: sty2dtx (1feb11) git-svn-id: svn://tug.org/texlive/trunk@21252 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/support/sty2dtx/README | 92 +++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 10 deletions(-) (limited to 'Master/texmf-dist/doc/support/sty2dtx') diff --git a/Master/texmf-dist/doc/support/sty2dtx/README b/Master/texmf-dist/doc/support/sty2dtx/README index 5ea1cc55a6c..99388299b5f 100644 --- a/Master/texmf-dist/doc/support/sty2dtx/README +++ b/Master/texmf-dist/doc/support/sty2dtx/README @@ -1,5 +1,5 @@ -Copyright (c) 2010-2011 Martin Scharrer -This is open source software under the GPL v3 or later. +sty2dtx -- Converts a LaTeX .sty file to a documented .dtx file +Version: v2.0 2011/01/31 Converts a .sty file (LaTeX package) to .dtx format (documented LaTeX source), by surrounding macro definitions with 'macro' and 'macrocode' environments. @@ -8,13 +8,23 @@ 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. +as a good start to convert undocumented style files to .dtx files. + + +Copyright (c) 2010-2011 Martin Scharrer + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. -Usage: - perl sty2dtx.pl infile [infile ...] outfile -or - perl sty2dtx.pl < file.sty > file.dtx +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . The following macro definitions are detected when they are at the start of a @@ -28,5 +38,67 @@ line (can be prefixed by \global, \long, \protected and/or \outer): \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. +The following environment definitions are detected when they are at the start +of a line: + \newenvironment{name} \renewenvironemnt{name} \provideenvironment{name} + +The macro and environment definition must either end at the same line or with +a '}' on its own on a line. + + +USAGE: + +sty2dtx.pl [] [--= ...] [--] [ ...] [] + +Files: + * can be '-' for STDIN or STDOUT, which is the default if no files are given + * multiple input files are merged to one output file + +Variables: + can be defined using --= or -- and will be used for + substitutions in the template file. + Common variables: + author, email, maintainer, year (for copyright), + version, date, description (of package/class), + type (either 'package' default or 'class'), + filebase (automatically set from output or input file name), + +Options: + -h : Print this help text + -H : Print extended help + -V : Print version and copyright + -v : Be verbose + -o : Use given file as output + -O : Overwrite already existing output file(s) + -B : Use basename of single input file for output file + -I : Also create .ins (install) file + -i : Create .ins file with given name + -t