summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-01-30 00:06:18 +0000
committerKarl Berry <karl@freefriends.org>2009-01-30 00:06:18 +0000
commit0fedce708a4beebc39b71bc0ecacd4395574721c (patch)
treec8bdf492c12ec1f44742db939b8efc115526ba81 /Master/texmf-dist
parentb51a317576a6238db0b50d51a6cc66475500d66a (diff)
menu update (29jan09)
git-svn-id: svn://tug.org/texlive/trunk@12012 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/menu/menu.pdfbin0 -> 132906 bytes
-rw-r--r--Master/texmf-dist/doc/latex/menu/readme28
-rw-r--r--Master/texmf-dist/source/latex/menu/menu.dtx382
-rw-r--r--Master/texmf-dist/source/latex/menu/menu.ins4
-rw-r--r--Master/texmf-dist/tex/latex/menu/menu.sty142
5 files changed, 445 insertions, 111 deletions
diff --git a/Master/texmf-dist/doc/latex/menu/menu.pdf b/Master/texmf-dist/doc/latex/menu/menu.pdf
new file mode 100644
index 00000000000..888ac4c3a13
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/menu/menu.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/menu/readme b/Master/texmf-dist/doc/latex/menu/readme
new file mode 100644
index 00000000000..11d6e82cd7e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/menu/readme
@@ -0,0 +1,28 @@
+Name of contribution: menu
+Name and email: Knut Lickert <knut@lickert.net>
+Location on CTAN: tex-archive/macros/latex/contrib/menu
+Summary description: Typeset menu
+License type: Free
+
+Menu.sty define a command \menu{Programm!!Menu1!Command} and
+expand it to something like Programm=>Menu1->Command.
+You can use it for documentations of programs.
+
+====================================
+Provided Files:
+*menu.dtx
+*menu.ins
+*menu.pdf
+*readme
+
+For more information visit
+ http://tex.lickert.net/packages/menu/index.html (German)
+ http://tex.lickert.net/packages/menu/index_en.html (English)
+
+====================================
+Related packages:
+keystroke
+ A LaTeX package which provides macros for the graphical
+ representation of the keys on a computer keyboard.
+ Example: Ctrl, Shift AltGr
+CTAN: tex-archive/macros/latex/contrib/keystroke/
diff --git a/Master/texmf-dist/source/latex/menu/menu.dtx b/Master/texmf-dist/source/latex/menu/menu.dtx
index 6662bd03c0a..e850c3ff8ab 100644
--- a/Master/texmf-dist/source/latex/menu/menu.dtx
+++ b/Master/texmf-dist/source/latex/menu/menu.dtx
@@ -1,10 +1,10 @@
-\def\fileversion{v0.98}
-\def\filedate{2003/12/20}
+\def\fileversion{v0.994}
+\def\filedate{2007/11/18}
% ^^A For index and changes, run:
% ^^A makeindex -s gglo -o Menu.gls Menu.glo
% ^^A makeindex -s gind -o Menu.ind Menu.idx
%
-% \CheckSum{95}
+% \CheckSum{237}
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -38,6 +38,7 @@
\documentclass{ltxdoc}
\usepackage{menu}
\usepackage{makeidx}
+\usepackage[draft]{fixme}
%\IfFileExists{hyperref.sty}{\usepackage{hyperref}}{}
\IfFileExists{keystroke.sty}{
\usepackage{keystroke}
@@ -46,7 +47,7 @@
}
\CodelineIndex
\makeindex
-\OnlyDescription
+%\OnlyDescription
\begin{document}
\DocInput{menu.dtx}
\end{document}
@@ -84,6 +85,8 @@
%
%
% \section{How to use the style}
+% \subsection{Inline-Menu}
+%
% \DescribeMacro{\menu}
% |\menu| has one parameter. The macro is used to typeset a path in a
% menu. Like |\index| different levels are separated with a "!"
@@ -93,15 +96,71 @@
% "Goto \menu{Menu1!Entry1!Menu2} and then from
% \menu{Menu2!Menu3!Entry3}" I write "Goto
% \menu{Menu1!Entry1!Menu2!!Menu3!Entry3}.
+%
+% Example:
+% \verb|\menu{File!Save!!Filename}|: \menu{File!Save!!Filename}
+%
+% This is only to show one path in a menu.
+% This command may not be used to show a complete menu.
+% I recommand to make a snapshot of your programm and include the picture
+% via \verb|includegraphics| (Package graphicx)
+%
+%
+% \subsection{Menu-Figure}
+% \fixme{Description}
+%\DescribeEnv{menufolder}
+%Number of parameter: 2
+%
+%\DescribeMacro{\menuitem}
+%Number of parameter: 2
+%
+%\DescribeMacro{\menuitemactive}
+%Number of parameter: 2
+%
+%\DescribeMacro{\menuseparator}
+% Add a separator line. An optional length can be defined.
+%
+% Example:
+%\begin{verbatim}
+%\settowidth{\menuitemlength}{Close and d\underline on't save}
+%\begin{menufolder}{\underline Menu}%
+% \menuitem{Close and d\underline on't save}
+% \menuitem{Close and sa\underline ve}
+% \menuitemactive{I\underline tem}
+%\end{menufolder}
+%}
+%\end{verbatim}
+
+%\settowidth{\menuitemlength}{Close and d\underline on't save}
+%\begin{menufolder}{\underline Menu}%
+% \menuitem{Close and d\underline on't save}
+% \menuitem{Close and sa\underline ve}
+% \menuitemactive{I\underline tem}
+%\end{menufolder}
+%
+%\subsubsection{Options}
+%There are different options to modify the look of menus.
+%
+%\begin{description}
+% \item[hand] The hand point to the active menu item.
+% Requires bbding.
+% \item[framed] The menu entries are framed
+% \item[grey] framed and background values.\fixme{change
+% option name}
+%\end{description}
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \section{Changing the look}
% \DescribeMacro{\menutext}
-% An step of a menu is written with this macro, default is
+% A step of a menu is written with this macro, default is
% |\texttt|. You can change it with |\renewcommand|, e.g.\
% |\renewcommand{\menutext}[1]{\emph{#1}|
%
-% \subsection{Changing the look}
+% \subsection{Inline-Menus}
% \DescribeMacro{\menumathsymbols}
% If you want to replace the symbols, you can use |\menusymbols|.
-% Parameter one is the flag for "!", Parameter for "!!".
+% Parameter one is the flag for "!", Parameter for "!!"
+% (Default is \(\rightarrow\) and \(\Rightarrow\)).
%
% \DescribeMacro{\menusymbols}
% Like |\menumathsymbols| with two differences:
@@ -124,12 +183,11 @@
% \item[{[End]}] How should a menu end.
% \end{description}
%
-%
-%
-% \section{Examples}
+% \subsubsection{Examples}
% \newcommand{\example}[1]{\texttt{$\backslash$menu\{#1\}} & \menu{#1}\\}
%
-% \subsection{Predefined look}
+% \paragraph{Predefined look}~\par
+%
% \begin{tabular}{ll}
% Coding & Result\\\hline
% \example{Menu!Menu}
@@ -137,9 +195,10 @@
% \example{Menu!!Next Menu!Entry}
% \end{tabular}
%
-% \subsection{Changed symbols}
-% \menumathsymbols{>}{\gg}
+% \paragraph{Changed symbols}
+%
% After |\menumathsymbols{>}{\gg}| you get\par
+% \menumathsymbols{>}{\gg}
% \begin{tabular}{ll}
% Coding & Result\\\hline
% \example{Menu!Menu}
@@ -150,7 +209,8 @@
% Attention: If you want to change it local, you must define a
% block.
%
-% \subsection{Define your own styles}
+% \paragraph{Define your own styles}
+%
% You can define your own "styles", |\menu{Menu!!Next Menu!Entry}|
% makes an entry like:
%
@@ -173,22 +233,44 @@
%\end{verbatim}
% \end{minipage}
% \begin{minipage}[t]{0.4\textwidth}
-%% ^^A Example for a new style
-%% \newlength{\menusep}
-%% \menusymbols[\setlength{\menusep}{0em}~\\]{
-%% \\
-%% \addtolength{\menusep}{1em}
-%% \hspace*{\menusep}
-%% }{
-%% $\wr$\\
-%% \addtolength{\menusep}{2em}
-%% \hspace*{\menusep}
-%% }[
-%% \ensuremath{\Leftarrow}
-%% ]
+% Example for a new style
+% \menusymbols[\setlength{\menusep}{0em}~\\]{
+% \\
+% \addtolength{\menusep}{1em}
+% \hspace*{\menusep}
+% }{
+% $\wr$\\
+% \addtolength{\menusep}{2em}
+% \hspace*{\menusep}
+% }[
+% \ensuremath{\Leftarrow}
+% ]
% \menu{Menu!!Next Menu!Entry}
% \end{minipage}
%
+% \subsection{Layout of Menu-figures}
+%
+% The macros can be replaced. See the implementation for examples.
+%
+% \fixme{describe length}
+%
+%\DescribeMacro{\menufolderentry}
+% Defines the look of the entry of a menu.
+% Parameters are length (optional) and text.
+%
+%\DescribeMacro{\menuitem}
+% Defines the look of one item in the menu.
+% Parameters are length (optional) and text.
+%
+%\DescribeMacro{\menuitemactive}
+% Defines the look of an active item in the menu.
+% Parameters are length (optional) and text.
+%
+%\DescribeMacro{\menuitemactivesymbol}
+% This symbol is used to show to the active item.
+%
+% \subsubsection{Examples}
+% \fixme{Examples}
%
% \section{Ideas for the future}
% \begin{itemize}
@@ -218,7 +300,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{menu}[
\filedate\space\fileversion\space menu-Package]
-\typeout{Menu.sty: Support of typeout menus}
+\typeout{menu.sty: Support of typeout menus}
\RequirePackage{xspace}
%\RequirePackage{keystroke}[2003/08/15 v1.5]
% \end{macrocode}
@@ -239,31 +321,47 @@
% \end{macro}%^^A{\menu}
%
% \begin{macro}{\@menu}
-% Get two parameters, seperated with "!".
+% Get two parameters, separated with "!".
% Parameter one can be:
% \begin{macrocode}
\def\@menu#1!#2<{%
\def\@menuParOne{#1}%
\def\@menuParTwo{#2}%
\def\gt{!}%
+% \end{macrocode}
+% Check if the first parameter has content.
+%
+% \begin{macrocode}
\ifx\@empty\@menuParOne%
{\ifx\@menuParTwo\gt%
\else\expandafter\@menuTo\@menuParTwo <\@menu#2<%
\fi}%
\else%
-\menutext{#1}\expandafter\@menuto\@menuParTwo <\@menu#2!<%
+% \end{macrocode}
+% \changes{v0.994}{2007-11-18}{No separator for direct menu entries}
+% First parameter has content, so let's print it.
+% \begin{macrocode}
+\menutext{#1}%
+% \end{macrocode}
+% Add a \verb|\@menuto| and the second part,
+% but only if there is a second part.
+% \begin{macrocode}
+ \ifx\@menuParTwo\@empty%
+ \else%
+ \expandafter\@menuto\@menuParTwo <\@menu#2!<%
+ \fi%
\fi%
}
% \end{macrocode}
% \end{macro}%^^A{\@menu}
% \begin{macro}{\@menuto}
% \begin{macrocode}
-\def\@menuto#1#2<{\ifx!#1\else\@menusymbolOne\xspace\fi}
+\def\@menuto#1#2<{\ifx!#1\else\@menusymbolOne\allowbreak\fi}
% \end{macrocode}
% \end{macro}%^^A{\menuto}
% \begin{macro}{\@menuTo}
% \begin{macrocode}
-\def\@menuTo#1#2<{\ifx!#1\else\@menusymbolTwo\xspace\fi}
+\def\@menuTo#1#2<{\ifx!#1\else\@menusymbolTwo\allowbreak\fi}
% \end{macrocode}
% \end{macro}%^^A{\menuTo}
%
@@ -275,29 +373,28 @@
\newcommand*\@menusymbolEnd{}
% \end{macrocode}
% \end{macro}%^^A{\@menusymbolOne}
+%
% \begin{macro}{\@menusymbolOne}
% The symbol, printed when a "!" occurs in |\menu|.
-% The |\xspace| allows a line break after the symbol. I tried |\-|
-% (no effect) and |\linebreak[3]|, but the best result was with space.
% \begin{macrocode}
-\newcommand*\@menusymbolOne{\xspace\ensuremath{\rightarrow}}
+\newcommand*\@menusymbolOne{\ensuremath{\rightarrow}}
% \end{macrocode}
% \end{macro}%^^A{\@menusymbolOne}
% \begin{macro}{\@menusymbolTwo}
% The symbol, printed when a "!!" occurs in |\menu|.
% \begin{macrocode}
-\newcommand*\@menusymbolTwo{\xspace\ensuremath{\Rightarrow}}
+\newcommand*\@menusymbolTwo{\ensuremath{\Rightarrow}}
% \end{macrocode}
% \end{macro}%^^A{\@menusymbolTwo}
%
% \begin{macro}{\menusymbol}
-% Redefine the symbols for "!" and "!!".
+% Possibility to redefine the symbols for "!" and "!!".
% \begin{macrocode}
-\newcommand*\menusymbols[3][]{
-\renewcommand*\@menusymbolStart{#1}
-\renewcommand*\@menusymbolOne{#2}
-\renewcommand*\@menusymbolTwo{#3}
-\@menusymbols
+\newcommand*\menusymbols[3][]{%
+\renewcommand*\@menusymbolStart{#1}%
+\renewcommand*\@menusymbolOne{#2}%
+\renewcommand*\@menusymbolTwo{#3}%
+\@menusymbols%
}
% \end{macrocode}
% \end{macro}%^^A{\@menusymbols}
@@ -305,42 +402,203 @@
% \begin{macro}{\@menusymbol}
% Define the End-Makro for a menu.
% \begin{macrocode}
-\newcommand*\@menusymbols[1][]{
-\renewcommand*\@menusymbolEnd{#1}
+\newcommand*\@menusymbols[1][]{%
+\renewcommand*\@menusymbolEnd{#1}%
}
% \end{macrocode}
% \end{macro}%^^A{\@menusymbols}
% \begin{macro}{\menumathsymbols}
-% Redefine the symbols for "!" and "!!".
+% Possibility to redefine the symbols for "!" and "!!".
% \begin{macrocode}
\newcommand*\menumathsymbols[3][]{
\renewcommand*\@menusymbolStart{\ensuremath{#1}}
-\renewcommand*\@menusymbolOne{\xspace\ensuremath{#2}}
-\renewcommand*\@menusymbolTwo{\xspace\ensuremath{#3}}
+\renewcommand*\@menusymbolOne{\ensuremath{#2}}
+\renewcommand*\@menusymbolTwo{\ensuremath{#3}}
}
% \end{macrocode}
% \end{macro}%^^A{\@menumathsymbol}
%
+% \section{The Predefined Layouts}
+%
+% \subsection{Standard}
% \begin{macrocode}
-\DeclareOption{big}{
+\menumathsymbols{\rightarrow}{\Rightarrow}
+% \end{macrocode}
+%
+% \section{Menu-Drawings}
+% \begin{macrocode}
+\newlength{\menuitemlength}
\newlength{\menusep}
-\menusymbols[
- \setlength{\menusep}{0em}~\\
- ]{
- \\
- \addtolength{\menusep}{1em}
- \hspace*{\menusep}
- }{
- $\wr$\\
- \addtolength{\menusep}{2em}
- \hspace*{\menusep}
- }[
- \ensuremath{\Leftarrow}
- ]
+\setlength{\menuitemlength}{6em}
+\setlength{\menusep}{3em}
+% \end{macrocode}
+% \begin{macro}{\menuitemactivesymbol}
+% \begin{macrocode}
+\newcommand\menuitemactivesymbol{\ensuremath{\Leftarrow}}%
+% \end{macrocode}
+% \end{macro}%^^A\menuitemactivesymbol
+%
+% \begin{environment}{menufolder}
+% \fixme{parameter 1 must be a length (2cm results in 22cm)}
+% A negative parskip results in an overlapping menu.
+% \begin{macrocode}
+\newenvironment{menufolder}[2][\menuitemlength]{%
+ \begin{minipage}{2#1}%
+ \setlength{\parskip}{0pt}%
+ \menufolderentry[#1]{#2}\par%
+ \addtolength{\leftskip}{\menusep}%
+ }{%
+ \end{minipage}%
+}
+% \end{macrocode}
+% \end{environment}%^^Amenufolder
+% \begin{macro}{\menufolderentry}
+% \begin{macrocode}
+\newcommand\menufolderentry[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{#2}\hfill}%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menufolderentry
+% \begin{macro}{\menuitem}
+% \begin{macrocode}
+\newcommand\menuitem[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{#2}\hfill}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuitem
+% \begin{macro}{\menuitemactive}
+% \begin{macrocode}
+\newcommand\menuitemactive[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{\emph{#2}}\hfill\menuitemactivesymbol}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuitemactive
+%
+% \begin{macro}{\menuseparator}
+%\fixme{besser positionieren (raisebox?)}
+% \begin{macrocode}
+\newcommand\menuseparator[1][\menuitemlength]{%
+ \makebox[#1][l]{~\hrulefill~}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuseparator
+%
+%\subsection{Options}
+% \begin{macrocode}
+\newif\ifmenuoptionhand
+\DeclareOption{hand}{
+\menuoptionhandtrue
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newif\ifmenuoptionframed
+\DeclareOption{framed}{
+\menuoptionframedtrue
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newif\ifmenuoptiongrey
+\DeclareOption{grey}{
+\menuoptiongreytrue
+}
+% \end{macrocode}
+%
+% Process the options to set the flags.
+% \begin{macrocode}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+%\subsubsection{Option hand}
+% Activate the hand-option.
+% \begin{macrocode}
+\ifmenuoptionhand
+\RequirePackage{bbding}%fuer \HandLeftUp
+% \end{macrocode}
+% \begin{macro}{\menuitemactivesymbol}
+% \begin{macrocode}
+\renewcommand\menuitemactivesymbol{\HandLeftUp}%
+% \end{macrocode}
+% \end{macro}%^^A{\menuitemactivesymbol}
+% \begin{macrocode}
+\fi%ifmenuoptionhand
+% \end{macrocode}
+%
+%\subsubsection{Option framed}
+% Activate the framed-option.
+% \begin{macrocode}
+\ifmenuoptionframed
+\RequirePackage{fancybox}%fuer shadowbox
+% \end{macrocode}
+% \begin{macro}{\menufolderentry}
+% \begin{macrocode}
+\renewcommand\menufolderentry[2][\menuitemlength]{%
+ \framebox[#1][l]{\menutext{#2}\hfill}%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menufolderentry
+% \begin{macro}{\menuitem}
+% \begin{macrocode}
+\renewcommand\menuitem[2][\menuitemlength]{%
+ \framebox[#1][l]{\menutext{#2}\hfill}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuitem
+% \begin{macro}{\menuitemactive}
+% \begin{macrocode}
+\renewcommand\menuitemactive[2][\menuitemlength]{%
+ \shadowbox to #1{\menutext{\emph{#2}}\hfill\menuitemactivesymbol}\par%
}
-\ProcessOptions
+% \end{macrocode}
+% \end{macro}%^^A\menuitemactive
+% \begin{macrocode}
+\fi%Option framed
% \end{macrocode}
%
+%\subsubsection{Option grey}
+% Activate the grey-option.
+% \begin{macrocode}
+\ifmenuoptiongrey
+\RequirePackage{fancybox}%fuer shadowbox
+\RequirePackage{color}%fuer farbige Boxen
+\definecolor{menugrey}{rgb}{0.9,0.9,0.9}
+% \end{macrocode}
+% \begin{macro}{\menufolderentry}
+% \begin{macrocode}
+\renewcommand\menufolderentry[2][\menuitemlength]{%
+ \fcolorbox{white}{black}{\makebox[#1]{\menutext{\textcolor{white}{#2}}}}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menufolderentry
+% \begin{macro}{\menuitem}
+% \begin{macrocode}
+\renewcommand\menuitem[2][\menuitemlength]{%
+ \fcolorbox{black}{menugrey}{\makebox[#1]{\menutext{\textcolor{white}{#2\hfill}}}}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuitem
+% \begin{macro}{\menuitemactive}
+%\fixme{offset 1ex}
+% \begin{macrocode}
+\renewcommand\menuitemactive[2][\menuitemlength]{%
+ \textsf{\hspace*{1ex}\shadowbox to #1 {\menutext{#2}\hfill\menuitemactivesymbol}}\par%fixme
+}
+% \end{macrocode}%
+% \end{macro}%^^A\menuitemactive
+%
+%
+% \begin{macro}{\menuseparator}
+%\fixme{verbessern}
+% \begin{macrocode}
+\renewcommand\menuseparator[1][\menuitemlength]{%
+ \makebox[#1][l]{~\hrulefill~}\par%
+}
+% \end{macrocode}
+% \end{macro}%^^A\menuseparator
+% \begin{macrocode}
+\fi%Option grey
+% \end{macrocode}
%
% \Finale
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/menu/menu.ins b/Master/texmf-dist/source/latex/menu/menu.ins
index b8697e0c238..5075f4d3843 100644
--- a/Master/texmf-dist/source/latex/menu/menu.ins
+++ b/Master/texmf-dist/source/latex/menu/menu.ins
@@ -5,8 +5,8 @@
\preamble
----------------------------------------------------------------------
Name of contribution: Menu
-Name and email: Knut Lickert <knut@lickert.net>
-Location on CTAN: tex-archive/macros/latex/contrib/lickert
+Name and email: Knut Lickert <knut@lickert.net>
+Location on CTAN: tex-archive/macros/latex/contrib/menu
More details: http://www.lickert.net/tex/menu
Summary description: Package for writing menus
diff --git a/Master/texmf-dist/tex/latex/menu/menu.sty b/Master/texmf-dist/tex/latex/menu/menu.sty
index d6f3dd109c6..96018868423 100644
--- a/Master/texmf-dist/tex/latex/menu/menu.sty
+++ b/Master/texmf-dist/tex/latex/menu/menu.sty
@@ -8,7 +8,7 @@
%% ----------------------------------------------------------------------
%% Name of contribution: Menu
%% Name and email: Knut Lickert <knut@lickert.net>
-%% Location on CTAN: tex-archive/macros/latex/contrib/lickert
+%% Location on CTAN: tex-archive/macros/latex/contrib/menu
%% More details: http://www.lickert.net/tex/menu
%% Summary description: Package for writing menus
%%
@@ -17,8 +17,8 @@
%% \menu{Programm!!Menu1!Command}
%% and expand it to something like Programm=>Menu1->Command
%% ----------------------------------------------------------------------
-\def\fileversion{v0.98}
-\def\filedate{2003/12/20}
+\def\fileversion{v0.994}
+\def\filedate{2007/11/18}
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -36,23 +36,12 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-%% ^^A Example for a new style
-%% \newlength{\menusep}
-%% \menusymbols[\setlength{\menusep}{0em}~\\]{
-%% \\
-%% \addtolength{\menusep}{1em}
-%% \hspace*{\menusep}
-%% }{
-%% $\wr$\\
-%% \addtolength{\menusep}{2em}
-%% \hspace*{\menusep}
-%% }[
-%% \ensuremath{\Leftarrow}
-%% ]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{menu}[
\filedate\space\fileversion\space menu-Package]
-\typeout{Menu.sty: Support of typeout menus}
+\typeout{menu.sty: Support of typeout menus}
\RequirePackage{xspace}
\newcommand{\menu}[1]{\@menusymbolStart\@menu #1!<\@menusymbolEnd}
\newcommand{\menutext}[1]{\texttt{#1}}
@@ -65,46 +54,105 @@
\else\expandafter\@menuTo\@menuParTwo <\@menu#2<%
\fi}%
\else%
-\menutext{#1}\expandafter\@menuto\@menuParTwo <\@menu#2!<%
+\menutext{#1}%
+ \ifx\@menuParTwo\@empty%
+ \else%
+ \expandafter\@menuto\@menuParTwo <\@menu#2!<%
+ \fi%
\fi%
}
-\def\@menuto#1#2<{\ifx!#1\else\@menusymbolOne\xspace\fi}
-\def\@menuTo#1#2<{\ifx!#1\else\@menusymbolTwo\xspace\fi}
+\def\@menuto#1#2<{\ifx!#1\else\@menusymbolOne\allowbreak\fi}
+\def\@menuTo#1#2<{\ifx!#1\else\@menusymbolTwo\allowbreak\fi}
\newcommand*\@menusymbolStart{}
\newcommand*\@menusymbolEnd{}
-\newcommand*\@menusymbolOne{\xspace\ensuremath{\rightarrow}}
-\newcommand*\@menusymbolTwo{\xspace\ensuremath{\Rightarrow}}
-\newcommand*\menusymbols[3][]{
-\renewcommand*\@menusymbolStart{#1}
-\renewcommand*\@menusymbolOne{#2}
-\renewcommand*\@menusymbolTwo{#3}
-\@menusymbols
+\newcommand*\@menusymbolOne{\ensuremath{\rightarrow}}
+\newcommand*\@menusymbolTwo{\ensuremath{\Rightarrow}}
+\newcommand*\menusymbols[3][]{%
+\renewcommand*\@menusymbolStart{#1}%
+\renewcommand*\@menusymbolOne{#2}%
+\renewcommand*\@menusymbolTwo{#3}%
+\@menusymbols%
}
-\newcommand*\@menusymbols[1][]{
-\renewcommand*\@menusymbolEnd{#1}
+\newcommand*\@menusymbols[1][]{%
+\renewcommand*\@menusymbolEnd{#1}%
}
\newcommand*\menumathsymbols[3][]{
\renewcommand*\@menusymbolStart{\ensuremath{#1}}
-\renewcommand*\@menusymbolOne{\xspace\ensuremath{#2}}
-\renewcommand*\@menusymbolTwo{\xspace\ensuremath{#3}}
+\renewcommand*\@menusymbolOne{\ensuremath{#2}}
+\renewcommand*\@menusymbolTwo{\ensuremath{#3}}
}
-\DeclareOption{big}{
+\menumathsymbols{\rightarrow}{\Rightarrow}
+\newlength{\menuitemlength}
\newlength{\menusep}
-\menusymbols[
- \setlength{\menusep}{0em}~\\
- ]{
- \\
- \addtolength{\menusep}{1em}
- \hspace*{\menusep}
- }{
- $\wr$\\
- \addtolength{\menusep}{2em}
- \hspace*{\menusep}
- }[
- \ensuremath{\Leftarrow}
- ]
-}
-\ProcessOptions
+\setlength{\menuitemlength}{6em}
+\setlength{\menusep}{3em}
+\newcommand\menuitemactivesymbol{\ensuremath{\Leftarrow}}%
+\newenvironment{menufolder}[2][\menuitemlength]{%
+ \begin{minipage}{2#1}%
+ \setlength{\parskip}{0pt}%
+ \menufolderentry[#1]{#2}\par%
+ \addtolength{\leftskip}{\menusep}%
+ }{%
+ \end{minipage}%
+}
+\newcommand\menufolderentry[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{#2}\hfill}%
+}
+\newcommand\menuitem[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{#2}\hfill}\par%
+}
+\newcommand\menuitemactive[2][\menuitemlength]{%
+ \makebox[#1][l]{\menutext{\emph{#2}}\hfill\menuitemactivesymbol}\par%
+}
+\newcommand\menuseparator[1][\menuitemlength]{%
+ \makebox[#1][l]{~\hrulefill~}\par%
+}
+\newif\ifmenuoptionhand
+\DeclareOption{hand}{
+\menuoptionhandtrue
+}
+\newif\ifmenuoptionframed
+\DeclareOption{framed}{
+\menuoptionframedtrue
+}
+\newif\ifmenuoptiongrey
+\DeclareOption{grey}{
+\menuoptiongreytrue
+}
+\ProcessOptions\relax
+\ifmenuoptionhand
+\RequirePackage{bbding}%fuer \HandLeftUp
+\renewcommand\menuitemactivesymbol{\HandLeftUp}%
+\fi%ifmenuoptionhand
+\ifmenuoptionframed
+\RequirePackage{fancybox}%fuer shadowbox
+\renewcommand\menufolderentry[2][\menuitemlength]{%
+ \framebox[#1][l]{\menutext{#2}\hfill}%
+}
+\renewcommand\menuitem[2][\menuitemlength]{%
+ \framebox[#1][l]{\menutext{#2}\hfill}\par%
+}
+\renewcommand\menuitemactive[2][\menuitemlength]{%
+ \shadowbox to #1{\menutext{\emph{#2}}\hfill\menuitemactivesymbol}\par%
+}
+\fi%Option framed
+\ifmenuoptiongrey
+\RequirePackage{fancybox}%fuer shadowbox
+\RequirePackage{color}%fuer farbige Boxen
+\definecolor{menugrey}{rgb}{0.9,0.9,0.9}
+\renewcommand\menufolderentry[2][\menuitemlength]{%
+ \fcolorbox{white}{black}{\makebox[#1]{\menutext{\textcolor{white}{#2}}}}\par%
+}
+\renewcommand\menuitem[2][\menuitemlength]{%
+ \fcolorbox{black}{menugrey}{\makebox[#1]{\menutext{\textcolor{white}{#2\hfill}}}}\par%
+}
+\renewcommand\menuitemactive[2][\menuitemlength]{%
+ \textsf{\hspace*{1ex}\shadowbox to #1 {\menutext{#2}\hfill\menuitemactivesymbol}}\par%fixme
+}
+\renewcommand\menuseparator[1][\menuitemlength]{%
+ \makebox[#1][l]{~\hrulefill~}\par%
+}
+\fi%Option grey
\endinput
%%
%% End of file `menu.sty'.