我正在寻找一个软件包来帮助排版采访记录,有没有什么好的软件包可以完成这样的任务。如果可能的话,你能提供一个最小的工作示例吗?
也许可以将姓名与文本对齐,并使用柱状布局来显示人物和他们所说的内容。
答案1
我认为你真正需要的只是环境description
,你可以轻松地根据自己的喜好进行调整。那么:
\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}