Given this:
\documentclass{article}
\usepackage{lipsum}
\usepackage{setspace}
\setstretch{1.5}
\setlength{\parindent}{0pt}
\newlength{\len}
\newcommand{\arrowed}[1]{%
% draw an arrow, then a parbox that's exactly
% the remaining width of the line
\settowidth{\len}{$\rightarrow$}%
\addtolength{\len}{-2\len}%
\addtolength{\len}{\textwidth}%
$\rightarrow$\parbox[t]{\len}{#1}%
}
\begin{document}
\lipsum[2]
\arrowed{\lipsum[4]}
\lipsum[6]
\arrowed{But this is OK, since it's only one line.}
\lipsum[2]
\end{document}
It's double-spaced, except for immediately after the big parbox. How do I fix that?
(I know there are other ways to achieve the same result as what I did here, but it's part of something else that is using the parbox in a list item label, and the problem that I'm having is that the spacing after the parbox is wrong if the contents are more than one line long.)
Edit:
Thanks for the suggestions. Here is some more complete code that shows how
I'm using the parbox as part of a list item label, as mentioned. I've tried to incorporate your suggestions: @Werner's suggestion (marked 1 in the code) gives You can't use \prevdepth in restricted horizontal mode, while @Steven's suggestion (marked [2]) doesn't seem to have any effect. I've tried a few variations of those but haven't had any luck.
\documentclass{article}
\usepackage{setspace,lipsum}
\makeatletter
\newcommand\singlelipsum[1]{%
\begingroup\let\lips@par\relax\csname lipsum@\@roman{#1}\endcsname
\endgroup }
\newlength{\argwidth}
\newcommand{\argparams}[1]{%
\parbox[t]{\argwidth}{%
\setstretch{1.5}%
#1)%
%\par\xdef\tpd{\the\prevdepth}% [1]
%\strut% [2]
}%
%\par\prevdepth\tpd% [1]
%\\\strut\ignorespaces% [2]
}
\newcommand{\argfunc}[1]{\textbf{#1}(}
\newcommand{\argitem}[2]{
\settowidth{\argwidth}{\argfunc{#1}}%
\addtolength{\argwidth}{-2\argwidth}%
\addtolength{\argwidth}{\textwidth}%
\item[\argfunc{#1}\argparams{#2}]%
}
\newcommand{\argitemlabel}[1]{%
\@tempdima\linewidth%
\advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%
}
\newenvironment{arglist}{
\begin{list}{}{%
\setlength\labelwidth{\leftmargin}
\setlength\labelsep{0pt}
\setlength\rightmargin{0pt}
\let\makelabel=\argitemlabel%
}%
}{\end{list}}
\makeatother
\begin{document}
\setstretch{2}
\begin{arglist}
\argitem{function}{args} body
\argitem{function}{\singlelipsum{4}} \singlelipsum{2}
\end{arglist}
\end{document}

By the way, the approach I'm using is based on the sphinx.sty used by Sphinx-doc. I think they don't have the problem because it's single spaced there.



