diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek/twoopt.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/twoopt.dtx | 379 |
1 files changed, 290 insertions, 89 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx index 8e139668c6a..955019a1298 100644 --- a/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/twoopt.dtx @@ -1,82 +1,180 @@ % \iffalse meta-comment % -% twoopt.dtx -% -% This file is part of the package `twoopt' for use with LaTeX2e. -% -% Function: Defining commands with two optional arguments. -% -% Copyright (C) 1998,1999 Heiko Oberdiek. -% -% This program can be redistributed and/or modified -% under the terms of the LaTeX Project Public License -% distributed from CTAN archives in directory -% macros/latex/base/lppl.txt; either version 1 of -% the License, or (at your option) any later version. -% -% Please send error reports and suggestions for improvements to -% Heiko Oberdiek <oberdiek@ruf.uni-freiburg.de>. -% -%<*dtx> - \ProvidesFile{twoopt.dtx} -%</dtx> -%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01] -%<package>\ProvidesPackage{twoopt} -%<driver>\ProvidesFile{twoopt.drv} -% \fi -% \ProvidesFile{twoopt.dtx} - [1999/04/12 v1.3 Definitions with two optional arguments (HO)] -% -% \GetFileInfo{twoopt.dtx} -% -% \CheckSum{103} -% -%% \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 \~} -%% -% \iffalse +% Copyright (C) 1999, 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +% +% 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". +% +% This Current Maintainer of this work is Heiko Oberdiek. +% +% This work consists of the main source file twoopt.dtx +% and the derived files +% twoopt.sty, twoopt.pdf, twoopt.ins, twoopt.drv. +% +% Distribution: +% CTAN:macros/latex/contrib/oberdiek/twoopt.dtx +% CTAN:macros/latex/contrib/oberdiek/twoopt.pdf +% +% Unpacking: +% (a) If twoopt.ins is present: +% tex twoopt.ins +% (b) Without twoopt.ins: +% tex twoopt.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{twoopt.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (a) If twoopt.drv is present: +% latex twoopt.drv +% (b) Without twoopt.drv: +% latex twoopt.dtx; ... +% The class ltxdoc loads the configuration file ltxdoc.cfg +% if available. Here you can specify further options, e.g. +% use A4 as paper format: +% \PassOptionsToClass{a4paper}{article} +% +% Programm calls to get the documentation (example): +% pdflatex twoopt.dtx +% makeindex -s gind.ist twoopt.idx +% pdflatex twoopt.dtx +% makeindex -s gind.ist twoopt.idx +% pdflatex twoopt.dtx +% +% Installation: +% TDS:tex/latex/oberdiek/twoopt.sty +% TDS:doc/latex/oberdiek/twoopt.pdf +% TDS:source/latex/oberdiek/twoopt.dtx +% +%<*ignore> +\begingroup + \def\x{LaTeX2e} +\expandafter\endgroup +\ifcase 0\ifx\install y1\fi\expandafter + \ifx\csname processbatchFile\endcsname\relax\else1\fi + \ifx\fmtname\x\else 1\fi\relax +\else\csname fi\endcsname +%</ignore> +%<*install> +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: twoopt 2006/02/20 v1.4 Definitions with two optional arguments (HO)} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\preamble + +This is a generated file. + +Copyright (C) 1999, 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> + +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". + +This Current Maintainer of this work is Heiko Oberdiek. + +This work consists of the main source file twoopt.dtx +and the derived files + twoopt.sty, twoopt.pdf, twoopt.ins, twoopt.drv. + +\endpreamble + +\generate{% + \file{twoopt.ins}{\from{twoopt.dtx}{install}}% + \file{twoopt.drv}{\from{twoopt.dtx}{driver}}% + \usedir{tex/latex/oberdiek}% + \file{twoopt.sty}{\from{twoopt.dtx}{package}}% +} + +\obeyspaces +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* twoopt.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `twoopt.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +%</install> +%<*ignore> +\fi +%</ignore> %<*driver> +\NeedsTeXFormat{LaTeX2e} +\ProvidesFile{twoopt.drv}% + [2006/02/20 v1.4 Definitions with two optional arguments (HO)] \documentclass{ltxdoc} \usepackage{holtxdoc} \begin{document} - \DocInput{twoopt.dtx} + \DocInput{twoopt.dtx} \end{document} %</driver> % \fi % -% \DoNotIndex{\csname,\endcsname,\expandafter,\noexpand,\string} -% \DoNotIndex{\begingroup,\endgroup,\def,\xdef,\long,\let} +% \CheckSum{105} +% +% \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 \~} +% +% \GetFileInfo{twoopt.drv} +% +% \title{The \xpackage{twoopt} package} +% \date{2006/02/20 v1.4} +% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % -% \newenvironment{param}{^^A -% \newcommand{\entry}[1]{\meta{\###1}:&}^^A -% \begin{tabular}[t]{@{}l@{ }l@{}}^^A -% }{^^A -% \end{tabular}^^A -% } -% -% \SetupTitle{definitions,optional,argument,LaTeX} % \maketitle % % \begin{abstract} -% This package provides commands to define macros with two -% optional arguments. +% This package provides commands to define macros with two +% optional arguments. % \end{abstract} % % \tableofcontents % +% \newenvironment{param}{^^A +% \newcommand{\entry}[1]{\meta{\###1}:&}^^A +% \begin{tabular}[t]{@{}l@{ }l@{}}^^A +% }{^^A +% \end{tabular}^^A +% } +% % \section{Usage} % \DescribeMacro{\newcommandtwoopt} % \DescribeMacro{\renewcommandtwoopt} @@ -115,13 +213,15 @@ % \end{tabular} % \end{quote} % -% \Installation -% -% \StopEventually{} +% \StopEventually{ +% } % % \section{Implementation} % \begin{macrocode} %<*package> +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{twoopt} + [2006/02/20 v1.4 Definitions with two optional arguments (HO)] % \end{macrocode} % \begin{macro}{\newcommandtwoopt} % \begin{macrocode} @@ -257,38 +357,139 @@ % \begin{macrocode} %</package> % \end{macrocode} -% -% \StartHistory -% \HistVersion{1998/10/30 v1.0} -% \begin{itemize} -% \item The first version was built as a response to a question -% of \Email[Rebecca and Rowland]{rebecca@astrid.u-net.com}, +% \section{Installation} +% +% \paragraph{CTAN.} This package is available on +% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}: +% \begin{description} +% \item[\CTAN{macros/latex/contrib/oberdiek/twoopt.dtx}] The source file. +% \item[\CTAN{macros/latex/contrib/oberdiek/twoopt.pdf}] Documentation. +% \end{description} +% +% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting +% \docstrip\ archive. The files are extracted by running the +% \xfile{.dtx} through \plainTeX: +% \begin{quote} +% \verb|tex twoopt.dtx| +% \end{quote} +% +% \paragraph{TDS.} Now the different files must be moved into +% the different directories in your installation TDS tree +% (also known as \xfile{texmf} tree): +% \begin{quote} +% \sbox0{^^A +% \begin{tabular}{@{}>{\ttfamily}l@{$\quad\rightarrow\quad$}>{\ttfamily}l@{}} +% twoopt.sty & tex/latex/oberdiek/twoopt.sty\\ +% twoopt.pdf & doc/latex/oberdiek/twoopt.pdf\\ +% twoopt.dtx & source/latex/oberdiek/twoopt.dtx\\ +% \end{tabular}^^A +% }% +% \ifdim\wd0>\linewidth +% \mbox{}\nobreak\hskip0pt minus\leftmargin +% \usebox0 +% \nobreak\hskip0pt minus\rightmargin +% \else +% \usebox0 +% \fi +% \end{quote} +% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's +% TDS installing feature, then some files can already be in the right +% place, see the documentation of \docstrip. +% +% \paragraph{Refresh file databases.} If your \TeX~distribution +% (\teTeX, \mikTeX, \dots) rely on file databases, you must refresh +% these. For example, \teTeX\ users run \verb|texhash| or +% \verb|mktexlsr|. +% +% \subsection{Some details for the interested} +% +% \paragraph{Attached source.} +% +% The PDF documentation on CTAN also includes the +% \xfile{.dtx} source file. It can be extracted by +% AcrobatReader 6 or higher. Another option is \textsf{pdftk}, +% e.g. unpack the file into the current directory: +% \begin{quote} +% \verb|pdftk twoopt.pdf unpack_files output .| +% \end{quote} +% +% \paragraph{Unpacking with \LaTeX.} +% The \xfile{.dtx} chooses its action depending on the format: +% \begin{description} +% \item[\plainTeX:] Run \docstrip\ and extract the files. +% \item[\LaTeX:] Generate the documentation. +% \end{description} +% If you insist on using \LaTeX\ for \docstrip\ (really, +% \docstrip\ does not need \LaTeX), then inform the autodetect routine +% about your intension: +% \begin{quote} +% \verb|latex \install=y\input{twoopt.dtx}| +% \end{quote} +% Do not forget to quote the argument according to the demands +% of your shell. +% +% \paragraph{Generating the documentation.} +% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate +% the documentation. The process can be configured by the +% configuration file \xfile{ltxdoc.cfg}. For instance, put this +% line into this file, if you want to have A4 as paper format: +% \begin{quote} +% \verb|\PassOptionsToClass{a4paper}{article}| +% \end{quote} +% An example follows how to generate the +% documentation with pdf\LaTeX: +% \begin{quote} +%\begin{verbatim} +%pdflatex twoopt.dtx +%makeindex -s gind.ist twoopt.idx +%pdflatex twoopt.dtx +%makeindex -s gind.ist twoopt.idx +%pdflatex twoopt.dtx +%\end{verbatim} +% \end{quote} +% +% \begin{History} +% \begin{Version}{1998/10/30 v1.0} +% \item +% The first version was built as a response to a question +% of \NameEmail{Rebecca and Rowland}{rebecca@astrid.u-net.com}, % published in the newsgroup % \href{news:comp.text.tex}{comp.text.tex}:\\ % \URL{``Re: [Q] LaTeX command with two optional arguments?''}^^A % {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=406573518} -% \end{itemize} -% \HistVersion{1998/10/30 v1.1} -% \begin{itemize} -% \item Improvements added in response to -% \Email[Stefan Ulrich]{ulrich@cis.uni-muenchen.de} +% \end{Version} +% \begin{Version}{1998/10/30 v1.1} +% \item +% Improvements added in response to +% \NameEmail{Stefan Ulrich}{ulrich@cis.uni-muenchen.de} % in the same thread:\\ % \URL{``Re: [Q] LaTeX command with two optional arguments?''}^^A % {http://www.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=406703373} -% \end{itemize} -% \HistVersion{1998/11/04 v1.2} -% \begin{itemize} -% \item Fixes for LaTeX bugs 2896, 2901, 2902 added. -% \end{itemize} -% \HistVersion{1999/04/12 v1.3} -% \begin{itemize} -% \item Fixes removed because of LaTeX [1998/12/01]. -% \item Documentation in dtx format. -% \item Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) -% \item First CTAN release. -% \end{itemize} -% -% \hfuzz10pt +% \end{Version} +% \begin{Version}{1998/11/04 v1.2} +% \item +% Fixes for LaTeX bugs 2896, 2901, 2902 added. +% \end{Version} +% \begin{Version}{1999/04/12 v1.3} +% \item +% Fixes removed because of LaTeX [1998/12/01]. +% \item +% Documentation in dtx format. +% \item +% Copyright: LPPL (\CTAN{macros/latex/base/lppl.txt}) +% \item +% First CTAN release. +% \end{Version} +% \begin{Version}{2006/02/20 v1.4} +% \item +% Code is not changed. +% \item +% New DTX framework. +% \item +% LPPL 1.3 +% \end{Version} +% \end{History} +% % \PrintIndex % % \Finale |