summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skeycommand
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-11-25 00:11:53 +0000
committerKarl Berry <karl@freefriends.org>2011-11-25 00:11:53 +0000
commit0ad65f7beaddd4e930a52720af50fa3aa6ba5958 (patch)
treec31df2e1d6f4b7f87f59802b1932c08931b3e797 /Master/texmf-dist/doc/latex/skeycommand
parent5949618821cfe384176ae1a4a7a032a3f6e7ee30 (diff)
skeycommand 0.4 (20nov11)
git-svn-id: svn://tug.org/texlive/trunk@24652 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/skeycommand')
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/README14
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.cfg47
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdfbin211904 -> 356201 bytes
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex898
4 files changed, 590 insertions, 369 deletions
diff --git a/Master/texmf-dist/doc/latex/skeycommand/README b/Master/texmf-dist/doc/latex/skeycommand/README
index 6e4583bab30..d2210cab7a2 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/README
+++ b/Master/texmf-dist/doc/latex/skeycommand/README
@@ -1,16 +1,16 @@
%+++++++++++++++++++++++++++++++++++ INTRODUCTION +++++++++++++++++++++++++++++++++++%
% %
-% This is the Readme file for the skeycommand package, version 0.3. %
-% May 2010 %
+% This is the Readme file for the skeycommand package, version 0.4. %
+% October 2011 %
% %
-% Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com). %
+% Copyright (c) 2011 Ahmed Musa (a.musa@rocketmail.com). %
% %
%+++++++++++++++++++++++++++++++++++++ MOTIVATION +++++++++++++++++++++++++++++++++++%
% %
% The skeycommand package introduces concepts for defining commands and %
-% environments using keys and parameters. All the facilities of the xkeyval %
-% and skeyval packages are available to users of the skeycommand package. %
-% The user interface is made as user-friendly as possible. %
+% environments using keys and parameters. All the facilities of the ltxkeys %
+% package are available to users of the skeycommand package. The user interface %
+% is made as user-friendly as possible. %
% %
%+++++++++++++++++++++++++++++++++++++ LICENSE ++++++++++++++++++++++++++++++++++++++%
% %
@@ -26,4 +26,4 @@
% expressed or implied, including, but not limited to, the implied warranties of %
% merchantability and fitness for a particular purpose. %
% %
-%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% \ No newline at end of file
+%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++% \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.cfg b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.cfg
new file mode 100644
index 00000000000..1e2fb0853be
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.cfg
@@ -0,0 +1,47 @@
+\ProvidesFile{skeycommand-guide.cfg}%
+ [2011/10/20 v0.4 Definitions file for skeycommand-guide.tex (AM)]
+
+\usepackage{skeycommand}
+
+\fancypagenos[%
+ showonpageone = false,
+ showpagenumbers = true,
+ showheadrule = true,
+ showfootrule = false,
+ yposition = -.44\paperheight,
+ xposition = 0,
+ scale = 1,
+ angle = 0,
+ left-header = The \textcolor{macrocolor}{skeycommand} package,
+ style = \textsc{Page~\thepage~of~\pageref{xwmlastpage}},
+ right-header = \ttcl{black}{\today}
+]
+
+\amltxoptions{%
+ geometryoptions = {left=3cm,right=3cm,top=2.5cm,%
+ bottom=2.5cm,includeheadfoot},
+ reviewdocument = false,
+ parindent = false,
+ toc = false,
+ frontpagestyle = empty,
+ pretitleskip = -\baselineskip,
+ posttitleskip = 1ex,
+ presuptitleskip = 15ex,
+ postsuptitleskip = 0ex,
+ presubtitleskip = 0ex,
+ postsubtitleskip = -\baselineskip,
+ loadnatbib = {numbers,sort&compress},
+ cmdcolor = xmagenta1,
+ stylecolor = xgreen1,
+ speccolor = teal,
+ sectionheadcolor = blue
+}
+
+\newwatermark[page=1,fontfamily=phv,fontsize=11pt,fontseries=m,align=center,
+ coordunit=pc,width=\paperheight,angle=0,scale=5,xpos=0,ypos=29]{%
+ \xwmcolorbox[framesep=5pt,framerule=2pt,fillcolor=yellow!75,
+ outerframecolor=brown,innerframecolor=white,textalign=justified,
+ width=.81\paperwidth]{}}
+
+
+\endinput
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
index a71f46207c3..cc455bdf8dc 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
index dba05792f56..dd427f0eb2a 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
@@ -1,332 +1,494 @@
-\documentclass[a4paper,10pt,final,language=UKenglish,fancysec,fancyfnote]{amltxdoc}
+\documentclass[
+ use-a4-paper,
+ use-10pt-font,
+ final-version,
+ use-UK-English,
+ fancy-section-headings,
+ frame-section-numbers,
+ input-config-file,
+ no-hyperref-messages,
+ fancy-footers
+]{amltxdoc}
+
+\usepackage{makeidx}
\makeatletter
-\let\sectionbreak\medbreak
+\makeindex
\begin{document}
\begin{frontmatter}
\suptitle{}
\title{The \texttt{\color{blue}skeycommand} Package\titleref{t1}}
-\iftogon{pdf}{%
- \titlenote[t1]{The package is available at \url{\@titleurl}.}%
-}{%
- \titlenote[t1]{The package is available at \url{\@shorttitleurl}.}%
-}
-\subtitle{Version 0.3}
-\titleurl{http://www.ctan.org/tex-archive/macros/latex/contrib/skeycommand/}
-\shorttitleurl{http://www.ctan.org/}
+\subtitlefont{\normalsize\normalfont}
+\subtitle{\fbox{\parbox[c]{\textwidth}{This package has been superseded by the
+ key command and key environment commands of the
+ \pkg'{ltxkeys}. It is maintained only for the sake of those already using it.
+ Prospective users should instead employ the facilities of the \pkg'{ltxkeys}.
+}}}
+\titlenote[t1]{The package is available at \url{\titleurltext}.}
+\version{0.4}
+\titleurl{http://mirror.ctan.org/macros/latex/contrib/skeycommand/}
\author{Ahmed Musa\Email{a.musa@rocketmail.com}\\Preston, Lancashire, UK}
-\redef*\abstractname{\vspace{-\baselineskip}}
+\renewdef*\abstractname{\vspace{-\baselineskip}}
\begin{abstract}
-\frameshade[width=\hsize,fillcolor=yellow!20,framesep=2pt,framerule=2pt,
- framecolor=brown]{%
- \frameshade[fillcolor=white,width=2.5cm,framecolor=red!60,framerule=2pt]%
- {\centering SUMMARY}\small
- The \pkgm{skeycommand} provides tools for defining \latex-style commands and environments using parameters and keys together. The advantages of keys over parameters include the facts that the former aren't limited to nine but can rise as desired by the user, and keys are much easier to match to their values than parameters to arguments, especially if the parameters are many. Moreover, keys can have natural functions. The design approach and user interfaces in the \pkg{skeycommand} differ from those found in the \pkgm{keycommand}. This package also provides the \acmd{\newtwooptcmd} and \acmd{\newtwooptenviron} macros for defining new commands and environments with two options/optional arguments. At both key command definition and invocation times there is no reference by the user to the semantics of key parsing and management. All the complex semantics and calculations involved in defining and setting keys are transparent to the user. The user of the \pkg{skeycommand} has access to some (but not all) of the machinery of \asty{xkeyval} and \asty{skeyval} packages (including the pointer mechanism) at the much lesser cost of worrying only about the key names and their values. Native boolean keys are automatically recognized and handled appropriately. However, because of the need to keep the user interface simple, toggle boolean keys aren't available in this package; neither are choice keys.
-}
+\begin{frameshade}[width=\hsize,fillcolor=yellow!20,framesep=2pt,framerule=2pt,
+ framecolor=brown]
+ \frameshade[fillcolor=white,width=2.5cm,framecolor=red!60,framerule=2pt]
+ \centering SUMMARY
+ \endframeshade
+ \small
+ The \pkgm'{skeycommand} provides tools for defining \latex-style commands and environments using parameters and keys together. The advantages of keys over parameters include the facts that the former aren't limited to nine but can rise as desired by the user, and keys are much easier to match to their values than parameters to arguments, especially if the parameters are many. Moreover, keys can have natural functions. The design approach and user interfaces in the \pkgg'{skeycommand} differ from those found in the \pkgm'{keycommand}. This package also provides the \ffx'{\newtwooptcmd,\newtwooptenviron} macros for defining new commands and environments with two options/optional arguments. At both key command definition and invocation times there is no reference by the user to the semantics of key parsing and management. All the complex semantics and calculations involved in defining and setting keys are transparent to the user. The user of the \pkgg'{skeycommand} has access to some of the machinery of \pkg'{ltxkeys} (including the pointer mechanism) at the much lesser cost of worrying only about the key names and their values. Native boolean keys are automatically recognized and handled appropriately. However, because of the need to keep the user interface simple, choice and style keys aren't available in this package.
+\end{frameshade}
\end{abstract}
-\pkgm*{xkeyval,skeyval}
-\NewLet\licname\licensename
-\redef*\licensename{\vspace{-\baselineskip}}
+\newletcs\licname\licensename
+\renewdef*\licensename{\vspace{-\baselineskip}}
\begin{license}
-\frameshade[width=\hsize,fillcolor=white,framesep=2pt,framerule=2pt,
- framecolor=brown]{\small
- \vspace{1ex}\centerline{\licname}\endgraf
- This work (\ie, all the files in the \asty{skeycommand} bundle) may be distributed and/or modified under the conditions of the \lppl (LPPL), either version~1.3 of this license or any later version.
- \endgraf
- The \lppl maintenance status of this software is ``author-maintained''. This software is provided ``as it is,'' without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
- \endgraf
- \endgraf\centerline{\makered{\CopyrightYear}}%
-}
+\begin{frameshade}[width=\hsize,fillcolor=white,framesep=2pt,framerule=2pt,
+ framecolor=brown]%
+ \small
+ \vspace{1ex}\centerline{\licname}\endgraff
+ This work (\ie, all the files in the \pkgg'{skeycommand} bundle) may be distributed and/or modified under the conditions of the \lppl, either version~1.3 of this license or any later version.
+ \endgraff
+ The \lppl maintenance status of this software is \quoted{author-maintained}. This software is provided \quoted{as it is}, without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose.
+ \endgraff
+ \centerline{\makered{\CopyrightYear}}%
+\end{frameshade}
\end{license}
+
\end{frontmatter}
-\newpage
\frameshade[fillcolor=yellow!20,framecolor=brown,framerule=2pt,framesep=2pt,
- width=\hsize]{\tableofcontents}
+ width=\hsize]\tableofcontents
+\endframeshade
+
-\section{Package options}
-\label{sec:pack-options}
+\docsection(sec:pack-options){Package options}
-The package has only one option (namely, \acmdm{verbose}) and can be invoked at the time of loading the package or via the \acmd{\skeycommand} macro. The option \fx{verbose} is a boolean, initially set to false (\ie, its complement, \acmdm{silent}, is true by default). Setting \fx{silent} to \fx{false} is tantamount to setting \fx{verbose} to \fx{true}.
-\begin{example}
-|comm(In style files:)
-\RequirePackage[verbose=true |orr false |orr on |orr off]{skeycommand}
+The package has only one option (namely, \fxim{verbose}) and can be invoked at the time of loading the package or via the \fx{\skeycommand} macro. The option \fx{verbose} is a boolean, initially set to false (\ie, its complement, \fxim{silent}, is true by default). Setting \fx{silent} to \fx{false} is tantamount to setting \fx{verbose} to \fx{true}.
-|comm(In document files:)
-\usepackage[verbose=true |orr false |orr on |orr off]{skeycommand}
+\start{example}[Package options]
+|com(In style or class files:)
+\RequirePackage[verbose=true |orr false]{skeycommand}
+|com(In document files:)
+\usepackage[verbose=true |orr false]{skeycommand}
+|com(In all cases:)
+\skeycommand{verbose=true |orr false}
+\finish{example}
-|comm(In all cases:)
-\skeycommand{verbose=true |orr false |orr on |orr off}
-\end{example}
+If you enter the boolean \fx{verbose} (or \fx{silent}) without value, the value is assumed to be \fx{true}. The \fx{verbose} option is simply passed on to the \pkg'{ltxkeys} to log informational messages in the transcript file. The major task of key parsing for the \pkg'{skeycommand} is undertaken by the \pkg'{ltxkeys}.
-If you enter the boolean \fx{verbose} (or \fx{silent}) without value, the value is assumed to be \fx{true}. The \fx{verbose} option is simply passed on to the \pkgm{skeyval} to log informational messages in the transcript file. The major task of key parsing for the \pkg{skeycommand} is undertaken by the \pkgm{skeyval}.
-\section{User interfaces}
+\docsection(sec:user-interface){User interfaces}
-\subsection{Defining new key commands and environments}
+\docsubsection{Defining new key commands and environments}
The user interfaces for defining new key commands and environments are as follows:
-\begin{macro}
-\newkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\newkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\renewkeycmd|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\renewkeycmd|redstar|vang(cmd)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\start+{newmacro}[\newkeycmd, \renewkeycmd, \newkeyenviron, \renewkeyenviron]
+\newkeycmd|nang(cmd)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\newkeycmd|*|nang(cmd)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+
+\renewkeycmd|nang(cmd)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\renewkeycmd|*|nang(cmd)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+
+\newkeyenviron|nang(env)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\newkeyenviron|*|nang(env)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+
+\renewkeyenviron|nang(env)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\renewkeyenviron|*|nang(env)<|nang(mp)>|(|nang(keyval)|)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\finish{newmacro}
+\fxim*{\newkeycmd, \renewkeycmd, \newkeyenviron, \renewkeyenviron}
+
+Here,
-\newkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\newkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
+\begin{enum}
+\item \ang{cmd} is the new control sequence; \ang{env} is the new environment name.
+\item \ang{mp} is the prefix for macros deriving from the defined keys whose values will be used in the new command or environment (this is called the \emph{macro prefix} in the parlance of keys). If you don't supply the optional \ang{mp}, the package will use the first three letters of the key command or environment name, excluding the escape character but including an added \quoted{at sign} (\fx{@}). The aim of the default \quoted{at sign} is to aid the visual separation of key names from macro prefixes.
+\item \ang{keyval} is the key-value list [\eg, (\ffx{keya=valuea,keyb=valueb})].
+\item \ang{narg} is the number of parameters/arguments for the new command or environment (excluding the keys), as you would normally enter it in \fx{\newcommand} and \fx{\newenvironment}.
+\item \ang{dft1} is the default value for your optional argument (normally the first argument in \hhx'{\newcommand,\newenvironment}).
+\item \ang{defn} is the replacement text (as in \hhx'{\newcommand,\newenvironment}).
+\end{enum}
-\renewkeyenviron|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\renewkeyenviron|redstar|vang(env)<|vang(mprefix)>|:|vang(keyval)|![|vang(narg)][|vang(default1)]{|vang(defn)}
-\end{macro}
+\ltsnote The number of parameters (\ang{narg}) for the new command or environment is limited to eight (8), and not the nine (9) that \tex allows. The ninth one is taken up by the keys. Indeed, we could have designed \ffx{\newkeycmd, \renewkeycmd, \newkeyenviron, \renewkeyenviron} to take nine parameters (apart from the keys) but the need for parameters is greatly diminished by the theoretically limitless number of keys that each command can have.
-Here, \ang{cmd} is the new control sequence; \ang{env} is the new environment name; \ang{mprefix} is the prefix for macros deriving from the defined keys whose values will be used in the new command or environment (this is called the \emph{macro prefix} in the parlance of keys); \ang{keyval} is the key-value list [\eg, (\fx{keya=valuea}, \fx{keyb=valueb})]; \ang{narg} is the number of arguments for the new command or environment (excluding the keys), as you would enter it in \fx{\newcommand} and \fx{\newenvironment}; \ang{default1} is the default value for your optional argument (normally the first argument in \fx{\newcommand} and \fx{\newenvironment}); \ang{defn} is the replacement text (as in \fx{\newcommand} and \fx{\newenvironment}). If you don't supply the optional \ang{mprefix}, the package will use the first three letters of the key command or environment name, excluding the escape character but including an added ``at sign'' (\fx{@}). The aim of default ``at sign'' is to aid the visual separation of key names from macro prefixes.
+Please note the angle brackets surrounding \ang{mp}, and the parentheses surrounding \ang{keyval} in the above syntaxes. The \ang{mp} can't be empty (\ie, don't enter \texttt{<>}) because it will be used by the package to build unique names for the macros that will hold the key values. You can choose not to enter anything for \ang{mp}, \ie, no angled brackets at all. In this case the package will happily use the default prefix \fx{<xxx@>}, where \quoted{\fx{xxx}} represents the first three letters of the new command or environment name, excluding the escape character. Also, \ang{keyval} can't be empty: if it was empty, then we should wonder why you're using key commands instead of \latex's \fx{\newcommand} and \fx{\newenvironment}.
-Please note the angle bracket surrounding \ang{mprefix}, and the parenthesis surrounding \ang{keyval} in the above syntaxes. The \ang{mprefix} can't be empty (\ie, don't enter \texttt{<>}) because it will be used by the package to build unique names for the macros that will hold the key values. You can choose not to enter anything for \ang{mprefix}, and the package will happily use the default prefix \fx{<xxx@>}, where ``\fx{xxx}'' represents the first three letters of the new command or environment name. Also, \ang{keyval} can't be empty: if it was empty, then we should ask: why use key commands instead of \latex's \fx{\newcommand} and \fx{\newenvironment}?
+In \ang{defn}, you refer to your arguments in the normal way. You refer to the values of the keys using macros whose first three characters (after the escape character) are the \ang{mp} or, if \ang{mp} is not supplied, the first three letters of the declared key command (excluding the escape character). The family name of the keys defined via a key command is the key command name itself (without the escape character)---but the user is not required to know anything about such jargons as \quoted{key families}. The package uses this internally in developing the keys. The key prefix is always \quoted{KV}. If any of your key values contains parentheses, simply enclose them in braces, to avoid confusing them with \ang{keyval} list.
-In \ang{defn}, you refer to your arguments in the normal way. You refer to the values of the keys using macros whose first three characters (after the escape character) are the \ang{mprefix} or, if \ang{mprefix} is not supplied, the first three letters of the declared key command (excluding the escape character). The family name of the keys defined via a key command is the key command name itself (without the escape character). The package uses this internally in developing the keys. The key prefix is always ``KV''. If any of your key values contains parenthesis, simply enclose it in braces, to avoid confusing it with \ang{keyval} list.
+The \stform+ give \quoted{short} macros, while the plain (unstarred) variants yield \quoted{long} macros, in the sense usually understood in \latex.
-The starred variants (\RedStar) give ``short'' macros, while the unstarred variants yield ``long'' macros.
+The optional \ang{mp} will be useful if you fear clashes with previously defined key commands. Although, to be defined, key commands must be definable, two key commands may have their first three or four characters identical, thereby leading to clashes of their key-value prefixes.
-The optional \ang{mprefix} will be useful if you fear clashes with previously defined key commands. Although, to be defined, key commands must be definable, two key commands may have their first three or four characters identical, thereby leading to clashes of their key-value prefixes.
-\subsection{Final tokens of every environment}
-\label{sec:env-final-tokens}
+\docsubsection(sec:env-final-tokens){Final tokens of every environment}
-The user can add some tokens to the very end of every subsequent environment by declaring those tokens in \acmdm{\everyeoe}, which by default contains only \latex's \acmd{\ignorespacesafterend}, that is, the \pkg{skeycommand} automatically issues
+The user can add some tokens to the very end of every subsequent environment by declaring those tokens in \fxim{\skceveryeoe}, which by default contains only \latex's \fxi{\ignorespacesafterend}, that is, the \pkg'{skeycommand} automatically issues
-\begin{example}
-|makered(\everyeoe){\ignorespacesafterend}
-\end{example}
+\start{example}[\skceveryeoe]
+|makered(\skceveryeoe){\ignorespacesafterend}
+\finish{example}
-It is important to note that new tokens are prepended (not appended) to the hook that underlies \fx{\everyeoe}, such that by default \fx{\ignorespacesafterend} always comes last in the list. You can empty the token list \fx{\everyeoe} by issuing the command \fx*{\everyeoe{}} and rebuild the list afresh, still by prepending elements to it. \fx{\everyeoe} isn't actually a token list register, but has been designed to behave like one. It is safe to issue \fx{\everyeoe} and/or \fx*{\everyeoe{}} in the pre-code part of the environment. The following example illustrates this point.
+It is important to note that new tokens are prepended (not appended) to the hook that underlies \fx{\skceveryeoe}, such that by default \fx{\ignorespacesafterend} always comes last in the list. You can empty the token list \fx{\skceveryeoe} by issuing \fx*{\skceveryeoe{}} and rebuild the list afresh, still by prepending elements to it. \fx{\skceveryeoe} isn't actually a token list register, but has been designed to behave like one. It is safe to issue \fx{\skceveryeoe}\fnu{token} and/or \fx*{\skceveryeoe{}} in the pre-code part of the environment. The following example illustrates this point.
-\begin{example}
-\newkeyenviron*{testenv}<mp@>|:xwidth=2cm,ywidth=1.5cm,
- bool=off,body=\null,author=\null|!{%
+\start{example}[\newkeyenviron]
+\newkeyenviron*{testenv}<mp@>|(xwidth=2cm,ywidth=1.5cm,
+ bool=false,body=\null,author=\null|){%
\centering\fbox{\parbox{\mp@xwidth}{\mp@body}}
\ifmp@bool\color{red}\fi
\fbox{\parbox{\mp@ywidth}{\mp@body}}%
\normalcolor
- |makered(\everyeoe){}%
- |makered(\everyeoe){\ignorespacesafterend}%
- |makered(\everyeoe){\endgraf\vskip\baselineskip\centerline{\itshape\mp@author}}
-}{}
+ |makered(\skceveryeoe){}%
+ |makered(\skceveryeoe){\ignorespacesafterend}%
+ |makered(\skceveryeoe){\endgraf\vskip\baselineskip
+ \centerline{\itshape\mp@author}}
+ \def\testmacroa##1{aaa##1bbb}|com(just to test parameter use)
+}{%
+ \def\testmacrob##1{xxx##1yyy}%
+}
\begin{document}
-\begin{testenv}|:xwidth=5cm,ywidth=4cm,bool=on,
- author={Cornelius Tacitus \textup{|:55--120~AD|!}},body={%
+\begin{testenv}|(xwidth=5cm,ywidth=4cm,bool=true,
+ author={Cornelius Tacitus \textup{|(55--120~AD|)}},body={%
Love of fame is the last thing even learned men can bear
to be parted from.
-}|!%
+}|)%
\end{testenv}
\end{document}
-\end{example}
+\finish{example}
%%+
\newkeyenviron*{testenv}<mp@>(xwidth=2cm,ywidth=1.5cm,
- boola=off,body=\null,author=\null){%
+ boola=false,body=\null,author=\null){%
\centering\fbox{\parbox{\mp@xwidth}{\raggedright\mp@body}}%
{\ifmp@boola\color{red}\fi
\hspace*{2mm}\fbox{\parbox{\mp@ywidth}{\raggedright\mp@body}}}%
- \everyeoe{}%
- \everyeoe{\ignorespacesafterend}%
- \everyeoe{\endgraf\vskip\baselineskip
- \centerline{\itshape\mp@author}}%
-}{}%
-\printexample{%
- \begin{testenv}(xwidth=5cm,ywidth=6cm,boola=on,
+ \skceveryeoe{}%
+ \skceveryeoe{\ignorespacesafterend}%
+ \skceveryeoe{\endgraf\vskip\baselineskip
+ \centerline{\itshape\mp@author}}%
+ \def\testmacroa##1{aaa##1bbb}%
+}{\def\testmacrob##1{xxx##1yyy}}%
+
+\printexample
+ \begin{testenv}(xwidth=5cm,ywidth=6cm,boola=true,
author={Cornelius Tacitus \textup{(c.55--c.120~AD)}},
body={Love of fame is the last thing even learned men can bear
to be parted from.})%
\end{testenv}%
-}
-\everyeoe{}
-\everyeoe{\ignorespacesafterend}
-%%+
+\endprintexample
+
+\skceveryeoe{}
+\skceveryeoe{\ignorespacesafterend}
+%%-
+
-\subsection{Invoking new key commands and environments}
+\docsubsection(sec:invoking-new-cmd){Invoking new key commands and environments}
The syntaxes for calling new key commands and environments are as follows:
-\begin{macro}
-\cmd[|vang(arg1)]{|vang(arg2)}...{|vang(argn)}|:|vang(keyval)|!
+\start'{macro}[Invoking commands and environments]
+\cmd[|nang(arg1)]{|nang(arg2)}...{|nang(argn)}|(|nang(keyval)|)
-\begin{env}[|vang(arg1)]{|vang(arg2)}...{|vang(argn)}|:|vang(keyval)|!
+\begin{env}[|nang(arg1)]{|nang(arg2)}...{|nang(argn)}|(|nang(keyval)|)
environment body
\end{env}
-\end{macro}
+\finish{macro}
+
where \fx{\cmd} and \fx{env} have been previously defined using key command and key environment. You refer to your arguments using parameter number one \fx{#1} onwards, up to a maximum of \fx{#8} (yes, \fx{#8}, not \fx{#9}). Here, \ang{keyval} (including the parenthesis) are optional arguments: you can omit them if you want to use the values of the keys set at key command definition time. Using keys is preferable to using parameters: you don't have to match parameters to arguments and, in principle, there is no limit to the number of keys that are permissible.
-\subsection[Commands with two optional arguments]
+
+\docsubsection[Commands with two optional arguments]
{Commands and environments with two optional arguments}
-The \pkg{skeycommand} uses the following macros internally. They can be used to define new commands and environments with two optional arguments. Their philosophy, intent, and use syntaxes differ from those of the \pkgm{twoopt}. They may be useful to some users, although I recommend the use of the above key commands.
+The \pkg'{skeycommand} uses the following macros internally. They can be used to define new commands and environments with two optional arguments. Their philosophy, intent, and use syntaxes differ from those of the \pkgm'{twoopt}. They may be useful to some users in a few circumstances, but I recommend the use of the above key commands in all instances.
-\begin{macro}
-\newtwooptcmd|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
-\newtwooptcmd|redstar|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
+\start+{newmacro}[\newtwooptcmd,\newtwooptenviron, etc]
+\newtwooptcmd|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\newtwooptcmd|*|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
-\renewtwooptcmd|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
-\renewtwooptcmd|redstar|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
+\renewtwooptcmd|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\renewtwooptcmd|*|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
-\newtwooptenviron|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
-\newtwooptenviron|redstar|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
+\newtwooptenviron|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\newtwooptenviron|*|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
-\renewtwooptenviron|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
-\renewtwooptenviron|redstar|vang(cmd)[|vang(narg)][|vang(default1)]{|vang(defn)}
-\end{macro}
+\renewtwooptenviron|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\renewtwooptenviron|*|nang(cmd)[|nang(narg)][|nang(dft1)]{|nang(defn)}
+\finish{newmacro}
+\fxim*{\newtwooptcmd,\renewtwooptcmd,\newtwooptenviron,\renewtwooptenviron}
\ang{narg} is the total number of arguments, including the first and second optional arguments.
-Where are the second optional arguments here, you might be wondering? The second optional argument is usually empty and doesn't appear at command definition time. The second optional argument isn't the second argument of your command (as in \pkg{twoopt}), but the last. At command invocation, if you don't supply a value for the second optional argument, the command will assume it to be empty. But how do you supply a value for the second optional argument? The next section shows how.
+Where are the second optional arguments here, you might be wondering? The second optional argument is usually empty and doesn't appear at command definition time. The second optional argument isn't the second argument of your command (as in \pkgg'{twoopt}), but the last. At command invocation, if you don't supply a value for the second optional argument, the command will assume it to be empty. But how do you supply a value for the second optional argument? The next section shows how.
+
-\subsubsection[Invoking commands and environments]
+\docsubsubsection[Invoking commands and environments]
{Invoking commands and environments with two optional arguments}
The syntaxes for calling commands and environments with two optional arguments are as follows:
-\begin{macro}
-\cmd[|vang(1st optarg)]{|vang(arg2)}...{|vang(argn)}|:|vang(2nd optarg)|!
+\start{macro}[Commands and environments with two optional arguments]
+\cmd[|nang(1st optarg)]{|nang(arg2)}...{|nang(argn)}|(|nang(2nd optarg)|)
-\begin{env}[|vang(1st optarg)]{|vang(arg2)}...{|vang(argn)}|:|vang(2nd optarg)|!
+\begin{env}[|nang(1st optarg)]{|nang(arg2)}...{|nang(argn)}|(|nang(2nd optarg)|)
environment body
\end{env}
-\end{macro}
+\finish{macro}
If \ang{2nd optarg} is empty at command or environment invocation, the command or environment will assume it to be empty. Now you can see the conceptual link between \fx{\newtwooptcmd} (and friends) and \fx{\newkeycmd} (and friends).
-\section{Examples}
+
+\docsection(sec:examples){Examples}
+
+The source codes for the following examples are available in the accompanying user guide (file
+\file[tex]{skeycommand-guide}).
+
\hbadness\@M
-\begin{example}
-|comm(The following is a macro of 3 parameters and 4 keys:)
+\start{example}[\newkeycmd]
+|com(The following is a macro of 3 parameters and 4 keys:)
+|makered(\newkeycmd*)\demomacro|(name=Steve,height=1.60m,weight=75kg,
+ tested=true|)[3][Registered]{%
+ \def\x{#1}\def\y{#2}\def\z{#3}%
+ \noindent\rule{4cm}{1pt}\endgraf\smallskip
+ \noindent\textcolor{blue}{\texttt{\string\demomacro}} macro:
+ \endgraf\medskip
+ \ifdem@tested
+ \edef\cleared{\dem@name}%
+ \noindent\fbox{Name given: \dem@name}%
+ \else
+ \let\cleared\relax
+ Name not given
+ \fi
+ \endgraf\medskip
+ \noindent \x, \y, \z
+ \endgraf\smallskip
+ \noindent\rule{4cm}{1pt}%
+ \def\testmacro##1{xxx##1yyy}%
+}
+|com(|makered(\dem@name) will hold the value supplied for |makered(`name') by the user of)
+|com(\demomacro. |makered(`dem') is from |makered(`demomacro'). Notice the LaTeX-like)
+|com(syntax of this command. The user doesn't have to bother about)
+|com(the nitty-gritty of key infrastructure.)
-|makered(\newkeycmd*)\demomacro|:name=Steve,height=1.60m,weight=75kg,
- tested=true|![3][Registered]{%
+|com(You can use the following statement to instruct the user)
+|com(to always supply value for `name' in \demomacro macro:)
+\finish{example}
+
+%%+
+\newkeycmd*\demomacro(\needvalue{name}=Steve,height=1.60m,weight=75kg,
+ tested=true)[3][Registered]{%
\def\x{#1}\def\y{#2}\def\z{#3}%
+ \noindent\rule{4cm}{1pt}\endgraf\smallskip
+ \noindent\textcolor{blue}{\texttt{\string\demomacro}} macro:
+ \endgraf\medskip
\ifdem@tested
\edef\cleared{\dem@name}%
+ \noindent\fbox{Name given: \dem@name}%
\else
\let\cleared\relax
+ Name not given
\fi
+ \endgraf\medskip
+ \noindent \x, \y, \z
+ \endgraf\smallskip
+ \noindent\rule{4cm}{1pt}%
+ \def\testmacro##1{xxx##1yyy}%
}
-|comm(|makered(\dem@name) will hold the value supplied for |makered(`name') by the user of)
-|comm(\demomacro. |makered(`dem') is from |makered(`demomacro'). Notice the LaTeX-like)
-|comm(syntax of this command. The user doesn't have to bother about)
-|comm(the nitty-gritty of key infrastructure.)
-|comm(You can use the following statement to instruct the user)
-|comm(to always supply value for `name' in \demomacro macro:)
+\printexample
+ \demomacro[data1]{data2}{data3}(name=John Stone,
+ height=1.45m,weight=55kg,tested=true)%
+\endprintexample
+%%-
-|makered(\uservaluekeys)[KV]{demomacro}{name}
-\end{example}
+The following requires the user to always supply a value for \quoted{name}:
-Instead of using the macro \acmd{\uservaluekeys}, you can use the full pointer system of the \pkg{skeyval}. For example, the following requires the user to supply a value for `name' and the package will save that value for some later use:
-\begin{example}
-|makered(\newkeycmd)*\demomacro|:|makered(\uservalue\savevalue|mcolor({)name|mcolor(}))=Steve,
- height=1.60m,wieght=75kg,tested=true|![3][Registered]{%
+\start{example}[\newkeycmd]
+|makered(\newkeycmd)*\demomacro|(\needvalue{name}=Steve,height=1.60m,wieght=75kg,tested=true|)
+ [3][Registered]{%
\def\x{#1}\def\y{#2}\def\z{#3}%
- \edef\xxx{\dem@name}%
+ \noindent\rule{4cm}{1pt}\endgraf\smallskip
+ \noindent\textcolor{blue}{\texttt{\string\demomacro}} macro:
+ \endgraf\medskip
+ \ifdem@tested
+ \edef\cleared{\dem@name}%
+ \noindent\fbox{Name given: \dem@name}%
+ \else
+ \let\cleared\relax
+ Name not given
+ \fi
+ \endgraf\medskip
+ \noindent \x, \y, \z
+ \endgraf\smallskip
+ \noindent\rule{4cm}{1pt}%
}
-|comm(User now calls the \demomacro macro:)
-\demomacro[data1]{data2}{data3}|:name,height=1.55m,wieght=55kg,
- tested=true|!
+|com(User now calls the \demomacro macro:)
+\demomacro[data1]{data2}{data3}|(name,height=1.55m,wieght=55kg,
+ tested=true|)
|makered(|tto Error: no value supplied for `name')
-\end{example}
-
-You can use the saved value of key \fx{name} within \fx{\demomacro}. Suppose, oddly, that the key \fx{height} can use the value of the key \fx{name}, then we can do
-
-\begin{example}
-\demomacro[data1]{data2}{data3}|:name=John,
- height=|makered(\usevalue){|mcolor(name)},wieght=55kg,tested=true|!%
-\end{example}
+\finish{example}
If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro will use the above default value of that key. For example, in the following, the key \fx{height} is missing, so the macro will use its default value specified at key definition time:
-\begin{example}
-\demomacro[data1]{data2}{data3}|:name=John,weight=55kg,tested=true|!
-\end{example}
-
-\begin{example}
-|makered(\newkeycmd*)\firstmacro<skc@>|:name=Steve,
- height=1.6m|![8][xxx]{%
- \noindent Name: \skc@name\\
- Height: \skc@height\\
- Details: #1#2#3#4#5#6#7#8%
- \endgraf
+\start{example}
+\demomacro[data1]{data2}{data3}|(name=John,weight=55kg,tested=true|)
+\finish{example}
+
+\start{example}[\newkeycmd]
+|makered(\newkeycmd*)\firstmacro<skc@>|(name=Steve,height=1.6m|)[8][xxx]{%
+ \noindent\textcolor{purple}{\texttt{\string\firstmacro}} macro:
+ \endgraf\vskip.25\baselineskip
+ \noindent Name: \skc@name\\Height: \skc@height\\
+ Details: #1#2#3#4#5#6#7#8\endgraf
}
\begin{document}
\firstmacro[1]{-2}{-3}{-4}{-5}{-6}{-7}{-8}%
- |:name=John {|:Winner|!},height=1.54m|!
+ |(name=John {|(Winner|)},height=1.54m|)
\end{document}
-\end{example}
+\finish{example}
%%+
\newkeycmd*\firstmacro<skc@>(name=Steve,height=1.6m)[8][xxx]{%
+ \noindent\textcolor{purple}{\texttt{\string\firstmacro}} macro:
+ \endgraf\vskip.25\baselineskip
\noindent Name: \skc@name\\Height: \skc@height\\
Details: #1#2#3#4#5#6#7#8\endgraf
}
-\printexample{%
+\printexample
\firstmacro[1]{-2}{-3}{-4}{-5}{-6}{-7}{-8}%
(name=John {(Winner)},height=1.54m)%
+\endprintexample
+%%-
+
+\start{example}[\newkeyenviron]
+\NewBoxes{MiniBox}
+|makered(\newkeyenviron*){xboxedminipage}<boxm@>|(width=\hsize,parindent=0em,
+ boxposition=center,innerposition=c,textposition=right,fboxrule=.4pt,
+ fboxsep=2pt|){%
+ \begingroup
+ \fboxsep\boxm@fboxsep\fboxrule\boxm@fboxrule
+ \dimensionexpr!\BoxWidth{\boxm@width-2\fboxsep-2\fboxrule}%
+ \simpleexpandarg\CheckInput\boxm@boxposition{center,right,left,justified}{%
+ \edef\boxm@boxposition{%
+ \ifcase\nr center\or flushright\or flushleft\or\fi
+ }%
+ }{%
+ \SKC@err{Invalid value `\boxm@boxposition' for `boxposition'}\@ehc
+ }%
+ \def\PrintBox{%
+ \simpleexpandarg\begin\boxm@boxposition
+ \fbox{\usebox{\MiniBox}}%
+ \simpleexpandarg\end\boxm@boxposition
+ \endgroup
+ }%
+ \begin{lrbox}{\MiniBox}%
+ \begin{minipage}[\boxm@innerposition]{\BoxWidth}%
+ \csname flush\boxm@textposition\endcsname
+}{%
+ \end{minipage}\end{lrbox}\PrintBox
}
+|com(Valid values for `position' are `right', `left', `center', and)
+|com(`justified'.)
+\finish{example}
+
%%+
+\newbox\MiniBox
+\newkeyenviron*{xboxedminipage}<boxm@>(width=\hsize,parindent=0em,
+ boxposition=left,innerposition=c,textposition=right,
+ fboxrule=.4pt,fboxsep=2pt){%
+ \begingroup
+ \fboxsep\boxm@fboxsep\fboxrule\boxm@fboxrule
+ \dimensionexpr!\BoxWidth{\boxm@width-2\fboxsep-2\fboxrule}%
+ \oifinlistbTF\boxm@boxposition{center,right,left,justified}{%
+ \edef\boxm@boxposition{%
+ \ifcase\nr center\or flushright\or flushleft\or\fi
+ }%
+ }{%
+ \SKC@err{Invalid value '\boxm@boxposition' for 'boxposition'}\@ehc
+ }%
+ \def\PrintBox{%
+ \simpleexpandarg\begin\boxm@boxposition
+ \fbox{\usebox{\MiniBox}}%
+ \simpleexpandarg\end\boxm@boxposition
+ \endgroup
+ }%
+ \begin{lrbox}{\MiniBox}%
+ \begin{minipage}[\boxm@innerposition]{\BoxWidth}%
+ \csname flush\boxm@textposition\endcsname
+}{%
+ \end{minipage}\end{lrbox}\PrintBox
+}
-\begin{example}
-|makered(\newkeyenviron*){vdescription}<skv@>|:labelwidth=5pt,
- labelsep=5pt|![2][\qquad]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+\printexample
+ \begin{xboxedminipage}(width=.5\hsize,parindent=0em,fboxrule=2pt,
+ innerposition=c,boxposition=center,textposition=right)%
+ A boxed minipage environment that accepts verbatim text like this:
+ \ttcl{macrocolor}{\fx{xxx_yyy_zzz}} \fx{\verb+xxx+}.
+ \end{xboxedminipage}%
+\endprintexample
+%%-
+
+\start{example}[\newkeyenviron]
+|makered(\newkeyenviron*){vdescription}<skv@>|(labelwidth=5pt,
+ labelsep=5pt|)[2][\qquad]
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\skv@labelwidth
+ \dimensionexpr!\leftmargin{\labelwidth+\skv@labelwidth
+\labelsep+\skv@labelsep}}%
\item[Description Preamble] #2%
}{\end{list}}
\begin{document}
\begin{vdescription}[Description Postamble]%
- {$\star\star\star$}|:labelwidth=10pt,labelsep=10pt|!
+ {$\star\star\star$}|(labelwidth=10pt,labelsep=10pt|)
\item[Item 1] xxx
\item[Item 2] yyy
\item[Description Postamble] $\langle$End of my
environment$\rangle$
\end{vdescription}
\end{document}
-\end{example}
+\finish{example}
%%+
\newkeyenviron*{vdescription}<skv@>(labelwidth=5pt,labelsep=5pt)[2][\qquad]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\skv@labelwidth
+ \dimensionexpr!\leftmargin{\labelwidth+\skv@labelwidth
+\labelsep+\skv@labelsep}}%
\item[Description Preamble] #2%
}{\end{list}}
-\printexample{%
+\printexample
\begin{vdescription}[Alexandre P\'ere Dumas (1802--1870)]%
{$\langle\star\star\star\rangle$}(labelwidth=5pt,labelsep=5pt)
\item[Alexandre P\'ere Dumas (1802--1870)] All for one, and one for all.
\item[Alexandre Fils Dumas (1824--1895)] All generalizations are dangerous, even this one.
\item[Description Postamble] $\langle\bullet\bullet\bullet\rangle$
\end{vdescription}%
-}
-%%+
+\endprintexample
+%%-
\EnableMathInExampleCode
-\begin{example}
-\newkeyenviron*{dialog}<dia@>|:labelwidth=5pt,labelsep=5pt|![1][\qquad]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
- \centering\textbf{G. H. Hardy vs.\ Srinivasa Ramanujan |:1920|!}%
+\start{example}[\newkeyenviron]
+|makered(\newkeyenviron*){dialog}<dia@>|(labelwidth=5pt,labelsep=5pt,
+ title=\null,source=\null,sourcecolor=blue|)[1][\qquad]
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
+ \centering\textbf{\dia@title}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\dia@labelwidth
+ \dimensionexpr!\leftmargin{\labelwidth+\dia@labelwidth
+\labelsep+\dia@labelsep}}%
-}{\end{list}}
+}{%
+ \\\flushright\textcolor{\dia@sourcecolor}{\dia@source}%
+ \end{list}%
+}
-\begin{dialog}[Ramanujan]|:labelwidth=20pt,labelsep=10pt|!%
+\begin{dialog}[Ramanujan]|(labelwidth=0pt,labelsep=0pt,
+ title={G. H. Hardy vs.\ Srinivasa Ramanujan |(1920|)},
+ source={S. Ramanujan |(1887--1920|), Collected Works}|)%
\item[Hardy] Srinivasa, can you see that number from here, the
one on that taxi cab?
\item[Ramanujan] I can see it, it is 1729.
@@ -339,20 +501,26 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
\item[Ramanujan] They are $1^3+12^3$ and $9^3+10^3$.
\item[Hardy] I am impressed! When did you work that out?
\end{dialog}
-\end{example}
+\finish{example}
\DisableMathInExampleCode
%%+
-\newkeyenviron*{dialog}<dia@>(labelwidth=5pt,labelsep=5pt)[1][\qquad]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
- \centering\textbf{G. H. Hardy vs.\ Srinivasa Ramanujan (1920)}%
+\newkeyenviron*{dialog}<dia@>(labelwidth=5pt,labelsep=5pt,
+ title=\null,source=\null,sourcecolor=blue)[1][\qquad]
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
+ \centering\textbf{\dia@title}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\dia@labelwidth
+ \dimensionexpr!\leftmargin{\labelwidth+\dia@labelwidth
+\labelsep+\dia@labelsep}}%
-}{\end{list}}
+}{%
+ \\\flushright\textcolor{\dia@sourcecolor}{\dia@source}%
+ \end{list}%
+}
-\printexample{%
- \begin{dialog}[Ramanujan](labelwidth=0pt,labelsep=0pt)%
+\printexample
+ \begin{dialog}[Ramanujan](labelwidth=0pt,labelsep=0pt,
+ title={G. H. Hardy vs.\ Srinivasa Ramanujan (1920)},
+ source={S. Ramanujan (1887--1920), Collected Works})%
\item[Hardy] Srinivasa, can you see that number from here, the one on that taxi cab?
\item[Ramanujan] I can see it, it is 1729.
\item[Hardy] What a dull registration number to have on your vehicle?
@@ -363,27 +531,27 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
\item[Ramanujan] They are $1^3+12^3$ and $9^3+10^3$.
\item[Hardy] I am impressed! When did you work that out?
\end{dialog}%
-}
-%%+
+\endprintexample
+%%-
-\begin{example}
-\def\@barbara{An author writing an article for publication
+\start{example}[\newkeyenviron]
+\def\@beeton{An author writing an article for publication
in TUGboat is encouraged to create it on a computer file
and submit it on magnetic tape.}
-\def\barbara{BARBARA BEETON,\\ \emph{How to Prepare a File For
- Publication in TUGboat} |:1981|!}
+\def\beeton{Barbara BEETON,\\ \emph{How to Prepare a File For
+ Publication in TUGboat} |(1981|)}
\def\@hieronymus{The printer should refuse to employ wandering
men, foreigners who, after having committed some grievous
error, can easily disappear and return to their own country.}
-\def\hieronymus{HIERONYMUS HORNSCHUCH |:1608|!}
+\def\hieronymus{HIERONYMUS HORNSCHUCH |(1608|)}
-|comm(The macros \@barbara, \barbara, etc. are just shorthands:)
-|comm(you can enter their contents directly in key commands,)
-|comm(as we shall see later.)
+|com(The macros \@beeton, \beeton, etc. are just shorthands:)
+|com(you can enter their contents directly in key commands,)
+|com(as we shall see later.)
-|makered(\newkeyenviron){Quote}<mp@>|:left=\leftmargin,
+|makered(\newkeyenviron){Quote}<mp@>|(left=\leftmargin,
right=\rightmargin,mode=false,whoby=\null,
- source=\null|!{%
+ source=\null|){%
\begin{list}{}{%
\setlength\leftmargin{\mp@left}%
\setlength\rightmargin{\mp@right}%
@@ -398,28 +566,28 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
}
\usepackage{lipsum}
\lipsum[1]
-\begin{Quote}|:left=30pt,right=30pt,mode=false,
- whoby=\barbara,source={The \TeX Book}|!%
- {\ifmp@mode\color{red}\else\color{blue}\fi\@barbara}
+\begin{Quote}|(left=30pt,right=30pt,mode=false,
+ whoby=\beeton,source={The \TeX Book}|)%
+ {\ifmp@mode\color{red}\else\color{blue}\fi\@beeton}
\end{Quote}
\lipsum[1]
-\begin{Quote}|:left=20pt,right=20pt,mode=true,
- whoby=\hieronymus,source={The \TeX Book}|!%
+\begin{Quote}|(left=20pt,right=20pt,mode=true,
+ whoby=\hieronymus,source={The \TeX Book}|)%
{\ifmp@mode\color{red}\else\color{blue}\fi\@hieronymus}
\end{Quote}
\lipsum[1]
-\begin{Quote}|:left=40pt,right=40pt,mode=false,
- whoby={EDWARD ELGAR},source={Letter to A.\ J.\ Jaeger |:1898|!}|!%
+\begin{Quote}|(left=40pt,right=40pt,mode=false,
+ whoby={EDWARD ELGAR},source={Letter to A.\ J.\ Jaeger |(1898|)}|)%
{\ifmp@mode\color{red}\else\color{blue}\fi
If I write a tune you all say it's commonplace---if I
don't, you all say it's rot.%
}%
\end{Quote}
-\begin{Quote}|:left=40pt,right=40pt,mode=false,
- whoby={ALBERT EINSTEIN},source={The World As I See It}|!%
+\begin{Quote}|(left=40pt,right=40pt,mode=false,
+ whoby={ALBERT EINSTEIN},source={The World As I See It}|)%
{\ifmp@mode\color{red}\else\color{blue}\fi
If you want to find out anything from the theoretical physicists
about the methods they use, I advise you to stick closely to
@@ -427,76 +595,77 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
on their deeds.%
}%
\end{Quote}
-\end{example}
+\finish{example}
%%+
-\newkeyenviron{Quote}<mp@>(left=\leftmargin,
+\newkeyenviron{Quote}<mpi@>(left=\leftmargin,
right=\rightmargin,mode=false,whoby=\null,source=\null){%
\begin{list}{}{%
- \setlength\leftmargin{\mp@left}%
- \setlength\rightmargin{\mp@right}%
+ \setlength\leftmargin{\mpi@left}%
+ \setlength\rightmargin{\mpi@right}%
}%
\item[]\makebox[0pt][r]{``}%
}{%
\unskip\makebox[0pt][l]{''}%
- \item[]\flushright\mp@whoby
- \item[]\flushleft\small Source:~\mp@source
+ \item[]\flushright\mpi@whoby
+ \item[]\flushleft\small Source:~\mpi@source
\end{list}%
\vskip\baselineskip
}
-\def\@barbara{An author writing an article for publication
+\def\@beeton{An author writing an article for publication
in TUGboat is encouraged to create it on a computer file
and submit it on magnetic tape.}
-\def\barbara{BARBARA BEETON,\\ \emph{How to Prepare a File For
+\def\beeton{B. BEETON,\\ \emph{How to Prepare a File For
Publication in TUGboat} (1981)}
\def\@hieronymus{The printer should refuse to employ wandering
men, foreigners who, after having committed some grievous
error, can easily disappear and return to their own country.}
\def\hieronymus{HIERONYMUS HORNSCHUCH (1608)}
-\printexample{%
+
+\printexample
\begin{Quote}(left=30pt,right=30pt,mode=false,
- whoby=\barbara,source={The \TeX Book})%
- {\ifmp@mode\color{red}\else\color{blue}\fi\@barbara}%
+ whoby=\beeton,source={The \TeX Book})%
+ {\ifmpi@mode\color{red}\else\color{blue}\fi\@beeton}%
\end{Quote}%
-}
-\printexample*{%
+\endprintexample
+\printexample*
\begin{Quote}(left=40pt,right=40pt,mode=true,
whoby=\hieronymus,source={The \TeX Book})%
- {\ifmp@mode\color{red}\else\color{blue}\fi\@hieronymus}%
+ {\ifmpi@mode\color{red}\else\color{blue}\fi\@hieronymus}%
\end{Quote}%
-}
-\printexample*{%
+\endprintexample
+\printexample*
\begin{Quote}(left=80pt,right=80pt,mode=false,
whoby={EDWARD ELGAR (1898)},source={Letter to A.\ J.\ Jaeger})%
- {\ifmp@mode\color{red}\else\color{blue}\fi
+ {\ifmpi@mode\color{red}\else\color{blue}\fi
If I write a tune you all say it's commonplace---if I
don't, you all say it's rot.%
}%
\end{Quote}%
-}
-\printexample*{%
+\endprintexample
+\printexample*
\begin{Quote}(left=40pt,right=40pt,mode=false,
whoby={ALBERT EINSTEIN},source={The World As I See It})%
- {\ifmp@mode\color{red}\else\color{blue}\fi
+ {\ifmpi@mode\color{red}\else\color{blue}\fi
If you want to find out anything from the theoretical physicists
about the methods they use, I advise you to stick closely to
one principle: don't listen to their words, fix your attention
on their deeds.%
}%
\end{Quote}%
-}
-%%+
+\endprintexample
+%%-
-\begin{example}
+\start{example}[\newkeyenviron]
\usepackage{lipsum}
\newcounter{notecnt}
\def\noteparameters{\labelsep=\notelabelsep
\itemindent=\noteitemindent \leftmargin=\noteleft
\rightmargin=\noteright \labelwidth=\notelabelwidth}
-|makered(\newkeyenviron*){notex}<note>|:labelsep=8pt,itemindent=8pt,
+|makered(\newkeyenviron*){notex}<note>|(labelsep=8pt,itemindent=8pt,
left=\parindent,right=\parindent,labelwidth=0pt,
- preskip=0ex,aftskip=0ex|![1][\baselineskip]%
+ preskip=0ex,aftskip=0ex|)[1][\baselineskip]%
{\begin{list}{\textsc{Note}~\arabic{notecnt}:}%
{\noteparameters\usecounter{notecnt}}%
\vskip#1}%
@@ -504,13 +673,13 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
\begin{document}
\noindent\lipsum[1]
-\begin{notex}[\notepreskip]|:labelsep=8pt,itemindent=8pt,
- left=30pt,right=30pt,labelwidth=0pt,preskip=2ex,aftskip=2ex|!
+\begin{notex}[\notepreskip]|(labelsep=8pt,itemindent=8pt,
+ left=30pt,right=30pt,labelwidth=0pt,preskip=2ex,aftskip=2ex|)
\item \lipsum[1]
\item \lipsum[1]
\end{notex}
\end{document}
-\end{example}
+\finish{example}
%%+
\newcounter{notecnt}
@@ -527,8 +696,8 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
}%
{\end{list}\vskip\noteaftskip}
-\StartRecurrentList{2}
-\printexample*{%
+\startrecurrentlist{2}
+\printexample*
\begin{notex}[\notepreskip](labelsep=8pt,itemindent=8pt,
left=20pt,right=20pt,labelwidth=0pt,preskip=2ex,aftskip=2ex)%
\item The play was a great success, but the audience was a disaster. (Oscar Wilde, 1854--1900)
@@ -536,16 +705,16 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
\item If you hate a person, you hate something in him that is part of yourself. What isn't part of ourselves doesn't disturb us. (Hermann Hesse, 1877-1962)
\item If a man makes a better mouse-trap than his neighbor, though he builds his house in the woods, the world will make a beaten path to his door. (Ralph Waldo Emerson, 1803--1882)
\end{notex}
-}
-\EndRecurrentList
-%%+
+\endprintexample
+\endrecurrentlist
+%%-
-\begin{example}
+\start{example}[\renewkeyenviron]
\def\sitation{}
\def\sitparameters{\leftmargin=\sit@left\rightmargin=\sit@right}
\newbox\sitname
-|makered(\renewkeyenviron*){sitation}|:left=\parindent,
- right=\parindent,nolinebreak=1|![2][\relax]%
+|makered(\renewkeyenviron*){sitation}|(left=\parindent,
+ right=\parindent,nolinebreak=1|)[2][\relax]%
{\def\quoteend{#1}\sitparameters
\sbox\sitname{\textit{#2}}%
\begin{quote}\quoteend
@@ -557,22 +726,22 @@ If for any key in \fx{\demomacro} you don't supply a key-value pair, the macro w
\begin{document}
\begin{sitation}[\sit@nolinebreak]%
- {Theodore Roosevelt~|:1858--1919|!}%
- |:left=30pt,right=30pt,nolinebreak=2|!
+ {Theodore Roosevelt~|(1858--1919|)}%
+ |(left=30pt,right=30pt,nolinebreak=2|)
No man is justified in doing evil on the ground of expediency.
\end{sitation}
-\begin{sitation}{George Bernard Shaw |:1856-1950|!}%
+\begin{sitation}{George Bernard Shaw |(1856-1950|)}%
A man of great common sense and good taste; meaning thereby
-a man without originality or moral courage.
+a man without originality and/or moral courage.
\end{sitation}
\end{document}
-\end{example}
+\finish{example}
%%+
\def\sitation{}
\def\sitparameters{\leftmargin=\sit@left\rightmargin=\sit@right}
-\csnewbox{sitname}
+\csnnewbox{sitname}
\renewkeyenviron*{sitation}(left=\parindent,
right=\parindent,nolinebreak=1)[2][\relax]%
{\def\quoteend{#1}\sitparameters
@@ -584,134 +753,134 @@ a man without originality or moral courage.
\box\sitname
\end{quote}\quoteend
}
-\printexample{%
+\printexample
\begin{sitation}[\vskip2ex\relax]{Theodore Roosevelt~\textup{(1858--1919)}}%
(left=30pt,right=30pt,nolinebreak=2)%
No man is justified in doing evil on the ground of expediency.
\end{sitation}%
-}
-\printexample*{%
+\endprintexample
+\printexample*
\begin{sitation}{George Bernard Shaw~\textup{(1856-1950)}}%
(left=0pt,right=0pt,nolinebreak=2)%
A man of great common sense and good taste;
meaning thereby a man without originality and/or moral courage.
\end{sitation}%
-}
-%%+
+\endprintexample
+%%-
-\begin{example}
-|makered(\newkeyenviron*){vdescription}|:labelwidth=5pt,
- labelsep=5pt|![2][\qquad]%
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+\start{example}[\newkeyenviron]
+|makered(\newkeyenviron*){vdescription}|(labelwidth=5pt,
+ labelsep=5pt|)[2][\qquad]%
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\vde@labelwidth
+ \dimensionexpr!\leftmargin{\labelwidth+\vde@labelwidth
+\labelsep+\vde@labelsep}}%
\item[Description Preamble] #2%
}{\end{list}}
\begin{document}
\begin{vdescription}[Description Postamble]{+++xxx+++}%
- |:labelwidth=10pt,labelsep=5pt|!
+ |(labelwidth=10pt,labelsep=5pt|)
\item[Item 1] xxx
\item[Item 2] yyy
\item[Description Postamble] $\langle$End of my
environment$\rangle$
\end{vdescription}
\end{document}
-\end{example}
+\finish{example}
-\begin{example}
+\start{example}[\renewtwooptenviron]
|makered(\renewtwooptenviron*){vdescription}[3][\qquad]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\labelsep+#2}}%
+ \dimensionexpr!\leftmargin{\labelwidth+\labelsep+#2}}%
\item[Description Preamble] #3%
}{\end{list}}
\begin{document}
-\begin{vdescription}[Description Postamble]{4cm}|:{|:Begin
- environment no.\ 1|!}|!
+\begin{vdescription}[Description Postamble]{4cm}|({|(Begin
+ environment no.\ 1|)}|)
\item[Item 1] xxx
\item[Item 2] yyy
- \item[Description Postamble] |:End of environment no.\ 1|!
+ \item[Description Postamble] |(End of environment no.\ 1|)
\end{vdescription}
\end{document}
-\end{example}
+\finish{example}
-\begin{example}
+\start{example}[\newtwooptenviron]
|makered(\newtwooptenviron*){udescription}[3][\hspace{1cm}]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef\leftmargin{\labelwidth+\labelsep+#3}}%
+ \dimensionexpr!\leftmargin{\labelwidth+\labelsep+#3}}%
\item[Description Preamble] #2%
}{\end{list}}
\begin{document}
-\begin{udescription}[Description Postamble]{uuu}|:4cm|!
+\begin{udescription}[Description Postamble]{uuu}|(4cm|)
\item[Item 1] xxx
\item[Item 2] yyy
\item[Description Postamble] The End
\end{udescription}
\end{document}
-\end{example}
+\finish{example}
%%+
\newtwooptenviron*{udescription}[3][\hspace{1cm}]
- {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ {\begin{list}{}{\renewdef*\makelabel##1{\sffamily ##1:\hfil}%
\settowidth\labelwidth{\makelabel{#1}}%
- \SKV@dimdef!\leftmargin{\labelwidth+\labelsep+#3}}%
+ \dimensionexpr!\leftmargin{\labelwidth+\labelsep+#3}}%
\item[Preamble] #2%
}{\end{list}%
}
-\printexample{%
- \begin{udescription}[Bertrand Russell (1872--1970)]{\tcl{red}{Beginning of quotations}}(1mm)
+\printexample
+ \begin{udescription}[Bertrand Russell (1872--1970)]{\ttcl{red}{Beginning of quotations}}(1mm)
\item[John Ruskin (1819--1900)]Whereas it has long being known and declared that the poor have no right to the property of the rich, I wish it also to be known and declared that the rich have no right to the property of the poor.
\item[Bertrand Russell (1872--1970)]The megalomaniac differs from the narcissist by the fact that he wishes to be powerful rather than charming, and seeks to be feared rather than loved. To this type belong many lunatics and most of the great men of history.
- \item[Postamble] \tcl{magenta}{End of quotations}
+ \item[Postamble] \ttcl{magenta}{End of quotations}
\end{udescription}%
-}
-%%+
+\endprintexample
+%%-
-\begin{example}
+\start{example}[\renewkeycmd]
\def\firstmacro{}
-|makered(\renewkeycmd*)\firstmacro<skv@>|:name=Steve,
- module=Martian logic,pass=true|![2][\@ptsize]{%
+|makered(\renewkeycmd*)\firstmacro<skv@>|(name=Steve,
+ module=Martian logic,pass=true|)[2][\@ptsize]{%
\edef\x{\skv@name}%
\wlog{\if0#1 10pt\else\if1#1 11pt\else
\if2#1 12pt\fi\fi\fi\space font used}%
\def\y{#2}%
}
-\firstmacro[0]{aaa}|:name=John,module=Philosophy,pass=false|!
-\end{example}
+\firstmacro[0]{aaa}|(name=John,module=Philosophy,pass=false|)
+\finish{example}
-\begin{example}
+\start{example}[\newtwooptcmd]
|makered(\newtwooptcmd*)\macro[3][xxx]{\def\x{#1}\def\y{#2}\def\z{#3}}
-\macro[uuu]{vvv}|:www|!
-\macro{vvv}|:www|!
+\macro[uuu]{vvv}|(www|)
+\macro{vvv}|(www|)
\macro{vvv}
-\end{example}
+\finish{example}
-\begin{example}
-\SKV@undef\macro
+\start{example}[\newtwooptcmd]
+\undefcs\macro
|makered(\newtwooptcmd*)\macro[2][xxx]{\def\x{#1}\def\y{#2}}
-\macro[uuu]|:vvv|!
-\macro|:vvv|!
-\end{example}
+\macro[uuu]|(vvv|)
+\macro|(vvv|)
+\finish{example}
-\begin{example}
+\start{example}[\renewtwooptcmd]
|makered(\renewtwooptcmd)\macro[2][xxx]{\def\x{#1}\long\def\y{#2}}
-\macro[uuu]|:\par|!
-\macro|:\par|!
-\end{example}
-
-\begin{example}
-\let\tcl\textcolor
-|makered(\newkeycmd*)\firstrule|:raise=.5ex,width=1em,thick=2pt,
- proclaim=false|![1]{%
- \tcl{blue}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+\macro[uuu]|(\par|)
+\macro|(\par|)
+\finish{example}
+
+\start{example}[\newkeycmd]
+\let\ttcl\textcolor
+|makered(\newkeycmd*)\firstrule|(raise=.5ex,width=1em,thick=2pt,
+ proclaim=false|)[1]{%
+ \ttcl{blue}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
#1%
- \tcl{cyan}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+ \ttcl{cyan}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
\iffir@proclaim \color{red}\fi\textdaggerdbl
}
@@ -719,34 +888,33 @@ a man without originality or moral courage.
\begin{document}
\parindent\z@
\begin{tabular*}\textwidth{lr}
-\verb+\firstrule{Hello World}|:width=2em,thick=4pt,
- proclaim|!+:|ampersand
- \firstrule{Hello World}|:width=2em,thick=4pt|!\cr
-\verb+\firstrule{Hello}|:width=2em,thick=.5pt,
- proclaim=true|!+:|ampersand
- \firstrule{Hello}|:width=2em,thick=.5pt,proclaim=true|!\cr
-\verb+\firstrule{Hello World}|:thick=2pt,
- proclaim=true|!+:|ampersand
- \firstrule{Hello World}|:thick=2pt,proclaim=true|!\cr
-\verb+\firstrule{Hello World}|:raise=1ex,width=2em,
- thick=1pt|!+:|ampersand
- \firstrule{Hello}|:raise=1ex,width=2em,thick=1pt|!
+\verb+\firstrule{Hello World}|(width=2em,thick=4pt,
+ proclaim|)+:|ampersand
+ \firstrule{Hello World}|(width=2em,thick=4pt|)\cr
+\verb+\firstrule{Hello}|(width=2em,thick=.5pt,
+ proclaim=true|)+:|ampersand
+ \firstrule{Hello}|(width=2em,thick=.5pt,proclaim=true|)\cr
+\verb+\firstrule{Hello World}|(thick=2pt,
+ proclaim=true|)+:|ampersand
+ \firstrule{Hello World}|(thick=2pt,proclaim=true|)\cr
+\verb+\firstrule{Hello World}|(raise=1ex,width=2em,
+ thick=1pt|)+:|ampersand
+ \firstrule{Hello}|(raise=1ex,width=2em,thick=1pt|)
\end{tabular*}
\end{document}
-\end{example}
+\finish{example}
%%+
-\let\tcl\textcolor
+\let\ttcl\textcolor
\newkeycmd*\firstrule(raise=.5ex,width=1em,thick=2pt,
proclaim=false)[1]{%
- \tcl{blue}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+ \ttcl{blue}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
#1%
- \tcl{cyan}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+ \ttcl{cyan}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
\iffir@proclaim \color{red}\fi\textdaggerdbl
}
-\printexample{%
- \parindent10pt
- \small
+\printexample
+ \parindent7pt
\begin{tabular*}\hsize{lr}%
\fx*{\firstrule{Hello World}(width=2em,thick=4pt,proclaim)}:&
\firstrule{Hello World}(width=2em,thick=4pt)\cr
@@ -757,49 +925,49 @@ a man without originality or moral courage.
\fx*{\firstrule{Hello World}(raise=1ex,width=2em,thick=1pt)}:&
\firstrule{Hello}(raise=1ex,width=2em,thick=1pt)%
\end{tabular*}%
-}
-%%+
-
-\begin{example}
-\let\tcl\textcolor
-|makered(\newkeycmd)\secondrule<mp@>|:raise=.5ex,width=1em,thick=2pt,
- proclaim=false|![2][\tcl{magenta}{$\star$}]{%
- \tcl{cyan}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
+\endprintexample
+%%-
+
+\start{example}[\newkeycmd]
+\let\ttcl\textcolor
+|R(\newkeycmd)\secondrule<mp@>|(raise=.5ex,width=1em,thick=2pt,
+ proclaim=false|)[2][\ttcl{magenta}{$\star$}]{%
+ \ttcl{cyan}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
#1#2#1%
- \tcl{blue}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
+ \ttcl{blue}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
\ifmp@proclaim \color{red}\fi\textdaggerdbl
}
\usepackage[left=2cm,right=2cm]{geometry}
\begin{document}
\parindent\z@
\begin{tabular*}\textwidth{lr}
-\verb+\secondrule[\textbullet]{Hello World}|:width=2em,
- thick=4pt,proclaim|!+:|ampersand
- \secondrule[\textbullet]{Hello World}|:width=2em,
- thick=4pt|!\cr
-\verb+\secondrule{Hello}|:width=2em,thick=.5pt,
- proclaim=true|!+:|ampersand
- \secondrule{Hello}|:width=2em,thick=.5pt,proclaim=true|!\cr
-\verb+\secondrule{Hello World}|:thick=2pt,
- proclaim=true|!+:|ampersand
- \secondrule{Hello World}|:thick=2pt,proclaim=true|!\cr
-\verb+\secondrule{Hello World}|:raise=1ex,width=2em,
- thick=1pt|!+:|ampersand
- \secondrule{Hello}|:raise=1ex,width=2em,thick=1pt|!
+\verb+\secondrule[\textbullet]{Hello World}|(width=2em,
+ thick=4pt,proclaim|)+:|ampersand
+ \secondrule[\textbullet]{Hello World}|(width=2em,
+ thick=4pt|)\cr
+\verb+\secondrule{Hello}|(width=2em,thick=.5pt,
+ proclaim=true|)+:|ampersand
+ \secondrule{Hello}|(width=2em,thick=.5pt,proclaim=true|)\cr
+\verb+\secondrule{Hello World}|(thick=2pt,
+ proclaim=true|)+:|ampersand
+ \secondrule{Hello World}|(thick=2pt,proclaim=true|)\cr
+\verb+\secondrule{Hello World}|(raise=1ex,width=2em,
+ thick=1pt|)+:|ampersand
+ \secondrule{Hello}|(raise=1ex,width=2em,thick=1pt|)
\end{tabular*}
\end{document}
-\end{example}
+\finish{example}
%%+
-\newkeycmd\secondrule<mp@>(raise=.5ex,width=1em,thick=2pt,
- proclaim=false)[2][\tcl{magenta}{$\star$}]{%
- \tcl{cyan}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
+\newkeycmd\secondrule<mpii@>(raise=.5ex,width=1em,thick=2pt,
+ proclaim=false)[2][\ttcl{magenta}{$\star$}]{%
+ \ttcl{cyan}{\rule[\mpii@raise]{\mpii@width}{\mpii@thick}}%
\textcolor{red}{#1}#2\textcolor{red}{#1}%
- \tcl{blue}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
- \ifmp@proclaim \color{red}\fi\textdaggerdbl
+ \ttcl{blue}{\rule[\mpii@raise]{\mpii@width}{\mpii@thick}}%
+ \ifmpii@proclaim \color{red}\fi\textdaggerdbl
}
-\printexample{%
- \parindent-5pt
+\printexample
+ \parindent8pt
\footnotesize
\begin{tabular*}\hsize{lr}%
\fx*{\secondrule[\textbullet]{Hello World}(width=2em,thick=4pt,proclaim)}:&
@@ -811,29 +979,35 @@ a man without originality or moral courage.
\fx*{\secondrule{Hello World}(raise=1ex,width=2em,thick=1pt)}:&
\secondrule[\textbullet]{Hello}(raise=1ex,width=2em,thick=1pt)%
\end{tabular*}%
-}
-%%+
+\endprintexample
+%%-
-\section{Version history}
-\label{sec:version-hist}
+\docsection(sec:version-hist){Version history}
-The numbers on the right-hand side of the following lists are section numbers; the star sign (\RedStar) means the subject features in the package but is not reflected anywhere in this user guide.
+The numbers on the right-hand side of the following lists are section numbers; the \stsign means the subject features in the package but is not reflected anywhere in this user guide.
\begin{versionhist}
- \begin{version}{0.1}{2010/05/05}
- \item First public release \xsecref
+ \begin{version}{0.4}{2011/10/22}
+ \item Changed the key processing module from the \pkg'{skeyval} to the \pkg'{ltxkeys}. \vsecref*
+ \item Improved the definition of \fx{\skceveryeoe} \vsecref{sec:env-final-tokens}
+ \end{version}
+
+ \begin{version}{0.3}{2010/05/21}
+ \item Introduced \fx{\skceveryeoe} \vsecref{sec:env-final-tokens}
\end{version}
\begin{version}{0.2}{2010/05/20}
- \item Addressed the case of \fx{\newkeycmd} without parameters \xsecref
+ \item Addressed the case of \fx{\newkeycmd} without parameters \vsecref*
\end{version}
- \begin{version}{0.3}{2010/05/21}
- \item Introduced \acmd{\everyeoe} \secref{sec:env-final-tokens}
+ \begin{version}{0.1}{2010/05/05}
+ \item First public release \vsecref*
\end{version}
\end{versionhist}
+\newpage
+\printindex
+
\end{document}
-% End of skeycommand-guide.tex \ No newline at end of file