
Am 26.02.2025 um 13:20 schrieb autumnus:
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]?
[...]
\tolerant\protected\def\userlanguage#*[#1]#*[#2]#*% {...}
You don't need #* before the first and after the last argument, only between the optional (or mandatory) argument to permit spaces. The \useinterlinespaceparameter command works when you pass a named interlinespace instance, which is created with \defineinterlinespace. \unprotect \installnamespace {userlanguage} \installcommandhandler \????userlanguage {userlanguage} \????userlanguage \protect \setupuserlanguage [en] [interlinespace=english] \setupuserlanguage [cn] [interlinespace=chinese] \defineinterlinespace [english] [line=2.4ex] \defineinterlinespace [chinese] [line=4.0ex] \starttext \samplefile{lorem} \cdef\currentuserlanguage{en} \useinterlinespaceparameter\userlanguageparameter \samplefile{lorem} \cdef\currentuserlanguage{cn} \useinterlinespaceparameter\userlanguageparameter \samplefile{lorem} \stoptext Wolfgang