<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Courier New";
color:windowtext;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><b>Rodolfo Medina wrote:<o:p></o:p></b></p>
<p class="MsoNormal"><b><o:p> </o:p></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">>In the following example, to be processed simply with `text file', the left box<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">>is bottomed down, whereas I want it `toped' up at the same level as the right<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Courier New"">>box. How could I change the definition of \boxit so to do that...?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">[example omitted]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">This is what I use (adjust the kerns to get desired
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">spacing):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">\long\def\frameit#1{% Frames box or text, preserves baseline.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \leavevmode<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \hbox{% % encloses framed box<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \vrule % Left side<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \vtop{ % \vtop has same baseline as its<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \vbox{ % first box (namely the \vbox here).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \hrule % Top side<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \kern 3pt % Top gap<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \hbox{% % Innermost \hbox, encloses text or box<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \kern 3pt % Left gap<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \ignorespaces #1% % maybe “#1\unskip%”?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \kern 3pt % Right gap<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }% % END hbox: \vbox has same baseline<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }% % END \vbox<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \kern 3pt % Bottom gap<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \hrule % Bottom side<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }% % END \vtop<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> \vrule % Right side<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> }% % END \hbox<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">}%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">\bigskip<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">\frameit{hallo}%<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">\frameit{\vtop{\hsize2cm\parindent0pt to be or not to be, that is the question}}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">The definition itself is designed to produce a box that has the
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">same baseline as its contents. Then I have to feed it a \vtop
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">so as to make the baseline align with the top line of the text.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">The trick is not to put a \kern at the very top of a \vtop, nor at
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">the very bottom of a \vbox, as then TeX puts the baseline right at
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">the top or bottom instead of at the baseline of the text.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Dan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Daniel H. Luecking, Graduate Coordinator<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Dept. of Mathematical Sciences<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">University of Arkansas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Fayetteville, AR, USA<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>