ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: escaping from \starttyping...\stoptyping
       [not found] <20011107224838X.marko@kinetic.ki.informatik.uni-frankfurt. de>
@ 2001-11-08  9:19 ` Hans Hagen
  2001-11-08 10:47   ` Marko Schuetz
       [not found] ` <20011108114700B.marko@kinetic.ki.informatik.uni-frankfurt. de>
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2001-11-08  9:19 UTC (permalink / raw)
  Cc: ntg-context

At 10:48 PM 11/7/2001 +0100, Marko Schuetz wrote:
>I want to use ConTeXt macros from within typing, like
>
>
>\define[1]\mysquare{#1$^2$}
>
>\starttyping
>this is verbatim text /mysquare{j}
>\stoptyping
>
>it works with macros that do not take arguments, but with arguments
>the open curly brace seems to be considered for the macro name and an
>undefined ... error is produced.
>
>A related problem is that I cannot have e.g. a comma after a macro
>name because then also the name is not recognized.
>
>Help will be appreciated! :-)

I admit that it looks ugly but look at this:

\startRAW
\def\mathematics#1%         %%\ N  usage: \type {\mathematics{x^2}}
   {\ifmmode#1\else$#1$\fi}  %%\ N  becomes: \mathematics{X^2}
\stopRAW

the %%\ serves as an escape and N is the escape-to-tex handler

[see verb-ini.tex/core-ver.tex for more details]

[some day i will reimplement the pretty printing handler since it is (low 
level) a bit too fuzzy]

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: escaping from \starttyping...\stoptyping
  2001-11-08  9:19 ` escaping from \starttyping...\stoptyping Hans Hagen
@ 2001-11-08 10:47   ` Marko Schuetz
  0 siblings, 0 replies; 7+ messages in thread
From: Marko Schuetz @ 2001-11-08 10:47 UTC (permalink / raw)
  Cc: marko, ntg-context

Hans,

From: Hans Hagen <pragma@wxs.nl>
Subject: Re: escaping from \starttyping...\stoptyping
Date: Thu, 08 Nov 2001 10:19:29 +0100

> At 10:48 PM 11/7/2001 +0100, Marko Schuetz wrote:
> >I want to use ConTeXt macros from within typing, like
> >
> >
> >\define[1]\mysquare{#1$^2$}
> >
> >\starttyping
> >this is verbatim text /mysquare{j}
> >\stoptyping
> >
> >it works with macros that do not take arguments, but with arguments
> >the open curly brace seems to be considered for the macro name and an
> >undefined ... error is produced.
> >
> >A related problem is that I cannot have e.g. a comma after a macro
> >name because then also the name is not recognized.
> >
> >Help will be appreciated! :-)
> 
> I admit that it looks ugly but look at this:
> 
> \startRAW
> \def\mathematics#1%         %%\ N  usage: \type {\mathematics{x^2}}
>    {\ifmmode#1\else$#1$\fi}  %%\ N  becomes: \mathematics{X^2}
> \stopRAW

??? 

I don't understand. Wherever I put \startRAW ... \stopRAW I get an
undefined control sequence error for \startRAW. I tried
\startTEX/\stopTEX, but the %%\ does not seem to escape...

> the %%\ serves as an escape and N is the escape-to-tex handler
> 
> [see verb-ini.tex/core-ver.tex for more details]

I had a look in there, but did not understand what was going on.

Marko


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

* Re: escaping from \starttyping...\stoptyping
       [not found] ` <20011108114700B.marko@kinetic.ki.informatik.uni-frankfurt. de>
@ 2001-11-08 13:20   ` Hans Hagen
  2001-11-09 13:31     ` Marko Schuetz
       [not found]   ` <20011109143114Y.marko@kinetic.ki.informatik.uni-frankfurt. de>
  1 sibling, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2001-11-08 13:20 UTC (permalink / raw)
  Cc: ntg-context

At 11:47 AM 11/8/2001 +0100, you wrote:

>I don't understand. Wherever I put \startRAW ... \stopRAW I get an
>undefined control sequence error for \startRAW. I tried
>\startTEX/\stopTEX, but the %%\ does not seem to escape...
>
> > the %%\ serves as an escape and N is the escape-to-tex handler
> >
> > [see verb-ini.tex/core-ver.tex for more details]
>
>I had a look in there, but did not understand what was going on.

what happens after:

\installprettytype [RAW] [RAW]

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: escaping from \starttyping...\stoptyping
  2001-11-08 13:20   ` Hans Hagen
