How do I make a sentence vertical in the middle of a horizontal sentence?

Two options:

  1. One can manually stack the sentence in a \Longunderstack; or

  2. One can stick a \parbox to let the "vertical" sentence auto-format.

Here is the MWE:

\documentclass{article}
\usepackage{stackengine}
\setstackEOL{\cr}
\begin{document}
Here is a sentence.  Here is another 
\Longunderstack[l]{sentence\cr that will be\cr vertical.\cr Nice.}

Next paragraph.

Here is a sentence.  Here is another 
\parbox[t]{.7in}{\raggedright sentence that will be vertical. Nice.}
\end{document}

enter image description here


Here's an implementation based on tabular, with some trick for keeping the interline spacing.

\documentclass[a4paper,twocolumn]{amsart}
\usepackage{lipsum}

% this is just for showing the interline spacing is correct
\addtolength{\textwidth}{4cm}
\calclayout
\newcommand{\checkrule}{%
  \makebox[0pt][l]{\vrule height 0pt depth 0.1pt width \textwidth}%
}
%

\newenvironment{vertpar}
 {\begin{tabular}[t]{@{}l@{}}}
 {\end{tabular}\par\prevdepth=\dp\strutbox}

\begin{document}

\checkrule
Here is a sentence. Here is another 
\begin{vertpar}
sentence \\
that will be \\
vertical. \\
\checkrule
Nice.
\end{vertpar}

\checkrule
\lipsum[2]

\newpage

\lipsum[1]
\end{document}

The \checkrule macro is used for showing the alignment of lines with or without the special environment.

enter image description here


What about \hangindent?

mwe

\documentclass{amsart}
\def\sentences{
    \noindent Here is a sentence. 
    Here is another sentence that will be vertical. 
    Nice.}

\begin{document}
\hyphenpenalty10000  
\rightskip16em
\hangindent16.5em
\sentences

\hyphenpenalty0  
\rightskip24em
\hangindent6em
\hangafter3
\sentences\sentences\sentences
\end{document}