Natural Table does not allow using defined typing in its cell
![](https://secure.gravatar.com/avatar/151dae33d910926772e15645f1f7c391.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
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
participants (2)
-
Eugene Toporov
-
Hans Hagen