texlive[57172] Master/texmf-dist: menukeys (19dec20)
commits+karl at tug.org
commits+karl at tug.org
Sat Dec 19 22:26:23 CET 2020
Revision: 57172
http://tug.org/svn/texlive?view=revision&revision=57172
Author: karl
Date: 2020-12-19 22:26:22 +0100 (Sat, 19 Dec 2020)
Log Message:
-----------
menukeys (19dec20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/menukeys/README
trunk/Master/texmf-dist/doc/latex/menukeys/menukeys.pdf
trunk/Master/texmf-dist/source/latex/menukeys/menukeys.dtx
trunk/Master/texmf-dist/source/latex/menukeys/menukeys.ins
trunk/Master/texmf-dist/tex/latex/menukeys/menukeys.sty
Modified: trunk/Master/texmf-dist/doc/latex/menukeys/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/menukeys/README 2020-12-19 21:26:11 UTC (rev 57171)
+++ trunk/Master/texmf-dist/doc/latex/menukeys/README 2020-12-19 21:26:22 UTC (rev 57172)
@@ -5,9 +5,12 @@
Tobias Weh
mail at tobiw.de
- http://tobiw.de/en
+ https://tobiw.de/en
+ Jonathan P. Spratte
+ jspratte at yahoo.de
+
ctan.org/pkg/menukeys
github.com/tweh/menukeys
@@ -25,7 +28,7 @@
option) any later version. The latest version of this
license is in the file
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
Files:
Modified: trunk/Master/texmf-dist/doc/latex/menukeys/menukeys.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/menukeys/menukeys.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/menukeys/menukeys.dtx 2020-12-19 21:26:11 UTC (rev 57171)
+++ trunk/Master/texmf-dist/source/latex/menukeys/menukeys.dtx 2020-12-19 21:26:22 UTC (rev 57172)
@@ -7,11 +7,11 @@
%% license or (at your option) any later version. The latest version
%% of this license is in the file
%%
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%%
%<package>\NeedsTeXFormat{LaTeX2e}[2009/01/01]
%<package>\ProvidesPackage{menukeys}
-%<package> [2020/10/31 v1.6 -- A package to format menus, paths and shortcuts]
+%<package> [2020/12/19 v1.6.1 -- A package to format menus, paths and shortcuts]
%
%<*driver>
\documentclass{ltxdoc}
@@ -175,6 +175,7 @@
}{blacknwhite}
\newmenumacro{\filefolder}[/]{pathswithblackfolder}
\newmenumacro{\MENU}[,]{menusbig}
+\newcommand\email[1]{\href{mailto:#1}{\texttt{#1}}}
\makeatother
\EnableCrossrefs
@@ -221,7 +222,7 @@
%
% \GetFileInfo{menukeys.sty}
%
-% \DoNotIndex{\?,\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
+% \DoNotIndex{\?,\_,\.,\@M,\@@input,\@Alph,\@alph,\@addtoreset,\@arabic}
% \DoNotIndex{\@badmath,\@centercr,\@cite}
% \DoNotIndex{\@dotsep,\@empty,\@float,\@gobble,\@gobbletwo,\@ignoretrue}
% \DoNotIndex{\@input,\@ixpt,\@m,\@minus,\@mkboth}
@@ -285,11 +286,16 @@
% \IfStrEq,\hyphenchar,\expandonce,\encodingdefault,\DeclareStringOption}
%
% \title{\Huge\MENU[,]{M,E,N,U,K,E,Y,S}}
-% \author{Tobias Weh\\
-% \normalsize\href{mailto:mail at tobiw.de}{\texttt{mail at tobiw.de}}\\
-% \normalsize\url{http://tobiw.de/en}\\
-% \normalsize\url{http://github.com/tweh/menukeys}\\
-% \normalsize\url{http://www.ctan.org/pkg/menukeys}\\
+% \author{^^A
+% Tobias Weh\\
+% {\normalsize\email{mail at tobiw.de}}\\
+% {\normalsize\url{https://tobiw.de/en}}\\[\medskipamount]
+% ^^A
+% Jonathan P.\@ Spratte\\
+% {\normalsize\email{jspratte at yahoo.de}}\\[\medskipamount]
+% ^^A
+% \normalsize\url{https://github.com/tweh/menukeys}\\
+% \normalsize\url{https://www.ctan.org/pkg/menukeys}\\
% \normalsize\filefolder{macros/latex/contrib/menukeys}}
% \date{\filedate{} --- \fileversion}
% \thispagestyle{empty}
@@ -304,11 +310,8 @@
% manual -- send me an e-mail, please.
% \par\bigskip\noindent
% \emph{Many thanks to Ahmed Musa, who provided the original list parsing
-% code at \url{http://tex.stackexchange.com/a/44989/4918}.}
-% \par\bigskip\noindent
-% \emph{Special thanks to Jonathan P.\@ Spratte, who made the changes in v1.6
-% to remove the \pkg{catoptions} dependency so that \pkg{menukeys} works with
-% \LaTeX\ releases starting from 2020/10/01.}
+% code at \url{https://tex.stackexchange.com/a/44989/4918}.}
+% \par
% \end{abstract}
%
% \newpage\tableofcontents\newpage
@@ -315,9 +318,9 @@
%
% \section{Introduction}\label{intro}
% The \menukeys package is mainly designed to parse and print
-% sequences of software menus, folders and files or keystrokes.
-% The most predefined styles use the power of \TikZ\footnote{See
-% \url{http://www.ctan.org/pkg/pgf}.} to format the output.
+% sequences of software menus, folders and files, or keystrokes.
+% Most predefined styles use the power of \TikZ\footnote{See
+% \url{https://www.ctan.org/pkg/pgf}.} to format the output.
%
% For example if you want to tell the reader of a manual how to set the ruler
% unit you may type
@@ -327,9 +330,9 @@
% to view the rulers is \keys{cmd + R}. Pressing these keys again
% will hide the rulers.
%
-% The standard path for saving your document is \directory{Macintosh HD/Users/
-% Your Name/Documents} but you can change it at \menu{Extras > Settings
-% > Saving} by clicking \menu{Change save path}.
+% The standard path for saving your document is \directory{Macintosh HD/
+% Users/Your Name/Documents} but you can change it at \menu{Extras >
+% Settings > Saving} by clicking \menu{Change save path}.
% \end{verbatim}
% and get this:
%
@@ -339,9 +342,9 @@
% to view the rulers is \keys{cmd + R}. Pressing these keys again
% will hide the rulers.
%
-% The standard path for saving your document is \directory{Macintosh HD/Users/
-% Your Name/Documents} but you can change it at \menu{Extras > Settings
-% > Saving} by clicking \menu{Change save path}.
+% The standard path for saving your document is \directory{Macintosh HD/
+% Users/Your Name/Documents} but you can change it at \menu{Extras >
+% Settings > Saving} by clicking \menu{Change save path}.
%
% \bigskip\noindent
% The package is loaded as usual via
@@ -369,7 +372,7 @@
% \changes{v1.6}{2020/10/27}{Load order no longer important}
% Since \menukeys used to use \pkg{catoptions}, which does some heavy changes on key-value
% options, it \textbf{was} recommended to load \menukeys as the last package
-% (even after \pkg{hyperref}\footnote{See \url{http://tex.stackexchange.com/q/237683/4918}
+% (even after \pkg{hyperref}\footnote{See \url{https://tex.stackexchange.com/q/237683/4918}
% and \url{https://github.com/tweh/menukeys/issues/41}.}).
% \textbf{This is no longer the case!}
%
@@ -739,7 +742,7 @@
% loaded after it. Otherwise some key macros get corrupted.
% \item \changes{v1.1}{2012/02/26}{Load \pkg{xcolor} before \menukeys.}
% \menukeys must be loaded after \pkg{xcolor}, if you load
-% the latter with options. Otherwise you'll get an option clash
+% the latter with options. Otherwise you'll get an option clash.
% Since \menukeys loads \pkg{xcolor} internally you may pass
% options as global options via |\documentclass| or directly to it via
% |\PassOptionsToPackage|.
@@ -794,7 +797,8 @@
% \begin{macrocode}
\ExplSyntaxOn
\cs_new_eq:NN \tw at mk@trimspaces \tl_trim_spaces:n
-\cs_new_eq:NN \tw at mk@expanded \use:x
+\cs_new_eq:NN \tw at mk@exp at Nnno \exp_args:Nnno
+\cs_new_eq:NN \tw at mk@string \cs_to_str:N
\prg_generate_conditional_variant:Nnn \tl_if_in:nn { xx } { TF }
\cs_new:Npn \tw at mk@xifinsetTF #1 #2
{
@@ -864,12 +868,12 @@
% expanded once as it is handed in as a token storing the real argument in later
% use.
% \begin{macrocode}
-\cs_generate_variant:Nn \seq_set_split:Nnn { Nno }
+\cs_generate_variant:Nn \seq_set_split:Nnn { Noo }
\cs_new_protected:Npn \tw at mk@indrisloop #1 #2 #3
{
\__twmk_pushseq:
\__twmk_pushint:
- \seq_set_split:Nno \l__twmk_indris_seq {#1} {#2}
+ \seq_set_split:Noo \l__twmk_indris_seq {#1} {#2}
\int_zero:N \l__twmk_indris_int
\bool_do_while:nn { \bool_not_p:n { \seq_if_empty_p:N \l__twmk_indris_seq } }
{
@@ -1573,7 +1577,7 @@
% \begin{macro}{\tw at default@input at sep}
% First we define our default input separator
% \begin{macrocode}
-\edef\tw at default@input at sep{,}
+\def\tw at default@input at sep{,}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\CurrentMenuElement} and the |\CurrentMenuElement| dummy
@@ -1582,6 +1586,8 @@
% \end{macrocode}
% \end{macro}
% \begin{macro}{\tw at define@menu at macro}
+% \changes{v1.6.1}{2020/12/19}{Handles default input separator.}
+% \begin{macro}{\tw at define@menu at macro@}
% \changes{v1.1a}{2013/05/28}{Fixed minor bug, that causes a warning about robustifying (issue \#23),
% by deleting the line to make the command robust.}
% \changes{v1.2}{2013/07/23}{Replaced \cs{edef} by \cs{protected at edef}}
@@ -1588,11 +1594,14 @@
% \changes{v1.2c}{2013/07/23}{Replaced \cs{protected at edef} by \cs{def}}
% \changes{v1.2}{2013/07/23}{Added \cs{leavevmode}}
% \changes{v1.6}{2020/10/27}{Don't use \cs{NewDocumentCommand}}
+% \changes{v1.6.1}{2020/12/19}{Renamed from \cs{tw at define@menu at macro}}
+% \changes{v1.6.1}{2020/12/19}{No x-type expansion on the separator to call the
+% loop}
% Then we set up the internal command to create new menu macros.
% The list parsing code was essentially provided by Ahmed Musa at
-% \url{http://tex.stackexchange.com/a/44989/4918}. Jonathan P.\@ Spratte
+% \url{https://tex.stackexchange.com/a/44989/4918}. Jonathan P.\@ Spratte
% made some major changes to make \pkg{menukeys} work without \pkg{catoptions}
-% and reimplemented the parsing code usding \LaTeX3. Thank you both very much!
+% and reimplemented the parsing code using \LaTeX3. Thank you both very much!
% \begin{macrocode}
\begingroup
\lccode`\,=1
@@ -1605,61 +1614,87 @@
}%
}%
}
-\newcommand\tw at define@menu at macro[4]{%
- \ifcsundef{tw at style@#4 at sep}{%
- \tw at mk@error{Can't define menu macro \string#2\space,\MessageBreak
- because the style '#4' is not available!}
- }{%
- \csdef{tw at parse@menu at list@\expandafter\@gobble\string#2}##1{%
- \tw at mk@iflastindris
+\newcommand\tw at define@menu at macro[3]
+ {%
+ \IfNoValueTF{#3}
+ {\tw at mk@exp at Nnno\tw at define@menu at macro@{#1}{#2}\tw at default@input at sep}
+ {\tw at define@menu at macro@{#1}{#2}{#3}}%
+ }
+\newcommand\tw at define@menu at macro@[4]
+ {%
+ \ifcsundef{tw at style@#4 at sep}
+ {%
+ \tw at mk@error
{%
- \ifnum\tw at mk@indrisnr=\@ne
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at single}%
- \else
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at sep}\@nameuse{tw at style@#4 at last}%
- \fi
- }
+ Can't define menu macro \string#2\space,\MessageBreak
+ because the style '#4' is not available!%
+ }%
+ }
+ {%
+ \csdef{tw at parse@menu at list@\tw at mk@string#2}##1%
{%
- \ifnum\tw at mk@indrisnr=\@ne
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at first}%
- \else
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at sep}\@nameuse{tw at style@#4 at mid}%
- \fi
+ \def\CurrentMenuElement{##1}%
+ \tw at mk@iflastindris
+ {%
+ \ifnum\tw at mk@indrisnr=\@ne
+ \@nameuse{tw at style@#4 at single}%
+ \else
+ \@nameuse{tw at style@#4 at sep}%
+ \@nameuse{tw at style@#4 at last}%
+ \fi
+ }
+ {%
+ \ifnum\tw at mk@indrisnr=\@ne
+ \@nameuse{tw at style@#4 at first}%
+ \else
+ \@nameuse{tw at style@#4 at sep}%
+ \@nameuse{tw at style@#4 at mid}%
+ \fi
+ }%
}%
+ #1#2{+O{#3}+m}%
+ {%
+ \leavevmode
+ \begingroup
+ \def\tw at current@color at theme
+ {\csname tw at style@#4 at color@theme\endcsname}%
+ \@nameuse{tw at style@#4 at pre}%
+ \tw at mk@test at input@sep{##1}
+ {%
+ \edef\tw at menu@list{\detokenize{##2}}%
+ \edef\tw at mk@tempa{\@backslashchar}%
+ }
+ {%
+ \edef\tw at menu@list{\unexpanded{##2}}%
+ \edef\tw at mk@tempa{\tw at mk@trimspaces{##1}}%
+ }%
+ \begingroup
+ \letcs{\tw at mk@tempb}{tw at parse@menu at list@\tw at mk@string#2}%
+ \tw at mk@indrisloop\tw at mk@tempa\tw at menu@list\tw at mk@tempb
+ \endgroup
+ \@nameuse{tw at style@#4 at post}%
+ \endgroup
+ }%
}%
- #1 #2 { +O{#3} +m }{%
- \leavevmode%
- {\def\tw at current@color at theme{\csname tw at style@#4 at color@theme\endcsname}%
- \@nameuse{tw at style@#4 at pre}%
- \tw at mk@test at input@sep{##1}{%
- \edef\tw at menu@list{\detokenize{##2}}\edef\tw at mk@tempa{\@backslashchar}%
- }{%
- \edef\tw at menu@list{\unexpanded{##2}}\edef\tw at mk@tempa{\tw at mk@trimspaces{##1}}%
- }%
- {\letcs{\tw at mk@tempb}{tw at parse@menu at list@\expandafter\@gobble\string#2}%
- \tw at mk@expanded{\tw at mk@indrisloop{\tw at mk@tempa}}\tw at menu@list\tw at mk@tempb}%
- \@nameuse{tw at style@#4 at post}}%
- }%
- }%
-}
+ }
% \end{macrocode}
% \end{macro}
+% \end{macro}
% \subsubsection{User-level commands}
% \begin{macro}{\newmenumacro}
% \changes{v1.1a}{2013/05/28}{Added a line to make a new macro robust.}
% \changes{v1.6}{2020/10/27}{use \cs{NewDocumentCommand}}
+% \changes{v1.6.1}{2020/12/19}{default handled by \cs{tw at define@menu at macro}}
% \begin{macro}{\renewmenumacro}
% \changes{v1.6}{2020/10/27}{use \cs{RenewDocumentCommand}}
+% \changes{v1.6.1}{2020/12/19}{default handled by \cs{tw at define@menu at macro}}
% \begin{macro}{\providemenumacro}
% \changes{v1.6}{2020/10/27}{use \cs{ProvideDocumentCommand}}
+% \changes{v1.6.1}{2020/12/19}{default handled by \cs{tw at define@menu at macro}}
% Now it's time to build the user-level commands
% \begin{macrocode}
-\NewDocumentCommand{\newmenumacro}{m O{\tw at default@input at sep} m}{%
- \ifcsundef{\expandafter\@gobble\string#1}{%
+\NewDocumentCommand{\newmenumacro}{m o m}{%
+ \ifcsundef{\tw at mk@string#1}{%
\tw at define@menu at macro\NewDocumentCommand{#1}{#2}{#3}%
}{%
\tw at mk@error{Menu macro '\string#1' already defined!\MessageBreak
@@ -1666,11 +1701,11 @@
Use \string\renewmenustyle\space instead.}%
}%
}
-\NewDocumentCommand{\renewmenumacro}{m O{\tw at default@input at sep} m}{%
+\NewDocumentCommand{\renewmenumacro}{m o m}{%
\tw at define@menu at macro\RenewDocumentCommand{#1}{#2}{#3}%
}
-\NewDocumentCommand{\providemenumacro}{m O{\tw at default@input at sep} m}{%
- \ifcsundef{\expandafter\@gobble\string#1}{%
+\NewDocumentCommand{\providemenumacro}{m o m}{%
+ \ifcsundef{\tw at mk@string#1}{%
\tw at define@menu at macro\ProvideDocumentCommand{#1}{#2}{#3}%
}{%
\tw at mk@warning{Menu macro '\string#1' already defined!\MessageBreak
@@ -1738,25 +1773,25 @@
% \begin{macrocode}
\NewDocumentCommand{\tw at make@key at macro}{s m}{%
\IfBooleanTF{#1}{%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2@\tw at mk@os}}%
+ \@nameuse{tw at mk@\tw at mk@string#2@\tw at mk@os}}%
}%
}%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2mac\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2mac\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2 at mac}}%
+ \@nameuse{tw at mk@\tw at mk@string#2 at mac}}%
}%
}%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2win\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2win\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2 at win}}%
+ \@nameuse{tw at mk@\tw at mk@string#2 at win}}%
}%
}%
}{%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2}}%
+ \@nameuse{tw at mk@\tw at mk@string#2}}%
}%
}%
}%
Modified: trunk/Master/texmf-dist/source/latex/menukeys/menukeys.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/menukeys/menukeys.ins 2020-12-19 21:26:11 UTC (rev 57171)
+++ trunk/Master/texmf-dist/source/latex/menukeys/menukeys.ins 2020-12-19 21:26:22 UTC (rev 57172)
@@ -7,7 +7,7 @@
license or (at your option) any later version. The latest version
of this license is in the file
- http://www.latex-project.org/lppl.txt
+ https://www.latex-project.org/lppl.txt
\fi
@@ -28,7 +28,7 @@
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
+ https://www.latex-project.org/lppl.txt
and version 1.2 or later is part of all distributions of
LaTeX version 1999/12/01 or later.
@@ -53,4 +53,4 @@
\Msg{* *}
\Msg{****************************************************}
-\endbatchfile
\ No newline at end of file
+\endbatchfile
Modified: trunk/Master/texmf-dist/tex/latex/menukeys/menukeys.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/menukeys/menukeys.sty 2020-12-19 21:26:11 UTC (rev 57171)
+++ trunk/Master/texmf-dist/tex/latex/menukeys/menukeys.sty 2020-12-19 21:26:22 UTC (rev 57172)
@@ -16,7 +16,7 @@
%% 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
+%% https://www.latex-project.org/lppl.txt
%%
%% and version 1.2 or later is part of all distributions of
%% LaTeX version 1999/12/01 or later.
@@ -28,11 +28,11 @@
%% license or (at your option) any later version. The latest version
%% of this license is in the file
%%
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%%
\NeedsTeXFormat{LaTeX2e}[2009/01/01]
\ProvidesPackage{menukeys}
- [2020/10/31 v1.6 -- A package to format menus, paths and shortcuts]
+ [2020/12/19 v1.6.1 -- A package to format menus, paths and shortcuts]
\RequirePackage{xparse}
\RequirePackage{xstring}
\RequirePackage{etoolbox}
@@ -43,7 +43,8 @@
\RequirePackage{relsize}
\ExplSyntaxOn
\cs_new_eq:NN \tw at mk@trimspaces \tl_trim_spaces:n
-\cs_new_eq:NN \tw at mk@expanded \use:x
+\cs_new_eq:NN \tw at mk@exp at Nnno \exp_args:Nnno
+\cs_new_eq:NN \tw at mk@string \cs_to_str:N
\prg_generate_conditional_variant:Nnn \tl_if_in:nn { xx } { TF }
\cs_new:Npn \tw at mk@xifinsetTF #1 #2
{
@@ -85,12 +86,12 @@
\int_set:Nn \l__twmk_indris_int \l__twmk_indris_tl
}
}
-\cs_generate_variant:Nn \seq_set_split:Nnn { Nno }
+\cs_generate_variant:Nn \seq_set_split:Nnn { Noo }
\cs_new_protected:Npn \tw at mk@indrisloop #1 #2 #3
{
\__twmk_pushseq:
\__twmk_pushint:
- \seq_set_split:Nno \l__twmk_indris_seq {#1} {#2}
+ \seq_set_split:Noo \l__twmk_indris_seq {#1} {#2}
\int_zero:N \l__twmk_indris_int
\bool_do_while:nn { \bool_not_p:n { \seq_if_empty_p:N \l__twmk_indris_seq } }
{
@@ -651,7 +652,7 @@
\drawtikzfolder[\usemenucolor{c}][\usemenucolor{b}]%
\hspace{0.2em plus 0.1em}%
}
-\edef\tw at default@input at sep{,}
+\def\tw at default@input at sep{,}
\def\CurrentMenuElement{}
\begingroup
\lccode`\,=1
@@ -664,49 +665,71 @@
}%
}%
}
-\newcommand\tw at define@menu at macro[4]{%
- \ifcsundef{tw at style@#4 at sep}{%
- \tw at mk@error{Can't define menu macro \string#2\space,\MessageBreak
- because the style '#4' is not available!}
- }{%
- \csdef{tw at parse@menu at list@\expandafter\@gobble\string#2}##1{%
- \tw at mk@iflastindris
+\newcommand\tw at define@menu at macro[3]
+ {%
+ \IfNoValueTF{#3}
+ {\tw at mk@exp at Nnno\tw at define@menu at macro@{#1}{#2}\tw at default@input at sep}
+ {\tw at define@menu at macro@{#1}{#2}{#3}}%
+ }
+\newcommand\tw at define@menu at macro@[4]
+ {%
+ \ifcsundef{tw at style@#4 at sep}
+ {%
+ \tw at mk@error
{%
- \ifnum\tw at mk@indrisnr=\@ne
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at single}%
- \else
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at sep}\@nameuse{tw at style@#4 at last}%
- \fi
- }
+ Can't define menu macro \string#2\space,\MessageBreak
+ because the style '#4' is not available!%
+ }%
+ }
+ {%
+ \csdef{tw at parse@menu at list@\tw at mk@string#2}##1%
{%
- \ifnum\tw at mk@indrisnr=\@ne
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at first}%
- \else
- \def\CurrentMenuElement{##1}%
- \@nameuse{tw at style@#4 at sep}\@nameuse{tw at style@#4 at mid}%
- \fi
+ \def\CurrentMenuElement{##1}%
+ \tw at mk@iflastindris
+ {%
+ \ifnum\tw at mk@indrisnr=\@ne
+ \@nameuse{tw at style@#4 at single}%
+ \else
+ \@nameuse{tw at style@#4 at sep}%
+ \@nameuse{tw at style@#4 at last}%
+ \fi
+ }
+ {%
+ \ifnum\tw at mk@indrisnr=\@ne
+ \@nameuse{tw at style@#4 at first}%
+ \else
+ \@nameuse{tw at style@#4 at sep}%
+ \@nameuse{tw at style@#4 at mid}%
+ \fi
+ }%
}%
+ #1#2{+O{#3}+m}%
+ {%
+ \leavevmode
+ \begingroup
+ \def\tw at current@color at theme
+ {\csname tw at style@#4 at color@theme\endcsname}%
+ \@nameuse{tw at style@#4 at pre}%
+ \tw at mk@test at input@sep{##1}
+ {%
+ \edef\tw at menu@list{\detokenize{##2}}%
+ \edef\tw at mk@tempa{\@backslashchar}%
+ }
+ {%
+ \edef\tw at menu@list{\unexpanded{##2}}%
+ \edef\tw at mk@tempa{\tw at mk@trimspaces{##1}}%
+ }%
+ \begingroup
+ \letcs{\tw at mk@tempb}{tw at parse@menu at list@\tw at mk@string#2}%
+ \tw at mk@indrisloop\tw at mk@tempa\tw at menu@list\tw at mk@tempb
+ \endgroup
+ \@nameuse{tw at style@#4 at post}%
+ \endgroup
+ }%
}%
- #1 #2 { +O{#3} +m }{%
- \leavevmode%
- {\def\tw at current@color at theme{\csname tw at style@#4 at color@theme\endcsname}%
- \@nameuse{tw at style@#4 at pre}%
- \tw at mk@test at input@sep{##1}{%
- \edef\tw at menu@list{\detokenize{##2}}\edef\tw at mk@tempa{\@backslashchar}%
- }{%
- \edef\tw at menu@list{\unexpanded{##2}}\edef\tw at mk@tempa{\tw at mk@trimspaces{##1}}%
- }%
- {\letcs{\tw at mk@tempb}{tw at parse@menu at list@\expandafter\@gobble\string#2}%
- \tw at mk@expanded{\tw at mk@indrisloop{\tw at mk@tempa}}\tw at menu@list\tw at mk@tempb}%
- \@nameuse{tw at style@#4 at post}}%
- }%
- }%
-}
-\NewDocumentCommand{\newmenumacro}{m O{\tw at default@input at sep} m}{%
- \ifcsundef{\expandafter\@gobble\string#1}{%
+ }
+\NewDocumentCommand{\newmenumacro}{m o m}{%
+ \ifcsundef{\tw at mk@string#1}{%
\tw at define@menu at macro\NewDocumentCommand{#1}{#2}{#3}%
}{%
\tw at mk@error{Menu macro '\string#1' already defined!\MessageBreak
@@ -713,11 +736,11 @@
Use \string\renewmenustyle\space instead.}%
}%
}
-\NewDocumentCommand{\renewmenumacro}{m O{\tw at default@input at sep} m}{%
+\NewDocumentCommand{\renewmenumacro}{m o m}{%
\tw at define@menu at macro\RenewDocumentCommand{#1}{#2}{#3}%
}
-\NewDocumentCommand{\providemenumacro}{m O{\tw at default@input at sep} m}{%
- \ifcsundef{\expandafter\@gobble\string#1}{%
+\NewDocumentCommand{\providemenumacro}{m o m}{%
+ \ifcsundef{\tw at mk@string#1}{%
\tw at define@menu at macro\ProvideDocumentCommand{#1}{#2}{#3}%
}{%
\tw at mk@warning{Menu macro '\string#1' already defined!\MessageBreak
@@ -737,25 +760,25 @@
}
\NewDocumentCommand{\tw at make@key at macro}{s m}{%
\IfBooleanTF{#1}{%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2@\tw at mk@os}}%
+ \@nameuse{tw at mk@\tw at mk@string#2@\tw at mk@os}}%
}%
}%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2mac\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2mac\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2 at mac}}%
+ \@nameuse{tw at mk@\tw at mk@string#2 at mac}}%
}%
}%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2win\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2win\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2 at win}}%
+ \@nameuse{tw at mk@\tw at mk@string#2 at win}}%
}%
}%
}{%
- \expandafter\providecommand\csname\expandafter\@gobble\string#2\endcsname{%
+ \expandafter\providecommand\csname\tw at mk@string#2\endcsname{%
\expandonce{\maxsizebox{!}{1.8ex}{%
- \@nameuse{tw at mk@\expandafter\@gobble\string#2}}%
+ \@nameuse{tw at mk@\tw at mk@string#2}}%
}%
}%
}%
More information about the tex-live-commits
mailing list.