| 1 |
%% |
| 2 |
%% This is file `xkvex3.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% xkeyval.dtx (with options: `xkvex3') |
| 8 |
%% |
| 9 |
%% --------------------------------------- |
| 10 |
%% Copyright (C) 2004-2022 Hendri Adriaens |
| 11 |
%% 2025 David Carlisle for latex-package-repositories |
| 12 |
%% --------------------------------------- |
| 13 |
%% |
| 14 |
%% This work may be distributed and/or modified under the |
| 15 |
%% conditions of the LaTeX Project Public License, either version 1.3 |
| 16 |
%% of this license or (at your option) any later version. |
| 17 |
%% The latest version of this license is in |
| 18 |
%% http://www.latex-project.org/lppl.txt |
| 19 |
%% and version 1.3 or later is part of all distributions of LaTeX |
| 20 |
%% version 2003/12/01 or later. |
| 21 |
%% |
| 22 |
%% This work has the LPPL maintenance status "maintained". |
| 23 |
%% |
| 24 |
%% This Current Maintainer of this work is Hendri Adriaens. |
| 25 |
%% |
| 26 |
%% This work consists of the file xkeyval.dtx and derived files |
| 27 |
%% keyval.tex, xkvtxhdr.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, |
| 28 |
%% xkvltxp.sty, xkvutils.tex, pst-xkey.tex, pst-xkey.sty, xkveca.cls, |
| 29 |
%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex, |
| 30 |
%% xkvex2.tex, xkvex3.tex and xkvex4.tex. |
| 31 |
%% |
| 32 |
%% The following files constitute the xkeyval bundle and must be |
| 33 |
%% distributed as a whole: readme, xkeyval.pdf, keyval.tex, |
| 34 |
%% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty, |
| 35 |
%% xkvltxp.sty, xkvtxhdr.tex, xkvutils.tex, pst-xkey.dtx and xkeyval.dtx. |
| 36 |
%% |
| 37 |
%% keyi will set \keyi in xkveca.cls |
| 38 |
%% keyvi will set \keyvi in xkveca.cls and xkvesc.sty will pick |
| 39 |
%% it up from \documentclass and redefine it |
| 40 |
%% IgnoredGlobal and another=key will be considered as global |
| 41 |
%% options to be passed on to packages. Not used anymore. |
| 42 |
\documentclass[keyi=test1,keyvi,another=key,IgnoredGlobal,10pt]{xkveca} |
| 43 |
|
| 44 |
%% keyii will set \keyii in xkvesa.sty |
| 45 |
%% keyiv will be passed to xkvesb.sty as unknown option |
| 46 |
%% the other input will be passed on to xkvesb as well. |
| 47 |
\usepackage[keyii=test2,keyiv=test4,test5]{xkvesa} |
| 48 |
|
| 49 |
%% keyvii will set \keyvii in xkvesc.sty |
| 50 |
\usepackage[keyvii]{xkvesc} |
| 51 |
|
| 52 |
\title{\textsf{xkeyval} package\\\normalsize\emph{Example 3}} |
| 53 |
\author{Hendri Adriaens} |
| 54 |
\setlength{\parindent}{0cm} |
| 55 |
|
| 56 |
\makeatletter |
| 57 |
\let\@tempa\@classoptionslist |
| 58 |
\let\@tempb\@unusedoptionlist |
| 59 |
|
| 60 |
\begin{document} |
| 61 |
\maketitle |
| 62 |
|
| 63 |
This example demonstrates the use of the new macros for declaring |
| 64 |
class and package options of the \textsf{xkeyval} package. Please |
| 65 |
study the files \verb+xkvex2.tex+, \verb+xkveca.cls+, |
| 66 |
\verb+xkvecb.cls+, \verb+xkvesa.sty+, \verb+xkvesb.sty+ and |
| 67 |
\verb+xkvesc.sty+ carefully to understand the output below.\\ |
| 68 |
|
| 69 |
Set by \verb+xkveca.cls+: \keyi\par |
| 70 |
Set by \verb+xkvesa.sty+, copied from \verb+\documentclass+: \keyia\par |
| 71 |
Set by \verb+xkvesa.sty+: \keyii\par |
| 72 |
Set by \verb+xkvesb.sty+, passed on from \verb+xkvesa.sty+: \keyiii\par |
| 73 |
Set by \verb+xkvesb.sty+, passed on as unknown key from \verb+xkvesa.sty+: \keyiv\par |
| 74 |
Set by \verb+xkvesb.sty+, passed on as unknown from \verb+xkvesa.sty+: \keyv\par |
| 75 |
Set by the class, copied by \verb+xkvesc.sty+: \keyvi\par |
| 76 |
Set by \verb+xkvesc.sty+: \keyvii\par |
| 77 |
Set by \verb+xkvecb.cls+, passed on from \verb+xkveca.cls+: \keyviii\\ |
| 78 |
|
| 79 |
The document class is: \XKV@documentclass\par |
| 80 |
Unused global options: \@tempb\\ |
| 81 |
|
| 82 |
Notice the content of the following macros.\par |
| 83 |
\verb+\@classoptionslist+: \@tempa\par |
| 84 |
\verb+\XKV@classoptionslist+: \XKV@classoptionslist\\ |
| 85 |
|
| 86 |
This shows that \verb+key=value+ pairs have been deleted from the |
| 87 |
class options list so that subsequent packages which are not using |
| 88 |
\textsf{xkeyval} and are scanning this list will not run into |
| 89 |
problems.\\ |
| 90 |
|
| 91 |
\end{document} |
| 92 |
\endinput |
| 93 |
%% |
| 94 |
%% End of file `xkvex3.tex'. |