The minipage environment has options for making the top, bottom, or center of the minipage box line up with the baseline of the surrounding text. Is there a way to make it line up to the baseline of the first or last line of text inside the minipage?
I imagine I'd use \raisebox, but how do I calculate the distance from the top of the minipage to the first line's baseline (or the bottom of the minipage to the last line's baseline)?
Update:
As indicated in the excellent answer below, minipage already does what I want. The problem I had was that the \color command was messing with the minipage in all sorts of bizarre ways. Putting a \strut at the beginning and end of the minipage didn't fix it, but everything started working once I changed \color to \textcolor:

\documentclass{article}
\usepackage{color}
\usepackage{varwidth}
\newcommand{\sampletext}{testing (1)\\testing (2)}
\newcommand{\tmp}[2]{\fbox{\begin{varwidth}[#1]{0.8in}#2\end{varwidth}}}
\newcommand{\broken}[1]{\tmp{#1}{\color[rgb]{0,0,0.5}\sampletext}}%
\newcommand{\fixed}[1]{\tmp{#1}{\textcolor[rgb]{0,0,0.5}{\sampletext}}}%
\setlength{\parindent}{0pt}\setlength{\parskip}{\baselineskip}%
\begin{document}
with \verb|\color|:\\
before \broken{t} between \broken{c} between \broken{b} after
with \verb|\textcolor|:\\
before \fixed{t} between \fixed{c} between \fixed{b} after
\end{document}

\vspace*{0pt}leads to your described behavior. See [Aligning image and text on top, with minipages(http://tex.stackexchange.com/questions/11630/aligning-image-and-text-on-top-with-minipages/11631#11631) where this technique is used for vertical alignment. My tip: Try to start and/or end theminipagewith a\strut. – Martin Scharrer Jul 01 '11 at 20:02\color's fault. Switching to\textcolorfixed it. Adding\strutto the beginning and end of theminipagedidn't work. – Richard Hansen Jul 01 '11 at 20:31minipagealignment with an included\colorat the beginning when I was answering this question. There a\strutbefore the\coloractually fixed it. – Martin Scharrer Jul 01 '11 at 20:50\textcoloris basically only\leavevmode {\color #1{#2}#3}. The\leavevmodeis the important here. Without TeX is still in vertical mode when\coloris processed and this adds some vertical space somehow. – Martin Scharrer Jul 01 '11 at 20:54\color{...}textto\leavevmode{\color{...}text}worked! – Richard Hansen Jul 01 '11 at 21:12\leavevmodedoesn't take any argument, so you can simply write\leavevmode\color{...}text. – Martin Scharrer Jul 01 '11 at 21:15\leavevmode(so that it became{\leavevmode\color{...}text}) worked. – Richard Hansen Jul 01 '11 at 21:47