[NTG-context] Text and tree side by side in a framedtext environment

Fabrice Couvreur fabrice1.couvreur at gmail.com
Sat Nov 16 12:44:18 CET 2019


Hello,
I want to use a text frame to put text and a probability tree side by side,
but it does not work.
Thanks for your help.
Fabrice

\usemodule[tikz]
\usetikzlibrary[trees]

\definefloat
    [recipe]
    [figure]

  \setupfloat
    [recipe]
    [default={right,nonumber}]
\starttext
\startframedtext[width=\textwidth]
  \placerecipe{}{
    \hbox{
      \starttikzpicture
            [level 1/.style={level distance=20mm,sibling distance=15mm},
             level 2/.style={level distance=20mm,sibling distance=10mm}]
            \node{}[grow=right]
              child {node{\tfxx Réglisse}
                child{node{\tfxx Réglisse}edge from parent
node[below=2pt]{\dots}}
                child{node{\tfxx Fraise}edge from parent
node[above=2pt]{\dots}
                } edge from parent node[below=2pt]{\dots}}
              child {node{\tfxx Fraise}
                child{node{\tfxx Réglisse}edge from parent
node[below=2pt]{\dots}}
                child{node{\tfxx Fraise}edge from parent
node[above=2pt]{\dots}} edge from parent node[above=2pt]{\dots}};
          \stoptikzpicture
    }
  }
  \dorecurse{2}{\input knuth}
\stopframedtext
\blank
  \placerecipe{}{
    \hbox{
      \starttikzpicture
            [level 1/.style={level distance=20mm,sibling distance=15mm},
             level 2/.style={level distance=20mm,sibling distance=10mm}]
            \node{}[grow=right]
              child {node{\tfxx Réglisse}
                child{node{\tfxx Réglisse}edge from parent
node[below=2pt]{\dots}}
                child{node{\tfxx Fraise}edge from parent
node[above=2pt]{\dots}
                } edge from parent node[below=2pt]{\dots}}
              child {node{\tfxx Fraise}
                child{node{\tfxx Réglisse}edge from parent
node[below=2pt]{\dots}}
                child{node{\tfxx Fraise}edge from parent
node[above=2pt]{\dots}} edge from parent node[above=2pt]{\dots}};
          \stoptikzpicture
    }
  }
  \dorecurse{2}{\input knuth}
\stoptext
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20191116/15ddf39c/attachment.html>


More information about the ntg-context mailing list