diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-sty.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-sty.mkvi | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-sty.mkvi b/Master/texmf-dist/tex/context/base/font-sty.mkvi index d8f01afa700..3caa944887c 100644 --- a/Master/texmf-dist/tex/context/base/font-sty.mkvi +++ b/Master/texmf-dist/tex/context/base/font-sty.mkvi @@ -84,7 +84,7 @@ % \appendtoks % \let\groupedcommand\thirdofthreearguments -% \to \simplifiedcommands +% \to \everysimplifycommands %D This command also defines the keyword as command. This means %D that the example definition of \type{bold} we gave before, @@ -216,11 +216,19 @@ \installcommandhandler \??style {style} \??style +\setupstyle + [%\c!style=, + %\c!color=, + \c!method=\v!command] + \appendtoks \letvalue{\??stylecheck\currentstyle}\relax - \setuevalue{\e!start\currentstyle}{\font_styles_apply_start{\currentstyle}}% - \setuevalue{\e!stop \currentstyle}{\font_styles_apply_stop}% - \setuevalue {\currentstyle}{\font_styles_apply_grouped{\currentstyle}}% no longer groupedcommand here + \edef\p_method{\styleparameter\c!method}% + \ifx\p_method\v!command + \setuevalue{\e!start\currentstyle}{\font_styles_apply_start{\currentstyle}}% + \setuevalue{\e!stop \currentstyle}{\font_styles_apply_stop}% + \setuevalue {\currentstyle}{\font_styles_apply_grouped{\currentstyle}}% no longer groupedcommand here + \fi \to \everydefinestyle \unexpanded\def\font_styles_apply_start#name% @@ -242,7 +250,9 @@ \unexpanded\def\font_styles_use_generic#specification% {\let\currentstyle\s!unknown % reasonable generic tag - \setupcurrentstyle[\c!style=,\c!color=,#specification]% + \letstyleparameter\c!style\empty + \letstyleparameter\c!color\empty + \setupcurrentstyle[#specification]% \usestylestyleandcolor\c!style\c!color} % commands @@ -251,14 +261,20 @@ \unexpanded\def\style[#name]% as this is can be a switch we use groupedcommand {\csname\??styleargument - \ifcsname#name\endcsname1\else\ifcsname\??stylecheck#name\endcsname2\else3\fi\fi + \ifcsname\??stylecheck#name\endcsname + 2% defined as style + \else\ifcsname#name\endcsname + 1% defined as command + \else + 3% specification + \fi\fi \endcsname{#name}} \setvalue{\??styleargument1}#name% - {\csname#name\endcsname} + {\groupedcommand{\csname#name\endcsname}{}} \setvalue{\??styleargument2}#name% - {\groupedcommand{\font_styles_use_defined{#name}}{}} + {\groupedcommand{\font_styles_use_defined{#name}}{}} % or {\font_styles_apply_grouped{#name}} \setvalue{\??styleargument3}#specification% {\doifassignmentelse{#specification}\font_styles_assignment\font_styles_direct{#specification}} @@ -273,7 +289,13 @@ \unexpanded\def\startstyle[#name]% {\begingroup \csname\??styleenvironment - \ifcsname#name\endcsname1\else\ifcsname\??stylecheck#name\endcsname2\else3\fi\fi + \ifcsname\??stylecheck#name\endcsname + 2% defined as style + \else\ifcsname#name\endcsname + 1% defined as command + \else + 3% specification + \fi\fi \endcsname{#name}} \unexpanded\def\stopstyle @@ -289,7 +311,7 @@ \setvalue{\??styleenvironment3}#specification% {\doifassignmentelse{#specification}\font_styles_start_assignment\font_styles_start_direct{#specification}} -\def\font_styles_start_assignment#specification{\usegenericstyle{#specification}} +\def\font_styles_start_assignment#specification{\font_styles_use_generic{#specification}} \def\font_styles_start_direct #specification{\definedfont[#specification]\relax} %D Still experimental (might even go away). @@ -358,12 +380,12 @@ %D Variant selectors %D %D \starttyping -%D \mathematics {\vsone{\utfchar{"2229}}} -%D \mathematics {\utfchar{"2229}\vsone{}} +%D \mathematics {\vsone{\utfchar{0x2229}}} +%D \mathematics {\utfchar{0x2229}\vsone{}} %D \stoptyping -\unexpanded\edef\vsone#character{#character\utfchar{"FE00}} % used -\unexpanded\edef\vstwo#character{#character\utfchar{"FE01}} % not used but handy for testing +\unexpanded\edef\vsone#character{#character\normalUchar"FE00 } % used +\unexpanded\edef\vstwo#character{#character\normalUchar"FE01 } % not used but handy for testing %D For historic reasons we keep the following around but they are no longer %D that relevant for \MKIV. |