summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-21 23:30:25 +0000
committerKarl Berry <karl@freefriends.org>2018-02-21 23:30:25 +0000
commitdb6b6d35b031d5c4294428a844e30b8d2d5dce9c (patch)
tree091ad8d81024624632dd315b1b94b53c7d85524c /Master/texmf-dist
parent3908d5ba9809b4ede985cb626410781fdf499ee1 (diff)
makedtx (21feb18)
git-svn-id: svn://tug.org/texlive/trunk@46702 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/support/makedtx/CHANGES19
-rw-r--r--Master/texmf-dist/doc/support/makedtx/CHANGES.org76
-rw-r--r--Master/texmf-dist/doc/support/makedtx/README32
-rw-r--r--Master/texmf-dist/doc/support/makedtx/README.txt48
-rw-r--r--Master/texmf-dist/doc/support/makedtx/creatdtx.perl72
-rw-r--r--Master/texmf-dist/doc/support/makedtx/latexmkrc.pl19
-rw-r--r--Master/texmf-dist/doc/support/makedtx/makedtx-manual.html971
-rw-r--r--Master/texmf-dist/doc/support/makedtx/makedtx-version.tex44
-rw-r--r--Master/texmf-dist/doc/support/makedtx/makedtx.pdfbin202740 -> 300434 bytes
-rwxr-xr-xMaster/texmf-dist/scripts/makedtx/makedtx.pl111
-rw-r--r--Master/texmf-dist/source/support/makedtx/makedtx.dtx316
-rw-r--r--Master/texmf-dist/source/support/makedtx/makedtx.ins20
-rw-r--r--Master/texmf-dist/tex/latex/makedtx/createdtx.sty (renamed from Master/texmf-dist/tex/latex/makedtx/creatdtx.sty)17
13 files changed, 480 insertions, 1265 deletions
diff --git a/Master/texmf-dist/doc/support/makedtx/CHANGES b/Master/texmf-dist/doc/support/makedtx/CHANGES
deleted file mode 100644
index cbd18311fda..00000000000
--- a/Master/texmf-dist/doc/support/makedtx/CHANGES
+++ /dev/null
@@ -1,19 +0,0 @@
-version 0.94 (2007/08/19) :
-
- * Default preamble changed to one which conforms with the
- LaTeX Project Public License (LPPL)
- * license switch added
-
-version 0.93 (2007/08/02) :
-
- * version switch added
- * comment switch added
- * codetitle switch added
-
-version 0.91 (2006/07/21) :
-
- * prefinale switch added
-
-version 0.9 (2005/02/11) :
-
- * Initial beta release
diff --git a/Master/texmf-dist/doc/support/makedtx/CHANGES.org b/Master/texmf-dist/doc/support/makedtx/CHANGES.org
new file mode 100644
index 00000000000..f91259d63df
--- /dev/null
+++ b/Master/texmf-dist/doc/support/makedtx/CHANGES.org
@@ -0,0 +1,76 @@
+%%
+%% This is file `CHANGES.org',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% makedtx.dtx (with options: `CHANGES.org,package')
+%%
+%% makedtx.dtx
+%% Copyright 2018 Nicola L.C. Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola L.C. Talbot.
+%%
+%% This work consists of the files makedtx.dtx and makedtx.ins and the derived files CHANGES.org, makedtx-version.tex, latexmkrc.pl, createdtx.sty, makedtx.pl.
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+* version 1.2 2018/02/19
+
++ Under MSW use envvar USERNAME rather than getpwuid for getting
+ author default value
++ User Perl I/O layers in order to have LF EOL on output, and accept
+ both LF and CRLF on input
++ Create a test bench --- add a testmode option so that date in output
+ is fixed and output is comparable to a reference value.
++ Fix perl warning about escaping { in regexp.
++ Semi-colonize end of here-documents as recommended in Perl Manual.
++ Fix --version cli argument, so that version is flushed to stdout
+ before script exits.
++ Automate packaging
+
+* version 0.94 (2007/08/19) :
+
++ Default preamble changed to one which conforms with the
+ LaTeX Project Public License (LPPL)
++ license switch added
+
+* version 0.93 (2007/08/02) :
+
++ version switch added
++ comment switch added
++ codetitle switch added
+
+* version 0.91 (2006/07/21) :
+
++ prefinale switch added
+
+* version 0.9 (2005/02/11) :
+
++ Initial beta release
+\endinput
+%%
+%% End of file `CHANGES.org'.
diff --git a/Master/texmf-dist/doc/support/makedtx/README b/Master/texmf-dist/doc/support/makedtx/README
deleted file mode 100644
index e4abbba5d90..00000000000
--- a/Master/texmf-dist/doc/support/makedtx/README
+++ /dev/null
@@ -1,32 +0,0 @@
-makedtx v0.94b : a Perl script to help create .dtx and .ins files
-
-Last Modified : 19 August 2007
-
-Author : Nicola Talbot
-
-Files : makedtx.dtx - documented source file
- makedtx.ins - installation script
-
-
-The makedtx bundle is provided to help LaTeX2e developers to write the code and
-documentation in separate files, and then combine them into a single .dtx
-file for distribution. It automatically generates the character table, and also
-writes the associated installation (.ins) script.
-
-To extract the code do:
-
-latex makedtx.ins
-
-To extract the documentation do:
-
-pdflatex makedtx.dtx
-pdflatex makedtx.dtx
-
-Read the documentation for installation instructions.
-
-This material is subject to the LaTeX Project Public License.
-See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
-the details of that license.
-
-http://theoval.cmp.uea.ac.uk/~nlct/
-
diff --git a/Master/texmf-dist/doc/support/makedtx/README.txt b/Master/texmf-dist/doc/support/makedtx/README.txt
new file mode 100644
index 00000000000..cfb50f5568a
--- /dev/null
+++ b/Master/texmf-dist/doc/support/makedtx/README.txt
@@ -0,0 +1,48 @@
+Table of Contents
+─────────────────
+
+
+
+
+makedtx v1.2 : a Perl script to help create .dtx and .ins files
+
+Last Modified: 2018-02-19
+Author : Nicola Talbot
+Files :
+ • makedtx.dtx - documented source file
+ • makedtx.ins - installation script
+
+
+The makedtx bundle is provided to help LaTeX2e developers to write the
+code and documentation in separate files, and then combine them into a
+single .dtx file for distribution. It automatically generates the
+character table, and also writes the associated installation (.ins)
+script.
+
+To extract the code do:
+
+┌────
+│ latex makedtx.ins
+└────
+
+To extract the documentation do after extracting the code:
+
+┌────
+│ latexmk -r latexmkrc.pl
+└────
+
+If you don't have latexmk or makeindex, you can also do the following to
+have the documentation w/o index:
+
+┌────
+│ pdflatex makedtx.dtx
+│ pdflatex makedtx.dtx
+└────
+
+Read the documentation for installation instructions.
+
+This material is subject to the LaTeX Project Public License. See
+[http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html] for
+the details of that license.
+
+[http://theoval.cmp.uea.ac.uk/~nlct/]
diff --git a/Master/texmf-dist/doc/support/makedtx/creatdtx.perl b/Master/texmf-dist/doc/support/makedtx/creatdtx.perl
deleted file mode 100644
index 9149cba164b..00000000000
--- a/Master/texmf-dist/doc/support/makedtx/creatdtx.perl
+++ /dev/null
@@ -1,72 +0,0 @@
-# creatdtx.perl LaTeX2HTML file corresponding to creatdtx.sty package
-# author : Nicola Talbot
-# date : 2nd August 2007
-
-package main;
-
-print " [creatdtx v0.93b (N.L.C. Talbot)]";
-
-sub do_cmd_meta
-{
- &do_cmd_emph(@_);
-}
-
-sub do_cmd_cs{
- local($_) = @_;
- local($name);
-
- $name = &missing_braces unless
- (s/$next_pair_pr_rx/$name=$2;''/eo);
-
- "<TT>&#092;$name</TT>$_";
-}
-
-sub do_cmd_marg{
- local($_) = @_;
- local($arg);
-
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
-
- "<TT>{</TT><EM>$arg</EM><TT>}</TT>$_";
-}
-
-sub do_cmd_oarg{
- local($_) = @_;
- local($arg);
-
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
-
- "<TT>[</TT><EM>$arg</EM><TT>]</TT>$_";
-}
-
-sub do_cmd_parg{
- local($_) = @_;
- local($arg);
-
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
-
- "<TT>(</TT><EM>$arg</EM><TT>)</TT>$_";
-}
-
-&ignore_commands( <<_IGNORED_CMDS_);
-ifmakedtx # {}
-StopEventually # {}
-OnlyDescription
-RecordChanges
-PrintChanges
-EnableCrossRefs
-CodelineIndex
-GetFileInfo # {}
-CheckSum # {}
-DescribeMacro # {}
-DescribeEnvironment # {}
-DoNotIndex # {}
-changes # {} # {} # {}
-DeleteShortVerb # {}
-MakeShortVerb # {}
-_IGNORED_CMDS_
-
-1;
diff --git a/Master/texmf-dist/doc/support/makedtx/latexmkrc.pl b/Master/texmf-dist/doc/support/makedtx/latexmkrc.pl
new file mode 100644
index 00000000000..c65ad6ffddc
--- /dev/null
+++ b/Master/texmf-dist/doc/support/makedtx/latexmkrc.pl
@@ -0,0 +1,19 @@
+$dvi_mode = 0;
+$pdf_mode = 1;
+
+@default_files=();
+foreach $file (glob('makedtx.{dtx,tex}'))
+{
+ if(-e $file){
+ @default_files=($file);
+ break;
+ }
+}
+
+$makeindex= "makeindex -s gind.ist %O -o %D %S";
+
+# 1. For glossaries using glossary package --- \changes generatated by the ltxdoc \changes directive
+add_cus_dep( 'glo', 'gls', 0, 'makeglo2gls' );
+sub makeglo2gls {
+ system("makeindex -s gglo.ist -t \"$_[0].glg\" -o \"$_[0].gls\" \"$_[0].glo\"" );
+}
diff --git a/Master/texmf-dist/doc/support/makedtx/makedtx-manual.html b/Master/texmf-dist/doc/support/makedtx/makedtx-manual.html
deleted file mode 100644
index 4438c92c219..00000000000
--- a/Master/texmf-dist/doc/support/makedtx/makedtx-manual.html
+++ /dev/null
@@ -1,971 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-
-<!--Converted with LaTeX2HTML 2002 (1.67)
-original version by: Nikos Drakos, CBLU, University of Leeds
-* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
-* with significant contributions from:
- Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
-<HTML>
-<HEAD>
-<TITLE>makedtx v0.94b : a Perl script to help create a DTX file from source code</TITLE>
-<META NAME="description" CONTENT="makedtx v0.94b : a Perl script to help create a DTX file from source code">
-<META NAME="keywords" CONTENT="manual">
-<META NAME="resource-type" CONTENT="document">
-<META NAME="distribution" CONTENT="global">
-
-<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
-<META NAME="Generator" CONTENT="LaTeX2HTML v2002">
-<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
-
-
-</HEAD>
-
-<BODY >
-
-<H1 ALIGN="CENTER">makedtx v0.94b : a Perl script to help create a DTX
-file from source code</H1>
-<P ALIGN="CENTER"><STRONG>Nicola Talbot
-<BR><TT><A NAME="tex2html1"
- HREF="http://theoval.cmp.uea.ac.uk/~nlct/">http://theoval.cmp.uea.ac.uk/~nlct/</A></TT></STRONG></P>
-<P ALIGN="CENTER"><STRONG>19th August 2007</STRONG></P>
-
-<P>
-<BR>
-
-<H2><A NAME="SECTION00010000000000000000">
-Contents</A>
-</H2>
-<!--Table of Contents-->
-
-<UL>
-<LI><A NAME="tex2html17"
- HREF="manual.html#SECTION00020000000000000000">Introduction</A>
-<LI><A NAME="tex2html18"
- HREF="manual.html#SECTION00030000000000000000">Installation</A>
-<LI><A NAME="tex2html19"
- HREF="manual.html#SECTION00040000000000000000">makedtx.pl</A>
-<UL>
-<LI><A NAME="tex2html20"
- HREF="manual.html#SECTION00041000000000000000">Compulsory Arguments</A>
-<LI><A NAME="tex2html21"
- HREF="manual.html#SECTION00042000000000000000">Options</A>
-</UL><BR>
-<LI><A NAME="tex2html22"
- HREF="manual.html#SECTION00050000000000000000">The creatdtx Package</A>
-<LI><A NAME="tex2html23"
- HREF="manual.html#SECTION00060000000000000000">Examples</A>
-<LI><A NAME="tex2html24"
- HREF="manual.html#SECTION00070000000000000000">Troubleshooting</A>
-<UL>
-<LI><A NAME="tex2html25"
- HREF="manual.html#SECTION00071000000000000000">Known Bugs</A>
-<LI><A NAME="tex2html26"
- HREF="manual.html#SECTION00072000000000000000">Possible errors encountered using makedtx.pl</A>
-</UL><BR>
-<LI><A NAME="tex2html27"
- HREF="manual.html#SECTION00080000000000000000">Perl Regular Expressions</A>
-<LI><A NAME="tex2html28"
- HREF="manual.html#SECTION00090000000000000000">Bibliography</A>
-</UL>
-<!--End of Table of Contents-->
-<P>
-
-<H3>Abstract:</H3>
-<DIV>
-The <TT>makedtx</TT> bundle is provided to help developers to write
-the code and documentation in separate files, and then combine them
-into a single DTX file for distribution. It automatically generates
-the character table, and also writes the associated installation
-(.ins) script.
-</DIV>
-<P>
-
-<P>
-
-<H1><A NAME="SECTION00020000000000000000">
-Introduction</A>
-</H1>
-
-<P>
-Authors of L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<SUB>e</SUB> class files or packages are encouraged to bundle
-their source and documentation together into a single DTX file. This
-makes distribution much easier, as users need only download the DTX
-file and possibly a corresponding installation script (INS file)
-instead of a multitude of <TT>.sty</TT>, <TT>.cls</TT>, <TT>.def</TT>
-etc files. However, having the documentation and code bundled
-together can cause problems if a developer wants to, say, use
-<TT>ispell</TT> to spell check the documentation, or convert the
-documentation to a format other than DVI, PostScript or PDF (such as
-HTML).
-
-<P>
-Why should I want to convert my documentation to HTML when I can just
-use PDFLaTeX? The more general purpose packages that I write (such
-as <TT>datetime</TT> and <TT>glossary</TT>) I upload to CTAN, however
-most of the packages I write are specific to the School of Computing
-Sciences at the University of East Anglia, so these I keep on my web
-site, and as some of the faculty either don't have a PDF plug in or
-prefer to view HTML rather than PDF documents, I have taken to writing
-both PDF and HTML versions of my package documentation. However,
- doesn't work on a <TT>.dtx</TT> file so I used to
-convert them manually which is fine for one or two small documents,
-but becomes rather cumbersome as soon as I have large documents or a
-lot of packages. Therefore I decided to write the documentation
-separately, and use a Perl script to bundle everything together. It
-also has the added convenience in that I don't have to keep copying
-and pasting the character table every time I write a new package, and
-it saves the laborious task of writing the installation
-script<A NAME="tex2html2"
- HREF="#foot51"><SUP>1</SUP></A>.
-
-<P>
-This document is structured as follows: Section&nbsp;<A HREF="manual.html#sec:install">2</A>
-describes how to install the <TT>makedtx</TT> bundle,
-Section&nbsp;<A HREF="manual.html#sec:makedtx">3</A> gives an overview of the <TT>makedtx.pl</TT>
-Perl script, Section&nbsp;<A HREF="manual.html#sec:creatdtx">4</A> describes the
-<TT>creatdtx</TT> package, Section&nbsp;<A HREF="manual.html#sec:examples">5</A> illustrates the
-use of the <TT>makedtx</TT> bundle with examples and
-Section&nbsp;<A HREF="manual.html#sec:problems">6</A> gives a list of possible errors and their
-solutions.
-
-<P>
-
-<H1><A NAME="SECTION00030000000000000000"></A><A NAME="sec:install"></A><BR>
-Installation
-</H1>
-
-<P>
-You need to download both <TT>makedtx.dtx</TT> and
-<TT>makedtx.ins</TT>, and run the installation script through
-LaTeX:
-<P>
-<TT>latex makedtx.ins</TT>
-
-<P>
-The following files will be created:
-<DL>
-<DT><STRONG><TT>makedtx.pl</TT></STRONG></DT>
-<DD>Perl script
-</DD>
-<DT><STRONG><TT>creatdtx.sty</TT></STRONG></DT>
-<DD>LaTeX package for use with <TT>makedtx.pl</TT>
-</DD>
-<DT><STRONG><TT>creatdtx.perl</TT></STRONG></DT>
-<DD>Corresponding Perl script for use with LaTeX2HTML
-</DD>
-</DL>
-
-<P>
-If you are using UNIX/Linux etc you will need to make
-<TT>makedtx.pl</TT> executable using
-<TT>chmod</TT>:
-<P>
-<BR>
-<BR><TT>chmod a+x
-makedtx.pl</TT>
-<P>
-<BR>
-<BR>and place it somewhere on your
-path. If <TT>perl</TT> is located somewhere other than
-<TT>/usr/bin/</TT> you will need to edit the first line of
-<TT>makedtx.pl</TT>. (If you don't know where <TT>perl</TT> is
-located, you can use the command: <TT>which perl</TT>.) The package
-<TT>creatdtx.sty</TT> needs to be placed somewhere on the LaTeX path
-and <TT>creatdtx.perl</TT> should be placed in a directory searched by
-. (See the documentation for details.)
-
-<P>
-
-<H1><A NAME="SECTION00040000000000000000"></A><A NAME="sec:makedtx"></A><BR>
-makedtx.pl
-</H1>
-
-<P>
-The Perl script <TT>makedtx.pl</TT> has the following syntax:
-<P>
-<TT>makedtx.pl</TT> <TT>[</TT><EM>options</EM><TT>]</TT> <TT>-src</TT>
-<TT>"</TT><I>expr1</I><code>=&gt;</code><I>expr2</I><TT>"</TT>
-<TT>-doc</TT> <I>filename</I> <I>basename</I>
-
-<P>
-
-<H2><A NAME="SECTION00041000000000000000">
-Compulsory Arguments</A>
-</H2>
-
-<P>
-The very last argument <I>basename</I> is the basename of the
-<TT>.dtx</TT> and <TT>.ins</TT> files you want to create. The
-<TT>-doc</TT> <I>filename</I> switch indicates the file containing the
-documentation and <TT>-src</TT>
-<code>"</code><I>expr1</I><code>=&gt;</code><I>expr2</I><code>"</code> indicates the
-original source file(s), given by <I>expr1</I>, and the corresponding
-file name when it has been extracted from the <TT>.dtx</TT> file,
-given by <I>expr2</I>. This switch is a little complicated, so it's
-best described using examples.
-
-<P>
-Suppose you have your documentation in the file <TT>foodoc.tex</TT>,
-and the original source code is in the file <TT>foosrc.sty</TT>. You
-want to create the files <TT>foo.dtx</TT> and <TT>foo.ins</TT>. When
-you LaTeX <TT>foo.dtx</TT> you want the documentation as specified
-in <TT>foodoc.tex</TT> and when you LaTeX <TT>foo.ins</TT> you want
-the file <TT>foo.sty</TT> to be created, using the code specified in
-<TT>foosrc.sty</TT>. You will need to do:
-<PRE>
-makedtx.pl -src "foosrc\.sty=&gt;foo.sty" -doc foodoc.tex foo
-</PRE>
-
-<P>
-You may have multiple invocations of the <TT>-src</TT> switch. For
-example, suppose you also have the file <TT>barsrc.sty</TT> which you
-want to be extracted from the <TT>.dtx</TT> file as <TT>bar.sty</TT>,
-you can do:
-<PRE>
-makedtx.pl -src "foosrc\.sty=&gt;foo.sty" -src "barsrc\.sty=&gt;bar.sty" -doc foodoc.tex foo
-</PRE>
-Alternatively, you can use Perl-type regular expressions:
-<PRE>
-makedtx.pl -src "(.*)src\.sty=&gt;\1.sty" -doc foodoc.tex foo
-</PRE>
-(Note the use of double quotes to prevent shell expansion.)
-Appendix&nbsp;<A HREF="manual.html#sec:prex">A</A> gives a brief overview of Perl regular
-expressions for the uninitiated.
-
-<P>
-
-<H2><A NAME="SECTION00042000000000000000">
-Options</A>
-</H2>
-
-<P>
-<DL>
-<DT><STRONG><TT>-h</TT> or <TT>-help</TT></STRONG></DT>
-<DD>Prints on-line help, and exits.
-
-<P>
-</DD>
-<DT><STRONG><TT>-version</TT></STRONG></DT>
-<DD>Prints version number, and exits.
-
-<P>
-</DD>
-<DT><STRONG><TT>-v</TT></STRONG></DT>
-<DD>Uses verbose mode.
-
-<P>
-</DD>
-<DT><STRONG><TT>-dir</TT> <I>name</I></STRONG></DT>
-<DD>Specifies directory containing source
-files, as specified by the <TT>-src</TT> switch. For example, suppose
-you have source files <TT>foo.sty</TT>, <TT>bar.sty</TT> in the
-subdirectory <TT>sourcefiles</TT> you can do:
-<PRE>
-makedtx.pl -dir sourcefiles -src "(.*)\.sty=&gt;\1.sty" -doc foodoc.tex foo
-</PRE>
-
-<P>
-</DD>
-<DT><STRONG><TT>-op</TT> <I>character</I></STRONG></DT>
-<DD>sets the Perl pattern matching
-operator (the default is set to <TT>=</TT> symbol since the <TT>/</TT>
-character is used as the directory divider).
-
-<P>
-</DD>
-<DT><STRONG><TT>-askforoverwrite</TT></STRONG></DT>
-<DD>uses <TT>&#092;askforoverwritetrue</TT> in
-the installation script.
-
-<P>
-</DD>
-<DT><STRONG><TT>-noaskforoverwrite</TT></STRONG></DT>
-<DD>uses <TT>&#092;askforoverwritefalse</TT>
-in the installation script (default).
-
-<P>
-</DD>
-<DT><STRONG><TT>-noins</TT></STRONG></DT>
-<DD>Don't create the installation script
-(<TT>.ins</TT> file). This is useful if you want to tweak the file
-manually and you don't want your modifications overwritten.
-
-<P>
-</DD>
-<DT><STRONG><TT>-preamble</TT> <I>text</I></STRONG></DT>
-<DD>Set the preamble to
-<TT>text</TT>. The default preamble is:
-<P>
-<TT>
- <I>basename</I>.dtx
- Copyright <I>date</I> <I>author</I>
-</TT>
-<P>
-<TT>This work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
- The latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of LaTeX
- version 2005/12/01 or later.
-</TT>
-<P>
-<TT>This work has the LPPL maintenance status `maintained'.
-</TT>
-<P>
-<TT>The Current Maintainer of this work is <I>author</I>.
-</TT>
-<P>
-<TT>This work consists of the files <I>basename</I>.dtx and
- <I>basename</I>.ins and the derived files <I>file list</I>.
-</TT>
-
-<P>
-where <I>date</I> is the copyright date, and <I>author</I> is the
-author's name (see below).
-
-<P>
-<B>Note that this has been changed as of makedtx v0.94.
-Older versions of makedtx do not conform to any of the free
-licenses.</B>
-
-<P>
-</DD>
-<DT><STRONG><TT>-license</TT> <I>name</I></STRONG></DT>
-<DD>This sets the preamble to
-the license text for the license <I>name</I>. Currently <I>name</I>
-may be either <TT>lppl</TT> (the default, which produces the
-default preamble detailed above), <TT>bsd</TT> or <TT>gpl</TT>.
-You may use either <TT>-license</TT> or <TT>-preamble</TT>,
-but not both. (If you have used the <TT>-preamble</TT> switch, the
-<TT>-license</TT> switch will be ignored.)
-
-<P>
-</DD>
-<DT><STRONG><TT>-postamble</TT> <I>text</I></STRONG></DT>
-<DD>Set the postamble to
-<TT>text</TT>. If this is omitted the <TT>&#092;postamble</TT> command is
-omitted from the installation script.
-
-<P>
-</DD>
-<DT><STRONG><TT>-author</TT> <I>name</I></STRONG></DT>
-<DD>The author's name (as used in the
-default preamble). If omitted the user's name is used.
-
-<P>
-</DD>
-<DT><STRONG><TT>-date</TT> <I>text</I></STRONG></DT>
-<DD>The copyright date (as used in the
-default preamble). If omitted the current year is used.
-
-<P>
-</DD>
-<DT><STRONG><TT>-stopeventually</TT> <I>text</I></STRONG></DT>
-<DD>Insert <I>text</I> into the
-argument of <TT>&#092;StopEventually</TT>. For example:
-<code>-stopeventually "\\PrintIndex"</code> will result in the line:
-<TT>&#092;StopEventually</TT><code>{\PrintIndex}</code>. If <TT>makedtx.pl</TT>
-encounters a <TT>&#092;StopEventually</TT> command within the document,
-this will be used instead. If there is no <TT>&#092;StopEventually</TT>
-command in the document and the <TT>-stopeventually</TT> switch is
-absent <TT>&#092;StopEventually{}</TT> will be inserted in the DTX
-file.
-
-<P>
-</DD>
-<DT><STRONG><TT>-prefinale</TT> <I>text</I></STRONG></DT>
-<DD>Inset <I>text</I> immediately prior to <TT>&#092;Finale</TT>
-in the dtx file.
-
-<P>
-</DD>
-<DT><STRONG><TT>-setambles</TT> <TT>"</TT><I>expr</I><TT>=&#62;</TT><I>text</I><TT>"</TT></STRONG></DT>
-<DD>Sets the pre- and postambles for files matching <I>expr</I> within the
-<TT>&#092;file</TT> command in the installation script. To illustrate this,
-let's suppose you have source files <TT>foo.sty</TT>, <TT>bar.sty</TT>
-and <TT>foobar.pl</TT> in the subdirectory <TT>sourcefiles</TT>.
-Since <TT>foo.sty</TT> and <TT>bar.sty</TT> are LaTeX files, they
-should have pre- and postambles, but <TT>foobar.pl</TT> is a Perl
-file, and since the percent symbol (%) is not a comment character in
-Perl, there should be no pre- and postambles for this file. Therefore
-you would need to do something like:
-<PRE>
-makedtx.pl -dir sourcefiles -src "(.*)\.sty=&gt;\1.sty" -src "foobar.pl=&gt;foobar.pl"
--setambles "foobar\.pl=&gt;\\nopreamble\\nopostamble" -doc foodoc.tex foo
-</PRE>
-(Note that the line is only broken to fit it onto the page, and there
-should be no line break when entering at the command prompt.)
-
-<P>
-If the argument to <TT>-setambles</TT> contains the string
-<code>\\nopreamble</code>, the character table will be excluded from the
-corresponding files. So, in the above example, when you do:
-<code>latex foo.ins</code> the resulting files <TT>foo.sty</TT> and
-<TT>bar.sty</TT> will contain the character table, but
-<TT>foobar.pl</TT> won't. (If for some reason you don't want a
-preamble but you do want the character table included use
-<code>\\usepreamble\\empty</code> instead of <code>\\nopreamble</code>.
-Conversely, if you want a preamble but don't want the character table
-do something like <code>\\nopreamble\\usepreamble\\defaultpreamble</code>.
-
-<P>
-Note that the <code>=&gt;</code><I>text</I> part is optional. If it is
-omitted, <I>text</I> is assumed to be empty.
-
-<P>
-</DD>
-<DT><STRONG><TT>-macrocode</TT> <TT>"</TT><I>expr</I><TT>"</TT></STRONG></DT>
-<DD>If source
-file matches the Perl regular expression given by <I>expr</I>, the
-source code is inserted into a <TT>macrocode</TT> environment in the
-DTX file.
-
-<P>
-</DD>
-<DT><STRONG><TT>-comment</TT> <TT>"</TT><I>expr</I><TT>"</TT></STRONG></DT>
-<DD>If the source file matches the Perl regular expression given by
-<I>expr</I>, the source code will be inserted between <TT>&#092;iffalse</TT>
-<TT>&#092;fi</TT> commands. The contents of this file will be included in the
-DTX file, but will be excluded from the documentation. Since this
-is provided mainly for non-TeX files (such as Perl scripts) the
-<TT>-comment</TT> switch will typically need to be used in conjunction
-with <TT>-macrocode</TT>.
-
-<P>
-</DD>
-<DT><STRONG><TT>-codetitle</TT> <TT>"</TT><I>title</I><TT>"</TT></STRONG></DT>
-<DD>This sets the title for the code section. The default is
-<TT>The Code</TT>.
-</DD>
-</DL>
-
-<P>
-
-<H1><A NAME="SECTION00050000000000000000"></A>
-<A NAME="sec:creatdtx"></A><BR>
-The creatdtx Package
-</H1>
-
-<P>
-The documentation source code, as specified using the <TT>-doc</TT>
-switch will typically be a standard LaTeX document using the
-<TT>ltxdoc</TT> class file. Unlike the DTX file, there is no
-<TT>&#092;DocInput</TT> command, and the lines do not begin with a percent
-symbol, which means that the document can be, say, passed to the
- converter, or some other application that would
-otherwise be confused by a DTX file. The <TT>creatdtx</TT> package
-can be used in this document using
-<PRE>
-\usepackage{creatdtx}
-</PRE>
-although this package will be not be included in the DTX file by
-<TT>makedtx.pl</TT>. There is only one command defined in this
-package:<TT>&#092;ifmakedtx{</TT><EM>dtx text</EM><TT>}{</TT><EM>non dtx text</EM><TT>}</TT>. The first
-argument <I>dtx text</I> will be copied to the DTX file by
-<TT>makedtx.pl</TT>, but the second argument <I>non dtx text</I>
-won't. However, if you LaTeX the document, the first argument will
-be ignored, and the second argument will be used.
-
-<P>
-For example, if your code (in <TT>foodoc.tex</TT>) contains the
-line:
-<P>
-<BR>
-<BR><TT><TT>&#092;ifmakedtx</TT>{}{<TT>&#092;usepackage</TT>{html}}</TT>
-
-<P>
-<BR>
-<BR>the <TT>html</TT> package will only be
-loaded if you LaTeX <TT>foodoc.tex</TT>, but not when you LaTeX <TT>foo.dtx</TT>.
-
-<P>
-The Perl script <TT>creatdtx.perl</TT> ignores the following commands
-(and any associated arguments): <TT>&#092;OnlyDescription</TT>,
-<TT>&#092;RecordChanges</TT>, <TT>&#092;MakeShortVerb</TT>, <TT>&#092;DeleteShortVerb</TT>,
-<TT>&#092;DoNotIndex</TT>, <TT>&#092;EnableCrossrefs</TT>, <TT>&#092;CodelineIndex</TT>,
-<TT>&#092;GetFileInfo</TT>, <TT>&#092;PrintChanges</TT>, <TT>&#092;changes</TT>, <TT>&#092;CheckSum</TT>,
-<TT>&#092;DescribeMacro</TT> and <TT>&#092;DescribeEnvironment</TT>. So even if you don't
-use the <TT>&#092;ifmakedtx</TT> command, using the <TT>creatdtx</TT> package
-will help ensure that extraneous text does not appear in the HTML
-document when using .
-
-<P>
-As from version 0.93b, <TT>creatdtx.perl</TT> also defines the
-commands <TT>&#092;cs</TT>, <TT>&#092;marg</TT>, <TT>&#092;oarg</TT> and <TT>&#092;parg</TT>, since there
-is no implementation of the <TT>ltxdoc</TT> class file.
-
-<P>
-
-<H1><A NAME="SECTION00060000000000000000"></A>
-<A NAME="sec:examples"></A><BR>
-Examples
-</H1>
-
-<P>
-Let's first consider a very simple example. Suppose you want to
-create a package that redefines <TT>&#092;today</TT> so that the date is
-displayed in the form: yyyy-m-d. Let's call this package
-<TT>dashdate</TT>. The file <TT>dashdate.sty</TT> should look
-something like:
-<PRE>
- % First define package:
- % \begin{macrocode}
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{dashdate}
- % \end{macrocode}
- % Redefine |\today| command:
- % \begin{macrocode}
- \renewcommand{\today}{\the\year-\the\month-\the\day}
- % \end{macrocode}
-</PRE>
-Now let's make some (very brief) documentation. Let's call the file,
-say <TT>manual.tex</TT><A NAME="tex2html3"
- HREF="#foot477"><SUP>2</SUP></A>:
-<PRE>
-\documentclass{ltxdoc}
-\usepackage{creatdtx}
-
-\begin{document}
-\title{A Sample Package}
-\author{AN Other}
-\maketitle
-
-The \texttt{dashdate} package redefines |\today|
-to produce the current date in the form: yyyy-m-d.
-\end{document}
-</PRE>
-Suppose you have saved <TT>dashdate.sty</TT> and <TT>manual.tex</TT>
-in the subdirectory <TT>source</TT>. You can now create the
-<TT>.dtx</TT> and <TT>.ins</TT> file using the command:
-<PRE>
-makedtx.pl -author "AN Other" -dir source -src "dashdate\.sty=&gt;dashdate.sty"
--doc source/manual.tex dashdate
-</PRE>
-The file <TT>dashdate.dtx</TT> is created, and contains the following
-code:
-<PRE>
- %\iffalse
- % dashdate.dtx generated using makedtx.pl version 0.9b (c) Nicola Talbot
- % Command line args:
- % -dir "source"
- % -src "dashdate\.sty=&gt;dashdate.sty"
- % -author "AN Other"
- % -doc "source/manual.tex"
- % dashdate
- % Created on 2005/2/10 22:22
- %\fi
- %\iffalse
- %&lt;*package&gt;
- %% \CharacterTable
- %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
- %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
- %% Digits \0\1\2\3\4\5\6\7\8\9
- %% Exclamation \! Double quote \" Hash (number) \#
- %% Dollar \$ Percent \% Ampersand \&amp;
- %% Acute accent \' Left paren \( Right paren \)
- %% Asterisk \* Plus \+ Comma \,
- %% Minus \- Point \. Solidus \/
- %% Colon \: Semicolon \; Less than \&lt;
- %% Equals \= Greater than \&gt; Question mark \?
- %% Commercial at \@ Left bracket \[ Backslash \\
- %% Right bracket \] Circumflex \^ Underscore \_
- %% Grave accent \` Left brace \{ Vertical bar \|
- %% Right brace \} Tilde \~}
- %&lt;/package&gt;
- %\fi
- % \iffalse
- % Doc-Source file to use with LaTeX2e
- % Copyright (C) 2005 AN Other, all rights reserved.
- % \fi
- % \iffalse
- %&lt;*driver&gt;
- \documentclass{ltxdoc}
-
- \begin{document}
- \DocInput{dashdate.dtx}
- \end{document}
- %&lt;/driver&gt;
- %\fi
- %\title{A Sample Package}
- %\author{AN Other}
- %\maketitle
- %
- %The \texttt{dashdate} package redefines "\today"
- %to produce the current date in the form: yyyy-m-d.
- %\end{document}
- %
- %\StopEventually{}
- %\section{The Code}
- %\iffalse
- % \begin{macrocode}
- %&lt;*dashdate.sty&gt;
- % \end{macrocode}
- %\fi
- % First define package:
- % \begin{macrocode}
- \NeedsTeXFormat{LaTeX2e}
- \ProvidesPackage{dashdate}
- % \end{macrocode}
- % Redefine |\today| command:
- % \begin{macrocode}
- \renewcommand{\today}{\the\year-\the\month-\the\day}
- % \end{macrocode}
- %\iffalse
- % \begin{macrocode}
- %&lt;/dashdate.sty&gt;
- % \end{macrocode}
- %\fi
- %\Finale
- \endinput
-</PRE>
-The installation file <TT>dashdate.ins</TT> looks like:
-<PRE>
- % dashdate.ins generated using makedtx.pl version 0.94b 2007/8/19 22:22
- \input docstrip
-
- \preamble
- dashdate.dtx
- Copyright 2007 AN Other
-
- This work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
- The latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of LaTeX
- version 2005/12/01 or later.
-
- This work has the LPPL maintenance status `maintained'.
-
- The Current Maintainer of this work is AN Other.
-
- This work consists of the files dashdate.dtx and
- dashdate.ins and the derived file dashdate.sty.
- \endpreamble
-
- \askforoverwritefalse
-
- \generate{\file{dashdate.sty}{\usepreamble\defaultpreamble
- \usepostamble\defaultpostamble\from{dashdate.dtx}{dashdate.sty,package}}
- }
-
- \endbatchfile
-</PRE>
-Note that the command <code>\usepackage{creatdtx}</code> has not been
-transcribed to <TT>dashdate.dtx</TT> (although in this simple example
-it's not really needed).
-
-<P>
-Now let's extend the example: suppose you want to create an analogous
-Perl script for use with . This will need to be called
-<TT>dashdate.perl</TT> and will look something like:
-<PRE>
-package main;
-
-sub do_cmd_today{
- local($_) = @_;
- local($today) = &amp;get_date();
- $today =~ s|(\d+)/(\d+)/(\d+)|$3-$1-$2|;
- "$today$_";
-}
-
-1;
-</PRE>
-You will now need to call <TT>makedtx.pl</TT> as follows:
-<PRE>
-makedtx.pl -author "AN Other" -dir source -src "dashdate\.sty=&gt;dashdate.sty"
--src "dashdate\.perl=&gt;dashdate.perl"
--setambles "dashdate\.perl=&gt;\\nopreamble\\nopostamble"
--macrocode "dashdate\.perl" -doc source/manual.tex dashdate
-</PRE>
-(Note that the line is only broken to allow it to fit onto the page,
-there should be no line break when you enter it on the command line.)
-Alternatively, you could save typing and do:
-<PRE>
-makedtx.pl -author "AN Other" -dir source -src "dashdate\.(.*)=&gt;dashdate.\1"
--setambles "dashdate\.perl=&gt;\\nopreamble\\nopostamble" -macrocode "dashdate\.perl"
--doc source/manual.tex dashdate
-</PRE>
-Note the use of the <TT>-setambles</TT> switch which suppresses the
-insertion of text at the start and end of the Perl script which would
-only confuse Perl. Note also the use of the <TT>-macrocode</TT>
-switch. This is not needed for <TT>dashdate.sty</TT> since it has
-already been included in the source code, but since % is not a
-comment character in Perl, the <TT>macrocode</TT> environment is not
-included in the source code, and needs to be added. (If you are
-unfamiliar with DocStrip and the use of the <TT>macrocode</TT>
-environment, I suggest you read either <I>A guide to
-LaTeX</I>&nbsp;[<A
- HREF="manual.html#Kopka98">2</A>, Appendix&nbsp;D] or <I>The LaTeX companion</I>&nbsp;[<A
- HREF="manual.html#Goossens93">1</A>, Chapter&nbsp;14].)
-
-<P>
-It's likely that you may not want the Perl code to appear in the
-document, but you still want it included in the DTX file. In addition
-to the <TT>-macrocode</TT> switch, you would then also need to use
-the <TT>-comment</TT> switch:
-<PRE>
-makedtx.pl -author "AN Other" -dir source -src "dashdate\.(.*)=&gt;dashdate.\1"
--setambles "dashdate\.perl=&gt;\\nopreamble\\nopostamble" -macrocode "dashdate\.perl"
--comment "dashdate\.perl" -doc source/manual.tex dashdate
-</PRE>
-
-<P>
-As another example, consider the <TT>datetime</TT> package. Version
-2.42 of this package has 2 <TT>.sty</TT> files and 42 <TT>.def</TT>
-files. The documentation is written in the file <TT>manual.tex</TT>,
-and the <TT>.sty</TT> and <TT>.def</TT> files are saved in a
-subdirectory called <TT>source</TT>. Since these are the only files
-in this directory, they can easily be merged into one <TT>.dtx</TT>
-file using:
-<PRE>
-makedtx.pl -author "Nicola Talbot" -dir source -src "(.+)\.(.+)=&gt;\1.\2"
--doc manual.tex datetime
-</PRE>
-This creates the files <TT>datetime.dtx</TT> and <TT>datetime.ins</TT> which can then be distributed. The PDF version
-of the documentation is obtained by doing:
-<PRE>
-pdflatex datetime.dtx
-</PRE>
-and the HTML version (<TT>manual.html</TT>) is obtained by doing:
-<PRE>
-latex2html -split 0 -nonavigation -nofootnode -numbered_footnotes -noinfo manual
-</PRE>
-Any minor differences between the HTML and PDF versions are dealt by
-using <TT>&#092;ifmakedtx</TT> in the original file <TT>manual.tex</TT>.
-
-<P>
-
-<H1><A NAME="SECTION00070000000000000000"></A>
-<A NAME="sec:problems"></A><BR>
-Troubleshooting
-</H1>
-
-<P>
-The <TT>makedtx</TT> bundle has only been tested under Linux using
-Perl v5.6.0. There are no guarantees whether or not it will work on
-other operating systems or on different versions (in fact, there are
-no guarantees or warranties at all).
-
-<P>
-
-<H2><A NAME="SECTION00071000000000000000">
-Known Bugs</A>
-</H2>
-
-<P>
-It's possible to confuse <TT>makedtx.pl</TT> by placing either the
-command <TT>&#092;end{</TT><EM>document</EM><TT>}</TT> or the command <TT>&#092;ifmakedtx</TT> in a
-<TT>&#092;verb</TT> command, or by having the <TT>&#092;ifmakedtx</TT> command on the same
-line as <TT>&#092;begin{</TT><EM>document</EM><TT>}</TT>. You will also need to take care
-about lines beginning with a percent symbol (%) in the documentation,
-as this will get converted into a line beginning with <code>%%</code> in the
-<TT>.dtx</TT> file, which has a special meaning. Either place a space
-immediately prior the percent symbol, or do <code>\relax%</code> if you
-really don't want the extra space (or place your comment in an
-<TT>&#092;iffalse</TT> ... <TT>&#092;fi</TT> conditional).
-
-<P>
-
-<H2><A NAME="SECTION00072000000000000000">
-Possible errors encountered using <TT>makedtx.pl</TT></A>
-</H2>
-
-<P>
-Note: be careful to use double quotes around arguments that contain
-characters that the shell might try interpreting, e.g. <code>*</code> or
-<code>&gt;</code>.
-
-<P>
-Syntax error messages:
-
-<OL>
-<LI><TT>No document source specified (missing -doc)</TT>
-
-<P>
-You must use the <TT>-doc</TT> switch.
-
-<P>
-</LI>
-<LI><TT>No source code specified (missing -src)</TT>
-
-<P>
-You must specify at least one <TT>-src</TT> switch.
-
-<P>
-</LI>
-<LI><TT>No basename specified</TT>
-
-<P>
-You must specify the basename of the <TT>.dtx</TT> and <TT>.ins</TT> files. This should
-be the last argument passed to <TT>makedtx.pl</TT>.
-
-<P>
-</LI>
-<LI><TT>-src ... argument invalid (no output file specified)</TT>
-
-<P>
-You have omitted the <code>=&gt;</code> separator in the argument of the
-<TT>-src</TT> switch.
-
-<P>
-</LI>
-<LI><TT>-src argument ... invalid (too many =&gt; specified)</TT>
-
-<P>
-You have used too many <code>=&gt;</code> separators in the argument of the
-<TT>-src</TT> switch. (Similarly for the <TT>-setambles</TT> switch.)
-</LI>
-</OL>
-
-<P>
-
-<P>
-
-<H1><A NAME="SECTION00080000000000000000"></A>
-<A NAME="sec:prex"></A><BR>
-Perl Regular Expressions
-</H1>
-
-<P>
-This section gives a very brief overview of Perl regular expressions. For more detail, look at the Perl
-documentation (use <code>man perlre</code> for the man page.)
-
-<P>
-<TABLE CELLPADDING=3>
-<TR><TD ALIGN="LEFT"><code>\</code></TD>
-<TD ALIGN="LEFT">Quote the next character</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>.</code></TD>
-<TD ALIGN="LEFT">Match any character</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>|</code></TD>
-<TD ALIGN="LEFT">Alternation</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>()</code></TD>
-<TD ALIGN="LEFT">Grouping</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>[]</code></TD>
-<TD ALIGN="LEFT">Character class</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>*</code></TD>
-<TD ALIGN="LEFT">Match 0 or more times</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>+</code></TD>
-<TD ALIGN="LEFT">Match 1 or more times</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>?</code></TD>
-<TD ALIGN="LEFT">Match 1 or 0 times</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>{n}</code></TD>
-<TD ALIGN="LEFT">Match exactly <TT>n</TT> times</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>{n,}</code></TD>
-<TD ALIGN="LEFT">Match at least <TT>n</TT> times</TD>
-</TR>
-<TR><TD ALIGN="LEFT"><code>{n,m}</code></TD>
-<TD ALIGN="LEFT">Match at least <TT>n</TT> but no more than <TT>m</TT> times.</TD>
-</TR>
-</TABLE>
-
-<P>
-In the replacement text, a backslash followed by a number <I>n</I> indicates the text from the <I>n</I>th group.
-
-<P>
-For example, suppose you have the following files:
-<PRE>
-abcsrc.sty
-abcsrc.bst
-abcsrc.perl
-foosrc.sty
-foobarsrc.sty
-</PRE>
-then if you pass the following switch to <TT>makedtx.pl</TT>:
-
-<UL>
-<LI><code>-src "abcsrc\.([styb]+)=&gt;abc.\1"</code>
-will be equivalent to:
-<PRE>
--src "abcsrc.sty=&gt;abc.sty" -src "abcsrc.bst=&gt;abc.bst"
-</PRE>
-since <code>[styb]+</code> will match one or more of the letters <TT>styb</TT> (so it will match <TT>sty</TT> and <TT>bst</TT>).
-<code>\1</code> indicates the text found in the first group, which in this example will either be <TT>sty</TT> or <TT>bst</TT>.
-
-<P>
-</LI>
-<LI><code>-src "abcsrc\.(.+)=&gt;abc.\1"</code>
-will be equivalent to:
-<PRE>
--src "abcsrc.sty=&gt;abc.sty" -src "abcsrc.bst=&gt;abc.bst" -src "abcsrc.perl=&gt;abc.perl"
-</PRE>
-Note that a full stop represents any character so <TT>.+</TT> means any string of length 1 or more, whereas
-<code>\.</code> means an actual full stop character.
-
-<P>
-</LI>
-<LI><code>-src "foo(.*)src\.sty=&gt;foo\1.sty"</code>
-will be equivalent to:
-<PRE>
--src "foosrc.sty=&gt;foo.sty" -src "foobarsrc.sty=&gt;foobar.sty"
-</PRE>
-
-<P>
-</LI>
-<LI><code>-src "(.+)src\.(.+)=&gt;\1.\2"</code>
-will be equivalent to
-<PRE>
--src "abcsrc.sty=&gt;abc.sty"
--src "abcsrc.bst=&gt;abc.bst"
--src "abcsrc.perl=&gt;abc.perl"
--src "foosrc.sty=&gt;foo.sty"
--src "foobarsrc.sty=&gt;foobar.sty"
-</PRE>
-
-<P>
-</LI>
-</UL>
-
-<P>
-
-<P>
-
-
-<H2><A NAME="SECTION00090000000000000000">
-Bibliography</A>
-</H2><DL COMPACT><DD><P></P><DT><A NAME="Goossens93">1</A>
-<DD> The LaTeX companion. Michel&nbsp;Goossens, Frank&nbsp;Mittelbach and Alexander&nbsp;Samarin.
-Addison-Wesley 1993.
-
-<P>
-<P></P><DT><A NAME="Kopka98">2</A>
-<DD> A guide to LaTeX. Helmut&nbsp;Kopka and Patrick&nbsp;W.&nbsp;Daly. Addison-Wesley 1998.
-</DL>
-
-<BR><HR><H4>Footnotes</H4>
-<DL>
-<DT><A NAME="foot51">...
-script</A><A
- HREF="manual.html#tex2html2"><SUP>1</SUP></A></DT>
-<DD>or at least, it's laborious if there are rather a lot
-of files associated with a package
-
-</DD>
-<DT><A NAME="foot477">...manual.tex</A><A
- HREF="manual.html#tex2html3"><SUP>2</SUP></A></DT>
-<DD>Note: if you want to use
- on this document, you will need to use, e.g.,
-<TT>&#092;verb!<TT>&#092;today</TT>!</TT> instead of
-<TT>&#124;<TT>&#092;today</TT>&#124;</TT> since it doesn't recognise
-<TT>&#092;MakeShortVerb</TT>.
-
-</DD>
-</DL><BR><HR>
-<ADDRESS>
-<A href=http://theoval.cmp.uea.ac.uk/~nlct/>Nicola L. C. Talbot</A>.
-<A HREF=http://www.cmp.uea.ac.uk/>School of Computing Sciences</A>.
-<A HREF=http://www.uea.ac.uk/>University of East Anglia.</A>
-Last Modified: 2007-08-19
-</ADDRESS>
-</BODY>
-</HTML>
diff --git a/Master/texmf-dist/doc/support/makedtx/makedtx-version.tex b/Master/texmf-dist/doc/support/makedtx/makedtx-version.tex
new file mode 100644
index 00000000000..63853f3add8
--- /dev/null
+++ b/Master/texmf-dist/doc/support/makedtx/makedtx-version.tex
@@ -0,0 +1,44 @@
+%%
+%% This is file `makedtx-version.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% makedtx.dtx (with options: `makedtx-version.tex,package')
+%%
+%% makedtx.dtx
+%% Copyright 2018 Nicola L.C. Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola L.C. Talbot.
+%%
+%% This work consists of the files makedtx.dtx and makedtx.ins and the derived files CHANGES.org, makedtx-version.tex, latexmkrc.pl, createdtx.sty, makedtx.pl.
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\newcommand*\version{v1.2}
+\endinput
+%%
+%% End of file `makedtx-version.tex'.
diff --git a/Master/texmf-dist/doc/support/makedtx/makedtx.pdf b/Master/texmf-dist/doc/support/makedtx/makedtx.pdf
index 79a8b5e822b..e5089a6e067 100644
--- a/Master/texmf-dist/doc/support/makedtx/makedtx.pdf
+++ b/Master/texmf-dist/doc/support/makedtx/makedtx.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/makedtx/makedtx.pl b/Master/texmf-dist/scripts/makedtx/makedtx.pl
index 41516e79920..772ea33ff99 100755
--- a/Master/texmf-dist/scripts/makedtx/makedtx.pl
+++ b/Master/texmf-dist/scripts/makedtx/makedtx.pl
@@ -3,8 +3,8 @@
# File : makedtx
# Author : Nicola L. C. Talbot
# Date : 29 Oct 2004
-# Last Modified : 19 Aug 2007
-# Version : 0.94b
+# Last Modified : 2017-04-08
+# Version : 1.2
# usage : makedtx [options] -src <expr>=><expr> -doc <filename> <basename>
#
@@ -16,35 +16,49 @@
use Getopt::Long;
-$version = "0.94b";
+$version = "1.2";
# process command line options
%optctl = ();
+# v1.1 added section switch
&GetOptions(\%optctl, "h", "help", "v", "src=s@", "doc=s",
"dir=s", "op=s", "askforoverwrite!", "ins!",
-"preamble=s", "postamble=s", "setambles=s@", "macrocode=s@",
+"preamble=s", "postamble=s", "setambles=s@", "testmode", "macrocode=s@",
"author=s", "date=s", "stopeventually=s",
"prefinale=s", "codetitle=s", "comment=s@",
-"version", "license=s") or &syntaxerror();
+"version", "license=s", "section=s") or &syntaxerror();
$srcdir = ".";
$patternop = "=";
$verbose = 0;
$noins = 0;
+$testmode = 0;
$askforoverwrite = 0;
$preamble = "";
$postamble = "";
-$author = (getpwuid($<))[6] || 'Unknown';
+my $author;
+if ($^O =~ m/MSWin/)
+{
+ $author = $ENV{"USERNAME"};
+ if ($author eq ""){ $author = 'Unknown';}
+}
+else
+{
+ $author = (getpwuid($<))[6] || 'Unknown';
+}
$stopeventually = "";
$prefinale = "";
$codetitle = "The Code";
+$section = "section";
$license = "lppl";
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
$year = $year + 1900;
+$copyright_date = $year;
+$creation_date = "$year/" . ($mon+1) . "/$mday $hour:" . ($min<10?"0$min" : $min);
foreach $setting (keys %optctl)
{
@@ -54,7 +68,8 @@ foreach $setting (keys %optctl)
}
elsif ($setting eq "version")
{
- die "makedtx version $version\n";
+ print "makedtx version $version\n";
+ exit 0;
}
elsif ($setting eq "doc")
{
@@ -106,7 +121,7 @@ foreach $setting (keys %optctl)
}
elsif ($setting eq "date")
{
- $year = $optctl{$setting};
+ $copyright_date = $optctl{$setting};
}
elsif ($setting eq "stopeventually")
{
@@ -120,6 +135,20 @@ foreach $setting (keys %optctl)
{
$codetitle = $optctl{$setting};
}
+ elsif ($setting eq "section")
+ {
+ $section = $optctl{$setting};
+ }
+ elsif ($setting eq "testmode")
+ {
+ $testmode = $optctl{$setting};
+ if($testmode)
+ {
+ $version = "x.y";
+ $copyright_date = "YYYY";
+ $creation_date = "YYYY/MM/DD hh:mm";
+ }
+ }
elsif ($setting eq "comment")
{
@comment = @{ $optctl{$setting} };
@@ -150,7 +179,7 @@ if ($#source == -1)
&syntaxerror();
}
-open DTX, ">$basename.dtx" or die "Can't open '$basename.dtx'\n";
+open DTX, ">:unix","$basename.dtx" or die "Can't open '$basename.dtx'\n";
if ($verbose)
{
@@ -213,14 +242,15 @@ if ($preamble eq "")
{
if ($license eq "lppl")
{
- $preamble = <<_END_LICENSE
+# v1.2 fixed typo in preamble
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright $year $author
+ Copyright $copyright_date $author
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
@@ -234,10 +264,10 @@ _END_LICENSE
}
elsif ($license eq 'bsd')
{
- $preamble = <<_END_LICENSE
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright (c) $year $author
+ Copyright (c) $copyright_date $author
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -266,10 +296,10 @@ _END_LICENSE
}
elsif ($license eq 'gpl')
{
- $preamble = <<_END_LICENSE
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright (c) $year $author
+ Copyright (c) $copyright_date $author
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
@@ -299,53 +329,60 @@ _END_LICENSE
. " " . join(', ', @outputfiles) . ".\n";
}
-open DOC, $docsrc or die "Can't open '$docsrc'\n";
+open DOC, '<:crlf',$docsrc or die "Can't open '$docsrc'\n";
print DTX "\%\\iffalse\n";
print DTX "\% $basename.dtx generated using makedtx version $version (c) Nicola Talbot\n";
print DTX "\% Command line args:\n";
+@cmdline_args = ();
foreach $setting (keys %optctl)
{
if ($setting eq "src")
{
foreach $source (@source)
{
- print DTX "\% -src \"$source\"\n";
+ push @cmdline_args ,"-src \"$source\"";
}
}
elsif ($setting eq "setambles")
{
foreach $setamble (@setambles)
{
- print DTX "\% -setambles \"$setamble\"\n";
+ push @cmdline_args ,"-setambles \"$setamble\"";
}
}
elsif ($setting eq "macrocode")
{
foreach $macrocode (@macrocode)
{
- print DTX "\% -macrocode \"$macrocode\"\n";
+ push @cmdline_args ,"-macrocode \"$macrocode\"";
}
}
elsif ($setting eq "comment")
{
foreach $comment (@comment)
{
- print DTX "\% -comment \"$comment\"\n";
+ push @cmdline_args ,"-comment \"$comment\"";
}
}
else
{
$val = $optctl{$setting};
$val=~s/\\/\\\\/g;
- print DTX "\% -", $setting, " \"", $val, "\"\n";
+ push @cmdline_args ,("-" . $setting . " \"" . $val . "\"");
}
}
+if($testmode){
+ @cmdline_args = sort @cmdline_args;
+}
+foreach $arg (@cmdline_args){
+ print DTX "\% ", $arg , "\n";
+}
print DTX "\% $basename\n";
-print DTX "\% Created on $year/", $mon+1, "/$mday $hour:", $min<10?"0$min" : $min,"\n";
+print DTX "\% Created on $creation_date\n";
print DTX "\%\\fi\n";
print DTX "\%\\iffalse\n";
print DTX "\%<*package>\n";
@@ -369,7 +406,7 @@ print DTX "\%\\fi\n";
print DTX "\% \\iffalse\n";
print DTX "\% Doc-Source file to use with LaTeX2e\n";
-print DTX "\% Copyright (C) $year $author, all rights reserved.\n";
+print DTX "\% Copyright (C) $copyright_date $author, all rights reserved.\n";
print DTX "\% \\fi\n";
# driver
@@ -381,7 +418,7 @@ $indoc=0;
while (<DOC>)
{
- s/\\usepackage{creatdtx}//;
+ s/\\usepackage\{creatdtx}//;
$restofline = $_;
@@ -441,7 +478,7 @@ while (<DOC>)
print DTX $line;
- if ($line=~/\\begin{document}/)
+ if ($line=~/\\begin\{document}/)
{
$indoc = 1;
@@ -461,12 +498,12 @@ print DTX "\%";
while (<DOC>)
{
- if (/\\begin{verbatim}/)
+ if (/\\begin\{verbatim}/)
{
$inverb=1;
}
- if (/\\end{verbatim}/)
+ if (/\\end\{verbatim}/)
{
$inverb=0;
}
@@ -532,11 +569,11 @@ while (<DOC>)
$line = $beginline . $restofline;
- if (($line=~/\\end{document}/) and not $inverb)
+ if (($line=~/\\end\{document}/) and not $inverb)
{
$indoc=0;
- $line=~s/\\end{document}//;
+ $line=~s/\\end\{document}//;
}
$line=~s/\n/\n\%/mg;
@@ -553,7 +590,12 @@ if ($stopfound==0)
print DTX "\%\\StopEventually{$stopeventually}\n";
}
-print DTX "\%\\section{$codetitle}\n";
+# v1.0 added check
+if ($codetitle)
+{
+ # v1.1 added section
+ print DTX "\%\\$section\{$codetitle\}\n";
+}
for (my $idx = 0; $idx <= $#derivedfiles; $idx++)
{
@@ -565,7 +607,7 @@ for (my $idx = 0; $idx <= $#derivedfiles; $idx++)
print "$srcdirfile -> $_ \n";
}
- open SRC, $thisinfile or die "Can't open $thisinfile\n";
+ open SRC, "<:crlf", $thisinfile or die "Can't open $thisinfile\n";
print DTX "\%\\iffalse\n";
print DTX "\% \\begin{macrocode}\n";
@@ -628,9 +670,9 @@ close DTX;
if (!$noins)
{
- open INS, ">$basename.ins" or die "Can't open '$basename.ins'\n";
+ open INS, ">:unix","$basename.ins" or die "Can't open '$basename.ins'\n";
- print INS "\% $basename.ins generated using makedtx version $version $year/",$mon+1,"/$mday $hour:", $min<10?"0$min":$min,"\n";
+ print INS "\% $basename.ins generated using makedtx version $version $creation_date\n";
print INS "\\input docstrip\n\n";
print INS "\\preamble\n";
@@ -763,6 +805,7 @@ sub help
print "-macrocode <expr> : surround any file which matches <expr> in a macrocode environment\n";
print "-comment <expr> : surround any file which matches <expr> with \\iffalse \\fi pair\n";
print "-codetitle <text> : The title for the documented code section (default: The Code)\n";
+ print "-section <cs> : The sectioning command to use for the documented code section (default: 'section')\n";
print "-license <license> : use the given license for the preamble.\n";
print " Known licenses: lppl (default), bsd, gpl.\n";
print "-h : help message\n";
diff --git a/Master/texmf-dist/source/support/makedtx/makedtx.dtx b/Master/texmf-dist/source/support/makedtx/makedtx.dtx
index eaefdfe11df..8bf2eff18f1 100644
--- a/Master/texmf-dist/source/support/makedtx/makedtx.dtx
+++ b/Master/texmf-dist/source/support/makedtx/makedtx.dtx
@@ -1,18 +1,25 @@
%\iffalse
-% makedtx.dtx generated using makedtx version 0.94b (c) Nicola Talbot
+% makedtx.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -macrocode ".*\.p.*l"
-% -src "creatdtx.(.*)=>creatdtx.\1"
-% -src "makedtx=>makedtx.pl"
-% -author "Nicola Talbot"
+% -src "CHANGES\.org$=>CHANGES.org"
+% -src "makedtx-version\.tex$=>makedtx-version.tex"
+% -src "latexmkrc\.pl$=>latexmkrc.pl"
+% -src "createdtx\.sty$=>createdtx.sty"
+% -src "makedtx\.pl$=>makedtx.pl"
+% -author "Nicola L.C. Talbot"
+% -doc "makedtx.tex"
+% -setambles "\.pl$=>\nopreamble\nopostamble"
+% -macrocode "makedtx\.pl$"
+% -macrocode "CHANGES\.org$"
+% -macrocode "makedtx-version\.tex$"
+% -macrocode "latexmkrc\.pl$"
% -v "1"
-% -dir "source"
-% -setambles ".*\.p.*l=>\nopreamble\nopostamble"
-% -comment ".*\.p.*l"
-% -doc "manual.tex"
-% -codetitle "creatdtx.sty code"
+% -comment "makedtx\.pl$"
+% -comment "CHANGES\.org$"
+% -comment "makedtx-version\.tex$"
+% -comment "latexmkrc\.pl$"
% makedtx
-% Created on 2007/8/19 14:16
+% Created on 2018/2/21 16:13
%\fi
%\iffalse
%<*package>
@@ -35,11 +42,11 @@
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
-% Copyright (C) 2007 Nicola Talbot, all rights reserved.
+% Copyright (C) 2018 Nicola L.C. Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
-\documentclass[a4paper]{ltxdoc}
+\documentclass[a4paper,english]{ltxdoc}
\usepackage[colorlinks,
bookmarks,
@@ -47,6 +54,9 @@
bookmarksopen,
pdfauthor={Nicola Talbot},
pdftitle={makedtx : a Perl script to help create a DTX file from source code}]{hyperref}
+\usepackage{createdtx}
+\usepackage{datetime2}
+\DTMsetstyle{english}
\renewcommand{\usage}[1]{\textit{\hyperpage{#1}}}
@@ -64,18 +74,20 @@
\CheckSum{8}
\newcommand{\PDFLaTeX}{PDF\LaTeX}
+\DTMsavedate{makedtx-date}{2018-02-19}
-
+\input{makedtx-version}
\begin{document}
\DocInput{makedtx.dtx}
\end{document}
%</driver>
%\fi
-%\title{makedtx v0.94b : a Perl script to help create a DTX
+%
+%\title{makedtx \version : a Perl script to help create a DTX
%file from source code}
%\author{Nicola Talbot\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
-%\date{19th August 2007}
+%\date{\DTMusedate{makedtx-date}}
%\maketitle
%
%\tableofcontents
@@ -334,6 +346,13 @@
%source code is inserted into a \texttt{macrocode} environment in the
%DTX file.
%
+%Please note that the source code is supposed to be text insensitive to end of line format, as a matter of fact
+%\texttt{makedtx.pl} will convert all end of lines of this source code to LF's.
+%
+%Please note also that only the source files given by the \switch{src} switch are considered, the
+%\switch{macrocode} switch by itself does not cause the source file to be insterted into the DTX file, it only
+%affects \emph{how} it is inserted.
+%
%\item[\switch{comment} \texttt{"}\meta{expr}\texttt{"}]
%\changes{0.93}{2007/08/02}{comment switch added}%
%If the source file matches the Perl regular expression given by
@@ -412,7 +431,7 @@
% % \end{macrocode}
%\end{verbatim}
%Now let's make some (very brief) documentation. Let's call the file,
-%say \texttt{manual.tex}\footnote{Note: if you want to use
+%say \texttt{manual.tex}\footnote{Note: if you want to use
%\latextohtml\ on this document, you will need to use, e.g.,
%\cs{verb}\texttt{!\cs{today}!} instead of
%\texttt{\symbol{124}\cs{today}\symbol{124}} since it doesn't recognise
@@ -713,7 +732,7 @@
%\end{verbatim}
%then if you pass the following switch to \texttt{makedtx.pl}:
%\begin{itemize}
-%\item \verb'-src "abcsrc\.([styb]+)=>abc.\1"'
+%\item \verb'-src "abcsrc\.([styb]+)=>abc.\1"'
%will be equivalent to:
%\begin{verbatim}
%-src "abcsrc.sty=>abc.sty" -src "abcsrc.bst=>abc.bst"
@@ -759,98 +778,106 @@
%\PrintIndex}
%
%
-%
-%
-%\section{creatdtx.sty code}
+%\section{The Code}
%\iffalse
% \begin{macrocode}
-%<*creatdtx.perl>
+%<*CHANGES.org>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
-# creatdtx.perl LaTeX2HTML file corresponding to creatdtx.sty package
-# author : Nicola Talbot
-# date : 2nd August 2007
+* version 1.2 2018/02/19
-package main;
++ Under MSW use envvar USERNAME rather than getpwuid for getting
+ author default value
++ User Perl I/O layers in order to have LF EOL on output, and accept
+ both LF and CRLF on input
++ Create a test bench --- add a testmode option so that date in output
+ is fixed and output is comparable to a reference value.
++ Fix perl warning about escaping { in regexp.
++ Semi-colonize end of here-documents as recommended in Perl Manual.
++ Fix --version cli argument, so that version is flushed to stdout
+ before script exits.
++ Automate packaging
-print " [creatdtx v0.93b (N.L.C. Talbot)]";
-sub do_cmd_meta
-{
- &do_cmd_emph(@_);
-}
+* version 0.94 (2007/08/19) :
-sub do_cmd_cs{
- local($_) = @_;
- local($name);
++ Default preamble changed to one which conforms with the
+ LaTeX Project Public License (LPPL)
++ license switch added
- $name = &missing_braces unless
- (s/$next_pair_pr_rx/$name=$2;''/eo);
+* version 0.93 (2007/08/02) :
- "<TT>&#092;$name</TT>$_";
-}
-
-sub do_cmd_marg{
- local($_) = @_;
- local($arg);
++ version switch added
++ comment switch added
++ codetitle switch added
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
+* version 0.91 (2006/07/21) :
- "<TT>{</TT><EM>$arg</EM><TT>}</TT>$_";
-}
++ prefinale switch added
-sub do_cmd_oarg{
- local($_) = @_;
- local($arg);
+* version 0.9 (2005/02/11) :
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
++ Initial beta release
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</CHANGES.org>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*makedtx-version.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+\newcommand*\version{v1.2}
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</makedtx-version.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*latexmkrc.pl>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
+$dvi_mode = 0;
+$pdf_mode = 1;
- "<TT>[</TT><EM>$arg</EM><TT>]</TT>$_";
+@default_files=();
+foreach $file (glob('makedtx.{dtx,tex}'))
+{
+ if(-e $file){
+ @default_files=($file);
+ break;
+ }
}
-sub do_cmd_parg{
- local($_) = @_;
- local($arg);
-
- $arg = &missing_braces unless
- (s/$next_pair_pr_rx/$arg=$2;''/eo);
-
- "<TT>(</TT><EM>$arg</EM><TT>)</TT>$_";
+$makeindex= "makeindex -s gind.ist %O -o %D %S";
+
+# 1. For glossaries using glossary package --- \changes generatated by the ltxdoc \changes directive
+add_cus_dep( 'glo', 'gls', 0, 'makeglo2gls' );
+sub makeglo2gls {
+ system("makeindex -s gglo.ist -t \"$_[0].glg\" -o \"$_[0].gls\" \"$_[0].glo\"" );
}
-
-&ignore_commands( <<_IGNORED_CMDS_);
-ifmakedtx # {}
-StopEventually # {}
-OnlyDescription
-RecordChanges
-PrintChanges
-EnableCrossRefs
-CodelineIndex
-GetFileInfo # {}
-CheckSum # {}
-DescribeMacro # {}
-DescribeEnvironment # {}
-DoNotIndex # {}
-changes # {} # {} # {}
-DeleteShortVerb # {}
-MakeShortVerb # {}
-_IGNORED_CMDS_
-
-1;
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
-%</creatdtx.perl>
+%</latexmkrc.pl>
% \end{macrocode}
%\fi
%\iffalse
% \begin{macrocode}
-%<*creatdtx.sty>
+%<*createdtx.sty>
% \end{macrocode}
%\fi
% This is the code for the \texttt{creatdtx} package. This
@@ -869,9 +896,11 @@ _IGNORED_CMDS_
\providecommand{\StopEventually}{}
\renewcommand{\StopEventually}[1]{#1}
% \end{macrocode}
-%\iffalse
+\iffalse Local Variables:\fi
+\iffalse mode: DocTeX\fi
+\iffalse End:\fi%\iffalse
% \begin{macrocode}
-%</creatdtx.sty>
+%</createdtx.sty>
% \end{macrocode}
%\fi
%\iffalse
@@ -886,48 +915,62 @@ _IGNORED_CMDS_
# File : makedtx
# Author : Nicola L. C. Talbot
# Date : 29 Oct 2004
-# Last Modified : 19 Aug 2007
-# Version : 0.94b
+# Last Modified : 2017-04-08
+# Version : 1.2
# usage : makedtx [options] -src <expr>=><expr> -doc <filename> <basename>
#
# -h : help message
# -src <expr>=><expr> : e.g. -src "(foo)src\.(bar)=>$1.$2" will add foosrc.bar to <basename>.dtx to be extracted to foo.bar
# -doc <filename> : file containing documentation.
-# -prefinale <string> : text to add to dtx file just before \Finale (added to version 0.91b)
+# -prefinale <string> : text to add to dtx file just before \Finale (added to version 0.91b)
# <basename> : create <basename>.dtx and <basename>.ins
use Getopt::Long;
-$version = "0.94b";
+$version = "1.2";
# process command line options
%optctl = ();
+# v1.1 added section switch
&GetOptions(\%optctl, "h", "help", "v", "src=s@", "doc=s",
"dir=s", "op=s", "askforoverwrite!", "ins!",
-"preamble=s", "postamble=s", "setambles=s@", "macrocode=s@",
+"preamble=s", "postamble=s", "setambles=s@", "testmode", "macrocode=s@",
"author=s", "date=s", "stopeventually=s",
"prefinale=s", "codetitle=s", "comment=s@",
-"version", "license=s") or &syntaxerror();
+"version", "license=s", "section=s") or &syntaxerror();
$srcdir = ".";
$patternop = "=";
$verbose = 0;
$noins = 0;
+$testmode = 0;
$askforoverwrite = 0;
$preamble = "";
$postamble = "";
-$author = (getpwuid($<))[6] || 'Unknown';
+my $author;
+if ($^O =~ m/MSWin/)
+{
+ $author = $ENV{"USERNAME"};
+ if ($author eq ""){ $author = 'Unknown';}
+}
+else
+{
+ $author = (getpwuid($<))[6] || 'Unknown';
+}
$stopeventually = "";
$prefinale = "";
$codetitle = "The Code";
+$section = "section";
$license = "lppl";
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
$year = $year + 1900;
+$copyright_date = $year;
+$creation_date = "$year/" . ($mon+1) . "/$mday $hour:" . ($min<10?"0$min" : $min);
foreach $setting (keys %optctl)
{
@@ -937,7 +980,8 @@ foreach $setting (keys %optctl)
}
elsif ($setting eq "version")
{
- die "makedtx version $version\n";
+ print "makedtx version $version\n";
+ exit 0;
}
elsif ($setting eq "doc")
{
@@ -989,7 +1033,7 @@ foreach $setting (keys %optctl)
}
elsif ($setting eq "date")
{
- $year = $optctl{$setting};
+ $copyright_date = $optctl{$setting};
}
elsif ($setting eq "stopeventually")
{
@@ -1003,6 +1047,20 @@ foreach $setting (keys %optctl)
{
$codetitle = $optctl{$setting};
}
+ elsif ($setting eq "section")
+ {
+ $section = $optctl{$setting};
+ }
+ elsif ($setting eq "testmode")
+ {
+ $testmode = $optctl{$setting};
+ if($testmode)
+ {
+ $version = "x.y";
+ $copyright_date = "YYYY";
+ $creation_date = "YYYY/MM/DD hh:mm";
+ }
+ }
elsif ($setting eq "comment")
{
@comment = @{ $optctl{$setting} };
@@ -1033,7 +1091,7 @@ if ($#source == -1)
&syntaxerror();
}
-open DTX, ">$basename.dtx" or die "Can't open '$basename.dtx'\n";
+open DTX, ">:unix","$basename.dtx" or die "Can't open '$basename.dtx'\n";
if ($verbose)
{
@@ -1084,7 +1142,7 @@ foreach $source (@source)
$file{$thisinfile} = $thisoutfile;
$derivedfiles[$numoutput]{'in'} = $thisinfile;
- $derivedfiles[$numoutput]{'out'} = $thisoutfile;
+ $derivedfiles[$numoutput]{'out'} = $thisoutfile;
$outputfiles[$numoutput] = $thisoutfile;
$numoutput++;
@@ -1096,14 +1154,15 @@ if ($preamble eq "")
{
if ($license eq "lppl")
{
- $preamble = <<_END_LICENSE
+# v1.2 fixed typo in preamble
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright $year $author
+ Copyright $copyright_date $author
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
@@ -1117,10 +1176,10 @@ _END_LICENSE
}
elsif ($license eq 'bsd')
{
- $preamble = <<_END_LICENSE
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright (c) $year $author
+ Copyright (c) $copyright_date $author
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -1149,10 +1208,10 @@ _END_LICENSE
}
elsif ($license eq 'gpl')
{
- $preamble = <<_END_LICENSE
+ $preamble = <<_END_LICENSE;
$basename.dtx
- Copyright (c) $year $author
+ Copyright (c) $copyright_date $author
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
@@ -1177,58 +1236,65 @@ _END_LICENSE
}
$preamble .= " This work consists of the files "
- . "$basename.dtx and $basename.ins and the derived "
- . ($numoutput > 1 ? "files" : "file")
+ . "$basename.dtx and $basename.ins and the derived "
+ . ($numoutput > 1 ? "files" : "file")
. " " . join(', ', @outputfiles) . ".\n";
}
-open DOC, $docsrc or die "Can't open '$docsrc'\n";
+open DOC, '<:crlf',$docsrc or die "Can't open '$docsrc'\n";
print DTX "\%\\iffalse\n";
print DTX "\% $basename.dtx generated using makedtx version $version (c) Nicola Talbot\n";
print DTX "\% Command line args:\n";
+@cmdline_args = ();
foreach $setting (keys %optctl)
{
if ($setting eq "src")
{
foreach $source (@source)
{
- print DTX "\% -src \"$source\"\n";
+ push @cmdline_args ,"-src \"$source\"";
}
}
elsif ($setting eq "setambles")
{
foreach $setamble (@setambles)
{
- print DTX "\% -setambles \"$setamble\"\n";
+ push @cmdline_args ,"-setambles \"$setamble\"";
}
}
elsif ($setting eq "macrocode")
{
foreach $macrocode (@macrocode)
{
- print DTX "\% -macrocode \"$macrocode\"\n";
+ push @cmdline_args ,"-macrocode \"$macrocode\"";
}
}
elsif ($setting eq "comment")
{
foreach $comment (@comment)
{
- print DTX "\% -comment \"$comment\"\n";
+ push @cmdline_args ,"-comment \"$comment\"";
}
}
else
{
$val = $optctl{$setting};
$val=~s/\\/\\\\/g;
- print DTX "\% -", $setting, " \"", $val, "\"\n";
+ push @cmdline_args ,("-" . $setting . " \"" . $val . "\"");
}
}
+if($testmode){
+ @cmdline_args = sort @cmdline_args;
+}
+foreach $arg (@cmdline_args){
+ print DTX "\% ", $arg , "\n";
+}
print DTX "\% $basename\n";
-print DTX "\% Created on $year/", $mon+1, "/$mday $hour:", $min<10?"0$min" : $min,"\n";
+print DTX "\% Created on $creation_date\n";
print DTX "\%\\fi\n";
print DTX "\%\\iffalse\n";
print DTX "\%<*package>\n";
@@ -1252,7 +1318,7 @@ print DTX "\%\\fi\n";
print DTX "\% \\iffalse\n";
print DTX "\% Doc-Source file to use with LaTeX2e\n";
-print DTX "\% Copyright (C) $year $author, all rights reserved.\n";
+print DTX "\% Copyright (C) $copyright_date $author, all rights reserved.\n";
print DTX "\% \\fi\n";
# driver
@@ -1264,7 +1330,7 @@ $indoc=0;
while (<DOC>)
{
- s/\\usepackage{creatdtx}//;
+ s/\\usepackage\{creatdtx}//;
$restofline = $_;
@@ -1324,7 +1390,7 @@ while (<DOC>)
print DTX $line;
- if ($line=~/\\begin{document}/)
+ if ($line=~/\\begin\{document}/)
{
$indoc = 1;
@@ -1344,12 +1410,12 @@ print DTX "\%";
while (<DOC>)
{
- if (/\\begin{verbatim}/)
+ if (/\\begin\{verbatim}/)
{
$inverb=1;
}
- if (/\\end{verbatim}/)
+ if (/\\end\{verbatim}/)
{
$inverb=0;
}
@@ -1415,11 +1481,11 @@ while (<DOC>)
$line = $beginline . $restofline;
- if (($line=~/\\end{document}/) and not $inverb)
+ if (($line=~/\\end\{document}/) and not $inverb)
{
$indoc=0;
- $line=~s/\\end{document}//;
+ $line=~s/\\end\{document}//;
}
$line=~s/\n/\n\%/mg;
@@ -1436,7 +1502,12 @@ if ($stopfound==0)
print DTX "\%\\StopEventually{$stopeventually}\n";
}
-print DTX "\%\\section{$codetitle}\n";
+# v1.0 added check
+if ($codetitle)
+{
+ # v1.1 added section
+ print DTX "\%\\$section\{$codetitle\}\n";
+}
for (my $idx = 0; $idx <= $#derivedfiles; $idx++)
{
@@ -1448,7 +1519,7 @@ for (my $idx = 0; $idx <= $#derivedfiles; $idx++)
print "$srcdirfile -> $_ \n";
}
- open SRC, $thisinfile or die "Can't open $thisinfile\n";
+ open SRC, "<:crlf", $thisinfile or die "Can't open $thisinfile\n";
print DTX "\%\\iffalse\n";
print DTX "\% \\begin{macrocode}\n";
@@ -1511,9 +1582,9 @@ close DTX;
if (!$noins)
{
- open INS, ">$basename.ins" or die "Can't open '$basename.ins'\n";
+ open INS, ">:unix","$basename.ins" or die "Can't open '$basename.ins'\n";
- print INS "\% $basename.ins generated using makedtx version $version $year/",$mon+1,"/$mday $hour:", $min<10?"0$min":$min,"\n";
+ print INS "\% $basename.ins generated using makedtx version $version $creation_date\n";
print INS "\\input docstrip\n\n";
print INS "\\preamble\n";
@@ -1646,6 +1717,7 @@ sub help
print "-macrocode <expr> : surround any file which matches <expr> in a macrocode environment\n";
print "-comment <expr> : surround any file which matches <expr> with \\iffalse \\fi pair\n";
print "-codetitle <text> : The title for the documented code section (default: The Code)\n";
+ print "-section <cs> : The sectioning command to use for the documented code section (default: 'section')\n";
print "-license <license> : use the given license for the preamble.\n";
print " Known licenses: lppl (default), bsd, gpl.\n";
print "-h : help message\n";
diff --git a/Master/texmf-dist/source/support/makedtx/makedtx.ins b/Master/texmf-dist/source/support/makedtx/makedtx.ins
index 0f28af11859..d636d8ed0b4 100644
--- a/Master/texmf-dist/source/support/makedtx/makedtx.ins
+++ b/Master/texmf-dist/source/support/makedtx/makedtx.ins
@@ -1,14 +1,14 @@
-% makedtx.ins generated using makedtx version 0.94b 2007/8/19 14:16
+% makedtx.ins generated using makedtx version 1.2 2018/2/21 16:13
\input docstrip
\preamble
makedtx.dtx
- Copyright 2007 Nicola Talbot
+ Copyright 2018 Nicola L.C. Talbot
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
+ of this license or (at your option) any later version.
The latest version of this license is in
http://www.latex-project.org/lppl.txt
and version 1.3 or later is part of all distributions of LaTeX
@@ -16,17 +16,21 @@
This work has the LPPL maintenance status `maintained'.
- The Current Maintainer of this work is Nicola Talbot.
+ The Current Maintainer of this work is Nicola L.C. Talbot.
- This work consists of the files makedtx.dtx and makedtx.ins and the derived files creatdtx.perl, creatdtx.sty, makedtx.pl.
+ This work consists of the files makedtx.dtx and makedtx.ins and the derived files CHANGES.org, makedtx-version.tex, latexmkrc.pl, createdtx.sty, makedtx.pl.
\endpreamble
\askforoverwritefalse
-\generate{\file{creatdtx.perl}{\nopreamble\nopostamble\from{makedtx.dtx}{creatdtx.perl}}
-\file{creatdtx.sty}{\usepreamble\defaultpreamble
-\usepostamble\defaultpostamble\from{makedtx.dtx}{creatdtx.sty,package}}
+\generate{\file{CHANGES.org}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{makedtx.dtx}{CHANGES.org,package}}
+\file{makedtx-version.tex}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{makedtx.dtx}{makedtx-version.tex,package}}
+\file{latexmkrc.pl}{\nopreamble\nopostamble\from{makedtx.dtx}{latexmkrc.pl}}
+\file{createdtx.sty}{\usepreamble\defaultpreamble
+\usepostamble\defaultpostamble\from{makedtx.dtx}{createdtx.sty,package}}
\file{makedtx.pl}{\nopreamble\nopostamble\from{makedtx.dtx}{makedtx.pl}}
}
diff --git a/Master/texmf-dist/tex/latex/makedtx/creatdtx.sty b/Master/texmf-dist/tex/latex/makedtx/createdtx.sty
index 84195a9bbf3..784e1627ed6 100644
--- a/Master/texmf-dist/tex/latex/makedtx/creatdtx.sty
+++ b/Master/texmf-dist/tex/latex/makedtx/createdtx.sty
@@ -1,17 +1,17 @@
%%
-%% This is file `creatdtx.sty',
+%% This is file `createdtx.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
-%% makedtx.dtx (with options: `creatdtx.sty,package')
+%% makedtx.dtx (with options: `createdtx.sty,package')
%%
%% makedtx.dtx
-%% Copyright 2007 Nicola Talbot
+%% Copyright 2018 Nicola L.C. Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -19,9 +19,9 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Nicola Talbot.
+%% The Current Maintainer of this work is Nicola L.C. Talbot.
%%
-%% This work consists of the files makedtx.dtx and makedtx.ins and the derived files creatdtx.perl, creatdtx.sty, makedtx.pl.
+%% This work consists of the files makedtx.dtx and makedtx.ins and the derived files CHANGES.org, makedtx-version.tex, latexmkrc.pl, createdtx.sty, makedtx.pl.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -43,6 +43,9 @@
\newcommand{\ifmakedtx}[2]{#2}
\providecommand{\StopEventually}{}
\renewcommand{\StopEventually}[1]{#1}
+\iffalse Local Variables:\fi
+\iffalse mode: DocTeX\fi
+\iffalse End:\fi%\iffalse
\endinput
%%
-%% End of file `creatdtx.sty'.
+%% End of file `createdtx.sty'.