ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xml, verbatim
@ 2001-12-18 18:13 Patrick Gundlach
  2001-12-18 19:03 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Gundlach @ 2001-12-18 18:13 UTC (permalink / raw)


Hi, 

I'd like to use the "verbatim" environment from html and typset 
it using \starttyping ... \stoptyping like this

<html> 
 [...]
   11
    <pre>
      22
    </pre>
    33 44 55
 [...]
</html>

shoud be typeset like this:

11
\starttyping
    22
\stoptyping
33 44 55 

(I hope you get the idea)

I have tried:

\defineXMLenvironment [pre] \starttyping \stoptyping

but this lead me to 
Runaway argument?
! File ended while scanning use of \copyverbatimline.
<inserted text> 
                \par 
<to be read again> 
                   \relax 
\dodoreadfile ...normalinput \readfilename \relax 
                                                  \the \everyafterreadfile 
\processlocalfile ...#2}\processedfiles #1{#2}{}{}
                                                  \doglobal \decrement \file...
l.50 \processXMLfile {d2.html}

any Ideas?

Viele Grüße,

  Patrick Gundlach


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

* Re: xml, verbatim
  2001-12-18 18:13 xml, verbatim Patrick Gundlach
@ 2001-12-18 19:03 ` Hans Hagen
  2001-12-21 10:21   ` Patrick Gundlach
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2001-12-18 19:03 UTC (permalink / raw)
  Cc: ntg-context

At 07:13 PM 12/18/2001 +0100, Patrick Gundlach wrote:
>Hi,
>
>I'd like to use the "verbatim" environment from html and typset
>it using \starttyping ... \stoptyping like this
>
>[...] 11
>
>       22
>     33 44 55 [...]
>shoud be typeset like this:
>
>11
>\starttyping
>     22
>\stoptyping
>33 44 55
>
>(I hope you get the idea)

This has to do with the fact that the verbatim env changes catcodes and 
expects to see a \stoptyping.

Since i knew that you would come up with this question some day ...

   \defineXMLcommand [pre] {\processtaggeddisplayverbatim{</pre>}}

is about the shortest def i can come up with, try:

\startbuffer
<pre>
does
this look \like <xml>
ok
</pre>
\stopbuffer

\processXMLbuffer

Somehow this whole <pre> thing is a bit fuzzy, since it is not clear what 
should expand. If you want expansion,

   \defineXMLgrouped [pre] {\tttf\obeylines\obeyspaces}

is a good alternative.

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] 3+ messages in thread

* Re: xml, verbatim
  2001-12-18 19:03 ` Hans Hagen
@ 2001-12-21 10:21   ` Patrick Gundlach
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Gundlach @ 2001-12-21 10:21 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 225 bytes --]

Hallo Hans et al,

> Since i knew that you would come up with this question some day ...
:-)

>    \defineXMLcommand [pre] {\processtaggeddisplayverbatim{</pre>}}

works fine! great.

-- 
Viele Grüße, 

    Patrick Gundlach


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

end of thread, other threads:[~2001-12-21 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-18 18:13 xml, verbatim Patrick Gundlach
2001-12-18 19:03 ` Hans Hagen
2001-12-21 10:21   ` Patrick Gundlach

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