2

I'm working on a class for making meeting minutes. I want my page to contain the name of the speaker in the left column, and the actual speech of the speaker in the right column. The name of speaker and the speech should be top aligned.

The goal is to get a class in which if the speakers name does not fit on a single line in the left column, it should continue on the next line. If the speech does not fit on the current page entirely, it should continue on the next page. And the first line of the speakers name and the first line of his speech should be vertically aligned

If first had this, however this breaks for pages breaks and speeches that are too long to fit on a single page

\newcommand{\opmerking}[2]{
    \begin{minipage}[t]{\leftcolumnwidth}
        #1 % name of speaker
    \end{minipage}%
    \hspace{\columngapwidth}%
    \begin{minipage}[t]{\rightcolumnwidth}
        #2 % speech
    \end{minipage}\medskip
}

I then tried this, but this breaks for names that do not fit on a single line in the left column:

\newcommand{\opmerking}[2]{
\parbox[\leftcolumnwidth][t]{#1}
\begin{adjustwidth}{\leftcolumnwidth+\columngapwidth}{}
\vspace*{-\baselineskip}% Align name of speaker and environment
    #2
\end{adjustwidth}\medskip
}

Finally I tried using the tcolorbox package, this seemed to work. However I could not manage to vertically align the title and the box s.t. the name of the speaker and the speech are aligned.

Anyone who knows how to achieve this using LaTeX?

Picture to clarify:

enter image description here

  • Welcome! Are you aware of the minutes package? – marmot Dec 10 '17 at 18:10
  • question is not that clear but perhaps you are looking for \raggedright#1 % name of speaker – David Carlisle Dec 10 '17 at 18:34
  • @marmot I checked it out but sadly does not achieve what i want – user150347 Dec 10 '17 at 18:49
  • Can we assume the “speaker” box is just one line high? – egreg Dec 10 '17 at 19:18
  • @egreg No that is the hard part. – user150347 Dec 11 '17 at 0:10
2

One solution may be to use the paracol package. The following MWE is not very elaborate, it is only intended to demonstrate the general idea.

\documentclass{article}

\usepackage{paracol}
\usepackage{lipsum}

\newcommand{\speech}[2]{\switchcolumn[0]*{\noindent\raggedright #1}\switchcolumn[1]#2}
\columnratio{0.2}

\begin{document}

\begin{paracol}{2}

\speech{First speaker}{\lipsum[1]}

\speech{Second\\speaker}{\lipsum[2]\par\lipsum[3]}

\end{paracol}

\end{document}

It gives the following result.

Output of the MWE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.