# [NTG-context] texmfstart fails silently on incorrect input

Mon Jun 5 04:20:14 CEST 2006

On Mon, 5 Jun 2006, "Guðmundur J. Kristjánsson" wrote:

> Just a quick note regarding "silentness" in Context.
>
> I have on two occasions had problems with silent errors:
>
> 1) When using the bib module and putting spaces between citation
> variables and their value. For example, doing:
>
> \startpublication[k = ArcticCorsairTrawling,
> 		  t = misc]
>
>
> \startpublication[k=ArcticCorsairTrawling,
> 		  t=misc]
>
> 2) When trying to define an abstract command:
> \definestartstop
>     [abstract]
>     [before={\midaligned{\bf Abstract} \startnarrower[2*middle]},
>      after={\stopnarrower \blank[big]}]
>
> In this case the command was defined when I used "...before = ..." but
> did not alter the text in any way.
>
> So after all this rambling I have two questions:
> 1) Is this silent mode intended?

No, this is the usual behaviour.

> 2) Is whitespace not allowed before or after when defining with or using
> the "=" sign?

Parially, space after = is fine, space before = is ignored silently.

This is because with

\dosetvalue {one}{a}{ b}

\onea is defined,

while with

\dosetvalue {one}{a }{ b}
\onea is undefined.

Hans, can \dosetvalue be defined to ignore the space of #2, something
like

\unprotect
\def\dosetvalue#1#2#3%
{\dodosetvalue{#1}[#2]#3}

\def\dodosetvalue#1[#2#3]#4%
{\doifelse{#3}{\space}
{\@EA\def\csname#1#2\endcsname{#4}}
{\@EA\def\csname#1#2#3\endcsname{#4}}}

With this

\dosetvalue {one}{a }{ b}
(\onea)

works, but this does not work for

\definestartstop
[abstract]
[before = {{\bf Abstract}}]

I do not know the implication in terms of speed. In case there is a
heavy penality, one can have a switch to ignore spaces in value
assignments.