[comp.text.tex] Help with trascript format.

gaston@cpsc.ucalgary.ca (Gaston Groisman) (06/19/91)

I need help doing the following.  In my thesis I want to have transcripts
of conversations with comments alongside.  I want to do it like this:

-----------------------------------------------------------------------------
person 1: This is what person one is          here I comment on the transcript.
  saying.  Notice that it goes in the 
  left column.
  
person 2: Now person two answers.             This comment may be long and 
                                              take more space than the
					      paragraph it refers to.

person 1: Person one talks again, but now
  since the comment to the right was 
  long, this paragraph has to start a few
  lines below.
  
-----------------------------------------------------------------------------

This may carry on for several pages, and may start or end in the middle of
a one column page!

Any help will be greatly appreciated.

  
-- 
 Gaston Groisman          +-------------------------------------+
 Computer Science Dep.    |      gaston@cpsc.ucalgary.ca        |
 University of Calgary    |      groisman@uncamult.bitnet       |
 Alberta, CANADA          +-------------------------------------+

marcel@cs.caltech.edu (Marcel van der Goot) (06/19/91)

Gaston Groisman (gaston@cpsc.ucalgary.ca) needed help with:
> In my thesis I want to have transcripts of conversations with comments
> alongside.

Something like this will work. Between \conversation ... \endconversation
you need to write paragraphs in pairs: first the conversation paragraph,
then the corresponding comment paragraph. If you want an empty paragraph
(for instance because you don't have a comment) you can write a paragraph
consisting of a `tie' (`~') only.

A problem is that a page can only be broken between paragraphs, not
between lines. (To make page breaks between lines possible is a harder
problem.) If you write your own output routine (but you probably don't),
you can insert extra glue at the bottom of the page to make page breaks
easier. But even as it is, it will probably work ok as long as you don't
have excessively long paragraphs.


                                          Marcel van der Goot
 .----------------------------------------------------------------
 | Blauw de viooltjes,                    marcel@vlsi.cs.caltech.edu
 |    Rood zijn de rozen;
 | Een rijm kan gezet
 |    Met plaksel en dozen.
 |

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\convpar % settings for a `conversation paragraph'
   {\hsize=7cm
    \parindent=-0.5cm
   }

\def\commpar % settings for a `comment paragraph'
   {\hsize=6cm
    \parindent=0pt
   }

\newbox\convbox
\newbox\commbox
\newif\ifdoingconv

\def\conversation{\global\doingconvtrue\doconv}
\def\endconversation{\global\doingconvfalse}

\def\doconv#1\par
   {\setbox\convbox=\vtop{\convpar#1\strut}%
    \ifdoingconv\expandafter\docomm\fi
   }

\def\docomm#1\par
   {\setbox\commbox=\vtop{\commpar#1\strut}%
    % here you may want to insert a \smallskip or so
    \hbox to\hsize{% or something else than \hsize
	\strut\hss\box\convbox
	\qquad % the space between conversation and comment
	\box\commbox\hss}%
    \ifdoingconv\expandafter\doconv\fi
   }

\conversation
person 1: This is what person one is saying. Notice that it goes in the
left column.

Here I comment on the transcript.

person 2: Now person two answers.

This comment may be long and take more space than the paragraph it
refers to.

person 1: Person one talks again, but now since the
comment to the right was long, this paragraph has to start a few lines
below.

~

\endconversation

\bye