[metapost] [SPAM] Setting the baseline point for graphic while using luamplib and lualatex

Dan Luecking luecking at uark.edu
Tue Jan 4 21:19:11 CET 2011


At 08:34 PM 1/3/2011, Jason Stein wrote:

>I am creating a document that draws random right triangles to give
>students practice with the trig functions. The figures are created
>successfully, but I would like to move the anchor point for the
>picture to the top of the bbox, instead of the bottom. If I was doing
>this in the traditional manner, I would shift it using the graphics
>package, but as this is lualatex and luamplib, the graphics package is
>not involved. Any ideas how to accomplish this.

Normally image inclusion creates a box with the baseline
at the bottom. If you want a box with the baseline at the
top, you wrap it in TeX box-creation commands that
accomplish this. For example in latex:

\begin{minipage}{10cm}[t]
   \vspace{0pt}% create an empty "top" line for [t] alignment
   %Your image here
\end{minipage}

In plain tex:

\vtop{\hsize 10cm
   \vskip0pt % empty top line for \vtop alignment
   % image here
}

>filename="wa10_triangles.tex"
(An \input-ed file is missing.)

Good luck,
Dan

Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas
http://www-cs-faculty.stanford.edu/~knuth/iaq.html 



More information about the metapost mailing list