diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-11 22:15:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-11 22:15:49 +0000 |
commit | d2e133622bc193c77bf2eba80037c4344b270560 (patch) | |
tree | 933f2d29998102bd1858b8a7742ade20aa9306d4 /Master/texmf-dist/tex/latex | |
parent | 02516a1590c9558c71358a9a9456e5e94d8b128a (diff) |
menukeys (9mar14)
git-svn-id: svn://tug.org/texlive/trunk@33151 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/menukeys/menukeys.sty | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/Master/texmf-dist/tex/latex/menukeys/menukeys.sty b/Master/texmf-dist/tex/latex/menukeys/menukeys.sty index c0e8660d801..90bc75b22a6 100644 --- a/Master/texmf-dist/tex/latex/menukeys/menukeys.sty +++ b/Master/texmf-dist/tex/latex/menukeys/menukeys.sty @@ -23,7 +23,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2009/01/01] \ProvidesPackage{menukeys} - [2013/07/23 v1.2a a package to format menus paths and shortcuts] + [2014/03/10 v1.3 a package to format menus paths and shortcuts] \RequirePackage{xparse} \RequirePackage{xstring} \RequirePackage{etoolbox} @@ -399,7 +399,7 @@ \node(tw@node)[tw@roundedkeys@base]{\strut\CurrentMenuElement};}% }[% \hspace{0.1em plus 0.1em minus 0.05em}% - \raisebox{0.25ex}{\sffamily\footnotesize+}% + \raisebox{0.25ex}{\sffamily\relsize{-2}+}% \hspace{0.1em plus 0.1em minus 0.05em}% ]{gray} @@ -422,7 +422,7 @@ \node(tw@node)[tw@shadowedroundedkeys@base]{\strut\CurrentMenuElement};}% }[% \hspace{0.2ex}\hspace{0.1em plus 0.1em minus 0.05em}% - \raisebox{0.25ex}{\sffamily\footnotesize+}% + \raisebox{0.25ex}{\sffamily\relsize{-2}+}% \hspace{0.1em plus 0.1em minus 0.05em}% ][\hspace{0.2ex}]{gray} @@ -440,7 +440,7 @@ \node(tw@node)[tw@angularkeys@base]{\strut\CurrentMenuElement};}% }[% \hspace{0.1em plus 0.1em minus 0.05em}% - \raisebox{0.25ex}{\sffamily\footnotesize+}% + \raisebox{0.25ex}{\sffamily\relsize{-2}+}% \hspace{0.1em plus 0.1em minus 0.05em}% ]{gray} @@ -462,7 +462,7 @@ \node(tw@node)[tw@shadowedangularkeys@base]{\strut\CurrentMenuElement};}% }[% \hspace{0.2ex}\hspace{0.1em plus 0.1em minus 0.05em}% - \raisebox{0.25ex}{\sffamily\footnotesize+}% + \raisebox{0.25ex}{\sffamily\relsize{-2}+}% \hspace{0.1em plus 0.1em minus 0.05em}% ][\hspace{0.2ex}]{gray} @@ -485,7 +485,7 @@ \end{tikzpicture}% }[% \hspace{0.2ex}\hspace{0.1em plus 0.1em minus 0.05em}% - \raisebox{0.25ex}{\sffamily\footnotesize+}% + \raisebox{0.25ex}{\sffamily\relsize{-2}+}% \hspace{0.1em plus 0.1em minus 0.05em}% ]{blacknwhite} @@ -579,18 +579,18 @@ \csdef{tw@parse@menu@list@\expandafter\@gobble\string#1}##1{% \iflastindris \ifnum\indrisnr=\@ne - \protected@edef\CurrentMenuElement{##1}% + \def\CurrentMenuElement{##1}% \@nameuse{tw@style@#3@single}% \else - \protected@edef\CurrentMenuElement{##1}% + \def\CurrentMenuElement{##1}% \@nameuse{tw@style@#3@sep}\@nameuse{tw@style@#3@last}% \fi \else \ifnum\indrisnr=\@ne - \protected@edef\CurrentMenuElement{##1}% + \def\CurrentMenuElement{##1}% \@nameuse{tw@style@#3@first}% \else - \protected@edef\CurrentMenuElement{##1}% + \def\CurrentMenuElement{##1}% \@nameuse{tw@style@#3@sep}\@nameuse{tw@style@#3@mid}% \fi \fi @@ -639,12 +639,8 @@ \fi \iftw@mk@definekeys \NewDocumentCommand{\tw@make@key@box}{m m}{% - \expandafter\newbox\csname tw@mk@box@#1\endcsname - \expandafter\sbox\csname tw@mk@box@#1\endcsname{% - #2% - }% \csdef{tw@mk@#1}{% - \expandafter\usebox\csname tw@mk@box@#1\endcsname% + #2% }% } \NewDocumentCommand{\tw@make@key@macro}{s m}{% @@ -677,9 +673,17 @@ \IfStrEq{symbols}{\tw@mk@mackeys}{#2}{}% }% } +\tikzset{ + menukeys key symbol/.style={ + rounded corners=0pt, + line width=0.1ex, + baseline={(0,0)}, + }, + menukeys thick/.style={line width=0.25ex}, +} \normalsize \tw@make@key@box{shift}{% - \begin{tikzpicture}[yshift=-0.1ex,baseline={(0,0)},semithick] + \begin{tikzpicture}[yshift=-0.1ex,menukeys key symbol] \draw (0.3ex,0) -- (1.1ex,0) -- (1.1ex,1.2ex) -- % (1.5ex,1.2ex) -- (0.7ex,1.9ex) -- (-0.1ex,1.2ex) -- % (0.3ex,1.2ex) -- cycle; @@ -687,7 +691,7 @@ } \tw@make@key@macro{\shift} \tw@make@key@box{capslock@mac}{% - \begin{tikzpicture}[yshift=-0.1ex,baseline={(0,0)},semithick] + \begin{tikzpicture}[yshift=-0.1ex,menukeys key symbol] \draw (0.3ex,0.7ex) -- (1.1ex,0.7ex) -- (1.1ex,1.2ex) -- % (1.5ex,1.2ex) -- (0.7ex,1.9ex) -- (-0.1ex,1.2ex) -- % (0.3ex,1.2ex) -- cycle; @@ -695,7 +699,7 @@ \end{tikzpicture}% } \tw@make@key@box{capslock@win}{% - \begin{tikzpicture}[yscale=-1,yshift=-1.8ex,baseline={(0,0)},semithick] + \begin{tikzpicture}[yscale=-1,yshift=-1.8ex,menukeys key symbol] \draw (0.3ex,0) -- (1.1ex,0) -- (1.1ex,1.2ex) -- % (1.5ex,1.2ex) -- (0.7ex,1.9ex) -- (-0.1ex,1.2ex) -- % (0.3ex,1.2ex) -- cycle; @@ -703,17 +707,17 @@ } \tw@make@key@macro*{\capslock} \tw@make@key@box{tab@mac}{% - \begin{tikzpicture}[yshift=0.5ex,baseline={(0,0)}] - \draw [->,semithick] (0,0) -- (1em,0); - \draw (1em,-0.45ex) -- (1em,0.45ex); + \begin{tikzpicture}[yshift=0.6ex,menukeys key symbol] + \draw [->] (0,0) -- (1em,0); + \draw (1em,-0.35ex) -- (1em,0.35ex); \end{tikzpicture}% } \tw@make@key@box{tab@win}{% - \begin{tikzpicture}[yshift=0.1ex,baseline={(0,0)}] - \draw [->,semithick] (0.2em,0) -- (1.2em,0); - \draw (1.2em,-0.45ex) -- (1.2em,0.45ex); - \draw [<-,semithick] (0,1ex) -- (1em,1ex); - \draw (0,0.55ex) -- (0,1.55ex); + \begin{tikzpicture}[yshift=0.1ex,menukeys key symbol] + \draw [->] (0.2em,0) -- (1.2em,0); + \draw (1.2em,-0.35ex) -- (1.2em,0.35ex); + \draw [<-] (0,1ex) -- (1em,1ex); + \draw (0,0.65ex) -- (0,1.35ex); \end{tikzpicture}% } \tw@make@key@macro*{\tab} @@ -723,8 +727,8 @@ \def\tw@mk@esc@mac{esc} }{% \tw@make@key@box{esc@mac}{% - \begin{tikzpicture}[yshift=-0.1ex,baseline={(0,0)},semithick] - \draw [->] (0.5ex,0.5ex) -- ++(45:1.5ex); + \begin{tikzpicture}[yshift=-0.1ex,menukeys key symbol] + \draw [->] (0.5ex,0.5ex) -- ++(45:1.1ex); \draw (0.5ex,0.5ex) ++(15:0.6ex) arc (15:-285:0.6ex); \end{tikzpicture}% }% @@ -741,7 +745,7 @@ \def\tw@mk@Alt@mac{alt}% }{% \tw@make@key@box{Alt@mac}{% - \begin{tikzpicture}[semithick] + \begin{tikzpicture}[yshift=-0.1ex,menukeys key symbol] \draw (0,1ex) -- (0.5ex,1ex) -- (1ex,0.3ex) -- (1.8ex,0.3ex); \draw (0.8ex,1ex) -- (1.8ex,1ex); \end{tikzpicture}% @@ -758,7 +762,7 @@ \def\tw@mk@cmd@mac{cmd}% }{% \tw@make@key@box{cmd@mac}{% - \begin{tikzpicture}[yshift=-0.15ex,baseline={(0,0)},semithick] + \begin{tikzpicture}[yshift=-0.15ex,menukeys key symbol] \draw (0.5ex,0.7ex) -- (0.5ex,1.25ex) arc (0:270:0.25ex) -- % (1.25ex,1ex) arc (-90:180:0.25ex) -- (1ex,0.25ex) % arc (-180:90:0.25ex) -- (0.25ex,0.5ex) arc (90:360:0.25ex) % @@ -773,13 +777,13 @@ \providecommand*{\SPACE}{\expandonce{\rule{2em}{0pt}\spacename\rule{2em}{0pt}}} \tw@make@key@box{return@mac}{% - \begin{tikzpicture}[semithick] - \draw [->, rounded corners=0.3ex] (1.25ex,1ex) -| % + \begin{tikzpicture}[yshift=0.25ex,menukeys key symbol] + \draw [->, rounded corners=0.2ex] (1.25ex,1ex) -| % (2ex,0) -- (0,0); \end{tikzpicture}% } \tw@make@key@box{return@win}{% - \begin{tikzpicture}[semithick] + \begin{tikzpicture}[menukeys key symbol] \draw [->] (1ex,1.25ex) |- (0,0); \end{tikzpicture}% } @@ -787,7 +791,7 @@ \def\tw@mk@enter@win{Enter} \tw@make@key@box{enter@mac}{% - \begin{tikzpicture}[semithick] + \begin{tikzpicture}[menukeys key symbol] \draw (0,0) -- (0.5ex,0.5ex) -- (1ex,0); \draw (0,0.55ex) -- (1ex,0.55ex); \end{tikzpicture}% @@ -798,7 +802,7 @@ \tw@mk@warning{'\string\winmenu' only for Windows!}% } \tw@make@key@box{winmenu@win}{% - \begin{tikzpicture}[yshift=-0.2ex,baseline={(0,0)},semithick] + \begin{tikzpicture}[yshift=-0.2ex,menukeys key symbol] \draw (0,0) rectangle (1.5ex,1.8ex); \draw (0.25ex,1.4ex) -- ++(1ex,0); \draw (0.25ex,1ex) -- ++(1ex,0); @@ -808,8 +812,8 @@ \tw@make@key@macro*{\winmenu} \tw@make@key@box{backspace}{% - \begin{tikzpicture}[yshift=0.5ex,baseline={(0,0)},thick] - \draw [<-] (0,0) -- (1.25em,0); + \begin{tikzpicture}[yshift=0.65ex,menukeys key symbol] + \draw [<-,menukeys thick] (0,0) -- (1.35em,0); \end{tikzpicture}% } \tw@make@key@macro{\backspace} @@ -820,8 +824,8 @@ \def\tw@mk@del@mac{\delname}% }{% \tw@make@key@box{del@mac}{% - \begin{tikzpicture} - \draw [semithick] (0,0) -- (1.5ex,0) -- (2ex,0.5ex) --% + \begin{tikzpicture}[yshift=0.2ex,menukeys key symbol] + \draw (0,0) -- (1.5ex,0) -- (2ex,0.5ex) --% (1.5ex,1ex) -- (0,1ex) -- cycle; \draw (0.5ex,0.2ex) -- (1.1ex,0.8ex); \draw (0.5ex,0.8ex) -- (1.1ex,0.2ex); @@ -830,29 +834,29 @@ } \tw@make@key@macro*{\del} \tw@make@key@box{arrowkeyup}{% - \begin{tikzpicture}[yshift=-0.2ex,baseline={(0,0)}] - \draw [->,semithick] (0,0) -- (0,0.8em); + \begin{tikzpicture}[yshift=-0.2ex,menukeys key symbol] + \draw [->] (0,0) -- (0,0.8em); \end{tikzpicture}% } \tw@make@key@macro{\arrowkeyup} \tw@make@key@box{arrowkeydown}{% - \begin{tikzpicture}[yshift=0.7em,baseline={(0,0)}] - \draw [->,semithick] (0,0) -- (0,-0.8em); + \begin{tikzpicture}[yshift=0.7em,menukeys key symbol] + \draw [->] (0,0) -- (0,-0.8em); \end{tikzpicture}% } \tw@make@key@macro{\arrowkeydown} \tw@make@key@box{arrowkeyright}{% - \begin{tikzpicture}[yshift=0.5ex,baseline={(0,0)}] - \draw [->,semithick] (0,0) -- (0.8em,0); + \begin{tikzpicture}[yshift=0.5ex,menukeys key symbol] + \draw [->] (0,0) -- (0.8em,0); \end{tikzpicture}% } \tw@make@key@macro{\arrowkeyright} \tw@make@key@box{arrowkeyleft}{% - \begin{tikzpicture}[yshift=0.5ex,baseline={(0,0)}] - \draw [->,semithick] (0,0) -- (-0.8em,0); + \begin{tikzpicture}[yshift=0.5ex,menukeys key symbol] + \draw [->] (0,0) -- (-0.8em,0); \end{tikzpicture}% } \tw@make@key@macro{\arrowkeyleft} |