diff options
author | Hans Hagen <pragma@wxs.nl> | 2011-02-11 12:50:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2011-02-11 12:50:00 +0100 |
commit | f344a831f7da0d57427ebf38ef0861d1a3933ba1 (patch) | |
tree | 2b13cf5a0f3357ae919db0d34603f1fff8841332 /tex/context/base/meta-tex.mkiv | |
parent | c1277fe938900d76727978e9140fbf6bea3e13bb (diff) | |
download | context-f344a831f7da0d57427ebf38ef0861d1a3933ba1.tar.gz |
beta 2011.02.11 12:50
Diffstat (limited to 'tex/context/base/meta-tex.mkiv')
-rw-r--r-- | tex/context/base/meta-tex.mkiv | 89 |
1 files changed, 77 insertions, 12 deletions
diff --git a/tex/context/base/meta-tex.mkiv b/tex/context/base/meta-tex.mkiv index bc2f354b8..a6c785094 100644 --- a/tex/context/base/meta-tex.mkiv +++ b/tex/context/base/meta-tex.mkiv @@ -64,16 +64,16 @@ % \stopMPcode % a tex one: -% -% \unexpanded\def\definetextext [#1]#2{\setvalue{@@st@@#1}{#2}} -% \def\sometxt #1#{\dosometxt{#1}} -% \def\dosometxt #1#2{textext.drt("\dodosometxt#1{#2}")} -% -% \unexpanded\def\dodosometxt {\doifnextoptionalelse\dododosometxt\relax} -% \def\dododosometxt [#1]{\dodododosometxt{#1}} -% \def\dodododosometxt #1{\doifnextoptionalelse{\dododododosometxt{#1}}{\getsometxt{#1}}} -% \def\dododododosometxt#1[#2]{\switchtobodyfont[#2]\getsometxt{#1}} -% \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} + +\unexpanded\def\definetextext [#1]#2{\setvalue{@@st@@#1}{#2}} + \def\sometxt #1#{\dosometxt{#1}} + \def\dosometxt #1#2{textext.drt("\dodosometxt#1{#2}")} + +%unexpanded\def\dodosometxt {\doifnextoptionalelse\dododosometxt\relax} +% \def\dododosometxt [#1]{\dodododosometxt{#1}} +% \def\dodododosometxt #1{\doifnextoptionalelse{\dododododosometxt{#1}}{\getsometxt{#1}}} +% \def\dododododosometxt #1[#2]{\switchtobodyfont[#2]\getsometxt{#1}} +% \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} % % or: @@ -88,10 +88,75 @@ \def\dododosometxtA[#1][#2]#3{\getsometxt{#1}{\switchtobodyfont[#2]#3}} \def\dododosometxtB[#1][#2]#3{\getsometxt{#1}{#3}} \def\dododosometxtC[#1][#2]#3{#3} - \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} + \def\getsometxt #1#2{\csname @@st@@#1\endcsname{#2}} -% a lua one: +% a variant ... if m likes it: +% +% \unexpanded\def\definetextext[#1]% +% {\def\currenttextext{#1}% +% \dosingleempty\dodefinetextext} +% +% \def\dodefinetextext +% {\iffirstargument +% \expandafter\dodefinetextextone +% \else +% \expandafter\dodefinetextextzero +% \fi} +% +% \def\dodefinetextextone {\setvalue{@@st@@one\currenttextext}} +% \def\dodefinetextextzero[#1]{\setvalue{@@st@@zero\currenttextext}} +% +% \def\sometxt#1#% +% {\dosometxt{#1}} +% +% \def\dosometxt#1#2% +% {textext.drt("\dodosometxt#1{#2}")} +% +% \unexpanded\def\dodosometxt +% {\dosingleempty\dododosometxt} +% +% \def\dododosometxt +% {\iffirstargument +% \expandafter\dosometxtsome +% \else +% \expandafter\dosometxtzero +% \fi} +% +% \def\dosometxtsome[#1]% +% {\def\currenttextext{#1}% +% \csname @@st@@% +% \ifcsname @@st@@one#1\endcsname one\else +% \ifcsname @@st@@zero#1\endcsname zero\else +% none\fi\fi +% \endcsname} +% +% \def\dosometxtzero[#1]% +% {} +% +% \def\@@st@@one {\dosingleempty\do@@st@@one} +% \def\do@@st@@one{\csname @@st@@one\currenttextext\endcsname} +% \def\@@st@@zero {\csname @@st@@zero\currenttextext\endcsname} +% \def\@@st@@none {} +% +% \protect +% +% \definetextext[framed][#1]#2{\framed[width=4cm]{\switchtobodyfont[#1]#2}} +% \definetextext[simple]{\framed[width=8cm]} +% +% \starttext +% +% \startMPcode +% draw \sometxt{This is for} rotated 45 ; +% draw \sometxt [framed] [ss,16pt] {Mojca's}; +% draw \sometxt[framed]{eyes only!} rotated -45 ; +% draw \sometxt[simple]{Indeed!} rotated 180 ; +% \stopMPcode +% +% \stoptext + +% a lua one: +% % \unexpanded\def\definetextext[#1]#2{\setvalue{@@st@@#1}{#2}} % % \long\def\sometxt #1#{\dosometxt{#1}} % grab optional [args] |