Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-22 Thread Christopher Creutzig
Hans Hagen wrote:
 Ok, then what's \protected?  Is it performing an \unprotect/\protect 
pair around the definition?  But then, why did it work?

in context protext/unprotect is to be used when ! @ ? are used inmacro 
names which was not the case here
 I know.  So, does ConTeXt's \protected\def temporarily switch on one 
level of \unprotect?  But for some strange reason, the whole thing 
worked ...

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-21 Thread h h extern
Giuseppe Bilotta wrote:
Friday, November 19, 2004 h h extern wrote:

Giuseppe Bilotta wrote:

Shall this go in nath? Or, Hans, will you protect those macros?

if so, i need to protect the lot, any system/logic behind what to protect ?

I have no idea. Everything? What's the downside of protecting a
macro?
sometimes you want it to be expandable
\unexpanded\def\blabla{\handle{blabla}}
will not expand even if \handle is expandable (could be a problem in for 
instance fallbacks for pdf bookmarks and such)

\def\blabla{\handle{blabla}}
now one can overload \handle, and \handle can be protected if needed
Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Christopher Creutzig
Nikolai Weibull wrote:
! Undefined control sequence.
\dodosmash [#1]-\edef \@@smash
{#1}\futurelet \nexttoken \dododosmash
\relbar -\mathrel {\smash
   -}
 Uh-uh.  The problem is clear: \inlinemath tries (in the definition of 
\inlinemath@) to expand the formula (in the sense of TeX macro 
expansion).  \longrightarrow cum suis are, however, not expandable in 
ConTeXt.

 Now, I do believe the xdef is a bug in nath, but the following 
workaround does work:

\protected\def\longrightarrow{\relbar\joinrel\rightarrow}
 Hans, do you have a command that sort of changes an existing 
definition as if \protected had been used in the first place?

regards,
Christopher
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Christopher Creutzig
Hans Hagen wrote:
first of all, \protected is not what you think it is; i had a \protected 
before etex was around; the context name is \unexpanded
 Ok, then what's \protected?  Is it performing an \unprotect/\protect 
pair around the definition?  But then, why did it work?

\let\unprotectedlongrightarrow\longrightarrow
\unexpanded\def\longrightarrow{\unprotectedlongrightarrow}
 Yes, I'd though of that, I justwanted to know if there is some higher 
level version already existing.

regards,
ccr
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Hans Hagen
Christopher Creutzig wrote:
Hans Hagen wrote:
first of all, \protected is not what you think it is; i had a 
\protected before etex was around; the context name is \unexpanded

 Ok, then what's \protected?  Is it performing an \unprotect/\protect 
pair around the definition?  But then, why did it work?

\let\unprotectedlongrightarrow\longrightarrow
\unexpanded\def\longrightarrow{\unprotectedlongrightarrow}
ah, i though that you wanted the etex \protected -)
in context protext/unprotect is to be used when ! @ ? are used inmacro names 
which was not the case here

 Yes, I'd though of that, I justwanted to know if there is some higher 
level version already existing.
nop
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread Nikolai Weibull
* Hans Hagen [EMAIL PROTECTED] [Nov 19, 2004 16:40]:
 \let\unprotectedlongrightarrow\longrightarrow
 \unexpanded\def\longrightarrow{\unprotectedlongrightarrow}

Thanks, that works fine,
nikolai

--
::: name: Nikolai Weibull:: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA:: loc atm: Gothenburg, Sweden:::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(linux[\021%six\012\0],(linux)[have]+fun-97);}
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-19 Thread h h extern
Giuseppe Bilotta wrote:
Shall this go in nath? Or, Hans, will you protect those macros?
if so, i need to protect the lot, any system/logic behind what to protect ?
Hans
-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] \mathstrut in \underbrace and nath

2004-11-18 Thread Nikolai Weibull
* Giuseppe Bilotta [EMAIL PROTECTED] [Nov 18, 2004 16:40]:
  \usemodule[nath]
  \starttext
  \startnathequation
\underbrace{\mathstrut rr\dots r}_{n \text{times}}
  \stopnathequation
  \stoptext

  Error:

  ! Missing } inserted.
  inserted text

  My guess is that the expansion of \mathstrut, being \vphantom(, is being
  misinterpreted as a delimiter (as '(' is active in nath), but that's
  just a layman's guess.

 Bingo. In nath this is now fixed by letting \mathstrut use |
 instead of (.

:-)

 I'll try to get the new amsl and nath modules out today.

Thanks, great work.

I don't want to rain on your parade, but I just found another bug:

\usemodule[nath]
\starttext
$A \longrightarrow B$
\stoptext

gives

! Undefined control sequence.
\dodosmash [#1]-\edef \@@smash
{#1}\futurelet \nexttoken \dododosmash
\relbar -\mathrel {\smash
   -}
\longrightarrow -\relbar
  \joinrel \rightarrow
argument A \longrightarrow
 B
\inlinemath ...inemath@ {\noexpand \wrapfrac@ { #1
  }} \endgroup \protectinlin...

\imath@ [EMAIL PROTECTED] [EMAIL PROTECTED] \inlinemath {#1}
  [EMAIL PROTECTED] [EMAIL 
PROTECTED]
...
l.19 $A \longrightarrow B$

? 

which seems a bit more difficult to fix.  I can't do it anyway,
nikolai

--
::: name: Nikolai Weibull:: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA:: loc atm: Gothenburg, Sweden:::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(linux[\021%six\012\0],(linux)[have]+fun-97);}
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context