This is a follow-up question on this thread.
I want to mark a line by putting a star to the left of it. If the line contains a box that is tall, the marker should be aligned with the top of this box, not the bottom. How to align something to the top of the tallest box of a line?
MWE (edited):
\documentclass{article}
\def\marker{%
\strut\vadjust{\vbox to 0pt{
\kern-\dp\strutbox\smash{\llap{$\star$}}\vss}}%
\ignorespaces}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 1pt minus 3pt}
\begin{document}
Some text \marker\rule{1cm}{5em} some more text, all \newline in the same paragraph. A paragraph, where\newline \rule{1cm}{2em} \marker some lines are marked with a star\newline that should be aligned with the tallest box of the line.
\end{document}
Compile this to see the problem: the stars should be aligned with the top of the black rectangles.
Edit: I changed the MWE to describe the problem in a more accurate way. A \par
break and skipping back up to the old line does, unfortunately, not solve the problem.