On Thu, 12 Mar 2009, John Devereux wrote:
Wolfgang Schuster
writes: Am 12.03.2009 um 15:06 schrieb John Devereux:
Michael Bynum
writes: This has burned me too. It would be nice if the errors were more prominent, perhaps repeated at the end of the output? Mike
While we are on the subject, is it possible to make it "die" when incorrect (non-existent) options are passed to a context command? Is there any way at all of knowing if the option did anything (even by examining the log?)
No, this is not possible and even such a feature would increase the compile time a lot, e.g. I used list with valid names in a earlier version of my letter module and it was 30% slower than the current version and now imagine what happens if you check each key in a assignment list.
OK. It seems strange (coming from a programming background).
TeX is no ordinary language. Currently, all keys that you pass are simply stored as macros. When a particular option is needed, ConTeXt checks the value of the corresponding macro, and decides what to do. If you want to check the keys, you need that while storing the options as macros. This means an extra check for each value for each ConTeXt command. Since ConTeXt uses an extensive key-value configuration system, this means a lot of extra time. The same argument holds for stripping white spaces from key-value pairs. You can use \setupsomething[key=value] but not \setupsomething[ key = value ]. For module and environments, this problem can be solved by using \unprotect ... \setupsomething[\c!key=\v!value] ... \protect
If it is only the compile time, then a command line switch might be an option. (But it sounds like it is inherently hard to do, now).
Perhaps with luatex there may be an easier solution. But that would mean rewriting how options are handled internally --- a big and error-prone task. Aditya