Examples

Yes!

[test data]

[test data]

[test data]

Commands \setbox...= box{...} might produce extra spaces because of the \par\leavevmode, an undesirable phenomena for framed pictures. Since boxes are in any case a problem for us for standard text, we are probably better-off deal properly at least with pictures.

<..html latex env..>
 <.initial env configurations.>
 -_-_-

The above had ‘}{\csname after:listend\endcsname’ earlier.

The following are needed for cases like

\newenvironment{syntax}{\begin{center} 
                        \begin{tabular}{|p{0.9\linewidth}|} \hline}% 
                       {\hline 
                        \end{tabular} 
                        \end{center}} 
\begin{syntax} aa \\  \end{syntax} 

<..ignore par before hline in end..>
 \ifx \EndPicture\:UnDef
    \def\:temp{<.end row before hline.>%
       \expandafter\expandafter\expandafter\:temp}%
    \expandafter\:temp
 \fi
 -_-_-

<..end row before hline..>
 \def\:temp{%
    \def\:temp{\IgnorePar
      \ifx \:tempa\hline \expandafter\\\else\fi
    }%
    \futurelet\:tempa\:temp
 }%
 -_-_-

[test data]