slatex / sTeX

A semantic Extension of TeX/LaTeX
49 stars 9 forks source link

weird error message #358

Closed kohlhase closed 1 year ago

kohlhase commented 1 year ago

I get the following error message:


./linear-map.en.tex:16: Package stex Error: No field \bool_set_false:N  in instance V found!
(stex)                

on smglom/linear-algebra/source/mod/linear-mapen.tex and I have the feeling that instead of \bool_set_false:N there should be a field name.

kohlhase commented 1 year ago

funnily enough sometimes it seems to work:

./linear-map.en.tex:16: Package stex Error: No field smul in instance V found!
(stex)                

TYpe <return> to continue.
Jazzpirate commented 1 year ago

No field \bool_set_false:N in instance V found! is a pretty good indicator that there is something syntactically wrong in what you wrote - semantic macros with wrong numbers of arguments etc. This can easily happen if you do not brace arguments correctly, but it's really really difficult to detect that that is the case or throw helpful error messages.

In this case, note that in lines 16 and 17, we have \defeq\V{\mathstruct{.... \defeq takes two arguments, which are therefore \Vand \mathstruct{.... But \V itself expects an argument (namely a field name), so what you wanted to write was \V!, which now needs to be braced as well.

You get the same kinf of error when you do things like \inset x\V{base-set}, for example - suddenly the \V is taken as second argument for \inset and havoc ensues when \V itself tries to gobble its argument ;)

kohlhase commented 1 year ago

Indeed, I wanted to use \defeq{\V!} but did not see that. Thanks.