6

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

2
  • Does the line numbering need to be identical?
    – Davislor
    Commented Sep 14, 2020 at 19:18
  • I do not expect that the original court transcript was created using TeX. Depending on jurisdiction, it most likely was created with a word processor, using styles available in Word Perfect (even if you use MS Word or other software). The font might be similar to Courier, or it might be more like Charter or Schoolbook. Ask the Clerk of the Court what they use.
    – user287367
    Commented Dec 20, 2023 at 17:54

2 Answers 2

6

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}
5
  • 1
    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
    Commented Nov 23, 2018 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
    Commented Nov 23, 2018 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
    Commented Nov 24, 2018 at 14:24
  • 1
    @Linter: Change it to \AddToShipoutPictureFG.
    – Werner
    Commented Nov 24, 2018 at 16:16
  • Have adapted and augmented this code for touch-typing: tex.stackexchange.com/questions/557680/…
    – Cicada
    Commented Nov 28, 2021 at 14:54
0

Here's an other approach, with a different focus.

  1. Key is using macros (\newcommand) to abbreviate the people, roles etc. involved. I could have reused Werner's \speaker solution, but this way it's simple enough. Kindly watch the local overwrite of \parindent in \dscr. If you need actions before or after the text, replace by a \newenvironment.
% ~~~ macros ~~~~~~~~~~~~~~~~~~~~~~~
\newcommand\crt[1]{THE COURT:\ #1}
\newcommand\dfa[1]{DEFENDANT ALLEN:\ #1}
\newcommand\aln[1]{MR. ALLEN:\ #1}
\newcommand\dscr[1]{{\parindent0pt[#1]}}
  1. The font size may or may not be correct with the route chosen.

  2. Font of linenumbers needed a slight adjustment wrt. Werner's solution:

\renewcommand{\linenumberfont}{\normalfont}
  1. To check correctness of pagewise numbering, which seem to depend on the previous \renewcommand, I copied some text for the second page.

  2. The rest, global layout, headers and footers, vertical rules are already addressed either by the OP or by Werner's answer. So I dropped those to better show the new aspect of using abbreviations.

result

\documentclass[12pt]{article}

% ~~~ COURIER ~~~~~~~~~~~~
\usepackage{courier}
\renewcommand{\rmdefault}{\ttdefault}

% ~~~ line numbers ~~~~~~~~~~~~~
%     adapted from Werners answer https://tex.stackexchange.com/a/461446/245790
\usepackage[pagewise]{lineno}
\linenumbers % Add line numbers to document
\setlength{\linenumbersep}{1in}% Move line numbers away from text
\renewcommand{\linenumberfont}{\normalfont}

% ~~~ macros ~~~~~~~~~~~~~~~~~~~~~~~
\newcommand\crt[1]{THE COURT:\ #1}
\newcommand\dfa[1]{DEFENDANT ALLEN:\ #1}
\newcommand\aln[1]{MR. ALLEN:\ #1}
\newcommand\dscr[1]{{\parindent0pt[#1]}}

% ~~~ layout ~~~
\parindent24pt%         hanging indent
\linespread{2.33}%      factor for line separations

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\begin{document}
    \dscr{The Court advises defendant reagarding representation by the public defender on defendant's oral motion to fire his assigned \dots}

    \crt{Okay. Mr.-Mr. Allen?}
        
    \dfa{Right.}

    \crt{I believe that-Ibelieve your cas is going to be \dots
    
    Okay. Do you understand that?}
    
    \aln{Yes. Uh-}
    
    \crt{Okay. I tell you if you needed to tell me something, I want-I'll let you come up here to the podium so you \dots}

    \dscr{The defendant approached the podium.}
    
    \newpage%   just for checking purposes
    
    \crt{Okay. Mr.-Mr. Allen?}
        
    \dfa{Right.}

    \crt{I believe that-Ibelieve your cas is going to be \dots
    
    Okay. Do you understand that?}
    
    \aln{Yes. Uh-}
    
    \crt{Okay. I tell you if you needed to tell me something, I want \dots}

    \dscr{The defendant approached the podium.} 
    
\end{document}

You must log in to answer this question.

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