Commits

Wolfgang Schuster  committed 510eb51

\ExpandSecondAfter is no available in mkiv, separate mkii and mkiv code with modes

  • Participants
  • Parent commits c946624

Comments (0)

Files changed (4)

File files/default.nli

 %D \module
 %D   [       file=default,
-%D        version=2010.10.06,
+%D        version=2011.02.07,
 %D          title=\CONTEXT\ Letter Interface,
 %D       subtitle=Default Interface,
 %D         author=Wolfgang Schuster,
      {\doiflettervalue\c!salutation
         {\lettervalue\c!salutation}}}
 
+\startmode[\s!mkii]
 \defineletterelement[\v!opening][\v!french]
   {\ExpandSecondAfter\doifsomething{\letterstylevalue\v!option\c!indenting}
      {\setupindenting[\@@@@lsoptionindenting]}%
    \letterelement[\v!opening][\v!a]}
+\stopmode
+
+\startmode[\s!mkiv]
+\defineletterelement[\v!opening][\v!french]
+  {\doifsomething{\letterstylevalue\v!option\c!indenting}{\setupindenting[\@@@@lsoptionindenting]}%
+   \letterelement[\v!opening][\v!a]}
+\stopmode
 
 \startsetups[\v!letter:\v!opening]
 \executeifdefined{\v!letter:\v!opening:\@@@@lsopeningalternative}{\getvalue{\v!letter:\v!opening:\v!a}}
    \doiflettervalue\c!signature{\letterstylevalue\v!closing\c!inbetween}%
    \lettervalue\c!signature}
 
+\startmode[\s!mkii]
 \defineletterelement[\v!closing][\v!french]
   {\ExpandSecondAfter\doifsomething{\letterstylevalue\v!option\c!indenting}
      {\setupindenting[\@@@@lsoptionindenting,\v!first]}%
    \doiflettervalue\c!signature{\letterstylevalue\v!closing\c!inbetween}%
    \raggedcenter\doadaptleftskip{.5\textwidth}% quick and dirty
    \lettervalue\c!signature\endgraf}
+\stopmode
+
+\startmode[\s!mkiv]
+\defineletterelement[\v!closing][\v!french]
+  {\doifsomething{\letterstylevalue\v!option\c!indenting}{\setupindenting[\@@@@lsoptionindenting,\v!first]}%
+   \lettervalue\c!closing
+   \doiflettervalue\c!signature{\letterstylevalue\v!closing\c!inbetween}%
+   \raggedcenter\doadaptleftskip{.5\textwidth}% quick and dirty
+   \lettervalue\c!signature\endgraf}
+\stopmode
 
 \defineletterelement[\v!closing][\v!simplified]
   {\doiflettervalue\c!signature{\letterstylevalue\v!closing\c!inbetween}%

File files/t-correspondence.mkii

 %D \module
 %D   [       file=t-correspondence,
-%D        version=2010.11.22,
+%D        version=2011.02.07,
 %D          title=\CONTEXT\ User Module,
 %D       subtitle=Correspondence,
 %D         author=Wolfgang Schuster,
         \scratchdimen\dimexpr\wd\scratchbox+1em\relax
       \fi}
      {\doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!fit
-        {\if\wd\scratchbox>\zeropoint
+        {\ifdim\wd\scratchbox>\zeropoint
            \scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax
          \fi}
         {\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax}}%

File files/t-correspondence.mkiv

 %D \module
 %D   [       file=t-correspondence,
-%D        version=2010.11.22,
+%D        version=2011.02.07,
 %D          title=\CONTEXT\ User Module,
 %D       subtitle=Correspondence,
 %D         author=Wolfgang Schuster,
         \scratchdimen\dimexpr\wd\scratchbox+1em\relax
       \fi}
      {\doifelse{\correspondencestylevalue{#2}{#3}\c!width}\v!fit
-        {\if\wd\scratchbox>\zeropoint
+        {\ifdim\wd\scratchbox>\zeropoint
            \scratchdimen\dimexpr\wd\scratchbox+\correspondencestylevalue{#2}{#3}\c!distance\relax
          \fi}
         {\scratchdimen\dimexpr\correspondencestylevalue{#2}{#3}\c!width+\correspondencestylevalue{#2}{#3}\c!distance\relax}}%
         name        = "t-correspondence.tex",
         path        = "tex/context/third/letter/base/",
         type        = "base",
-        version     = "2010.11.22",
+        version     = "2011.02.07",
         description = "Core module"
     } ,
     {
         name        = "default.nli",
         path        = "tex/context/third/letter/interface/",
         type        = "interface",
-        version     = "2010.10.06",
+        version     = "2011.02.07",
         description = "Default letter interface"
 
     } ,

File files/t-correspondence.tex

 %D \module
 %D   [       file=t-correspondence,
-%D        version=2010.11.22,
+%D        version=2011.02.07,
 %D          title=\CONTEXT\ User Module,
 %D       subtitle=Correspondence,
 %D         author=Wolfgang Schuster,