ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* strange \v!on
@ 2006-01-25 11:04 Hans van der Meer
  2006-01-25 11:20 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Hans van der Meer @ 2006-01-25 11:04 UTC (permalink / raw)


Encountered something strange setting up the parameters of framed.

This runs normal: 	\setupframed[frame=off,strut=\v!no, ...

This gives an error:	\setupframed[frame=\v!off,strut=\v!no, ...

The same happens with \v!on as parameter.
The difference is "off" vs. "\v!off" (of course running within  
\unprotect .. \protect pair).
It seems to go wrong at the "frame" parameter only, because for  
example strut accepts \v!no.
Is there perhaps a clash with another macro?

I get this in the console (TeXShop):

! Missing \endcsname inserted.
<to be read again>
                    \let
\dobuildtextaccent #1#2->{\let
                                \char \normalaccent #1\let \char  
\normalchar #2}

\dohandleaccent ...acterencoding #1\endcsname {#2}
                                                   \fi \fi \fi
\@@oiframe ->\v !
                  on
<argument> t\@@frame@@ \framedparameter \c!frame
                                                  \framedparameter \c! 
topframe
\getvalue #1->\csname #1
                         \endcsname
...
l.44 \stoptable
                }{first table}
?
Process aborted


yours sincerely,
dr. H. van der Meer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: strange \v!on
  2006-01-25 11:04 strange \v!on Hans van der Meer
@ 2006-01-25 11:20 ` Taco Hoekwater
  2006-01-25 20:08   ` Hans van der Meer
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2006-01-25 11:20 UTC (permalink / raw)




Hans van der Meer wrote:
> Encountered something strange setting up the parameters of framed.
> 
> This runs normal: 	\setupframed[frame=off,strut=\v!no, ...
> 
> This gives an error:	\setupframed[frame=\v!off,strut=\v!no, ...
> 
> The same happens with \v!on as parameter.

In both cases the use of the \v! prefix is wrong (the strut=\v!no
will not be obeyed), but only one of the two results in an error,
because context handles some parameters differently from other
parameters.

Cheers, Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: strange \v!on
  2006-01-25 11:20 ` Taco Hoekwater
@ 2006-01-25 20:08   ` Hans van der Meer
  2006-01-25 21:02     ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: Hans van der Meer @ 2006-01-25 20:08 UTC (permalink / raw)


Well, obviously I interpreted the use of \V!-macros wrong.
I understood it being the ConTeXt way of making command strings  
language independent, as in for example.
	      \c!corner=\v!rectangular
Using code like this in a setup-getparameters combination.

The article "Context System macros part1" <by the way is er a part @? 
 > provided the inspiration (example on page 11). Since I am adapting  
an old plaintex -> latex macro pack now -> context I thought it handy  
to put in that independence, as seems to come for free.

Clearly I am not grasping the real meaning. Will you enlighten me? If  
it doesn't takes to much of your time to explain.

On Jan 25, 2006, at 12:20, Taco Hoekwater wrote:
>
> Hans van der Meer wrote:
>> Encountered something strange setting up the parameters of framed.
>>
>> This runs normal: 	\setupframed[frame=off,strut=\v!no, ...
>> This gives an error:	\setupframed[frame=\v!off,strut=\v!no, ...
>> The same happens with \v!on as parameter.
>
> In both cases the use of the \v! prefix is wrong (the strut=\v!no
> will not be obeyed), but only one of the two results in an error,
> because context handles some parameters differently from other
> parameters.
>
> Cheers, Taco
>

yours sincerely,
dr. H. van der Meer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: strange \v!on
  2006-01-25 20:08   ` Hans van der Meer
@ 2006-01-25 21:02     ` Taco Hoekwater
  2006-01-25 21:20       ` Hans van der Meer
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2006-01-25 21:02 UTC (permalink / raw)


Hans van der Meer wrote:
> Well, obviously I interpreted the use of \V!-macros wrong.
> I understood it being the ConTeXt way of making command strings  
> language independent, as in for example.
> 	      \c!corner=\v!rectangular

Ah, now it is clear to me (I was not paying attention close enough).

Your understanding is fine, you just missed a small caveat. You have
to put stuff that uses @, ! or ? in macro names within a block
surrounded by \unprotect ... \protect  (like the \makeat.. macros in
LaTeX). Within such a block, the @, ! and ? act as letters for use
inside macro names.

> The article "Context System macros part1" <by the way is er a part @? 

No (but I still have hopes that there will be, someday ...)

Cheers, Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: strange \v!on
  2006-01-25 21:02     ` Taco Hoekwater
@ 2006-01-25 21:20       ` Hans van der Meer
  0 siblings, 0 replies; 5+ messages in thread
From: Hans van der Meer @ 2006-01-25 21:20 UTC (permalink / raw)




On Jan 25, 2006, at 22:02, Taco Hoekwater wrote:

> Hans van der Meer wrote:
>> Well, obviously I interpreted the use of \V!-macros wrong.
>> I understood it being the ConTeXt way of making command strings
>> language independent, as in for example.
>> 	      \c!corner=\v!rectangular
>
> Ah, now it is clear to me (I was not paying attention close enough).
>
> Your understanding is fine, you just missed a small caveat. You have
> to put stuff that uses @, ! or ? in macro names within a block
> surrounded by \unprotect ... \protect  (like the \makeat.. macros in
> LaTeX). Within such a block, the @, ! and ? act as letters for use
> inside macro names.

Well, it's a pity, but I just did that.
I surround my macro pack with \unprotect ... \protect
Because I came through LaTeX, @ was heavily used.

OK, at the moment of composing this answer I realized that making !  
active will be the culprit (I am using it as separator between items).
Sorry bothering you with something I should have found out by myself.
But thanks for putting me on the right track!

yours sincerely,
dr. H. van der Meer

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-25 21:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-25 11:04 strange \v!on Hans van der Meer
2006-01-25 11:20 ` Taco Hoekwater
2006-01-25 20:08   ` Hans van der Meer
2006-01-25 21:02     ` Taco Hoekwater
2006-01-25 21:20       ` Hans van der Meer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).