Last active
October 17, 2019 20:32
-
-
Save Adjuvant/a125ec2e80ac48fc73d586a9ca5fdebd to your computer and use it in GitHub Desktop.
Conversation transcript style. Extension of Gareth Walker's convtran latex style that works inside minipages and figures. First pass, total hack. Original http://gareth-walker.staff.shef.ac.uk/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %% convtran.sty | |
| %% Copyright 2016 Gareth Walker | |
| %% Minipage updates by Thomas Deacon, 2019 | |
| % | |
| % This work may be distributed and/or modified under the | |
| % conditions of the LaTeX Project Public License, either version 1.3 | |
| % of this license or (at your option) any later version. | |
| % The latest version of this license is in | |
| % http://www.latex-project.org/lppl.txt | |
| % and version 1.3 or later is part of all distributions of LaTeX | |
| % version 2005/12/01 or later. | |
| % | |
| % This work has the LPPL maintenance status `maintained'. | |
| % | |
| % The Current Maintainer of this work is Gareth Walker. | |
| % | |
| % This work consists of the files convtran.sty and convtran.tex. | |
| \ProvidesPackage{convtran}[2016/11/30 for transcription of conversation] | |
| \NeedsTeXFormat{LaTeX2e} | |
| \RequirePackage{lineno,wasysym,graphicx} | |
| %% This is a very heavily modified version of James Kilfiger's | |
| %% `play.sty' (by now, it is probably unrecognisable) Outline of | |
| %% package use: designed to make doing transcriptions of conversation | |
| %% a bit easier, principally through the definition of new commands | |
| %% (e.g. \convturn, \convinfo, \phon, \glos, \tran) and its interaction with | |
| %% the lineno.sty package (which is required in order to work). See | |
| %% convtran.tex for documentation. | |
| %% CHANGES | |
| %% 2019/10/17: changed original turn command from \turn to \convturn as of package conflicts, added minipage functionality | |
| %% 2016/11/30: tried to reduce the effect of using marginpars for arrows | |
| %% 2016/05/04: added code to allow numbering to be resumed | |
| %% 2012/01/18: added code to do figure labels above relevant lines | |
| %% 2010/01/19: added \setconvrightmargin{} functionality to allow | |
| %% length to be added to the right margin of transcriptions | |
| %% (undocumented: just add the command, and length, to the preamble) | |
| %% 2009/07/08: changed some \samepage commands to \nopagebreak due to | |
| %% broken page breaking when using \phon{}, \convinfo{} etc | |
| %%%%% The convtran environment | |
| \newenvironment{convtran}[1][\convlabelwidth]{% this last value sets | |
| % the default distance from label to text | |
| \def\baselinestretch{\convspacing} % line spacing (single by default) | |
| \reversemarginpar % puts the arrow on the right | |
| \@mparswitchfalse % don't switch sides for arrow: | |
| % always on left | |
| \flushleft % kills justification | |
| \frenchspacing % stops extra space after period | |
| \list{}{ % modified list environment | |
| \linenumbers* \setlength\labelwidth{#1} | |
| \addtolength{\rightmargin}{\convrightmargin} | |
| \setlength\leftmargin{\labelwidth} \setlength\itemsep{0pt} | |
| \setlength\parsep{0pt} \addtolength\leftmargin{-\itemindent} | |
| \addtolength\leftmargin{\labelsep} | |
| \setlength\listparindent{\itemindent} \let\makelabel=\@CAplaylabel | |
| \setlength\topsep{3cm} } } | |
| {\endlist} | |
| \newenvironment{convtran*}[1][\convlabelwidth]{% this last value sets | |
| % the default distance from label to text | |
| \def\baselinestretch{\convspacing} % line spacing (single by default) | |
| \reversemarginpar % puts the arrow on the right | |
| \@mparswitchfalse % don't switch sides for arrow: | |
| % always on left | |
| \flushleft % kills justification | |
| \frenchspacing % stops extra space after period | |
| \internallinenumbers | |
| \list{}{ % modified list environment | |
| \linenumbers* \setlength\labelwidth{#1} | |
| \addtolength{\rightmargin}{\convrightmargin} | |
| \setlength\leftmargin{\labelwidth} \setlength\itemsep{0pt} | |
| \setlength\parsep{0pt} \addtolength\leftmargin{-\itemindent} | |
| \addtolength\leftmargin{\labelsep} | |
| \setlength\listparindent{\itemindent} \let\makelabel=\@CAplaylabel | |
| \setlength\topsep{3cm} } } | |
| {\endlist} | |
| %%%%% customizable elements | |
| \newcommand*{\convfont}{\normalfont\ttfamily\footnotesize} % sets fonts | |
| \newcommand*{\arrowfont}{\normalfont\ttfamily\footnotesize} | |
| \newcommand*{\glosfont}{\normalfont\ttfamily\footnotesize} | |
| \newcommand*{\tranfont}{\normalfont\ttfamily\normalfont} | |
| \newcommand*{\infofont}{\normalfont\ttfamily\em\footnotesize} | |
| \newcommand*{\setconvfont}[1]{\renewcommand{\convfont}{#1}} | |
| \newcommand*{\setarrowfont}[1]{\renewcommand{\arrowfont}{#1}} | |
| \newcommand*{\setglosfont}[1]{\renewcommand{\glosfont}{#1}} | |
| \newcommand*{\settranfont}[1]{\renewcommand{\tranfont}{#1}} | |
| \newcommand*{\setinfofont}[1]{\renewcommand{\infofont}{#1}} | |
| \newcommand*\convturnlabfont{\convfont} | |
| \newcommand*{\figlabsfont}{\normalfont\ttfamily\footnotesize} | |
| \newdimen\arrowsep | |
| \setlength\arrowsep{-1.3cm} | |
| \newcommand*{\setarrowplace}[1]% | |
| {\setlength\arrowsep{#1}} | |
| %\setarrowplace{-1.3cm} | |
| \newdimen\convindent | |
| \convindent=1.5cm | |
| \newcommand*{\setconvindent}[1]{\setlength\convindent{#1}} | |
| \newdimen\linenumbersep | |
| \newcommand*{\setlinenoplace}[1]{\setlength\linenumbersep{#1}} | |
| \setlinenoplace{-0.75cm} % sets how far in line numbers go | |
| \renewcommand*{\linenumberfont}{\convfont} % same as main font | |
| \newdimen\convlabelwidth | |
| \convlabelwidth=2.3cm | |
| \newcommand*{\setconvlabelwidth}[1]{\setlength\convlabelwidth{#1}} | |
| \newdimen\convrightmargin | |
| \convrightmargin=0cm | |
| \newcommand*{\setconvrightmargin}[1]{\setlength\convrightmargin{#1}} | |
| \newcommand{\convspacing}{1} % package options for linespacing | |
| \DeclareOption{single}{\renewcommand\convspacing{1}} | |
| \DeclareOption{onehalf}{\renewcommand\convspacing{1.5}} | |
| \DeclareOption{double}{\renewcommand\convspacing{2}} | |
| \ProcessOptions | |
| %%%%% commands | |
| \newcommand*{\convturn}{% | |
| \@ifstar{\convturn@star}{\convturn@no@star}% | |
| } | |
| \newcommand*{\convturn@no@star}[1]{% | |
| \convfont\item[\hspace*{\convindent}#1]\linenumbers} | |
| \newcommand*{\convturn@star}[1]{% | |
| \convfont\item[\hspace*{\convindent}#1]\nolinenumbers} | |
| \newcommand*{\convturnmini}{% | |
| \@ifstar{\convturnmini@star}{\convturnmini@no@star}% | |
| } | |
| \newcommand*{\convturnmini@no@star}[1]{% | |
| \convfont\item[\hspace*{\convindent}#1]\internallinenumbers} | |
| \newcommand*{\convturnmini@star}[1]{% | |
| \convfont\item[\hspace*{\convindent}#1]\nolinenumbers} | |
| \newcommand*{\phon}[1]% unnumbered phonetics | |
| {\nopagebreak\convfont\item[\hspace*{\convindent}#1]\nolinenumbers}% | |
| \newcommand*{\convinfo}[1]% unnumbered info | |
| {\infofont\item[\hspace*{\convindent}#1]\nolinenumbers}% | |
| \newcommand*{\glos}[1]% unnumbered glosses | |
| {\nopagebreak\glosfont\item[\hspace*{\convindent}#1]\nolinenumbers}% | |
| \newcommand*{\tran}[1]% unnumbered translation | |
| {\nopagebreak\tranfont\item[\hspace*{\convindent}#1]\nolinenumbers}% | |
| \newcommand*\convturndelim{}% | |
| \newcommand*{\@CAplaylabel}[1]{{\convfont#1\convturndelim\hfil}}% | |
| \newcommand*\lab{\linelabel}% line labels | |
| \newcommand*{\figlabs}[1]% unnumbered figure label lines | |
| {\nopagebreak\figlabsfont\item[\hspace*{\convindent}#1]\nolinenumbers}% | |
| \newcommand{\figlab}[1]{\begin{minipage}{0cm}% | |
| \vspace*{10pt}{\scriptsize\normalfont{\textbf{Fig~#1}}\\% | |
| \rotatebox[origin=c]{90}{\hspace*{5pt}$\LHD$}\par}% | |
| \end{minipage}} | |
| \newcommand{\fraglab}[1]{\begin{minipage}{0cm}% | |
| \vspace*{10pt}{\scriptsize\normalfont{\textbf{Frag~#1}}\\% | |
| \rotatebox[origin=c]{90}{\hspace*{5pt}$\LHD$}\par}% | |
| \end{minipage}} | |
| %%%%% symbols | |
| % these are loaded outstide the \newenvironmnent command so that | |
| % they are available in the body of the text for e.g. quoting | |
| \newcommand*\high{$\uparrow$} % high pitch (up arrow) | |
| \newcommand*\low{$\downarrow$} % low pitch (down arrow) | |
| \newcommand*\q{$^\circ$} % start of quiet talk | |
| \newcommand*\closeq{$^\circ$\ } % end of quiet talk | |
| %\newcommand*\ul{\underline} % shorthand for underlining | |
| \newcommand*\ol{//} % the `old fashioned' way to mark | |
| % onset of overlap | |
| \newcommand*{\convhl}{% higlighting arrow | |
| \setlength{\marginparpush}{0pt}% | |
| \setlength{\marginparsep}{\arrowsep}\marginpar{\hfill$\rightarrow$}} | |
| \newcommand*{\convHl}{% higlighting double arrow | |
| \setlength{\marginparpush}{0pt}% | |
| \setlength{\marginparsep}{\arrowsep}\marginpar{\hfill$\Rightarrow$}} | |
| \newcommand*{\hllab}[2]{% % labelled arrow | |
| \setlength{\marginparpush}{0pt}% | |
| \setlength{\marginparsep}{#1}% | |
| \marginpar{\hfill{\arrowfont #2}$\rightarrow$}} | |
| \newcommand*{\Hllab}[2]{% % labelled double arrow | |
| \setlength{\marginparpush}{0pt}% | |
| \setlength{\marginparsep}{#1}% | |
| \marginpar{\hfill{\arrowfont #2}$\Rightarrow$}} | |
| \newcommand*{\texthllab}[1]{% % labelled arrow in text | |
| {\arrowfont #1}$\rightarrow$} | |
| \newcommand*{\textHllab}[1]{% % labelled double arrow in text | |
| {\arrowfont #1}$\Rightarrow$} | |
| \newcommand*{\margmark}[1]{% | |
| \setlength{\marginparpush}{0pt}% arbitrary margin mark | |
| \setlength{\marginparsep}{\arrowsep}\marginpar{\hfill #1}} | |
| % to allow line numbering to be resumed | |
| \newcounter{endofconv} | |
| \newcommand{\convtocont}{\setcounter{endofconv}{\thelinenumber}} | |
| \newcommand{\convcont}{\linenumbers[\theendofconv]} | |
| % Old, deprecated commands - you shouldn't use these any more! | |
| \newcommand{\labhl}[1]{% | |
| \marginpar{\hspace*{\arrowsep}\arrowfont{#1}$\rightarrow$}} | |
| \newcommand{\textlabhl}[1]{{\arrowfont #1}$\rightarrow$} | |
| \newcommand*{\convturnnonum}[1]% unnumbered turns | |
| {\convfont\item[\hspace*{\convindent}#1]\nolinenumbers} | |
| % \newcommand{\convhl}{\marginpar{\hspace*{\arrowsep}$\rightarrow$}} | |
| % \newcommand{\labhl}[1]{% % lets you do labelled arrows e.g. A --> | |
| % \marginpar{\hspace*{\arrowsep}\arrowfont{#1}$\rightarrow$}} | |
| \endinput | |
| % End of file `convtran.sty'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %% convtran.tex | |
| %% Copyright 2016 Gareth Walker | |
| % | |
| % This work may be distributed and/or modified under the | |
| % conditions of the LaTeX Project Public License, either version 1.3 | |
| % of this license or (at your option) any later version. | |
| % The latest version of this license is in | |
| % http://www.latex-project.org/lppl.txt | |
| % and version 1.3 or later is part of all distributions of LaTeX | |
| % version 2005/12/01 or later. | |
| % | |
| % This work has the LPPL maintenance status `maintained'. | |
| % | |
| % The Current Maintainer of this work is Gareth Walker. | |
| % | |
| % This work consists of the files convtran.sty and convtran.tex. | |
| \documentclass[a4paper]{article} | |
| \usepackage[margin=2.5cm]{geometry} | |
| \setlength{\parskip}{1em} | |
| \setlength{\parindent}{0em} | |
| \usepackage{convtran} | |
| \begin{document} | |
| \title{convtran.sty} | |
| \author{Gareth Walker} | |
| \maketitle | |
| \section{Introduction} | |
| \verb!convtran.sty! is intended to simplify the presentation of | |
| transcriptions of conversation with \LaTeX. It does this primarily | |
| through a modified list environment, supplemented by a pallette of | |
| commands for the user to adjust the trancriptions according to the | |
| precise circumstances in which the package is being used. | |
| Caveat: this documentation is only intended to give an overview | |
| of the package, and outline its main features; see also the package | |
| itself for comments on the functions. | |
| \section{Some examples} | |
| \subsection{A simple example} | |
| \begin{convtran} | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran} | |
| \noindent The above example was created with this: | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran} | |
| \end{verbatim} | |
| \subsection{A more complicated example} | |
| \begin{convtran} | |
| \convturn{D:} O:h (I k-)= | |
| \convturn{A:} =Dz that make any sense to you? | |
| \convturn{C:} Mn mh. I don’ even know who she is. | |
| \convturn{A:} She’s that’s, the Sister Kerrida, [who, | |
| \convturn{D:} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[.hhh | |
| \convturn{D:} Oh [\underline{that’s} the one you to:ld [me you bought | |
| \convturn{C:} ~~~[Oh-~~~~~~~~~~~~~~~~~~~~~~[ | |
| \convturn{A:} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[\underline{Ye:h} | |
| \end{convtran} | |
| This is the code required: | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{D:} O:h (I k-)= | |
| \convturn{A:} =Dz that make any sense to you? | |
| \convturn{C:} Mn mh. I don’ even know who she is. | |
| \convturn{A:} She’s that’s, the Sister Kerrida, [who, | |
| \convturn{D:} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[.hhh | |
| \convturn{D:} Oh [\underline{that’s} the one you to:ld [me you bought | |
| \convturn{C:} ~~~[Oh-~~~~~~~~~~~~~~~~~~~~~~[ | |
| \convturn{A:} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[\underline{Ye:h} | |
| \end{convtran} | |
| \end{verbatim} | |
| Note that the overlapping talk has to be aligned manually using spaces | |
| (\verb!~!) or commands like \verb!\hspace{3em}!. | |
| \subsection{Numbered examples} | |
| You can use a package like \verb!gb4e! to provide numbered examples: | |
| \begin{verbatim} | |
| (...) | |
| \usepackage{gb4e} | |
| (...) | |
| \begin{exe} | |
| \ex An example | |
| \begin{convtran} | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran} | |
| \end{exe} | |
| \end{verbatim} | |
| \subsection{Line breaks} | |
| One major benefit of this package, being based on the \verb!list! | |
| environment, is that line breaking is handled automatically. So, the | |
| following has only two \verb!turn! commands: | |
| \begin{convtran} | |
| \convturn{Bob:} This is a test to see how long I should talk for to get | |
| onto the next line. Seems I have to talk for longer than I expected. | |
| \convturn{Jim:} This is also a test of the same thing, Bob my old | |
| mate. I'll continue for a bit longer, just to make sure. | |
| \end{convtran} | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{Bob:} This is a test to see how long I should talk for to get | |
| onto the next line. Seems I have to talk for longer than I expected. | |
| \convturn{Jim:} This is also a test of the same thing, Bob my old | |
| mate. I'll continue for a bit longer, just to make sure. | |
| \end{convtran} | |
| \end{verbatim} | |
| To insert line breaks manually try \verb!\\!: | |
| \begin{convtran} | |
| \convturn{Bob:} This is a test to see how long I should talk\\for to get | |
| onto the next line. Seems I have\\to talk for longer than I expected. | |
| \convturn{Jim:} This is also a test of the same thing,\\Bob my old | |
| mate. I'll continue for a bit\\ longer, just to make sure. | |
| \end{convtran} | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{Bob:} This is a test to see how long I should talk\\for to get | |
| onto the next line. Seems I have\\to talk for longer than I expected. | |
| \convturn{Jim:} This is also a test of the same thing,\\Bob my old | |
| mate. I'll continue for a bit\\ longer, just to make sure. | |
| \end{convtran} | |
| \end{verbatim} | |
| Manual line breaks can be useful when aligning talk in overlap. | |
| \section{Adjusting the typesetting} | |
| There are many aspects of the layout which might need fine-tuning in | |
| order to handle different page layouts, sizes, or even just personal | |
| preference as to the placement of elements. The elements are designed | |
| to be easily manipulated, and while the package defaults are intended | |
| to be reasonable, more often than not the user will have to specify | |
| aspects of the layout in the preamble. | |
| There are important dimensions which are adjustable, either on a | |
| case by case basis, or in the preamble: | |
| \begin{enumerate} | |
| \item placement of arrow, with \verb!\setarrowplace{length}! | |
| \item placement of line numbers, with \verb!\setlinenoplace{length}! | |
| \item font of main transcription, with \verb!\setconvfont{font}! | |
| \item font of labelled arrows with \verb!\setarrowfont{font}! | |
| \item font of gloss line, translation line, or information line with | |
| \verb!\setglosfont}!, \verb!\settranfont!, and \verb!\setinfofont! | |
| respectively | |
| \item amount speaker label is indented from the left with | |
| \verb!\setconvindent{length}! | |
| \item width of the speaker label with | |
| \verb!\setconvlabelwidth{length}! in the preamble, or a length in | |
| square brackets following \verb!\begin{convtran}! to change | |
| individual cases | |
| \end{enumerate} | |
| So if you wanted to adjust some of the parameters for all cases, you might | |
| have a preamble like this: | |
| \begin{verbatim} | |
| \usepackage{convtran} | |
| \setlinenoplace{1cm} | |
| \setarrowplace{0cm} | |
| \setconvindent{2cm} | |
| \setconvlabelwidth{3cm} | |
| \setconvrightmargin{1cm} | |
| \setconvfont{\sf} | |
| \setarrowfont{\tt} | |
| \end{verbatim} | |
| If you wanted to change some of the parameters for a smaller number of | |
| cases (and therefore didn't want to change the defaults for the entire | |
| document) you might do something like this, which adjusts the | |
| parameters only for that particular case. | |
| \begin{verbatim} | |
| \begin{convtran}[3cm] | |
| \setlinenoplace{1cm} | |
| \setarrowplace{0cm} | |
| \setconvindent{2cm} | |
| \setconvfont{\sf} | |
| \setarrowfont{\tt} | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. \hllab{2.8cm}{A} | |
| \end{convtran} | |
| \end{verbatim} | |
| Both produce this (which is ugly, but it shows the features): | |
| \begin{convtran}[3cm] | |
| \setlinenoplace{1cm} | |
| \setarrowplace{0cm} | |
| \setconvindent{2cm} | |
| \setconvfont{\sf} | |
| \setarrowfont{\tt} | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. \hllab{2.8cm}{A} | |
| \end{convtran} | |
| You should bear in mind that trial-and-error will almost certainly | |
| have to employed to successfully redefine these lengths for a good | |
| layout. For instance, you may find that some lengths require positive | |
| values while others require negative ones. To give a few clues, bear | |
| in mind that | |
| \begin{itemize} | |
| \item \verb!linenoplace! and \verb!convindent! are usually negative, | |
| and should be tenths of cm (if you are using cms for your lengths); | |
| \item \verb!setarrowplace! is usually a positive integer (whole number); | |
| \item the number in [ ] after \verb!\begin{convtran}! (is used) is | |
| usually positive but less than 1. | |
| \end{itemize} | |
| To adjust (increase) the right margin, use | |
| \verb!\setconvrightmargin{length}! in the preamble. | |
| Footnotes are also possible to some degree, by way of this kind of | |
| coding:\footnote{Note however that the same mechanism for highlighting | |
| lines (i.e. $\backslash$\texttt{marginpar}) doesn't seem to be possible; | |
| likewise, line numbers disappear. | |
| \begin{convtran}[2cm] | |
| \setconvindent{1cm} | |
| \convturn{Bob:} Hello Jim. | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran}} | |
| \begin{verbatim} | |
| \footnote{\begin{convtran}[2cm] | |
| \setconvindent{1cm} | |
| \convturn{Bob:} Hello Jim. | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran}} | |
| \end{verbatim} | |
| \section{Starting line numbering at values other than 1} | |
| If you want line numbering to start at something other than 1, use | |
| \verb!\linenumbers[xx]!. For instance, this | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \linenumbers[11] | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran} | |
| \end{verbatim} | |
| produces | |
| \begin{convtran} | |
| \linenumbers[11] | |
| \convturn{Bob:} Hello Jim. \hl | |
| \convturn{Jim:} Hello Bob. | |
| \end{convtran} | |
| If you want to continue numbering from where an earlier excerpt ended, | |
| use \verb!\convtocont! and \verb!\convcont!. This: | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{A:} hello | |
| \convturn{B:} hello | |
| \end{convtran}\convtocont | |
| Here is a continuation from where we left off: | |
| \begin{convtran}\convcont | |
| \convturn{A:} hello | |
| \convturn{B:} hello | |
| \end{convtran} | |
| \end{verbatim} | |
| produces this: | |
| \begin{convtran} | |
| \convturn{A:} hello | |
| \convturn{B:} hello | |
| \end{convtran}\convtocont | |
| Here is a continuation from where we left off: | |
| \begin{convtran}\convcont | |
| \convturn{A:} hello | |
| \convturn{B:} hello | |
| \end{convtran} | |
| Note that \verb!\convtocont! must go after \verb!\end{convtran}!: if | |
| you put it before, your next line numbers will start with the same | |
| number as the last line. You can even start again from where you left | |
| off later if you like by entering \verb!\convcont! at some later point. | |
| You can remember where you were up to in more than one excerpt by | |
| creating new counters and referring to those e.g. | |
| \begin{verbatim} | |
| \newcounter{endofconvTwo} | |
| \newcommand{\convtocontTwo}{\setcounter{endofconvTwo}{\thelinenumber}} | |
| \newcommand{\convcontTwo}{\linenumbers[\theendofconvTwo]} | |
| \end{verbatim} | |
| You can then use \verb!\convcontTwo! to recall the new counter, or | |
| \verb!\convcont! to recall the original one. | |
| \section{Other commands} | |
| A range of other commands are provided: | |
| \begin{description} | |
| \item{\verb!\convturn{label}{text}!} for numbered turns at talk | |
| \item{\verb!\convturn*{label}{text}!} for unnumbered turns at talk | |
| \item{\verb!\phon{label}{text}!} for unnumbered phonetic details | |
| \item{\verb!\info{label}{text}!} for unnumbered information | |
| \item{\verb!\glos{label}{text}!} for unnumbered gloss lines | |
| \item{\verb!\tran{label}{text}!} for unnumbered translation lines | |
| \end{description} | |
| Some symbols are also provided: | |
| \begin{description} | |
| \item{\verb!\high!} up arrow | |
| \item{\verb!\low!} down arrow | |
| \item{\verb!\q!} raised circle | |
| \item{\verb!\ul{text}!} underlining | |
| \item{\verb!\hl!} arrow in the margin | |
| \item{\verb!\Hl!} double arrow in the margin | |
| \item{\verb!\hllab{XX}{foo}!} labelled arrow in the margin, where | |
| \verb!XX! is however far you want to bump along the arrow in order | |
| to make space for the label, and \verb!foo! is the label | |
| \item{\verb!\Hllab{XX}{foo}!} as previous, but with a double arrow | |
| \item{\verb!\margmark{XX}!} arbitrary margin marks (XX in this case) | |
| \end{description} | |
| The package can be loaded with the options | |
| \verb![single/onehalf/double]! to adjust the line spacing. Default | |
| (i.e. where no option is loaded) is single. So, if you wanted double | |
| line spacing, in your preamble use \verb!\usepackage[double]{convtran}!. | |
| \section{Referring to figures} | |
| You might want to refer to figures, e.g. screenshots. For this use | |
| the \verb!\figlab! command. | |
| \begin{verbatim} | |
| \begin{convtran} | |
| \convturn{A:} one two three four | |
| \figlabs{} \figlab{1}~~~~~~~~~\figlab{2}~~~~~~~~ | |
| \figlab{3}~~~~~~\figlab{4}\vspace*{-5pt}% | |
| \convturn{B:} this is a test of some labels | |
| \end{convtran} | |
| \end{verbatim} | |
| produces | |
| \begin{convtran} | |
| \convturn{A:} one two three four | |
| \figlabs{} \figlab{1}~~~~~~~~~\figlab{2}~~~~~~~~ | |
| \figlab{3}~~~~~~\fraglab{4}\vspace*{-5pt}% | |
| \convturn{B:} this is a test of some labels | |
| \end{convtran} | |
| The \verb!\vspace*{-5pt}! command isn't essential, but it does put the | |
| arrow a bit closer to the text. Note that you can use the | |
| \verb!\ref{}! command inside \verb!\figlab! to refer to a figure. | |
| \section{Known problems} | |
| \begin{itemize} | |
| \item Using \verb![! at the start of a turn is fatal: use \verb!{[}! | |
| \item Using \verb!\hl!, \verb!\lab! \verb!\labhl!, \verb!\textlabhl! | |
| at the start of a turn (ie. before any text) is fatal | |
| \item The package uses \verb!\marginpar! to highlight lines with an | |
| arrow in the margin: this would cause problems for anyone using | |
| convtran in a document with \verb!\marginpar! used for other things | |
| e.g. users of \verb!classicthesis! and \verb!\todonotes!; if there | |
| are problems then the \verb!marginnote! package might help | |
| \item \verb!convtran! and \verb!rotating! clash as both define | |
| \verb!turn!. Try this as a workaround: | |
| \begin{verbatim} | |
| \usepackage{rotating} | |
| \let\convturn\relax | |
| \usepackage{convtran} | |
| \end{verbatim} | |
| \end{itemize} | |
| \section{Using it in minipage} | |
| \begin{minipage}{0.6\textwidth} | |
| \raggedleft | |
| \begin{convtran*} | |
| \convturnmini{U8} for me from where I stand its not that massive eehh panning you know | |
| \convturnmini{U7} eh no actually it should be stretched, shall we | |
| try em, we could stretch these [ end points | |
| \convturnmini{U8} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ yeah, eh ehm | |
| \figlabs{} ~~~~~~~~\figlab{a}\vspace*{-5pt}% | |
| \convturnmini{U8} yeah you stretch yours like your side, your end %((fig. )) | |
| \convturnmini{U7} okay | |
| \convturnmini{U8} I'll stretch this end okay | |
| \convturnmini{U7} okay that sounds good | |
| \end{convtran*} | |
| \end{minipage} | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment