summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/skeycommand
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-25 23:23:51 +0000
committerKarl Berry <karl@freefriends.org>2010-05-25 23:23:51 +0000
commit30ffebfa9605d5de08c5f6158caa022ac3a8cb4a (patch)
tree21f8b273f171c850ac5399fd6402744257f98485 /Master/texmf-dist/doc/latex/skeycommand
parent053e863d132996b7ab5686ede2b74dba754e9f94 (diff)
skeycommand update (25may10)
git-svn-id: svn://tug.org/texlive/trunk@18493 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/skeycommand')
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/README2
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdfbin162771 -> 211904 bytes
-rw-r--r--Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex463
3 files changed, 397 insertions, 68 deletions
diff --git a/Master/texmf-dist/doc/latex/skeycommand/README b/Master/texmf-dist/doc/latex/skeycommand/README
index ff03feac03f..6e4583bab30 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/README
+++ b/Master/texmf-dist/doc/latex/skeycommand/README
@@ -1,6 +1,6 @@
%+++++++++++++++++++++++++++++++++++ INTRODUCTION +++++++++++++++++++++++++++++++++++%
% %
-% This is the Readme file for the skeycommand package, version 0.2. %
+% This is the Readme file for the skeycommand package, version 0.3. %
% May 2010 %
% %
% Copyright (c) 2010 Ahmed Musa (a.musa@rocketmail.com). %
diff --git a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.pdf
index 694e5c21714..a71f46207c3 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 e2fdedd6c11..dba05792f56 100644
--- a/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
+++ b/Master/texmf-dist/doc/latex/skeycommand/skeycommand-guide.tex
@@ -12,7 +12,7 @@
}{%
\titlenote[t1]{The package is available at \url{\@shorttitleurl}.}%
}
-\subtitle{Version 0.2}
+\subtitle{Version 0.3}
\titleurl{http://www.ctan.org/tex-archive/macros/latex/contrib/skeycommand/}
\shorttitleurl{http://www.ctan.org/}
\author{Ahmed Musa\Email{a.musa@rocketmail.com}\\Preston, Lancashire, UK}
@@ -91,7 +91,62 @@ In \ang{defn}, you refer to your arguments in the normal way. You refer to the v
The starred variants (\RedStar) give ``short'' macros, while the unstarred variants yield ``long'' macros.
-\Note 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.
+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}
+
+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
+
+\begin{example}
+|makered(\everyeoe){\ignorespacesafterend}
+\end{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.
+
+\begin{example}
+\newkeyenviron*{testenv}<mp@>|:xwidth=2cm,ywidth=1.5cm,
+ bool=off,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}}
+}{}
+
+\begin{document}
+\begin{testenv}|:xwidth=5cm,ywidth=4cm,bool=on,
+ 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}
+
+%%+
+\newkeyenviron*{testenv}<mp@>(xwidth=2cm,ywidth=1.5cm,
+ boola=off,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,
+ 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}
+%%+
\subsection{Invoking new key commands and environments}
@@ -104,7 +159,7 @@ The syntaxes for calling new key commands and environments are as follows:
environment body
\end{env}
\end{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 \hash{1} onwards, up to a maximum of \hash{8} (yes, \hash{8}, not \hash{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.
+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]
{Commands and environments with two optional arguments}
@@ -144,6 +199,7 @@ The syntaxes for calling commands and environments with two optional arguments a
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}
+\hbadness\@M
\begin{example}
|comm(The following is a macro of 3 parameters and 4 keys:)
@@ -157,11 +213,10 @@ If \ang{2nd optarg} is empty at command or environment invocation, the command o
\let\cleared\relax
\fi
}
-|comm(|makered(\dem@name) will hold the value supplied for |makered(`name'))
-|comm(by the user of \demomacro. |makered(`dem') is from |makered(`demomacro').)
-|comm(Notice the LaTeX-like syntax of this command.)
-|comm(The user doesn't have to bother about the nitty-gritty)
-|comm(of key infrastructure.)
+|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:)
@@ -187,22 +242,22 @@ You can use the saved value of key \fx{name} within \fx{\demomacro}. Suppose, od
\begin{example}
\demomacro[data1]{data2}{data3}|:name=John,
- height=|makered(\usevalue){|mcolor(name)},wieght=55kg,tested=true|!
+ height=|makered(\usevalue){|mcolor(name)},wieght=55kg,tested=true|!%
\end{example}
-If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the above defaults:
+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,|comm(|makered(height) missing here.)
- weight=55kg,tested=true|!
+\demomacro[data1]{data2}{data3}|:name=John,weight=55kg,tested=true|!
\end{example}
\begin{example}
-|makered(\newkeycmd*)\firstmacro<sk@>|:name=Steve,
+|makered(\newkeycmd*)\firstmacro<skc@>|:name=Steve,
height=1.6m|![8][xxx]{%
- \noindent Name: \sk@name\newline
- Height: \sk@height\newline
+ \noindent Name: \skc@name\\
+ Height: \skc@height\\
Details: #1#2#3#4#5#6#7#8%
- \newline\newline
+ \endgraf
}
\begin{document}
@@ -211,6 +266,17 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
\end{document}
\end{example}
+%%+
+\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
+}
+\printexample{%
+ \firstmacro[1]{-2}{-3}{-4}{-5}{-6}{-7}{-8}%
+ (name=John {(Winner)},height=1.54m)%
+}
+%%+
+
\begin{example}
|makered(\newkeyenviron*){vdescription}<skv@>|:labelwidth=5pt,
labelsep=5pt|![2][\qquad]
@@ -219,7 +285,7 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
\SKV@dimdef\leftmargin{\labelwidth+\skv@labelwidth
+\labelsep+\skv@labelsep}}%
\item[Description Preamble] #2%
-}{\end{list}\ignorespacesafterend}
+}{\end{list}}
\begin{document}
\begin{vdescription}[Description Postamble]%
@@ -232,6 +298,74 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
\end{document}
\end{example}
+%%+
+\newkeyenviron*{vdescription}<skv@>(labelwidth=5pt,labelsep=5pt)[2][\qquad]
+ {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ \settowidth\labelwidth{\makelabel{#1}}%
+ \SKV@dimdef\leftmargin{\labelwidth+\skv@labelwidth
+ +\labelsep+\skv@labelsep}}%
+ \item[Description Preamble] #2%
+}{\end{list}}
+\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}%
+}
+%%+
+
+\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|!}%
+ \settowidth\labelwidth{\makelabel{#1}}%
+ \SKV@dimdef\leftmargin{\labelwidth+\dia@labelwidth
+ +\labelsep+\dia@labelsep}}%
+}{\end{list}}
+
+\begin{dialog}[Ramanujan]|:labelwidth=20pt,labelsep=10pt|!%
+ \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?
+ \item[Ramanujan] No, it is a very interesting number.
+ \item[Hardy] What is interesting about it?
+ \item[Ramanujan] It is the smallest number expressible as a sum of two
+ cubes in two different ways.
+ \item[Hardy] What are the different ways?
+ \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}
+\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)}%
+ \settowidth\labelwidth{\makelabel{#1}}%
+ \SKV@dimdef\leftmargin{\labelwidth+\dia@labelwidth
+ +\labelsep+\dia@labelsep}}%
+}{\end{list}}
+
+\printexample{%
+ \begin{dialog}[Ramanujan](labelwidth=0pt,labelsep=0pt)%
+ \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?
+ \item[Ramanujan] No, it is a very interesting number.
+ \item[Hardy] What is interesting about it?
+ \item[Ramanujan] It is the smallest number expressible as a sum of two cubes in two different ways.
+ \item[Hardy] What are the different ways?
+ \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}%
+}
+%%+
+
\begin{example}
\def\@barbara{An author writing an article for publication
in TUGboat is encouraged to create it on a computer file
@@ -242,17 +376,17 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
men, foreigners who, after having committed some grievous
error, can easily disappear and return to their own country.}
\def\hieronymus{HIERONYMUS HORNSCHUCH |:1608|!}
-\def\@elgar{If I write
|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.)
-|makered(\newkeyenviron){Quote}<mp@>|:leftmargin=\leftmargin,
- rightmargin=\rightmargin,mode=false,whoby=\null,
- source=\null|!{\begin{list}{}{%
- \setlength\leftmargin{\mp@leftmargin}%
- \setlength\rightmargin{\mp@rightmargin}%
+|makered(\newkeyenviron){Quote}<mp@>|:left=\leftmargin,
+ right=\rightmargin,mode=false,whoby=\null,
+ source=\null|!{%
+ \begin{list}{}{%
+ \setlength\leftmargin{\mp@left}%
+ \setlength\rightmargin{\mp@right}%
}%
\item[]\makebox[0pt][r]{``}%
}{%
@@ -260,32 +394,32 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
\item[] \flushright\mp@whoby
\item[] \flushleft\small Source: \mp@source
\end{list}
- \endgraf\vskip\baselineskip
+ \vskip\baselineskip
}
\usepackage{lipsum}
\lipsum[1]
-\begin{Quote}|:leftmargin=30pt,rightmargin=30pt,mode=false,
- whoby=\barbara,source={The \TeX Book}|!
+\begin{Quote}|:left=30pt,right=30pt,mode=false,
+ whoby=\barbara,source={The \TeX Book}|!%
{\ifmp@mode\color{red}\else\color{blue}\fi\@barbara}
\end{Quote}
\lipsum[1]
-\begin{Quote}|:leftmargin=20pt,rightmargin=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}|:leftmargin=40pt,rightmargin=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}|:leftmargin=40pt,rightmargin=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
@@ -295,68 +429,176 @@ If in \fx{\demomacro} you don't supply a key-value pair, the macro will use the
\end{Quote}
\end{example}
+%%+
+\newkeyenviron{Quote}<mp@>(left=\leftmargin,
+ right=\rightmargin,mode=false,whoby=\null,source=\null){%
+ \begin{list}{}{%
+ \setlength\leftmargin{\mp@left}%
+ \setlength\rightmargin{\mp@right}%
+ }%
+ \item[]\makebox[0pt][r]{``}%
+}{%
+ \unskip\makebox[0pt][l]{''}%
+ \item[]\flushright\mp@whoby
+ \item[]\flushleft\small Source:~\mp@source
+ \end{list}%
+ \vskip\baselineskip
+}
+\def\@barbara{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\@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{%
+ \begin{Quote}(left=30pt,right=30pt,mode=false,
+ whoby=\barbara,source={The \TeX Book})%
+ {\ifmp@mode\color{red}\else\color{blue}\fi\@barbara}%
+ \end{Quote}%
+}
+\printexample*{%
+ \begin{Quote}(left=40pt,right=40pt,mode=true,
+ whoby=\hieronymus,source={The \TeX Book})%
+ {\ifmp@mode\color{red}\else\color{blue}\fi\@hieronymus}%
+ \end{Quote}%
+}
+\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
+ If I write a tune you all say it's commonplace---if I
+ don't, you all say it's rot.%
+ }%
+ \end{Quote}%
+}
+\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
+ 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}%
+}
+%%+
+
\begin{example}
\usepackage{lipsum}
\newcounter{notecnt}
\def\noteparameters{\labelsep=\notelabelsep
- \itemindent=\noteitemindent \leftmargin=\noteleftmargin
- \rightmargin=\noterightmargin \labelwidth=\notelabelwidth}
+ \itemindent=\noteitemindent \leftmargin=\noteleft
+ \rightmargin=\noteright \labelwidth=\notelabelwidth}
-|makered(\newkeyenviron*){note}<note>|:labelsep=8pt,itemindent=8pt,
- leftmargin=\parindent,rightmargin=\parindent,labelwidth=0pt,
- preskip=0ex|![1][\baselineskip]%
- {\begin{list}{\textsc{Note}~\arabic{notecnt}: }%
+|makered(\newkeyenviron*){notex}<note>|:labelsep=8pt,itemindent=8pt,
+ left=\parindent,right=\parindent,labelwidth=0pt,
+ preskip=0ex,aftskip=0ex|![1][\baselineskip]%
+ {\begin{list}{\textsc{Note}~\arabic{notecnt}:}%
{\noteparameters\usecounter{notecnt}}%
\vskip#1}%
- {\end{list}\ignorespacesafterend}
+ {\end{list}\vskip\noteaftskip}
\begin{document}
\noindent\lipsum[1]
-\begin{note}[\notepreskip]|:labelsep=8pt,itemindent=8pt,
- leftmargin=30pt,rightmargin=30pt,labelwidth=0pt,preskip=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{note}
+\end{notex}
\end{document}
\end{example}
+%%+
+\newcounter{notecnt}
+\def\noteparameters{\labelsep=\notelabelsep
+ \itemindent=\noteitemindent \leftmargin=\noteleft
+ \rightmargin=\noteright \labelwidth=\notelabelwidth}
+\newkeyenviron*{notex}<note>(labelsep=8pt,itemindent=8pt,
+ left=\parindent,right=\parindent,labelwidth=0pt,
+ preskip=0ex,aftskip=0ex)[1][\baselineskip]%
+ {\begin{list}{\textbf{Note~\arabic{notecnt}}}%
+ {\centering\textbf{How to make a recurring list}\\[1ex]%
+ \noteparameters\usecounter{notecnt}}%
+ \vskip#1%
+ }%
+ {\end{list}\vskip\noteaftskip}
+
+\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)
+ \item If people behaved in the way nations do they would all be put in straitjackets. (Tennessee Williams, 1911--1983)
+ \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
+%%+
\begin{example}
\def\sitation{}
-\def\sitparameters{\leftmargin=\sit@leftmargin
- \rightmargin=\sit@rightmargin}
+\def\sitparameters{\leftmargin=\sit@left\rightmargin=\sit@right}
\newbox\sitname
-|makered(\renewkeyenviron*){sitation}|:leftmargin=\parindent,
- rightmargin=\parindent,nolinebreak=1|![2][1]%
- {\def\cnolinebreak{#1}\sitparameters\sbox\sitname
- {\textit{#2}}%
- \begin{quote}%
+|makered(\renewkeyenviron*){sitation}|:left=\parindent,
+ right=\parindent,nolinebreak=1|![2][\relax]%
+ {\def\quoteend{#1}\sitparameters
+ \sbox\sitname{\textit{#2}}%
+ \begin{quote}\quoteend
}%
- {\hspace*{\fill}\nolinebreak[\cnolinebreak]%
+ {\hspace*{\fill}\nolinebreak[\sit@nolinebreak]%
\quad\hspace*{\fill}\finalhyphendemerits\z@
\box\sitname
- \end{quote}\ignorespacesafterend}
+ \end{quote}}
\begin{document}
\begin{sitation}[\sit@nolinebreak]%
- {Hieronymus Hornschuch~|:1608|!}%
- |:leftmargin=30pt,rightmargin=30pt,nolinebreak=2|!
-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.
+ {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}{William Stanley Jevons~|:1878|!}%
-Some compositors still object to work in offices where
-type-composing machines are introduced. They are all afraid
-that if the work is done too easily and rapidly, they will
-not be wanted to do it. Justifying and page makeup can't be
-done profitably by machines, so the employees needn't fear
-losing their jobs.
+\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.
\end{sitation}
\end{document}
\end{example}
+%%+
+\def\sitation{}
+\def\sitparameters{\leftmargin=\sit@left\rightmargin=\sit@right}
+\csnewbox{sitname}
+\renewkeyenviron*{sitation}(left=\parindent,
+ right=\parindent,nolinebreak=1)[2][\relax]%
+ {\def\quoteend{#1}\sitparameters
+ \sbox\sitname{\textit{#2}}%
+ \begin{quote}%
+ }{%
+ \hspace*{\fill}\nolinebreak[\sit@nolinebreak]%
+ \quad\hspace*{\fill}\finalhyphendemerits\z@
+ \box\sitname
+ \end{quote}\quoteend
+}
+\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*{%
+ \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}%
+}
+%%+
+
\begin{example}
|makered(\newkeyenviron*){vdescription}|:labelwidth=5pt,
labelsep=5pt|![2][\qquad]%
@@ -365,7 +607,7 @@ losing their jobs.
\SKV@dimdef\leftmargin{\labelwidth+\vde@labelwidth
+\labelsep+\vde@labelsep}}%
\item[Description Preamble] #2%
-}{\end{list}\ignorespacesafterend}
+}{\end{list}}
\begin{document}
\begin{vdescription}[Description Postamble]{+++xxx+++}%
@@ -384,7 +626,7 @@ losing their jobs.
\settowidth\labelwidth{\makelabel{#1}}%
\SKV@dimdef\leftmargin{\labelwidth+\labelsep+#2}}%
\item[Description Preamble] #3%
- }{\end{list}\ignorespacesafterend}
+ }{\end{list}}
\begin{document}
\begin{vdescription}[Description Postamble]{4cm}|:{|:Begin
@@ -402,7 +644,7 @@ losing their jobs.
\settowidth\labelwidth{\makelabel{#1}}%
\SKV@dimdef\leftmargin{\labelwidth+\labelsep+#3}}%
\item[Description Preamble] #2%
- }{\end{list}\ignorespacesafterend}
+ }{\end{list}}
\begin{document}
\begin{udescription}[Description Postamble]{uuu}|:4cm|!
@@ -413,6 +655,23 @@ losing their jobs.
\end{document}
\end{example}
+%%+
+\newtwooptenviron*{udescription}[3][\hspace{1cm}]
+ {\begin{list}{}{\redef*\makelabel##1{\sffamily ##1:\hfil}%
+ \settowidth\labelwidth{\makelabel{#1}}%
+ \SKV@dimdef!\leftmargin{\labelwidth+\labelsep+#3}}%
+ \item[Preamble] #2%
+ }{\end{list}%
+}
+\printexample{%
+ \begin{udescription}[Bertrand Russell (1872--1970)]{\tcl{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}
+ \end{udescription}%
+}
+%%+
+
\begin{example}
\def\firstmacro{}
|makered(\renewkeycmd*)\firstmacro<skv@>|:name=Steve,
@@ -476,6 +735,30 @@ losing their jobs.
\end{document}
\end{example}
+%%+
+\let\tcl\textcolor
+\newkeycmd*\firstrule(raise=.5ex,width=1em,thick=2pt,
+ proclaim=false)[1]{%
+ \tcl{blue}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+ #1%
+ \tcl{cyan}{\rule[\fir@raise]{\fir@width}{\fir@thick}}%
+ \iffir@proclaim \color{red}\fi\textdaggerdbl
+}
+\printexample{%
+ \parindent10pt
+ \small
+ \begin{tabular*}\hsize{lr}%
+ \fx*{\firstrule{Hello World}(width=2em,thick=4pt,proclaim)}:&
+ \firstrule{Hello World}(width=2em,thick=4pt)\cr
+ \fx*{\firstrule{Hello}(width=2em,thick=.5pt,proclaim=true)}:&
+ \firstrule{Hello}(width=2em,thick=.5pt,proclaim=true)\cr
+ \fx*{\firstrule{Hello World}(thick=2pt,proclaim=true)}:&
+ \firstrule{Hello World}(thick=2pt,proclaim=true)\cr
+ \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
@@ -507,4 +790,50 @@ losing their jobs.
\end{document}
\end{example}
-\end{document} \ No newline at end of file
+%%+
+\newkeycmd\secondrule<mp@>(raise=.5ex,width=1em,thick=2pt,
+ proclaim=false)[2][\tcl{magenta}{$\star$}]{%
+ \tcl{cyan}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
+ \textcolor{red}{#1}#2\textcolor{red}{#1}%
+ \tcl{blue}{\rule[\mp@raise]{\mp@width}{\mp@thick}}%
+ \ifmp@proclaim \color{red}\fi\textdaggerdbl
+}
+\printexample{%
+ \parindent-5pt
+ \footnotesize
+ \begin{tabular*}\hsize{lr}%
+ \fx*{\secondrule[\textbullet]{Hello World}(width=2em,thick=4pt,proclaim)}:&
+ \secondrule[\textbullet]{Hello World}(width=2em,thick=4pt)\cr
+ \fx*{\secondrule{Hello}(width=2em,thick=.5pt,proclaim=true)}:&
+ \secondrule{Hello}(width=2em,thick=.5pt,proclaim=true)\cr
+ \fx*{\secondrule{Hello World}(thick=2pt,proclaim=true)}:&
+ \secondrule{Hello World}(thick=2pt,proclaim=true)\cr
+ \fx*{\secondrule{Hello World}(raise=1ex,width=2em,thick=1pt)}:&
+ \secondrule[\textbullet]{Hello}(raise=1ex,width=2em,thick=1pt)%
+ \end{tabular*}%
+}
+%%+
+
+\section{Version history}
+\label{sec:version-hist}
+
+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.
+
+\begin{versionhist}
+ \begin{version}{0.1}{2010/05/05}
+ \item First public release \xsecref
+ \end{version}
+
+ \begin{version}{0.2}{2010/05/20}
+ \item Addressed the case of \fx{\newkeycmd} without parameters \xsecref
+ \end{version}
+
+ \begin{version}{0.3}{2010/05/21}
+ \item Introduced \acmd{\everyeoe} \secref{sec:env-final-tokens}
+ \end{version}
+
+\end{versionhist}
+
+\end{document}
+
+% End of skeycommand-guide.tex \ No newline at end of file