When trying to typeset, luatex kept complaining about incorrect parameters for ‘minus’. There is no \minus command in the source however. So it turns out that the combination of using \quad with ‘plus’, 'minus', and some more make the error appear. If i rewrite minus by {minus} the error does not show up either. \starttext \quad minuskel \stoptext Where do i go wrong? Thanks. Floris
On 12/27/18 10:43 PM, Floris van Manen wrote:
When trying to typeset, luatex kept complaining about incorrect parameters for ‘minus’. There is no \minus command in the source however. So it turns out that the combination of using \quad with ‘plus’, 'minus', and some more make the error appear. If i rewrite minus by {minus} the error does not show up either.
That's because the skips in spachor.mkiv are defined like this \unexpanded\def\enskip{\hskip.5\emwidth} \unexpanded\def\quad {\hskip \emwidth} \unexpanded\def\qquad {\hskip 2\emwidth} The syntax for the \hskip primitive is \hskip<glue> and the definition of <glue> is <dimen>plus<dimen>minus<dimen> So “\quad minuskel” will expand to “\hskip\emwidth minuskel”. You see what's going to happen? The “minus” will be interpreted as part of the glue definition but no <dimen> is following it, so you get an error. To fix the bug, the definitions in spachor.mkiv have to changed \unexpanded\def\enskip{\hskip.5\emwidth\relax} \unexpanded\def\quad {\hskip \emwidth\relax} \unexpanded\def\qquad {\hskip 2\emwidth\relax} As a temporary workaround you can also just copy them into your document.
\starttext \quad minuskel \stoptext
Where do i go wrong?
Thanks. Floris
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntgcontext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntgcontext webpage : http://www.pragmaade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/contextmirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 12/27/18 11:08 PM, Henri Menke wrote:
On 12/27/18 10:43 PM, Floris van Manen wrote:
When trying to typeset, luatex kept complaining about incorrect parameters for ‘minus’. There is no \minus command in the source however. So it turns out that the combination of using \quad with ‘plus’, 'minus', and some more make the error appear. If i rewrite minus by {minus} the error does not show up either.
That's because the skips in spachor.mkiv are defined like this
\unexpanded\def\enskip{\hskip.5\emwidth} \unexpanded\def\quad {\hskip \emwidth} \unexpanded\def\qquad {\hskip 2\emwidth}
The syntax for the \hskip primitive is
\hskip<glue>
and the definition of <glue> is
<dimen>plus<dimen>minus<dimen>
So “\quad minuskel” will expand to “\hskip\emwidth minuskel”. You see what's going to happen? The “minus” will be interpreted as part of the glue definition but no <dimen> is following it, so you get an error. To fix the bug, the definitions in spachor.mkiv have to changed
\unexpanded\def\enskip{\hskip.5\emwidth\relax} \unexpanded\def\quad {\hskip \emwidth\relax} \unexpanded\def\qquad {\hskip 2\emwidth\relax}
As a temporary workaround you can also just copy them into your document.
There is even a comment in the TeXbook about this exact issue. \danger Horizontal glue is created in the same way, but with ^\hskip instead of\/ ^\vskip. For example, plain \TeX\ defines ^\enskip as an abbreviation for the command `\hskip.5em\relax'; this skips horizontally by one ``^{en},'' i.e., by exactly half of an em in the current font. There is no stretching or shrinking in an \enskip. The control sequence ^\relax after `.5em' prevents \TeX\ from thinking that a ^{keyword} is present, in case the text following \enskip just happens to begin with `plus' or `minus'.
\starttext \quad minuskel \stoptext
Where do i go wrong?
Thanks. Floris
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntgcontext@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntgcontext webpage : http://www.pragmaade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/contextmirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
Floris van Manen schrieb am 27.12.18 um 10:43:
When trying to typeset, luatex kept complaining about incorrect parameters for ‘minus’. There is no \minus command in the source however. So it turns out that the combination of using \quad with ‘plus’, 'minus', and some more make the error appear. If i rewrite minus by {minus} the error does not show up either.
\starttext \quad minuskel \stoptext
Where do i go wrong?
There is nothing wrong with your example but the definition for \quad isn’t. The \quad command uses the \hskip primitive which accepts besides the normal values which is inserted between the content also a variable part to shrink or stretch the inserted space. This variable part uses the “plus” and “minus” keywords (e.g. \hskip 1em minus .2em) which leads to the problem in your case. One could stop TeX from parsing for the optional keywords with a delimiter for the \hskip command but this delimiter is missing in the definition for \quad. I’ll send a fix to the dev list and the problem should be fixed in the next beta but for the meantime you can add \relax after \quad (i.e. \quad\relax ...) to get rid of the error. Wolfgang
participants (3)

Floris van Manen

Henri Menke

Wolfgang Schuster