2

How to insert a paragraph in Metapost and a drawing below that? This has to be done within a single Metapost block, (i.e) within a single \startMPcode and \stopMPcode block

Sample image :

sample image

6

Since you did not specify your exact problem, nor any example code I can just blindly guess where the problem is. I assume you want to use \framed within textext. You have to use align=normal to create a vbox. You can as well simply use a \vbox if you don't need the features the \framed command provides.

Here is a complete example. As “drawing” I simply used a black square.

\startbuffer
  \input hawking
\stopbuffer

\starttext
  \startMPcode
    draw textext.top("\framed[align=normal]{\getbuffer}");
    fill fullsquare
      xyscaled (TextWidth, 1cm) shifted (0, -5mm);
  \stopMPcode
\stoptext

result

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.