28

I'm looking for a package to help with the layout of an interview transcript are there any good packages to do such a task. If possible could you provide a minimum working example?

Perhaps something that aligns the names to the text, and uses a columnar layout for the people vs what they said.

1

2 Answers 2

30

I think you really just need the description environment, which you can easily tweak to your liking. What about:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{xparse}
\usepackage{enumitem}
\setlist[description]{
  font={\sffamily\bfseries},
  labelsep=0pt,
  labelwidth=\transcriptlen,
  leftmargin=\transcriptlen,
}

\newlength{\transcriptlen}

\NewDocumentCommand {\setspeaker} { mo } {%
  \IfNoValueTF{#2}
  {\expandafter\newcommand\csname#1\endcsname{\item[#1:]}}%
  {\expandafter\newcommand\csname#1\endcsname{\item[#2:]}}%
  \IfNoValueTF{#2}
  {\settowidth{\transcriptlen}{#1}}%
  {\settowidth{\transcriptlen}{#2}}%
}

% Easiest to put the longest name last...
\setspeaker{Bob}
\setspeaker{Billy}[Billy Bob]
\setspeaker{xxx}[Xavier Xanadu III]

% How much of a gap between speakers and text?
\addtolength{\transcriptlen}{1em}%

\begin{document}
\begin{description}

  \Bob I'm looking for a package to help with the layout of an
  interview transcript are there any good packages to do such a
  task. If possible could you provide a minimum working example?

  \Billy I'm looking for a package to help with the layout of an
  interview transcript are there any good packages to do such a
  task. If possible could you provide a minimum working example?

  \xxx Perhaps something that aligns the names to the text, and uses a
  columnar layout for the people vs what they said.

\end{description}
\end{document}

example-image

2
  • Hi, great answer! Can I set the speaker from a command like \newcommand\myself{myname} \setspeaker{\myself}? I get an error Missing \endcsname inserted.
    – Ben
    Commented Oct 5, 2017 at 19:30
  • The \setspeaker command is mostly just a way to create commands of the form \<name> that expand to \item[<Name>:], so defining a command that would be used in a command-defining command seems odd. Why not simply do \newcommand\myself{\item[myname:]}? Or, if you want to have your name string separate: \newcommand\myself{myname} and then \newcommand\me{\item[\myself:]}; then you can use the command \myself elsewhere.
    – jon
    Commented Oct 6, 2017 at 4:44
25

Package dramatist is intended to write plays, but I guess an interview is a mini-play too.

\documentclass{minimal}
\usepackage{dramatist}
\begin{document}
\begin{drama}
  \Character{John Dow}{dow}
  \Character{Jane Roe}{roe}

  \dowspeaks: I am John Dow.  

  \roespeaks: I am Jane Roe.  \direct{\roe{} leaves}
\end{drama}
\end{document}

enter image description here

1
  • Using dramatist on Overleaf, how do I get rid of the following warning: Package dramatist Warning /usr/local/texlive/2020/texmf-dist/tex/latex/dramatist/dramatist.sty
    – Leo103
    Commented Jul 2, 2021 at 8:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .