Tommaso Gordini schrieb am 27.11.18 um 08:14:
Wolfgang, your code works very fine for me, and the result is very beautiful, but I have noticed that it does not allow the interruption between two pages.

I tried to pass the split=yes option to the \startembeddedxtable, \startxrow or\startxcell commands, but nothing happens: where am I wrong? Is it possible to get what I want? Often I need to write long codes, with and without output, and a breakable environment would avoid large ugly spaces on the page.

Use the framedtext environment for the content of your examples.

Below a MWE.

Thanks in advance
Tommaso

\defineuserdata [purecode] [alternative=purecode]

\defineuserdataalternative [purecode] [renderingsetup=userdata:purecode]

\startsetups [userdata:purecode]
   \blank
\startembeddedxtable [width=\textwidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]
     \startxrow [corner=round,align=normal]
       \startxcell
         \typebuffer [userdata] [option=tex]
       \stopxcell
     \stopxrow
   \stopembeddedxtable
   \blank
\stopsetups

\startsetups [userdata:purecode]
  \blank
\startframedtext [width=max,offset=1ex,corner=round,framecolor=black,rulethickness=0.5pt]
    \typebuffer [userdata] [option=tex]
  \stopframedtext
  \blank
\stopsetups

\defineuserdata [example] [alternative=example]

\defineuserdataalternative [example] [renderingsetup=userdata:example]

\startsetups [userdata:example]
   \blank
   \startembeddedxtable 
[width=\textwidth,strut=no,offset=1ex,framecolor=black,rulethickness=0.5pt]
     \startxrow [corner=03,align=normal]
       \startxcell
         \typebuffer [userdata] [option=tex]
       \stopxcell
     \stopxrow
     \startxrow [corner=01,align=normal]
       \startxcell
         \getuserdata
       \stopxcell
     \stopxrow
   \stopembeddedxtable
   \blank
\stopsetups

\startsetups [userdata:example]
  \blank
\startframedtext [width=max,offset=1ex,corner=03,framecolor=black,rulethickness=0.5pt,location=none]
    \typebuffer [userdata] [option=tex]
  \stopframedtext
  \nointerlineskip
\startframedtext [width=max,offset=1ex,corner=01,framecolor=black,rulethickness=0.5pt,location=none]
    \getuserdata
  \stopframedtext
  \blank
\stopsetups

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to