@ 2001-11-09 13:31     ` Marko Schuetz
  0 siblings, 0 replies; 7+ messages in thread
From: Marko Schuetz @ 2001-11-09 13:31 UTC (permalink / raw)
  Cc: marko, ntg-context

From: Hans Hagen <pragma@wxs.nl>
Subject: Re: escaping from \starttyping...\stoptyping
Date: Thu, 08 Nov 2001 14:20:03 +0100

> At 11:47 AM 11/8/2001 +0100, you wrote:
> 
> 
> >I don't understand. Wherever I put \startRAW ... \stopRAW I get an
> >undefined control sequence error for \startRAW. I tried
> >\startTEX/\stopTEX, but the %%\ does not seem to escape...
> >
> > > the %%\ serves as an escape and N is the escape-to-tex handler
> > >
> > > [see verb-ini.tex/core-ver.tex for more details]
> >
> >I had a look in there, but did not understand what was going on.
> 
> what happens after:
> 
> \installprettytype [RAW] [RAW]

undefined control sequence

Marko


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

* Re: escaping from \starttyping...\stoptyping
       [not found]   ` <20011109143114Y.marko@kinetic.ki.informatik.uni-frankfurt. de>
@ 2001-11-12 11:26     ` Hans Hagen
  2001-11-12 13:24       ` Marko Schuetz
  0 siblings, 1 reply; 7+ messages in thread
From: Hans Hagen @ 2001-11-12 11:26 UTC (permalink / raw)
  Cc: marko, ntg-context

At 02:31 PM 11/9/2001 +0100, Marko Schuetz wrote:
>From: Hans Hagen <pragma@wxs.nl>
>Subject: Re: escaping from \starttyping...\stoptyping
>Date: Thu, 08 Nov 2001 14:20:03 +0100
>
> > At 11:47 AM 11/8/2001 +0100, you wrote:
> >
> >
> > >I don't understand. Wherever I put \startRAW ... \stopRAW I get an
> > >undefined control sequence error for \startRAW. I tried
> > >\startTEX/\stopTEX, but the %%\ does not seem to escape...
> > >
> > > > the %%\ serves as an escape and N is the escape-to-tex handler
> > > >
> > > > [see verb-ini.tex/core-ver.tex for more details]
> > >
> > >I had a look in there, but did not understand what was going on.
> >
> > what happens after:
> >
> > \installprettytype [RAW] [RAW]
>
>undefined control sequence

then, how old is your context ?

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


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

* Re: escaping from \starttyping...\stoptyping
  2001-11-12 11:26     ` Hans Hagen
@ 2001-11-12 13:24       ` Marko Schuetz
  0 siblings, 0 replies; 7+ messages in thread
From: Marko Schuetz @ 2001-11-12 13:24 UTC (permalink / raw)
  Cc: marko, ntg-context

Hans,

From: Hans Hagen <pragma@wxs.nl>
Subject: Re: escaping from \starttyping...\stoptyping
Date: Mon, 12 Nov 2001 12:26:00 +0100

> At 02:31 PM 11/9/2001 +0100, Marko Schuetz wrote:
> >From: Hans Hagen <pragma@wxs.nl>
> >Subject: Re: escaping from \starttyping...\stoptyping
> >Date: Thu, 08 Nov 2001 14:20:03 +0100
> >
> > > At 11:47 AM 11/8/2001 +0100, you wrote:
> > >
> > >
> > > >I don't understand. Wherever I put \startRAW ... \stopRAW I get an
> > > >undefined control sequence error for \startRAW. I tried
> > > >\startTEX/\stopTEX, but the %%\ does not seem to escape...
> > > >
> > > > > the %%\ serves as an escape and N is the escape-to-tex handler
> > > > >
> > > > > [see verb-ini.tex/core-ver.tex for more details]
> > > >
> > > >I had a look in there, but did not understand what was going on.
> > >
> > > what happens after:
> > >
> > > \installprettytype [RAW] [RAW]
> >
> >undefined control sequence
> 
> then, how old is your context ?

ConTeXt  ver: 2000.1.31  fmt: 2001.8.30  int: english  mes: english
I will try a newer version.

Marko


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

* escaping from \starttyping...\stoptyping
@ 2001-11-07 21:48 Marko Schuetz
  0 siblings, 0 replies; 7+ messages in thread
From: Marko Schuetz @ 2001-11-07 21:48 UTC (permalink / raw)


I want to use ConTeXt macros from within typing, like

\define[1]\mysquare{#1$^2$}

\starttyping
this is verbatim text /mysquare{j}
\stoptyping

it works with macros that do not take arguments, but with arguments
the open curly brace seems to be considered for the macro name and an
undefined ... error is produced. 

A related problem is that I cannot have e.g. a comma after a macro
name because then also the name is not recognized.

Help will be appreciated! :-)

Marko


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

end of thread, other threads:[~2001-11-12 13:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20011107224838X.marko@kinetic.ki.informatik.uni-frankfurt. de>
2001-11-08  9:19 ` escaping from \starttyping...\stoptyping Hans Hagen
2001-11-08 10:47   ` Marko Schuetz
     [not found] ` <20011108114700B.marko@kinetic.ki.informatik.uni-frankfurt. de>
2001-11-08 13:20   ` Hans Hagen
2001-11-09 13:31     ` Marko Schuetz
     [not found]   ` <20011109143114Y.marko@kinetic.ki.informatik.uni-frankfurt. de>
2001-11-12 11:26     ` Hans Hagen
2001-11-12 13:24       ` Marko Schuetz
2001-11-07 21:48 Marko Schuetz

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).