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



    \usepackage{color,graphicx, url}



    %%%%%%% FONTS


    %%%% Geometry


    \rule[\dimexpr \topskip-\textheight]{1pt}{\textheight}\hfill

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

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


Court Transcript Example

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

More macros can be added, depending on the needs:

enter image description here


  paper = letterpaper, 
  hmargin = 1.5in,
  vmargin = 1in
\linenumbers % Add line numbers to document
\setlength{\linenumbersep}{1in}% Move line numbers away from text

% Add rules to outside of text block
    % Left rule
    % Right rule

\fancyhf{}% Clear header/footer
\renewcommand{\headrulewidth}{0pt}% Remove header rule
% \renewcommand{\footrulewidth}{0pt}% Remove footer rule (default)




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

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


\speaker{Harry Potter}

  • 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
  • Have adapted and augmented this code for touch-typing: tex.stackexchange.com/questions/557680/…
    – Cicada
    Nov 28 at 14:54

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.