| 1 |
%% |
| 2 |
%% This is file `twoopt.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% twoopt.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: twoopt |
| 12 |
%% Version: 2016/05/16 v1.6 |
| 13 |
%% |
| 14 |
%% Copyright (C) |
| 15 |
%% 1999, 2006, 2008 Heiko Oberdiek |
| 16 |
%% 2016-2019 Oberdiek Package Support Group |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3 or later is part of all distributions of |
| 26 |
%% LaTeX version 2005/12/01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainers of this work are |
| 31 |
%% Heiko Oberdiek and the Oberdiek Package Support Group |
| 32 |
%% https://github.com/ho-tex/oberdiek/issues |
| 33 |
%% |
| 34 |
%% |
| 35 |
%% This work consists of the main source file twoopt.dtx |
| 36 |
%% and the derived files |
| 37 |
%% twoopt.sty, twoopt.pdf, twoopt.ins, twoopt.drv. |
| 38 |
%% |
| 39 |
\NeedsTeXFormat{LaTeX2e} |
| 40 |
\ProvidesPackage{twoopt} |
| 41 |
[2016/05/16 v1.6 Definitions with two optional arguments (HO)]% |
| 42 |
\newcommand{\newcommandtwoopt}{% |
| 43 |
\@ifstar{\@newcommandtwoopt*}{\@newcommandtwoopt{}}% |
| 44 |
} |
| 45 |
\newcommand{\@newcommandtwoopt}{} |
| 46 |
\long\def\@newcommandtwoopt#1#2{% |
| 47 |
\expandafter\@@newcommandtwoopt |
| 48 |
\csname2\string#2\endcsname{#1}{#2}% |
| 49 |
} |
| 50 |
\newcommand{\@@newcommandtwoopt}{} |
| 51 |
\long\def\@@newcommandtwoopt#1#2#3[#4][#5][#6]{% |
| 52 |
\newcommand#2#3[1][{#5}]{% |
| 53 |
\to@ScanSecondOptArg#1{##1}{#6}% |
| 54 |
}% |
| 55 |
\newcommand#2#1[{#4}]% |
| 56 |
} |
| 57 |
\newcommand{\renewcommandtwoopt}{% |
| 58 |
\@ifstar{\@renewcommandtwoopt*}{\@renewcommandtwoopt{}}% |
| 59 |
} |
| 60 |
\newcommand{\@renewcommandtwoopt}{} |
| 61 |
\long\def\@renewcommandtwoopt#1#2{% |
| 62 |
\begingroup |
| 63 |
\escapechar\m@ne |
| 64 |
\xdef\@gtempa{{\string#2}}% |
| 65 |
\endgroup |
| 66 |
\expandafter\@ifundefined\@gtempa{% |
| 67 |
\@latex@error{\noexpand#2undefined}\@ehc |
| 68 |
}{}% |
| 69 |
\let#2\@undefined |
| 70 |
\expandafter\let\csname2\string#2\endcsname\@undefined |
| 71 |
\expandafter\@@newcommandtwoopt |
| 72 |
\csname2\string#2\endcsname{#1}{#2}% |
| 73 |
} |
| 74 |
\newcommand{\providecommandtwoopt}{% |
| 75 |
\@ifstar{\@providecommandtwoopt*}{\@providecommandtwoopt{}}% |
| 76 |
} |
| 77 |
\newcommand{\@providecommandtwoopt}{} |
| 78 |
\long\def\@providecommandtwoopt#1#2{% |
| 79 |
\begingroup |
| 80 |
\escapechar\m@ne |
| 81 |
\xdef\@gtempa{{\string#2}}% |
| 82 |
\endgroup |
| 83 |
\expandafter\@ifundefined\@gtempa{% |
| 84 |
\expandafter\@@newcommandtwoopt |
| 85 |
\csname2\string#2\endcsname{#1}{#2}% |
| 86 |
}{% |
| 87 |
\let\to@dummyA\@undefined |
| 88 |
\let\to@dummyB\@undefined |
| 89 |
\@@newcommandtwoopt\to@dummyA{#1}\to@dummyB |
| 90 |
}% |
| 91 |
} |
| 92 |
\newcommand{\to@ScanSecondOptArg}[3]{% |
| 93 |
\@ifnextchar[{% |
| 94 |
\expandafter#1\to@ArgOptToArgArg{#2}% |
| 95 |
}{% |
| 96 |
#1{#2}{#3}% |
| 97 |
}% |
| 98 |
} |
| 99 |
\newcommand{\to@ArgOptToArgArg}{} |
| 100 |
\long\def\to@ArgOptToArgArg#1[#2]{{#1}{#2}} |
| 101 |
\endinput |
| 102 |
%% |
| 103 |
%% End of file `twoopt.sty'. |