% \iffalse meta-comment % $Header$ % % $Log$ % % \fi \def\fileversion{1.0} \def\filedate{23 Apr 95} \def\docdate{17 Sep 95} % % \changes{v1.0}{1 Apr 95}{First release} % \changes{v2.0}{17 Sep 95}{Added documentation} % % % \MakeShortVerb{\|} % % \title{Making boxed keys to immitate key presses} % \author{Nick Urbanik} % \maketitle % \begin{abstract} % For laboratory sheets I needed to show to the student when they were to % press a particular key. This style provides the |\key| command, which encloses its arguments in a box with rounded corners. % \end{abstract} %\StopEventually{} % \section{Producing the documentation} % Here is a short driver program that can be extracted with the \LaTeX2e % |docstrip| program. % \begin{macrocode} %<*driver> \documentclass{article}% \usepackage{a4,doc} \EnableCrossrefs % Make a full index. \CodelineIndex % Index by line numbers rather than by page. \RecordChanges % Show change history. \begin{document} \DocInput{key.dtx} \PrintIndex \PrintChanges \end{document} % % \end{macrocode} % \begin{macrocode} %<*package> \ProvidesPackage{key}[\filedate\space\fileversion\space Creates a boxed key image] % % \end{macrocode} % % \section{The package that \emph{really} does the work} % The |fancybox| package does all the work. This |key| package is % just using that to do the job here. % \begin{macrocode} %<*package> \RequirePackage{fancybox} % % \end{macrocode} % % \DescribeMacro{key} % The |key| macro takes one argument. This argument will be set in a small % sans serif font with a box that is 0.7em in size, and has rounded corners. % Really, the work is all done by the |fancybox| package. % \begin{macrocode} %<*package> \newcommand{\key}[1]{\Ovalbox{\makebox[0.7em]% {{\small\textsf{#1}}\rule[-0.0em]{0pt}{0.7em}}}} % % \end{macrocode} % This |\endinput| command prevents anything else from being read by % |docstrip|, such as the character table (what on earth is a character table for?) % \begin{macrocode} \endinput % \end{macrocode}