* Natural Table does not allow using defined typing in its cell
@ 2004-09-22 16:54 Eugene Toporov
2004-09-22 21:14 ` Hans Hagen
0 siblings, 1 reply; 2+ messages in thread
From: Eugene Toporov @ 2004-09-22 16:54 UTC (permalink / raw)
Hello,
I found a strange (to me) bTABLE behaviour.
I'm defining the "programlisting" typing and it works when used like below
\def\BeforeProgramListing{\startframedtext[background=screen,width=\hsize,style=\tttf\small]}
\def\AfterProgramListing{\stopframedtext}
\definetyping[programlisting][before=\BeforeProgramListing,after=\AfterProgramListing]
\startprogramlisting
"Hello World! Hello" + txtName.text + "!"
\stopprogramlisting
When I'm trying to insert a programlisting into a table cell using the
following code -- it fails to create PDF.
\bTABLE
\bTR
\bTD Set the value to \eTD
\bTD
\startprogramlisting
"Hello World! Hello" + txtName.text + "!"
\stopprogramlisting
\eTD
\eTR
\eTABLE
When I replace \start\stopprogramlisting with in place
\start\stopframedtext -- it works ok.
\bTD
\startframedtext[background=screen,width=\hsize,style=\tttf\small]
"Hello World! Hello" + txtName.text + "!"
\stopframedtext
\eTD
Why is this so? Do I miss something important?
Thanks a lot.
--
Regards.
Eugene Toporov
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Natural Table does not allow using defined typing in its cell
2004-09-22 16:54 Natural Table does not allow using defined typing in its cell Eugene Toporov
@ 2004-09-22 21:14 ` Hans Hagen
0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2004-09-22 21:14 UTC (permalink / raw)
Eugene Toporov wrote:
>Hello,
>
>I found a strange (to me) bTABLE behaviour.
>
>I'm defining the "programlisting" typing and it works when used like below
>
>\def\BeforeProgramListing{\startframedtext[background=screen,width=\hsize,style=\tttf\small]}
>\def\AfterProgramListing{\stopframedtext}
>\definetyping[programlisting][before=\BeforeProgramListing,after=\AfterProgramListing]
>
> \startprogramlisting
> "Hello World! Hello" + txtName.text + "!"
> \stopprogramlisting
>
>When I'm trying to insert a programlisting into a table cell using the
>following code -- it fails to create PDF.
>
>\bTABLE
> \bTR
> \bTD Set the value to \eTD
> \bTD
> \startprogramlisting
> "Hello World! Hello" + txtName.text + "!"
> \stopprogramlisting
> \eTD
> \eTR
>\eTABLE
>
>When I replace \start\stopprogramlisting with in place
>\start\stopframedtext -- it works ok.
> \bTD
> \startframedtext[background=screen,width=\hsize,style=\tttf\small]
> "Hello World! Hello" + txtName.text + "!"
> \stopframedtext
> \eTD
>
>
>Why is this so? Do I miss something important?
>
>
indeed, passing verbatim as argument does not work due to catcode
wizzardy; so, try to use buffers instead
\startbuffer
\startprogramlisting
"Hello World! Hello" + txtName.text + "!"
\stopprogramlisting
\stopbuffer
\bTABLE
\bTR
\bTD Set the value to \eTD
\bTD \getbuffer \eTD
\eTR
\eTABLE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-22 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-22 16:54 Natural Table does not allow using defined typing in its cell Eugene Toporov
2004-09-22 21:14 ` Hans Hagen
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).