Natural Table does not allow using defined typing in its cell
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
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