TransWikia.com

Fastest typed LaTeX template for live conversations

TeX - LaTeX Asked on February 3, 2021

I have some examples of LaTeX notes but the formatting is so sophisticated it’d be too slow to actually type these kinds of LaTeX notes live in a heated debate.

What’s a LaTeX template for notes that would be fast to type in a live setting that looks professional for live debate? Especially, retyping the speaker name is too slow.

A visual example of how these notes 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

Example

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}{normalsizettfamily}

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

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

AtBeginDocument{%
  ttfamily
  thispagestyle{fancy}
  raggedright
  setlength{parindent}{15pt}
  setlength{parskip}{smallskipamount}
}
newcommand{speaker}[1]{%
  parMakeUppercase{#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}

Referenced code webpage:

Court Legal Transcript Template

2 Answers

New commands and tab complete

The easiest way to make this quicker is to create a new command for each speaker, or some standard court names (e.g. defendant), such as

newcommand{defendant}[1]{indent textsc{Alice: }{#1}par}

You can abbreviate these if you want, but after typing the first letter or two it is usually the first suggestion for most IDE's tab complete. You'll rarely have to type out the whole thing. (Just typing in de and then hitting tab/enter does it for me in texstudio, and that's just 4 keystrokes).

Doing this for a few common characters gives me the following (I've not simplified all the margins and bits because you only need to do that once and it won't affect your speed) A small example reads

documentclass{article}

usepackage{lineno,lipsum}

newcommand{commentary}[1]{noindent[{#1}]par}
newcommand{court}[1]{indent textsc{The Court: }{#1}par}
newcommand{defendant}[1]{indent textsc{Alice: }{#1}par}
newcommand{plaintif}[1]{indent textsc{Bob: }{#1}par}
newcommand{witness}[1]{indent textsc{Witness: }{#1}par}
newcommand{jury}[1]{indent textsc{Jury: }{#1}par}

begin{document}
linenumbers
ttfamily

commentary{Something is about to happen.}
court{How do you plead?}
defendant{I didn't do it.}
plaintif{Ow yes he did.}
witness{Ow no he didn't.}
jury{Innocent}
commentary{The case is finished.}
defendant{I'm so happy. Now to give a long speech thanking the jury: lipsum}

end{document}

and yields

enter image description here

Answered by oliversm on February 3, 2021

It's probably too late now, time has passed, but in the spirit of an experimental jeu, since I need something similar, combining the answers already given (markdown method + short commands + predefines), would give, for the purposes of touch-typing scenarios, something like:

the next witness

MWE

documentclass{article}
%============================================
%from https://tex.stackexchange.com/questions/557680/fastest-typed-latex-template-for-live-conversations
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}{normalsizettfamily}
% Add rules to outside of text block
AddToShipoutPictureBG{%
AtTextLowerLeft{%
% Left rule
makebox[0pt][r]{rule[-.5paperheight]{.4pt}{2paperheight}hspace{0.8in}}%
}%
AtTextLowerLeft{%
% Right rule
hspace*{textwidth}%
makebox[0pt][l]{hspace{0.4in}rule[-.5paperheight]{.4pt}{2paperheight}}%
}%
}
fancyhf{}% Clear header/footer
renewcommand{headrulewidth}{0pt}% Remove header rule
% renewcommand{footrulewidth}{0pt}% Remove footer rule (default)
fancyfoot[R]{ttfamilythepage}
pagestyle{fancy}
AtBeginDocument{%
ttfamily
thispagestyle{fancy}
raggedright
setlength{parindent}{15pt}
setlength{parskip}{smallskipamount}
}

%
%============================================
usepackage{xparse}%for document command
usepackage{url}%for url
usepackage{xcolor}%for blue text
usepackage{framed}%for framed quotation

%============================================
newcommandccol[1]{textcolor{blue}{#1}}
%============================================
% DC iterator
%https://tex.stackexchange.com/questions/364494/whats-the-best-way-to-explode-a-string-into-characters-process-each-character
%defzz#1{defzzsep{}zzz#1relax}
%defzzz#1{ifxrelax#1elsezzsepdefzzsep{+}fbox{#1}expandafterzzzfi}
newcommandmyhyphen{raisebox{-1.2ex}{-}}
newcommandmyunderscore{{_}}
newcommandmyequalsign{raisebox{-1.4ex}{=}}
newcommandmyequalsignb{raisebox{-1.4ex}{textcolor{red}{=}}}
newcommandmyunderlinechar{myhyphen}
newcommandzzaction{llap{myunderlinechar}}
newcommandzzactionb{llap{myequalsign}}
newcommandzzactionc{llap{myequalsignb}}
newcommandmyzzaction{}
%
% each call to zz will have to def myzzaction appropriately
defzz#1{defzzsep{}zzz#1relax}
defzzz#1{ifxrelax#1elsedefzzsep{myzzaction}#1zzsepexpandafterzzzfi}
%This is used to ``underline'' text, like with a typewriter.
%
defzzd#1{defzzsep{}zzzd#1relax}
defzzzd#1{ifxrelax#1elsezzsepdefzzsep{myzzaction}#1expandafterzzzdfi}
%This is used to ``split'' text, as when spelling.
%============================================
% Create a new speaker command
newcommanddefinenewnamec[2]{%
globalexpandafternewcommandcsname y#1endcsname{#2}
}
% Redefine a speaker command
newcommandredefinenewnamec[2]{%
globalexpandafterrenewcommandcsname y#1endcsname{#2}
}
%============================================
%A : role
newcommand{speaker}[1]{%
parMakeUppercase{#1}:~ignorespaces
}
%B (A) : role (name)
newcommand{speakerb}[2][]{%
  speaker{#2 (#1)}
}
% A B : name role
newcommand{speakerc}[2]{%
  speaker{#1 #2}
}
%item value
newcommand{speakerd}[2]{%
parmakebox[8em][r]{MakeUppercase{#1:}}hspace{3em}MakeUppercase{#2}}
%heading
newcommand{speakere}[1]{%
bigskip hfill{#1}hfill parbigskipbigskip
}
%long way of underline using tt
newcommandud[1]{#1llap{raisebox{-1.2ex}{-}}}
%
%+++++++++++++++++++++++++
newcommand{commentary}[1]{noindent[{#1}]par}
%+++++++++++++++++++++++++


%~ from unisugar package:
%make a command using to end-of-line as its (one) parameter
newcommand*{toEolnCommand}[2]{%
  newcommand*{#1}{%
    begingroup
    escapechar=`%
    catcodeendlinechar=active
    csnamestring#1endcsname
  }%
  begingroup%
  escapechar=`%
  lccode`~=endlinechar
  lowercase{%
    expandafterendgroup
    expandafterdefcsnamestring#1endcsname##1~%
  }{endgroup#2space}%
}

%toEolnCommandtoEolnSection{section{#1}}
toEolnCommandtoEolnComment{comm{#1}}
toEolnCommandtoEolnDescription{tg{#1}}
toEolnCommandtoEolnMatter{tm{#1}}
toEolnCommandtoEolnCourt{tct{#1}}
toEolnCommandtoEolnBench{tben{#1}}
toEolnCommandtoEolnDate{tddate{#1}}




%q
%adapted from unisugar package:
%make q an escape character
catcode"71=11%catcode for letter (unisugar package assigns a unicode char here)
edefq{q}
catcode"71=0%escape character and control sequence

%===================================

% Continuation
newcommandqtc{speaker{the court}}
newcommandqtd{speaker{defendant}}
newcommandqtp{speaker{plaintiff}}
newcommandqtde{speaker{defence}}
newcommandqtpr{speaker{prosecution}}
newcommandqtap{speaker{appellant}}
newcommandqtre{speaker{respondent}}

newcommandqtw{speaker{witness}}
newcommandqttr{speaker{translator}}
newcommandqtj{speaker{jury}}
newcommandqtdd{speaker{counsel (def)}}
newcommandqtpp{speaker{counsel (pl)}}
newcommandqcomm[1]{commentary{#1}}
newcommandqtm[1]{speakerd{case}{#1}}
newcommandqtct[1]{speakerd{court}{#1}}
newcommandqtben[1]{speakerd{bench}{#1}}
newcommandqtddate[1]{speakerd{date}{#1}parbigskip}
%long way of tt underlining::
%newcommandqttran{speakere{ud{T}ud{r}ud{a}ud{n}ud{s}ud{c}ud{r}ud{i}ud{p}ud{t}}}%
%shorter way: zz{}
newcommandqttran{renewcommandmyzzaction{zzaction}speakere{zz{Transcript}}}%
newcommandqthead[1]{renewcommandmyzzaction{zzaction}speakere{zz{#1}}}%
newcommandqtcomm[1]{toEolnComment{#1}}
newcommandqtgg[1]{toEolnDescription{#1}}
newcommandqtmm[1]{toEolnMatter{#1}}
newcommandqtcrt[1]{toEolnCourt{#1}}
newcommandqtbench[1]{toEolnBench{#1}}
newcommandqtdate[1]{toEolnDate{#1}}
newcommandqtname[2]{definenewnamec{#1}{speaker{#2}}}% a=B
newcommandqtnamer[2]{redefinenewnamec{#1}{speaker{#2}}}% a=C

newcommandqtem[1]{renewcommandmyzzaction{zzaction}zz{#1}}%
newcommandqtemm[1]{renewcommandmyzzaction{zzactionb}zz{#1}}%
newcommandqtemmm[1]{renewcommandmyzzaction{zzactionc}zz{#1}}%
newcommandqtspell[1]{renewcommandmyzzaction{-}zzd{#1}}%

% Introduction
newcommandqtcc[1]{speakerb[#1]{the court}}
newcommandqtdx[1]{speakerb[#1]{defendant}}
newcommandqtpx[1]{speakerb[#1]{plaintiff}}
newcommandqtdex[1]{speakerb[#1]{defence}}
newcommandqtprx[1]{speakerb[#1]{prosecution}}
newcommandqtapx[1]{speakerb[#1]{appellant}}
newcommandqtrex[1]{speakerb[#1]{respondent}}

newcommandqtww[1]{speakerb[#1]{witness}}
newcommandqttt[1]{speakerb[#1]{translator}}
newcommandqtddd[1]{speakerb[#1]{counsel for the defendant}}
newcommandqtppp[1]{speakerb[#1]{counsel for the plaintiff}}
newcommandqtdee[1]{speakerc{#1}{for the defence}}
newcommandqtprr[1]{speakerc{#1}{for the prosecution}}
newcommandqtapp[1]{speakerc{#1}{for the appellant}}
newcommandqtree[1]{speakerc{#1}{for the respondent}}

% Ancillary command
newcommanddescmarker{=}
newcommandgendesc[1]{par{begin{center}descmarkerMakeUppercase{#1}descmarkerend{center}}}
newcommandgendescb[1]{[MakeUppercase{#1}]}
newcommandgendescc[1]{par{begin{center}MakeUppercase{#1}end{center}}}
newcommandgendescd[1]{parMakeUppercase{#1}}
%Description
newcommandqtbreak{gendescc{+++++++++++++++++++}}
newcommandqtend{bigskipbigskipgendescc{--*****--}}
%
newcommandqtadjourn{gendescd{court adjourns~}}
newcommandqtresume{gendescd{court resumes~}}
newcommandqtv{gendesc{voices overlapping}}
newcommandqti{gendescb{inaudible}}
newcommandqtim{gendescb{mumbles}}
newcommandqtin{gendescb{incompehensible}}
newcommandqtis{gendescb{softly}}
newcommandqtlp{gendescb{long pause}}
newcommandqtu{gendescb{?}}%uncertain
newcommandqtl{gendescb{speaks in foreign language}}
newcommandqts{gendesc{shouting}}%e.g. protesters
newcommandqtf{gendesc{confusion in court}}
newcommandqtg[1]{gendesc{#1}}%general purpose description
newcommandqtlol{gendesc{laughter in court}}
newcommandqta{ldots [interrupted]}
newcommandqtb{ldots [continues]~}
%spelling
newcommandhonourstringen{Honour}
newcommandhonourstringus{Honor}
newcommandhonourstring{}
%locale
newcommandsetlocaleen{%
    renewcommandhonourstring{honourstringen}
}
newcommandsetlocaleus{%
    renewcommandhonourstring{honourstringus}
}
%Settings - locale
setlocaleen
%Common phrases
newcommandqml{My Lord}
newcommandqmly{My Lady}
newcommandqmlu{Your Lordship}
newcommandqmlyu{Your Ladyship}
newcommandqalp{as Your Lordship pleases}
newcommandqalpy{as Your Ladyship pleases}
newcommandqalc{as the Court pleases}
newcommandqalh{as Your honourstring pleases}
newcommandqyh{Your honourstring}
newcommandqyw{Your Worship}
newcommandqpc{May it please the Court}



%==============================================
begin{document}

noindent Example:

qtmm party a and party b
qtcrt supreme court of xyz
qtbench name j
qtdate 07 aug 2020
qttran
qcomm{Something is about to happen.}
qtcomm This comment is defined by its line, rather than by braces.

qtcc{judge gavel} How do you plead? qtd I didn't do it. qtp Oh yes he did. qtdd I object! qtc Sustained! qtw Oh no he didn't. qtj  Not guilty! 

qcomm{The case is finished.} qtd I'm so happy. Now to give a long speech thanking the jury: ldots qtp qquite qquickly. Quietly qquietly. qtu 
 qtww{professor knowall} Yes, that's right. qtc You may go now. Next case! qtpp qti qtc Switch on your microphone, Counsel. qtv qtppp{Slicker Greenhorn} I apologise for that,  qyh. I'm here to represent the plaintiff in qta qts qtc Order in the Court! qtpp qtb to represent qtc Remove that rapscallion from the rafters! Call the next witness. qtww{el zorro} qtl qttr I am known as The Fox qtu qtpp We know who you are. Now, qtlol qtc Time for a short recess. qtadjourn 11:18 am qtbreak qtresume 11:20 am qtc Now, you realise you are still under oath? qtw Yes qyh. qtend

The foregoing was produced by:
begin{framed}begin{qquotation}
qqtmm party a and party b
qqtcrt supreme court of xyz
qqtbench name j
qqtdate 07 aug 2020
qqttran
qqcomm{Something is about to happen.}
qqtcomm This comment is defined by its line, rather than by braces.
 
qqtcc{judge gavel} How do you plead? qqtd I didn't do it. qqtp Oh yes he did. qqtdd I object! qqtc Sustained! qqtw Oh no he didn't. qqtj  Not guilty! 
 
qqcomm{The case is finished.} qqtd I'm so happy. Now to give a long speech thanking the jury: textbackslash ldots qqtp qqqquite qqqquickly. Quietly qqqquietly. qqtu 
 qqtww{professor knowall} Yes, that's right. qqtc You may go now. Next case! qqtpp qqti qqtc Switch on your microphone, Counsel. qqtv qqtppp{Slicker Greenhorn} I apologise for that,  qqyh. I'm here to represent the plaintiff in qqta qqts qqtc Order in the Court! qqtpp qqtb to represent qqtc Remove that rapscallion from the rafters! Call the next witness. qqtww{el zorro} qqtl qqttr I am known as The Fox qqtu qqtpp We know who you are. Now, qqtlol qqtc Time for a short recess. qqtadjourn 11:18 am qqtbreak qqtresume 11:20 am qqtc Now, you realise you are still under oath? qqtw Yes qqyh. qqtend
end{qquotation}end{framed}


newpage
qthead{INTRODUCTION} This template, more-or-less standalone, and inspired by some answers to a qquestion on TeX Stack Exchange,footnote{{https://tex.stackexchange.com/qquestions/557680/fastest-typed-latex-template-for-live-conversations}} provides some shorthand commands for touch-type transcription of a (fast-moving) conversation in court, with the letter ccol{qq} being defined as an escape character to take some of the typing load off the ccol{textbackslash} key (albeit at the other end of the keyboard). To get an ordinary qq, double it like this qqqq. And ccol{textbackslash} can still be used as the escape character. This  ccol{qq} method will eventually clash with some command or package somewhere if any are added into the code, but, within its own space, it works well enough. Familiarity with TeX  layout is an advantage.

Speaker names can be defined 'on-the-fly', and text formatting is embedded within the commands, so that formatting does not have to be typed separately.

To reduce typing even further, some commands that take a parameter can be typed on their own line without the need for any { or }, with the rest of the line being taken as the parameter.

ccol{qqtcomm This is a comment}

qtcomm This is a comment

Otherwise, the commands can follow each other inline, as the context allows. The cryptic ccol{qqtpr qqyh s, if I may take you to section ldots qqtc Yes, Mr Crown. qqtpr 42 of the Act.} produces: qtpr qyh s, if I may take you to section ldots qtc Yes, Mr Crown. qtpr 42 of the Act.

begin{framed}begin{qquotation}Trial by transcript can seldom be an adeqquate representation of an oral trial before a judge or an oral trial before a judge and jury.

-- McHugh J, in textit{Rosenberg v Percival} [2001] HCA 18; (2001) 205 CLR 434 at 448.
end{qquotation}end{framed}


begin{framed}begin{qquotation}
qtname{ross}{ms. ross} qyross  Mr. Chief Justice, and may it please the Court: It is a fundamental principle of trademark law that no party can obtain a trademark for a generic term like "wine," "cotton," or "grain."

-- Transcript of oral argument, 04 May 2020, page 3 lines 10-15, in  textit{United States Patent and Trademark Office versus Booking.com}
{smallurl{https://www.supremecourt.gov/oral_arguments/argument_transcripts/2019/19-46_bq7d.pdf}}
end{qquotation}end{framed}

newpage
section{Commands}

subsection{Speakers}

begin{tabular}{ll}
Command & Display 
qqtc & qtc 
qqtp & qtp  
qqtpp & qtpp  
qqtd & qtd  
qqtdd & qtdd  
qqtpr & qtpr  
qqtde & qtde  
qqtw & qtw  
qqttr & qttr  
qqtj & qtj  
qqtap & qtap  
qqtre & qtre  
end{tabular}

newpage
subsection{Speaking}
begin{tabular}{ll}
qqta & qta  
qqtb & qtb  
qqti & qti  
qqtim & qtim  
qqtin & qtin  
qqtis & qtis  
qqtlp & qtlp 
qqtl & qtl  
qqtu & qtu 
end{tabular}
bigskip

noindentbegin{tabular}{ll}
qqtem{emphasis} & qtem{emphasis} 
qqtemm{moretextbackslash emphasis} & qtemm{more emphasis} 
qqtemmm{strongesttextbackslash emphasis} & qtemmm{strongest emphasis} 
qqtspell{spell} & qtspell{spell}  
end{tabular}



newpage
subsection{Phrases}
begin{tabular}{ll}
qqalc & qalc  
qqalh & qalh  
qqalp & qalp  
qqalpy & qalpy  
qqml & qml  
qqmlu & qmlu 
qqmly & qmly  
qqmlyu & qmlyu  
qqpc & qpc  
qqyh & qyh  
qqyw & qyw  
end{tabular}

newpage
subsection{Stages}
begin{tabular}{ll}
qqtadjourn & qtadjourn 
qqtresume & qtresume  
end{tabular}

newpage
subsection{Structure}
 par qqtran qttran
qqthead{HEADING} qthead{HEADING}

qqtmm casename
qtmm casename

qqtcrt court name
qtcrt court name

qqtbench presiding judge(s)/justice(s)
qtbench presiding judge(s)/justice(s)

qqtdate hearing date
qtdate hearing date


newpage

subsection{Events}
 par
qqtg{Generic description}

qtg{Generic description}

qqtgg a generic description qtgg a generic description

qqtbreak qtbreak
qqtf qtf
qqtlol qtlol
qqts qts
qqtv qtv
qqtend qtend

newpage

subsection{{} parameter commands}

begin{tabular}{ll}
Command & Display 
qqcomm{Comment} & qcomm{Comment}  
end{tabular}
bigskip

noindent These are for use on first introduction. Subseqquently, role or defined name may be used.bigskip

noindentbegin{tabular}{ll}
Command & Display 
qqtcc{name} & qtcc{name}  

qqtpx{name} & qtpx{name}  
qqtppp{name} & qtppp{name}  
qqtdx{name} & qtdx{name}  
qqtddd{name} & qtddd{name}  

qqtprr{name} & qtprr{name}  
qqtprx{name} & qtprx{name}  
qqtdee{name} & qtdee{name}  
qqtdex{name} & qtdex{name}  

qqtww{name} & qtww{name}  
qqttt{name} & qttt{name}  

qqtapp{name} & qtapp{name}  
qqtapx{name} & qtapx{name}  

qqtree{name} & qtree{name}  
qqtrex{name} & qtrex{name}  
end{tabular}
bigskip

subsection{Dynamic names}

For creating names on-the-fly,

qqtname{a}{b} creates a command qqya which expands to qtname{a}{b}qya

So that qqtname{who}{the doctor}, qqtname{whit}{leela}, and qqtname{dog}{k9} create 
qqywho, qqywhit and qqydog which expand to qtname{who}{the doctor} qywho qtname{whit}{leela} qywhit  qtname{dog}{k9} par and qydog

A defined name can be re-defined with qqtnamer{}, so that qqtnamer{who}{clara} resets qqywho such that it now produces qtnamer{who}{clara}qywho

newpage

subsection{Rest-of-line parameter commands}

qqtcomm This text is on a line

qtcomm  This text is on a line

qqtgg a generic description

qtgg a generic description

qtend


end{document}

Answered by Cicada on February 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP