I'm not sure whether you are producing these transcripts in an automated way. Also, whether your example transcript is representative of things in general (for example, you give 2 columns, which I assume to always be the case). I have assumed this in the solution presented below, and made some other assumptions about typesetting (like the font). Here is the basic idea...
We typeset the structure using a tabular
that has 2 columns. You supply the tabular
content in a form similar to that in your example (specifying the line break with a &
), which is then printed twice. The first time, only the left column is shown, while the second time only shows the right column. At each print of the contents, the missing column is gobbled using a technique described in Easiest way to delete a column? The environ
package allows to easily collect all the contents in the tabular
and makes available (for multiple uses) in \BODY
, enabling it to be processed twice.
In the example below I have used \ttfamily
(mono-spaced Computer Modern font) to typeset the transcript, since it allows for easy horizontal alignment across lines. Also, I've used \phantom
to adjust for padding some lines with the correct number of "blank letters". The array
package provides the \newcolumntype
macro for specifying the "gobble column" H
. The new "line-breakable" tabular
is contained with the created transcript
environment:
\documentclass{article}
\usepackage{environ}% http://ctan.org/pkg/environ
\usepackage{array}% http://ctan.org/pkg/array
\newcolumntype{H}{>{\setbox0=\hbox\bgroup}c<{\egroup}@{}}% Gobble column
\NewEnviron{transcript}{%
\begin{tabular}{r@{}H}
\BODY
\end{tabular} \par
\begin{tabular}{H@{}l}
\BODY
\end{tabular}
}
\begin{document}
\ttfamily % Monospaced Computer Modern
tabular \textrm{environment:}
\begin{tabular}{r@{}l}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&xxxxxxxxxxxxxx \\
yyyyyyyyyyyyyyyyyyyyyyyyy&yyyyyyyyyyyyyyyyyy \\
zzzzzzz&zzzzzz \\
&\phantom{aa}aaa
\end{tabular}
transcript \textrm{environment:}
\begin{transcript}
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&xxxxxxxxxxxxxx \\
yyyyyyyyyyyyyyyyyyyyyyyyy&yyyyyyyyyyyyyyyyyy \\
zzzzzzz&zzzzzz \\
&\phantom{aa}aaa
\end{transcript}
\end{document}
The above illustration showcases the regular tabular
environment against transcript
.
tabular
environment could be useful here, but I don't quite understand your intent. Can you give us a more clear idea of the final layout desired? (perhaps uploading (or providing a link) to an image).