diff options
author | Karl Berry <karl@freefriends.org> | 2009-07-20 23:34:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-07-20 23:34:14 +0000 |
commit | 046d8ea1784304bf8a1e2d4d635fd3a35b4eca3c (patch) | |
tree | eeec90edde40945bd99e4527c51a9123cbb3bfef /Master/texmf-dist/doc | |
parent | 2abc8d3b3a4acaf5a3e7a2a95c1de4cbe5884e1a (diff) |
new latex package keycommand (19jul09)
git-svn-id: svn://tug.org/texlive/trunk@14353 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/keycommand/README | 24 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/keycommand/keycommand-example.pdf | bin | 0 -> 135984 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex | 110 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/keycommand/keycommand.pdf | bin | 0 -> 246472 bytes |
4 files changed, 134 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/keycommand/README b/Master/texmf-dist/doc/latex/keycommand/README new file mode 100644 index 00000000000..aaa4981ba4b --- /dev/null +++ b/Master/texmf-dist/doc/latex/keycommand/README @@ -0,0 +1,24 @@ +% keycommand is a package providing an easy way to define commands +% with keys in LaTeX. The code is based on kvsetkeys by Heiko +% Oberdiek. It does not rely on keyval. +% +% This work consists of the main source file keycommand.dtx +% and the derived files +% keycommand.sty, keycommand.pdf, keycommand.ins, +% keycommand-example.tex +% +% Unpacking: +% (a) If keycommand.ins is present: +% etex keycommand.ins +% (b) Without keycommand.ins: +% etex keycommand.dtx +% (c) If you insist on using LaTeX +% latex \let\install=y\input{keycommand.dtx} +% (quote the arguments according to the demands of your shell) +% +% Documentation: +% (pdf)latex keycommand.dtx + + + + diff --git a/Master/texmf-dist/doc/latex/keycommand/keycommand-example.pdf b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.pdf Binary files differnew file mode 100644 index 00000000000..f9e9eec228b --- /dev/null +++ b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.pdf diff --git a/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex new file mode 100644 index 00000000000..78aa8223214 --- /dev/null +++ b/Master/texmf-dist/doc/latex/keycommand/keycommand-example.tex @@ -0,0 +1,110 @@ +%% +%% This is file `keycommand-example.tex', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% keycommand.dtx (with options: `example') +%% +%% This is a generated file. +%% +%% keycommand : an easy way to define commands with keys +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file keycommand.dtx +%% and the derived files +%% keycommand.sty, keycommand.pdf, keycommand.ins, +%% keycommand-example.tex +%% +%% keycommand : an easy way to define commands with keys +%% Copyright (C) 2009 by Florent Chervet <florent.chervet@free.fr> +%% + +\ProvidesFile{keycommand-example} +\documentclass{article} +\usepackage[T1]{fontenc} +\usepackage[latin1]{inputenc} +\usepackage[american]{babel} +\usepackage{keycommand} +\usepackage{framed} +\makeatletter +\parindent\z@ +\newkeycommand\Rule[raise=.4ex,width=1em,thick=.4pt][1]{% + \rule[\commandkey{raise}]{\commandkey{width}}{\commandkey{thick}}% + #1% + \rule[\commandkey{raise}]{\commandkey{width}}{\commandkey{thick}}} + +\newkeycommand\charleads[sep=1][2]{% + \ifhmode\else\leavevmode\fi\setbox\@tempboxa\hbox{#2}\@tempdima=1.584\wd\@tempboxa% + \cleaders\hb@xt@\commandkey{sep}\@tempdima{\hss\box\@tempboxa\hss}#1% + \setbox\@tempboxa\box\voidb@x} +\newcommand\charfill[1][]{\charleads[{#1}]{\hfill\kern\z@}} +\newcommand\charfil[1][]{\charleads[{#1}]{\hfil\kern\z@}} +\newkeyenvironment{dblruled}[first=.4pt,second=.4pt,sep=1pt,left=\z@]{% + \def\FrameCommand{% + \vrule\@width\commandkey{first}% + \hskip\commandkey{sep} + \vrule\@width\commandkey{second}% + \hspace{\commandkey{left}}}% + \parindent\z@ + \MakeFramed {\advance\hsize-\width \FrameRestore}} + {\endMakeFramed} +\makeatother +\begin{document} +\title{This is {\tt keycommand-example.tex}} +\author{Florent Chervet} +\date{July 22, 2009} +\maketitle + +\section{Example of a keycommand : \texttt{\string\Rule}} + +\begin{tabular*}\textwidth{rl} +\verb+\Rule[width=2em]{hello}+:&\Rule[width=2em]{hello}\cr +\verb+\Rule[thick=1pt,width=2em]{hello}+:&\Rule[thick=1pt,width=2em]{hello}\cr +\verb+\Rule{hello}+:&\Rule{hello}\cr +\verb+\Rule[thick=1pt,raise=1ex]{hello}+:&\Rule[thick=1pt,raise=1ex]{hello} +\end{tabular*} + +\section{Example of a keycommand : \texttt{\string\charfill}} + +\begin{tabular*}\textwidth{rp{.4\textwidth}} +\verb+\charfill{$\star$}+: & \charfill{$\star$}\cr +\verb+\charfill[sep=2]{$\star$}+: & \charfill[sep=2]{$\star$} \\ +\verb+\charfill[sep=.7]{\textasteriskcentered}+: & \charfill[sep=.7]{\textasteriskcentered} +\end{tabular*} + +\section{Example of a keyenvironment : \texttt{dblruled}} + +\verb+\begin{dblruled}+\par +\verb+ test for dblruled key-environment\par+\par +\verb+ test for dblruled key-environment\par+\par +\verb+ test for dblruled key-environment+\par +\verb+\end{dblruled}+ + +\begin{dblruled} + test for dblruled key-environment\par + test for dblruled key-environment\par + test for dblruled key-environment +\end{dblruled} + +\verb+\begin{dblruled}[first=4pt,sep=2pt,second=.6pt,left=.2em]+\par +\verb+ test for dblruled key-environment\par+\par +\verb+ test for dblruled key-environment\par+\par +\verb+ test for dblruled key-environment+\par +\verb+\end{dblruled}+ + +\begin{dblruled}[first=4pt,sep=2pt,second=.6pt,left=.2em] + test for dblruled key-environment\par + test for dblruled key-environment\par + test for dblruled key-environment +\end{dblruled} + +\end{document} +\endinput +%% +%% End of file `keycommand-example.tex'. diff --git a/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf b/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf Binary files differnew file mode 100644 index 00000000000..60144c6fb3e --- /dev/null +++ b/Master/texmf-dist/doc/latex/keycommand/keycommand.pdf |