4

I'm trying to reproduce a court transcript. I find no packages or other examples that perform this exactly. Has anyone worked on this?

A visual example of how these transcripts look is attached.

  • There should be continuous numbered lines with a vertical rule.
  • New speakers are indented and in all caps.

Would be great if there was some code so that you could just write \speaker{Admiral Smith} and have the formatting performed automatically.

As you can see, I'm having trouble here:

    \documentclass[hidelinks, 12pt]{article} % Uses 10pt

    \newcommand{\Title}{\textbf{Title}}    

    \usepackage{dashrule}

    \usepackage{color,graphicx, url}

    \usepackage{wallpaper}
    \usepackage{soul}
    \usepackage{pifont}

    \usepackage{fontspec}
    \usepackage{xunicode} 

    %%%%%%% FONTS

    \setmainfont[Mapping=tex-text]{Courier} 
    \newfontfamily\headerfont{Courier}

    %%%% Geometry

    \usepackage{geometry}
    \geometry{
    letterpaper, 
    top=.7in,
    left=1in,
    right=1in,
    bottom=1in,
    }

    \begin{document}
    \rule[\dimexpr \topskip-\textheight]{1pt}{\textheight}\hfill
    \thispagestyle{empty}

    THE PRESIDENT: Hello Admiral! How's the steam today?

    ADMIRAL SMITH: ... Uh, yes sir. We're really loving the steam 
    today.


    \end{document}

Court Transcript Example

  • Does the line numbering need to be identical? – Davislor Sep 14 at 19:18
4

More macros can be added, depending on the needs:

enter image description here

\documentclass{article}

\usepackage{geometry,eso-pic,fancyhdr}
\geometry{
  paper = letterpaper, 
  hmargin = 1.5in,
  vmargin = 1in
}
\usepackage[pagewise]{lineno}
\linenumbers % Add line numbers to document
\setlength{\linenumbersep}{1in}% Move line numbers away from text
\renewcommand{\linenumberfont}{\normalsize\ttfamily}

% Add rules to outside of text block
\AddToShipoutPictureBG{%
  \AtTextLowerLeft{%
    % Left rule
    \makebox[0pt][r]{\rule[-.5\paperheight]{.4pt}{2\paperheight}\hspace{0.8in}}%
  }%
  \AtTextLowerLeft{%
    % Right rule
    \hspace*{\textwidth}%
    \makebox[0pt][l]{\hspace{0.4in}\rule[-.5\paperheight]{.4pt}{2\paperheight}}%
  }%
}

\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
% \renewcommand{\footrulewidth}{0pt}% Remove footer rule (default)
\fancyfoot[R]{\ttfamily\thepage}
\pagestyle{fancy}

\AtBeginDocument{%
  \ttfamily
  \thispagestyle{fancy}
  \raggedright
  \setlength{\parindent}{15pt}
  \setlength{\parskip}{\smallskipamount}
}
\newcommand{\speaker}[1]{%
  \par\MakeUppercase{#1}:~\ignorespaces
}

\usepackage{lipsum}

\begin{document}

\speaker{The President}
Hello Admiral! How's the steam today?

\speaker{Admiral Smith}
\ldots Uh, yes sir. We're really loving the steam today.

\lipsum[1-2]

\speaker{Harry Potter}
\lipsum[3-7]

\end{document}
| improve this answer | |
  • This is great, Werner! Thank you. One question: How can I indent the text from the left margin some more? The image has quite a large margin from the vertical rule. – Linter Nov 23 '18 at 17:06
  • 1
    @Linter: See the updated answer. You can adjust the \hspaces where I set the left/right \rule to move them around. – Werner Nov 23 '18 at 17:20
  • I decided to use the \wallpaper package to add a background image to this document. But doing this breaks the vertical rule. Is there some to use the \AddToShipoutPictureBG and \wallpaper? – Linter Nov 24 '18 at 14:24
  • 1
    @Linter: Change it to \AddToShipoutPictureFG. – Werner Nov 24 '18 at 16:16

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.