I designed a new command. But I found a problem.

We have the command [\useinterlinespaceparameter],
I thought it would work like \usealignparameter or \usebodyfontparameter,
But in the actual testing process, the command does not seem to work at all.
% Therefore, I used \dosetupcheckedinterlinespace.

In addition, 
I found that there is also [\useinterlinespaceparameter]  in the footnote.
it also can't work. 
Although we can make additional settings through \setups.
Or maybe is there something wrong with [\useinterlinespaceparameter]?

%%%%%%
\unprotect
\let\sys_language\language

\installnamespace          {userlanguage}
\installcommandhandler \????userlanguage {userlanguage} \????userlanguage

\setupuserlanguage[en][
  %  interlinespace=,
   indenting=,]
\setupuserlanguage[cn][
  %  interlinespace=,
   indenting={yes,2em},]

\tolerant\protected\def\userlanguage#*[#1]#*[#2]#*%
 {\edef\currentuserlanguage{#1}%
  \ifarguments\or\or
    \setuplanguage[#1][#2]%
    \setupuserlanguage[#1][#2]\fi
  \sys_language[#1]%
  \ifhmode\else\par
    \edef\p_language_interlinespace{\userlanguageparameter\c!interlinespace}%
    \useindentingparameter\userlanguageparameter
    % \useinterlinespaceparameter\userlanguageparameter% not work
    \dosetupcheckedinterlinespace\p_language_interlinespace% work
  \fi
  \lettonothing\currentuserlanguage}
\protect

\starttext
{\userlanguage[cn]How about \CONTEXT's apostrophes?
{\userlanguage[en]How about \CONTEXT's apostrophes?}}

{\userlanguage[cn][interlinespace=42pt]\ss\input knuthmath \par}

{\userlanguage[en][interlinespace=22pt]\tt\input knuthmath \par}

\input knuthmath
\stoptext
%%%%%%
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to