Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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