diff --git a/COB.cls b/COB.cls new file mode 100644 index 0000000..a8e3cbe --- /dev/null +++ b/COB.cls @@ -0,0 +1,1538 @@ +\newcommand\classname{COB} +\newcommand\lastmodifieddate{2015/01/09} +\newcommand\versionnumber{0.1} + +\newif\if@cropmarkson \@cropmarksontrue + +\NeedsTeXFormat{LaTeX2e}[2000/06/01] +\ProvidesClass{\classname}[\lastmodifieddate\space (C) 2015 Techset Composition Pvt. Ltd.^^J^^J] + +\special{papersize=8.5in,11in} + +\setlength{\paperheight}{11in}% +\setlength{\paperwidth}{8.5in}% + +\newif\if@numberedref \@numberedreftrue +\newif\if@endproofbox \@endproofboxtrue +\newif\ifpreview +\newif\ifrevised +\newif\ifopenacc +\newif\ifnostrip +\newif\ifonecolumn\global\onecolumnfalse% +\newif\ifnote@end\note@endfalse +\newif\ifxipt +\newif\ifnumbib +\newif\if@Vruler% +\newif\ifDEV +\newif\ifJEB +\newif\ifJCS +\newif\ifDMM +\newif\ifBIO + + +\DeclareOption{DEV}{\DEVtrue} +\DeclareOption{JEB}{\JEBtrue} +\DeclareOption{JCS}{\JCStrue} +\DeclareOption{DMM}{\DMMtrue} +\DeclareOption{BIO}{\BIOtrue} +\DeclareOption{numbib}{\numbibtrue} +\DeclareOption{xipt}{\xipttrue} +\DeclareOption{openacc}{\openacctrue} +\DeclareOption{onecolumn}{\onecolumntrue} +\DeclareOption{preview}{\previewtrue} +\DeclareOption{revised}{\revisedtrue} +\DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}} +\DeclareOption{a3paper}{\PassOptionsToPackage{a3}{crop}} +\DeclareOption{centre}{\PassOptionsToPackage{center}{crop}} +\DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue} +\DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse} +\DeclareOption{info}{\PassOptionsToPackage{info}{crop}} +\DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}} +\DeclareOption{numbered}{\global\@numberedreftrue} +\DeclareOption{named}{\global\@numberedreffalse} +\DeclareOption{noproofbox}{\global\@endproofboxfalse} +\DeclareOption{proofbox}{\global\@endproofboxtrue} +\DeclareOption{courier}{\def\verbatim@font{\normalfont\ttfamily}} +\DeclareOption{times}{\def\verbatim@font{\normalfont\rmfamily}} +\DeclareOption{endnotes}{\ProvidesPackage{endnotes}\note@endtrue} + +\DeclareOption{vruler}{\global\@Vrulertrue} + +\ExecuteOptions{info,proofbox,twocolumn,twoside} + +\ProcessOptions + +%\LoadClass[twoside,twocolumn]{article} + +\RequirePackage[T1]{fontenc} +\RequirePackage{soul} +\RequirePackage{crop,graphicx,array,amsmath,amsthm,amssymb,amsfonts,endnotes} +\RequirePackage{upref} +\RequirePackage{upgreek} +\RequirePackage{color} +\RequirePackage{stfloats} + +\if@Vruler +\usepackage{vruler-cob} +\linenos +\else +\RequirePackage{TI-lineno-COB} +\fi% + +\usepackage{times} + +\usepackage[figuresright]{rotating} + + +% Not sure if needed. +\newcommand\@ptsize{0} + +% Set twoside printing +\@twosidetrue + +% Marginal notes are on the outside edge +\@mparswitchtrue + +% Default font sizes + +\ifxipt +\renewcommand\normalsize{% + \@setfontsize\normalsize{9.5\p@}{11\p@}% + \abovedisplayskip 10\p@ \@plus 3\p@ \@minus4\p@ + \abovedisplayshortskip 3\p@ \@plus 3\p@ \@minus1\p@ + \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus2\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\else +\renewcommand\normalsize{% + \@setfontsize\normalsize{9.5\p@}{11\p@}% + \abovedisplayskip 10\p@ \@plus 3\p@ \@minus4\p@ + \abovedisplayshortskip 3\p@ \@plus 3\p@ \@minus1\p@ + \belowdisplayshortskip 6\p@ \@plus 3\p@ \@minus2\p@ + \belowdisplayskip \abovedisplayskip + \let\@listi\@listI} +\fi +\normalsize +\let\@bls\baselineskip + +\newcommand\small{% + \@setfontsize\small{9\p@}{11\p@}% + \abovedisplayskip 6\p@ \@plus1\p@ \@minus1\p@ + \abovedisplayshortskip 3\p@ \@plus 2\p@ \@minus1\p@ + \belowdisplayshortskip 2\p@ \@plus 1\p@ \@minus1\p@ + \def\@listi{\leftmargin\leftmargini + \listparindent \parindent + \topsep 6\p@ \@plus2\p@ \@minus1\p@ + \parsep \z@ \itemsep \z@}% + \belowdisplayskip \abovedisplayskip} + +\newcommand\footnotesize{% + \@setfontsize\footnotesize{8\p@}{9\p@}% + \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ + \abovedisplayshortskip \z@ \@plus \p@ + \belowdisplayshortskip 1\p@ \@plus2\p@ \@minus2\p@ + \def\@listi{\leftmargin\leftmargini + \listparindent 1em + \topsep 5\p@ \@plus 2\p@ \@minus 1\p@ + \parsep \z@ \itemsep \z@}% + \belowdisplayskip \abovedisplayskip} + +\def\scriptsize{\@setfontsize\scriptsize{7\p@}{9\p@}} +\def\tiny{\@setfontsize\tiny{6\p@}{7\p@}} +\def\little{\@setfontsize\little{5\p@}{6\p@}} +\def\large{\@setfontsize\large{12\p@}{14\p@}} +\def\Large{\@setfontsize\Large{14\p@}{16\p@}} +\def\LARGE{\@setfontsize\LARGE{16\p@}{18\p@}} +\def\huge{\@setfontsize\huge{24\p@}{26\p@}} +\def\Huge{\@setfontsize\Huge{25\p@}{27\p@}} + +\gdef\rec#1{\gdef\@rec{#1}}\rec{} +\gdef\rev#1{\gdef\@rev{#1}}\rev{} +\gdef\acc#1{\gdef\@acc{#1}}\acc{} + + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} + + +% Line spacing +\setlength\lineskip{1\p@} +\setlength\normallineskip{1\p@} +\renewcommand\baselinestretch{} + +% Paragraph dimensions and inter-para spacing +\setlength\parskip{0\p@} +\setlength\parindent{4mm} + +% Set inter-para skips +\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@} +\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@} + +% Page break penalties +\@lowpenalty 51 +\@medpenalty 151 +\@highpenalty 301 + +% Disallow widows and orphans +\clubpenalty 10000 +\widowpenalty 10000 + +% Disable page breaks before equations, allow pagebreaks after +% equations and discourage widow lines before equations. +\displaywidowpenalty 100 +\predisplaypenalty 10000 +\postdisplaypenalty 2500 + +% Allow breaking the page in the middle of a paragraph +\interlinepenalty 0 + +% Disallow breaking the page after a hyphenated line +\brokenpenalty 10000 + +% Hyphenation; don't split words into less than three characters +\lefthyphenmin=3 +\righthyphenmin=3 + +% Set page layout dimensions +\setlength\headheight{6.3\p@} +\setlength\topmargin{3pc} +\addtolength\topmargin{0\p@} +\addtolength\topmargin{-1in} + +\setlength\topskip{8\p@} +\setlength\headsep{30\p@} +\addtolength\headsep{-\topskip} + +\setlength\footskip{26\p@} +\setlength\maxdepth{.5\topskip} + +\setlength\textwidth{43pc} + +\setlength\textheight{60\@bls} +\addtolength\textheight{\topskip} + +\setlength\marginparsep{6\p@} +\setlength\marginparpush{6\p@} +\setlength\marginparwidth{10pt} + +\setlength\oddsidemargin{4pc}% +\addtolength\oddsidemargin{-1in} +\setlength\@tempdima{\paperwidth} +\addtolength\@tempdima{-\textwidth} +\addtolength\@tempdima{-4pc} +\setlength\evensidemargin{\@tempdima} +\addtolength\evensidemargin{-1in} + +\setlength\columnsep{5mm} +\setlength\columnseprule{0\p@} + +% Footnotes +\setlength\footnotesep{0\p@} +\setlength{\skip\footins}{12\p@ \@plus 6\p@ \@minus 1\p@} + +% Float placement parameters + +\setcounter{totalnumber}{10} +% The maximum number of floats at the top and bottom of a page. +\setcounter{topnumber}{5} +\setcounter{bottomnumber}{5} + +% The maximum part of the top or bottom of a text page that can be +% occupied by floats. This is set so that at least four lines of text +% fit on the page. +\renewcommand\topfraction{.921} +\renewcommand\bottomfraction{.921} + +% The minimum amount of a text page that must be occupied by text. +% This should accomodate four lines of text. +\renewcommand\textfraction{.079} + +% The minimum amount of a float page that must be occupied by floats. +\renewcommand\floatpagefraction{.887} + +% The same parameters repeated for double column output +\renewcommand\dbltopfraction{.88} +\renewcommand\dblfloatpagefraction{.88} + +% Space between floats +\setlength\floatsep {18\p@ \@plus 2\p@ \@minus 2\p@} +% Space between floats and text +\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} +% Space above and below an inline figure +\setlength\intextsep {18\p@ \@plus 2\p@ \@minus 2\p@} + +% For double column floats +\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} +\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} + +% Space left at top, bottom and inbetween floats on a float page. +\setlength\@fptop{0\p@} % no space above float page figures +\setlength\@fpsep{12\p@ \@plus 2fil} +\setlength\@fpbot{0\p@ \@plus 1fil} + +% The same for double column +\setlength\@dblfptop{0\p@} +\setlength\@dblfpsep{12\p@ \@plus 1fil} +\setlength\@dblfpbot{0\p@ \@plus 2fil} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%% Article Identification %%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\@default@journal@title{Journal Title} +\let\@journal@title\@default@journal@title +\def\jname@info{} +\def\jabbr@info{} +\def\art-id@info{} +\def\month@info{Month~} +\def\year@info{\the\year} +\def\vol@info{00} +\def\price@info{00} +\def\issue@info{00} +\def\@print@issn{0000-0000} +\def\@price{0000-0000} + +\newcommand{\page@extent@info}{% + \thepage--\pageref{LastPage}} + +\newcommand{\totalpage}{% + \pageref{LastPage}} + +\newcommand{\issn@line}{\@print@issn} +\newcommand{\copyright@line}{\textcopyright\ \year@info\. Published by The Company of Biologists Ltd} +\gdef\doi@string{0000000000} + +% Article information user commands +\def\jname#1{\gdef\jname@info{#1}} +\def\jabbr#1{\gdef\jabbr@info{#1}} +\def\Year#1{\gdef\year@info{#1}} +\def\Vol#1{\gdef\vol@info{#1}} +\def\Price#1{\gdef\price@info{#1}} +\def\Issue#1{\gdef\issue@info{#1}} +\def\art-id#1{\gdef\art-id@info{#1}} +\def\Month#1{\gdef\month@info{#1}} +\newcommand\DOI[2][\@doi@fixed@field]{% + \gdef\@doi@variable@field{#1}% + \setDOI{#1}{#2}} +\newcommand{\setDOI}[2]{% + \gdef\doi@string{#1#2}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Firstpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\firstpage}[1]{% + \setcounter{page}{#1}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%% Page Styles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\ps@titlepage{% +\vspace*{-10pt} + \let\@evenfoot\relax + \def\@evenhead{\fontsize{7}{9}\selectfont \titlepageheadline} + \def\@oddhead{\hbox{\fontsize{7}{9}\selectfont \titlepageheadline}}% + \def\@oddfoot{\hfill{\fontsize{7}{9}\selectfont\thepage}}%\numfont + \def\authormark##1{\def\leftmark{##1}}% + \def\titlemark##1{\markboth{##1}{##1}}} + +\def\ps@headings{% + \def\@oddfoot{\hfill{\fontsize{7}{9}\selectfont\thepage}}%\numfont + \def\@evenfoot{\hfill{\fontsize{7}{9}\selectfont\thepage}}%\numfont + \def\@evenhead{\let\etal=\tetal\fontsize{7}{9}\selectfont{\vbox{\hbox to \textwidth{{\color{titcolor}{\fontfamily{\sfdefault}\fontshape{sc}\selectfont + \lowercase\@supertitle}}\hspace*{\fill}\jourinf}\vskip-2pt\hbox{\noindent\rule{\textwidth}{.5pt}}}}} + \def\@oddhead{\let\etal=\tetal\fontsize{7}{9}\selectfont{\vbox{\hbox to \textwidth{{\color{titcolor}{\fontfamily{\sfdefault}\fontshape{sc}\selectfont + \lowercase\@supertitle}}\hspace*{\fill}\jourinf}\vskip-2pt\hbox{\noindent\rule{\textwidth}{.5pt}}}}} + \def\authormark##1{\def\leftmark{##1}}% + \def\titlemark##1{\markboth{##1}{##1}}} + +\def\ps@myheadings{% + \def\@oddfoot{\hfill{\fontsize{9}{10}\selectfont\thepage}}% + \let\@evenfoot\@empty% + \def\@evenhead{\hfil}% + \def\@oddhead{\let\etal=\tetal\fontsize{9}{10}\selectfont\hfil{}\hfil\llap{\phantom{09}}}% + \def\authormark##1{\def\leftmark{##1}}% + \def\titlemark##1{\markboth{##1}{##1}}} + +\def\slinf{\hbox to \textwidth{Nova Techset Composition Pvt. Ltd.\hfill\artname \hfill Page\#:\quad \totalpage\hfill Printed:\ \today}} + +\def\cobcopyright{$\copyright$ \year@info. MANUSCRIPT SUBMITTED TO \MakeUppercase{\jname@info}\ (\year@info) \vol@info, \jabbr@info\art-id@info. doi:10.1242/\jabbr@info.\art-id@info} + +\newcommand{\titlepageheadline}{% + \vbox to 2\baselineskip{% + \hbox to \textwidth{% + \parbox{\textwidth}{% <- textwidth minus logo width + \fontfamily{\sfdefault}\fontsize{7}{11}\selectfont + {\cobcopyright\hfill \raisebox{-5pt}{\includegraphics{COB_Publisher_Logo}}\\[-3.5pt] + \noindent \rule{\textwidth}{.5pt}% +}}}}} + +\def\today{\number\day/\ifcase\month\or + 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or 10\or 11\or 12\fi/\number\year} + +% +% Sectional units +% + +% Counters +\newcounter{part} +\newcounter{section} +\newcounter{subsection}[section] +\newcounter{subsubsection}[subsection] +\newcounter{paragraph}[subsubsection] +\newcounter{subparagraph}[paragraph] +\newcounter{asection}[section] +\newcounter{refsection}[section] +\newcounter{appsection}[section] +\newcounter{appsubsection}[section] +\newcounter{figure} +\newcounter{scheme} +\newcounter{table} + +% Form of the numbers +\newcommand\thepage{\arabic{page}} +\renewcommand\thesection{\Roman{section}} +\renewcommand\thesubsection{{\Alph{subsection}}} +\renewcommand\thesubsubsection{{\arabic{subsubsection}}} +\renewcommand\theparagraph{\thesubsubsection.\arabic{paragraph}} +\renewcommand\thesubparagraph{\theparagraph.\arabic{subparagraph}} +\renewcommand\theequation{\arabic{equation}} + +% Form of the words +\newcommand\contentsname{Contents} +\newcommand\guestname{GUEST EDITORS} +\newcommand\listfigurename{List of Figures} +\newcommand\listtablename{List of Tables} +\newcommand\partname{Part} +\newcommand\appendixname{Appendix} +\newcommand\abstractname{ABSTRACT} +\newcommand\refname{References} +\newcommand\bibname{References} +\newcommand\normsname{Norms} +\newcommand\indexname{Index} +\newcommand\figurename{Fig.} +\newcommand\schemename{Scheme} +\newcommand\tablename{Table} + +% Clearemptydoublepage should really clear the running heads too +\newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}\cleardoublepage}} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Titling Macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Reset default command signatures + +\def\title{\@ifnextchar[{\@title@wst@}{\@title@nst@}} +\def\@title@wst@[#1]{\titlemark{\lowercase{{#1}}}\@title@assign@} +\def\@title@nst@#1{\titlemark{#1}\@title@assign@{#1}} +\def\@title@assign@#1{\def\@title{#1}} + +\def\author{\@ifnextchar[{\@author@wst@}{\@author@nst@}} +\def\@author@wst@[#1]{\authormark{{{#1}}}\@author@assign@} +\def\@author@nst@#1{\authormark{{{#1}}}\@author@assign@{#1}} +\def\@author@assign@#1{\gdef\@author{{#1}}\global\@author@providedtrue} + + +\def\and{\MakeLowercase{and}\space\ignorespaces} + +% Ifs for titling commands +\newif\if@supertitle@provided \@supertitle@providedfalse +\newif\if@specialissue@provided \@specialissue@providedfalse +\newif\if@guesteditor@provided \@guesteditor@providedfalse +\newif\if@subtitle@provided \@subtitle@providedfalse +\newif\if@author@provided \@author@providedfalse +\newif\if@date@provided \@date@providedfalse +\newif\if@dedi@provided \@dedi@providedfalse +\newif\if@classification@provided \@classification@providedfalse +%\newif\if@abstract@provided \@abstract@providedfalse %%5/7/2004 +%\newif\if@keywords@provided \@keywords@providedfalse + +\def\keywordsname{KEYWORDS} + +\def\date#1{\gdef\@date{#1}\global\@date@providedtrue} +\def\dedi#1{\def\@dedi{#1}\global\@dedi@providedtrue} +\def\keywords#1{{\if@Vruler\else\addtocounter{linenumber}{-1}\fi%% +\vskip7pt\noindent\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{8}{9}\selectfont\keywordsname: #1\par\vskip-5.5pt +\ifonecolumn\noindent\rule{\textwidth}{1pt}\else\noindent\rule{20.75pc}{1pt}\fi}}%\global\@keywords@providedtrue +\def\subtitle#1{\def\@subtitle{{#1}}\global\@subtitle@providedtrue} +\def\supertitle#1{\def\@supertitle{{\noindent #1}}\global\@supertitle@providedtrue} +\def\specialissue#1{\def\@specialissue{{\noindent SPECIAL ISSUE:~#1}}\global\@specialissue@providedtrue} +\def\guesteditor#1{\def\@guesteditor{{\noindent \guestname:~#1}}\global\@guesteditor@providedtrue} +\def\@abbreviations{} +\def\@classification{} +\newcommand\classification[2][Jel Classification]{% + \global\@classification@providedtrue + \gdef\@classification{{\leftskip=2pc\rightskip=2pc \noindent\textit{#1}:\enskip #2\par}}} + +%\newbox\@abstractbox +\newenvironment{abstract}{%\global\@abstract@providedtrue%%% 5/7/2004 +\if@Vruler\else\addtocounter{linenumber}{1}\fi %\global\setbox\@abstractbox + \vbox\bgroup\fontfamily{\sfdefault}\fontsize{9}{11}\fontshape{m}\selectfont\if@Vruler\else\internallinenumbers\fi +{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\selectfont\abstractname}\par +\vskip-6pt +\ifonecolumn\noindent\rule{\textwidth}{.5pt}\else\noindent\rule{20.75pc}{.5pt}\fi\par +% \leftskip8mm\rightskip8mm + \@afterindentfalse\@afterheading}{\par\egroup}% + +\def\@fnsymbol#1{\ifcase#1\or *\or \dagger\or \ddagger\or + \S\or \P\or \|\or **\or \dagger\dagger + \or \ddagger\ddagger \else\@ctrerr\fi} + +\mathchardef\Register="20AE% +\mathchardef\ter="099% +\def\titdagger{\hbox{$\dagger$}} +\def\titddagger{\hbox{$\ddagger$}} +\def\titS{\hbox{$\S$}} +\def\titP{\hbox{$\P$}} + +%% Reimplement Titling Layout +\newcommand\maketitle{\par + \begingroup +\renewcommand{\@fnsymbol}[1]{\ifcase##1\or \hbox{*}\or \titdagger\or \titddagger\or + \titS\or \titP\or \|\or \hbox{**}\or \titdagger\titdagger + \or \titddagger\titddagger \else\@ctrerr\fi} + \thispagestyle{titlepage} %% +%\linenumbers + \setcounter{footnote}{0} + \renewcommand\thefootnote{}% + \def\@makefnmark{\hbox{\rm\@thefnmark}}% + \long\def\@makefntext##1{%\noindent + {${\@thefnmark}$}{##1}}% + \global\@topnum\z@ % Prevents figures from going at top of page. +\ifonecolumn + \@maketitle + \else +\twocolumn[\@maketitle] +\fi + \@thanks + \endgroup + \@afterindentfalse + \@afterheading + \setcounter{footnote}{0}% + \global\let\thanks\relax + \global\let\maketitle\relax + \global\let\@maketitle\relax + \global\let\@thanks\@empty% +\if@Vruler\else\let\c@linenumber\c@runninglinenumber\addtocounter{linenumber}{-1}\linenumbers\fi} + +\def\@maketitle{\if@Vruler\else\internallinenumbers\fi% + \ifx\@journal@title\@default@journal@title + \ClassError{COB}{Journal Code not specified. Processing stopped.} + {The journal code is a required field. Your LaTeX file must contain\MessageBreak + \protect\journal{JJJJ}, where JJJJ is the four letter journal code.}% + \fi +\if@supertitle@provided% +\ifonecolumn\vspace*{-.1pt}\else\vspace*{15pt}\fi + {\color{titcolor}{\fontfamily{\sfdefault}\fontsize{10}{12}\fontseries{b}\fontshape{sc}\selectfont\lowercase\@supertitle\par% +\vspace*{2.5pt}}} + \else + \vskip10pt% + \fi +%%%%%%%%%% + \begingroup% + \vspace*{5pt} + {\fontfamily{\sfdefault}\noindent\fontsize{18}{22}\fontseries{m}\raggedright\selectfont% + {\@title}% + \par}% + \if@subtitle@provided% + \vspace{20\p@}% + {\raggedright\fontsize{14}{16}\fontseries{b}\raggedright\selectfont\itshape\MakeUppercase\@subtitle\par% + \vspace{23.5\p@}}% + \else% + \vspace{5\p@}% + \fi% + \begingroup% + \if@author@provided% + {{\fontfamily{\sfdefault}\noindent\fontsize{12}{14}\fontseries{b}\fontshape{n}\selectfont\mathversion{bold}\raggedright\@author}\par}% + \else% + \vspace{0\p@}% + \fi% + \endgroup% +\endgroup + \ifx\@address\empty\else + \thanks{{\noindent\ifonecolumn\protect\rule{\textwidth}{.5pt}\else\protect\rule{20.75pc}{.5pt}\fi\newline\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont\@address}}% + \fi% + \ifx\@corres\empty\else + \thanks{{\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont\@corres}\vskip1pc}% + \fi% +%%%%%%%%%%% +%%%%\if@abstract@provided% +%%%%\vspace*{20pt} +%%%% {\fontsize{9}{11}\selectfont\noindent\unvbox\@abstractbox\par}% +%%%% \else +%%%% \vspace{0\p@}% +%%%% \fi +%%%%\if@keywords@provided% +%%%% \vspace*{20pt} +%%%% {\parindent=0pt\fontsize{9}{11}\selectfont +%%%% \textbf{\keywordsname:}\enskip \@keywords\par}% +%%%% \vspace{4\p@}% +%%%%\else% +%%%% \vspace{0\p@}% +%%%%\fi% + \if@date@provided% + \vspace*{7.5pt}% + {{\thanks{\noindent\fontsize{8}{10}\fontseries{b}\fontshape{n}\selectfont \ifonecolumn\protect\rule{\textwidth}{.5pt}\else\protect\rule{20.75pc}{.5pt}\fi\newline\@date\ifx\@rec\empty\else Received \@rec;\ \fi \ifx\@rev\empty\else Revised \@rev\fi}}\par}% + \vspace{4.5\p@}%% + \else + \vspace{0\p@}% + \fi + \if@dedi@provided% + {\fontsize{8}{10}\fontseries{rm}\selectfont{\@dedi}\par + \vspace{18.25\p@}}% + \else + \vspace{0\p@}% + \fi + \if@classification@provided + {\leftskip\z@\parfillskip=\z@ plus1fill% + \fontsize{8}{9}\selectfont\@classification\par}% + \fi + \par + \vspace{1pc plus 4\p@ minus 2\p@}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Lastpage %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{lastpage} +%% Last page number - from lastpage.sty +%\def\lastpage@putlabel{\addtocounter{page}{-1}% +% \immediate\write\@auxout{\string +% \newlabel{LastPage}{{}{\thepage}}}% +% \addtocounter{page}{1}} +%\AtEndDocument{% +% \message{Setting LastPage}% +% \clearpage\lastpage@putlabel}% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\sodef\strack{}{0.185em}{0.75em}{0pt} +\sodef\runtrack{}{0.05em}{0.35em}{0pt} +\sodef\thmtrack{}{0.09em}{\z@}{\z@} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%% Sectioning macros %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Lowest level heading that takes a number by default +\setcounter{secnumdepth}{0} + +% Reset the default section macros to help with title casing +\def\@sect#1#2#3#4#5#6[#7]#8{% + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \refstepcounter{#1}% + \protected@edef\@svsec{\@seccntformat{{#1}}\relax}% + \fi + \@tempskipa #5\relax + \ifdim \@tempskipa>\z@ + \begingroup + #6{% + \noindent{\hskip #3\relax\@svsec}% + \interlinepenalty \@M +% Modified to uppercase H1's and titlecase the rest + \ifnum #2>1\relax + {#8}% + \else + \MakeUppercase{#8}% + \fi + \@@par}% + \endgroup + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}% + \else + \def\@svsechd{% + #6{\hskip #3\relax + \@svsec #8.\enspace }% + \csname #1mark\endcsname{#7}% + \addcontentsline{toc}{#1}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7}}% + \fi + \@xsect{#5}} + +\newcommand{\sectionfont}{\fontfamily{\sfdefault}\fontsize{8.5}{11}\selectfont\bfseries\raggedright} +% H1 + +\newcommand\section{\@startsection {section}{1}{\z@}% + {-12\p@ plus -3\p@ minus -3\p@}% + {0.0001\p@}% + {\sectionfont}} +% H2 +\def\subsection{% +\renewcommand{\@seccntformat}[1]{{{\csname the##1\endcsname)\enskip}}} + \@startsection{subsection}{2}{\z@} + {-10\p@ plus -1\p@ minus -2\p@}{5.5\p@} + {\fontfamily{\sfdefault}\fontsize{8.5}{11}\selectfont\bfseries\raggedright}} + + +% H3 +\def\subsubsection{% +\renewcommand{\@seccntformat}[1]{{{\csname the##1\endcsname)\enskip}}} + \@startsection{subsubsection}{3}{\z@} + {-9.5\p@ plus -1\p@ minus -2\p@}{0.5\p@} + {\fontfamily{\sfdefault}\fontsize{8.5}{11}\selectfont\raggedright}} + +\def\paragraph{% + \@startsection{paragraph}{4}{\z@} + {-11\p@ plus -1\p@}{0.5\p@} + {\fontsize{9.5}{11}\selectfont\itshape}} + + + % H5 + \def\subparagraph{% + \@startsection{subparagraph}{5}{\z@} + {-11\p@ plus -1\p@}{0\p@} + {\fontsize{9.5}{11}\selectfont\itshape}} + +\def\refsection{% + \@startsection{section}{1}{\z@} + {-12\p@ plus -3\p@ minus -3\p@}{0.0001\p@} + {\fontfamily{\sfdefault}\fontseries{b}\fontsize{8}{10}\selectfont}} + +\def\appsection{% + \@startsection{section}{1}{\z@} + {-24\p@ plus -2\p@ minus -1\p@}{0.0001pt} + {\fontsize{11.5}{13.5}\selectfont\bfseries}} + +\def\appsections{% + \@startsection{section}{1}{\z@} + {-24\p@ plus -2\p@ minus -1\p@}{14pt} + {\fontsize{11.5}{13.5}\selectfont\bfseries}} + +\def\appsubsection{% + \@startsection{section}{1}{\z@} + {-12\p@ plus -2\p@ minus -1\p@}{0.0001\p@} + {\fontsize{11.5}{13.5}\selectfont\itshape}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Footnotes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\renewcommand\footnoterule{\begingroup\leftskip\z@ +\noindent\vspace{0\p@}\endgroup} + +\def\footnotealign{\hskip12pt} + +\newcommand\@makefntext[1]{% +\fontsize{8}{9}\selectfont + \parindent 1em% + \noindent + %\@hangfrom + {\footnotealign\llap{\@makefnmark}}#1} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% From ifmtarg.sty +% Copyright Peter Wilson and Donald Arseneau, 2000 +\begingroup +\catcode`\Q=3 +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} +\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil} +\endgroup +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%% PostScript Rotation Macros %%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\if@rotate \@rotatefalse +\newif\if@rotatecenter \@rotatecenterfalse +\def\rotatecenter{\global\@rotatecentertrue} +\def\rotateendcenter{\global\@rotatecenterfalse} +\def\rotate{\global\@rotatetrue} +\def\endrotate{\global\@rotatefalse} +\newdimen\rotdimen +\def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate + #1 neg exch neg exch translate}} +\def\rotfinish{\special{ps: currentpoint grestore moveto}} +\def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1 + \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish} +\def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1 + \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1 + \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%% Figures and Tables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newlength{\abovecaptionskip} +\newlength{\belowcaptionskip} +\setlength{\abovecaptionskip}{6\p@} +\setlength{\belowcaptionskip}{2\p@} + +\newbox\figurecaptionbox +\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}\par% + \setbox\figurecaptionbox=\hbox{\fontfamily{\sfdefault}\fontsize{7.5}{9}\selectfont + {\bfseries#1}\enskip{#2}}% + \ifdim\wd\figurecaptionbox<\hsize +\centerline{\box\figurecaptionbox} + \else + \fontfamily{\sfdefault}\fontsize{7.5}{9}\selectfont + \unhbox\figurecaptionbox + \par + \fi} + +\newbox\schemecaptionbox +\long\def\@schemecaption#1#2{\vspace{\abovecaptionskip}\par% + \setbox\schemecaptionbox=\hbox{#1\enskip #2}% + \ifdim\wd\schemecaptionbox<\hsize +{\box\schemecaptionbox} + \else +\fontsize{8}{9}\selectfont + \unhbox\schemecaptionbox + \par + \fi} + +\newbox\tablecaptionbox +\long\def\@tablecaption#1#2{\par% +\setbox\tablecaptionbox=\hbox{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont + {\bfseries #1}\enskip {#2}} % + \ifdim\wd\tablecaptionbox<\hsize% +\centerline{\box\tablecaptionbox} +\vskip3pt + \else + \fontfamily{\sfdefault}\fontsize{8}{10}\selectfont + \centering{\unhbox\tablecaptionbox} +\vskip3pt + \par + \fi} + +\def\thefigure{\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{{\figurename} \thefigure.} +\def\figure{\@float{figure}} +\def\endfigure{\end@float} +\@namedef{figure*}{\@dblfloat{figure}} +\@namedef{endfigure*}{\end@dblfloat} + +\def\thescheme{\@arabic\c@scheme} +\def\fps@scheme{h} +\def\ftype@scheme{2} +\def\ext@scheme{los} +\def\fnum@scheme{\MakeUppercase{\schemename}~\thescheme.} +\def\scheme{\let\@makecaption\@schemecaption\@float{scheme}} +\def\endscheme{\end@float} +\@namedef{scheme*}{\let\@makecaption\@schemecaption\@dblfloat{scheme}} +\@namedef{endscheme*}{\end@dblfloat} + +\def\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{3} +\def\ext@table{lot} +\def\fnum@table{{\tablename}\enspace\thetable.} +\def\table{\let\@makecaption\@tablecaption\@float{table}} +\def\endtable{\end@float} +\@namedef{table*}{\let\@makecaption\@tablecaption\@dblfloat{table}} +\@namedef{endtable*}{\end@dblfloat} + +\newdimen\tempdime +\newbox\temptbox + +\newlength{\abovefigskip} +\newlength{\belowfigskip} +\setlength{\abovefigskip}{\z@} +\setlength{\belowfigskip}{\z@} + +\def\toprule{\noalign{\ifnum0=`}\fi + \hrule \@height 1\p@ + \hrule \@height 4\p@ \@width \z@ + \futurelet \@tempa\@xhline} + +\def\midrule{\noalign{\ifnum0=`}\fi + \hrule \@height 4.5\p@ \@width \z@ + \hrule \@height 0.5\p@ + \hrule \@height 5\p@ \@width\z@ + \futurelet \@tempa\@xhline} + +\def\botrule{\noalign{\ifnum0=`}\fi + \hrule \@height 4\p@ \@width \z@ + \hrule \@height 1\p@ + \futurelet \@tempa\@xhline} + +% Table and array parameters +\setlength\arraycolsep{.5em} +\setlength\tabcolsep{.5em} +\setlength\arrayrulewidth{.25pt} +\setlength\doublerulesep{2.5pt} +\renewcommand\arraystretch{1} + +\def\hrulefill{\leavevmode\leaders\hrule height .25pt\hfill\kern\z@} + +\newcolumntype{P}[1]{>{\raggedright\let\\\@arraycr\hangindent1em}p{#1}} + +\newenvironment{processtable}[3]{\setbox\temptbox=\hbox{{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont#2}}% +\tempdime\wd\temptbox\@processtable{#1}{#2}{#3}{\tempdime}}% +{\relax} + +\newenvironment{@processtable}[4]{% +\if!#1!% +\addtocounter{table}{-1}%%ADDED ON 21/12/05 +\def\fnum@table{}% +\else% +\def\fnum@table{{\tablename}\enspace\thetable.}% +\fi% +\if@rotate +\setbox4=\vbox to \textwidth{\vss\hbox to \textheight{% +\begin{minipage}{#4}% +\caption{#1}{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont#2}% +\@ifmtarg{#3}{}{\vskip7pt\noindent +\parbox{#4}{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont #3\par}}% +\end{minipage}}\vss} +\else +\setbox4=\hbox to \hsize{{\hss\begin{minipage}[t]{#4}% +\caption{#1}{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont#2} +\@ifmtarg{#3}{}{\vskip7pt\noindent +\parbox{#4}{\fontfamily{\sfdefault}\fontsize{8}{10}\selectfont #3\par}} +\end{minipage}\hss}} +\fi +\if@rotate\rotr{4}\else\box4\fi} +{\relax} + +\newcommand{\tabhead}[1]{\textbf{#1}}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Lists %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\labelenumi{({\rm\roman{enumi}})} +\def\theenumi{\arabic{enumi}} +\def\labelenumii{{\rm(\alph{enumii})}} +\def\theenumii{\alph{enumii}} +\def\p@enumii{\theenumi} +\def\labelenumiii{{\rm(\arabic{enumiii})}} +\def\theenumiii{\roman{enumiii}} +\def\p@enumiii{\theenumi(\theenumii)} +\def\labelenumiv{{\rm(\arabic{enumiv})}} +\def\theenumiv{\Alph{enumiv}} +\def\p@enumiv{\p@enumiii\theenumiii} +\def\labelitemi{$\bullet$} +\def\labelitemii{$\bullet$} +\def\labelitemiii{$\bullet$} +\def\labelitemiv{$\bullet$} + +\setlength{\leftmargini}{11pt} +\setlength{\leftmarginii}{15pt} +\setlength{\leftmarginiii}{\z@} +\setlength{\leftmarginiv}{\z@} + +\def\enumargs{% + \partopsep \z@ + \itemsep 0\p@ + \parsep \z@ + \leftmargin 0pt + \rightmargin \z@ + \labelsep -0.85em + \listparindent \z@ + \itemindent \z@} + +\def\enumerate{% + \@ifnextchar[{\@numerate}{\@numerate[(3)]}} + +\def\@numerate[#1]{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \list{\csname label\@enumctr\endcsname}{% + \enumargs + \setlength{\leftmargin}{\csname leftmargin\romannumeral\the\@listdepth\endcsname} + \usecounter{\@enumctr} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\llap{##1}}}% + \fi + } +\def\endenumerate{\endlist\advance \@listdepth -1} + + +\def\romenumargs{% + \partopsep \z@ + \itemsep 0\p@ + \parsep \z@ + \leftmargin 15.2pt + \rightmargin \z@ + \labelsep -1.2em + \listparindent \z@ + \itemindent \z@} + +\def\romenumerate{% + \@ifnextchar[{\@numerate}{\@romnumerate[(iii)]}} + +\def\@romnumerate[#1]{% + \ifnum \@enumdepth >3 \@toodeep\else + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \list{\csname label\@enumctr\endcsname}{% + \romenumargs + \setlength{\leftmarginii}{\csname leftmargin\romannumeral\the\@listdepth\endcsname} + \usecounter{\@enumctr} + \settowidth\labelwidth{#1} + \addtolength{\leftmargin}{\labelwidth} + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\llap{##1}}}% + \fi + } +\def\endromenumerate{\endlist\advance \@listdepth -1} + + +% Changes to the list parameters for itemize +\def\itemargs{% + \partopsep \z@ + \itemsep 0pt + \parsep \z@ + \rightmargin \z@ + \labelsep 0.5em + \listparindent \parindent + \itemindent \z@} + +\def\itemize{% + \@ifnextchar[{\@itemize}{\@itemize[$\bullet$]}} + +\def\@itemize[#1]{% + \ifnum \@itemdepth >3 \@toodeep\else + \advance\@itemdepth \@ne + \edef\@itemctr{item\romannumeral\the\@itemdepth} + \list{\csname label\@itemctr\endcsname}{% + \itemargs + \setlength{\leftmargin}{7.1pt} + \def\makelabel##1{\hss \llap{##1}}}% + \fi + } +\let\enditemize\endlist + +\setlength{\topsep}{6\p@}% \@plus 1\p@ \@minus 1\p@} +\setlength{\itemsep}{\z@} + +\def\@listI{\leftmargin\leftmargini\topsep6.5\p@ plus 4\p@} +\let\@listi\@listI +\@listi +\def\@listii{\leftmargin\leftmarginii\topsep\z@} +\def\@listiii{\leftmargin\leftmarginiii\topsep\z@} +\def\@listiv{\leftmargin\leftmarginiv\topsep\z@} +\def\@listv{\leftmargin\leftmarginv\topsep\z@} +\def\@listvi{\leftmargin\leftmarginvi\topsep\z@} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% unnumbered list %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newenvironment{description}{% + \begin{list}{}{% + \usecounter{enumi}% + \setlength{\itemsep}{\z@}% + \setlength{\labelwidth}{\z@}% + \setlength{\leftmargin}{1em}% + \setlength{\itemindent}{-1em}}}% +{\end{list}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Extracts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\quotation{\par\begin{list}{}{%\fontsize{9}{10}\selectfont% Extracts in small type + \setlength{\topsep}{\medskipamount}% + \setlength{\itemsep}{\z@}% + \setlength\labelwidth{\z@}% + \setlength\labelsep{\z@}% + \setlength\leftmargin{18pt}% + \setlength\rightmargin{18pt}% + \listparindent \parindent}% + \item[\vrule width\z@ height 9\p@]} +\def\endquotation{\end{list}} +\let\quote\quotation +\let\endquote\endquotation +\newcommand{\source}[1]{\par{\textit{Source}: {\rm #1}}} +\newcommand{\note}[1]{\par{\textit{Note}: {\rm #1}}} +\newcommand{\notess}[1]{\par{\textit{Notes}: {\rm #1}}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% programs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +{\obeyspaces\global\let =\ } + +\newskip\cmskipamount% +\cmskipamount=12pt plus 6pt minus 3pt% + +\def\cmskip{\removelastskip\vskip\cmskipamount} + +\long\def\bCM{\begingroup\parindent=0pt\cmskip\ttfamily% +\obeylines\obeyspaces}% + +\def\eCM{\cmskip\endgroup}% + +\long\def\tbCM{\begingroup\parindent=0pt\cmskip% +\obeylines\obeyspaces}% + +\def\teCM{\cmskip\endgroup}% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\renewcommand{\proofname}{\textit{Proof}} + +\renewcommand{\qedsymbol}{\ensuremath{\square}} +\renewenvironment{proof}[1][\proofname]{\par + \if@endproofbox\pushQED{\qed}\fi% + \normalfont + \topsep\bigskipamount + \labelsep=0.5em\relax + \trivlist + \item[\quad\hskip\labelsep + {#1}{\rm:}]\ignorespaces +}{% + \if@endproofbox\popQED\fi + \endtrivlist\@endpefalse +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Counter for saving the section numbering depth +\newcounter{savesecnumdepth} + +%%%%%%%%%%%%%%%%%%%%%%%%%% Acknowledgments %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand{\ackname}{\strack{ACKNOWLEDGEMENTS}} +\newcommand{\ack}[1][\ackname]{\normalsize\par% + \setcounter{savesecnumdepth}{\value{secnumdepth}}% + \setcounter{secnumdepth}{0}% + \section*{#1}% + \setcounter{secnumdepth}{\value{savesecnumdepth}}% +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\ifnote@end\let\footnote\endnote\fi% + +\renewcommand{\notesname}{\strack{Notes}} + +\newenvironment{notes}[1][Notes]{\par +\setcounter{secnumdepth}{0} +\section{\strack{#1}}% +}{\par} + +%%%%%%%%%%%%%%%%%%%%%%%%% Nomenclature %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\providecommand{\nomenname}{Nomenclature} +\newcommand{\nomen}[1][\nomenname]{% + \setcounter{savesecnumdepth}{\value{secnumdepth}}% + \setcounter{secnumdepth}{0}% + \refsection{#1}% +\vspace*{5pt} + \setcounter{secnumdepth}{\value{savesecnumdepth}}% +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newenvironment{thebibliography}[1]{% + \begingroup + \fontsize{7}{9}\selectfont + \setcounter{secnumdepth}{0} + \refsection*{\bibname}% + \begin{list}{[\arabic{enumi}]}{% + \usecounter{enumi}% + \setlength{\itemsep}{5pt} + \setlength\leftmargin{\z@}% + \setlength{\labelsep}{0.5em}%%chgd. 1em to 0.5em on 21/7/2004 -- devi + \settowidth{\labelwidth}{[#1]}% + \addtolength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}}}% +{\end{list}\endgroup} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%\usepackage{hyperref} +%%%\hypersetup{ +%%% colorlinks,% +%%% citecolor=blue,% +%%% filecolor=blue,% +%%% linkcolor=blue,% +%%% urlcolor=blue +%%%} + +\ifnumbib +\usepackage[sort&compress]{natbib} +\bibpunct{[}{]}{,}{n}{,}{;} + +\renewenvironment{thebibliography}[1]{% + \begingroup + \fontsize{7}{9}\selectfont + \setcounter{secnumdepth}{0} + \refsection*{\bibname}% + \begin{list}{[\arabic{enumi}]}{% + \usecounter{enumi}% + \setlength{\itemsep}{5pt} + \setlength\leftmargin{\z@}% + \setlength{\labelsep}{0.5em}%%chgd. 1em to 0.5em on 21/7/2004 -- devi + \settowidth{\labelwidth}{[#1]}% + \addtolength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}}}% +{\end{list}\endgroup} +\else +\usepackage[authoryear]{natbib} +\bibpunct[, ]{(}{)}{;}{a}{,}{;} +\renewenvironment{thebibliography}[1]{% + \begingroup + \fontsize{8}{10}\selectfont + \setcounter{savesecnumdepth}{\value{secnumdepth}}% + \setcounter{secnumdepth}{0} + \refsection{\bibname}% + \begin{list}{}{% + \usecounter{enumi}% + \setlength{\labelwidth}{0pt}% + \setlength{\leftmargin}{8pt}% + \setlength{\itemindent}{-8pt} + }}% +{\end{list}\setcounter{secnumdepth}{\value{savesecnumdepth}}% +\endgroup} +\fi + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\newskip\normskip +\setlength\normskip{6pt} + +\newenvironment{normes}{% + \begingroup + \footnotesize\parindent=0pt + \setcounter{secnumdepth}{0} + \vskip\normskip + {\fontsize{10}{12}\selectfont\bf\normsname}% + \begin{list}{}{% + \usecounter{enumi}% + \setlength{\itemsep}{\z@}% + \setlength{\labelwidth}{0pt}% + \setlength{\leftmargin}{2em}% + \setlength{\itemindent}{-2em}}}% +{\end{list}\endgroup} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Index %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\if@restonecol +\def\theindex{\@mainmatterfalse + \@restonecoltrue\if@twocolumn\@restonecolfalse\fi + \begingroup\parindent \z@ + \addcontentsline{toc}{section}{Index} + \columnseprule \z@ + \columnsep 1pc\section*{\indexname} %Subject or Author here + \parskip\z@ plus .3\p@\relax\let\item\idxitem\fontsize{8\p@}{10\p@}\selectfont} +\def\idxitem{\par\raggedright\hangindent 3em} +\def\subitem{\par\penalty1000\raggedright\hangindent 3em\hspace*{1em}} +\def\subsubitem{\par\penalty1000\raggedright\hangindent 3em\hspace*{2em}} +\def\endtheindex{\if@restonecol\endgroup\onecolumn\else\clearpage\fi} +\def\indexspace{\par \vskip 18\p@ plus 12\p@ minus 12\p@\relax} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%% Appendix %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newif\ifappend % Are we in the Appendix? +\def\appendix{\fontsize{11.5}{13.5}\selectfont\par + \setcounter{secnumdepth}{0} + \renewcommand{\thesection}{\Alph{section}} + \renewcommand{\@seccntformat}[1]{{\csname + the##1\endcsname}\quad} +\def\thetable{\thesection\@arabic\c@table} +\def\thefigure{\thesection\@arabic\c@figure} +\renewcommand\theequation{\thesection\arabic{equation}} + \setcounter{section}{0} + \setcounter{table}{0} + \setcounter{equation}{0} + \setcounter{subsection}{0} + \appendtrue} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Override settings in MathTime back to TeX defaults +\DeclareMathSizes{5} {5} {5} {5} +\DeclareMathSizes{6} {6} {5} {5} +\DeclareMathSizes{7} {7} {5} {5} +\DeclareMathSizes{8} {8} {6} {5} +\DeclareMathSizes{9} {9} {7} {5} +\DeclareMathSizes{10} {10} {7} {5} +\DeclareMathSizes{12} {12} {9} {7} + +%Math parameters +\setlength{\jot}{5\p@} +\skip\@mpfootins = \skip\footins +\fboxsep=6\p@ +\fboxrule=.25\p@ + +\medmuskip=4mu% plus 2mu minus 4mu +\thickmuskip=5mu% plus 5mu + +\vbadness=9999 +\tolerance=9999 +\doublehyphendemerits=10000 +\doublehyphendemerits 640000 +\finalhyphendemerits 1000000 + +\flushbottom +\frenchspacing +%\onecolumn +\pagestyle{headings} + +% Author queries +\fboxsep=4\p@ +\fboxrule=0.5\p@ + +\newcommand{\query}[2][0pt]{% + \marginpar{%\vspace*{#1}% + {\parbox{\marginparwidth}{% + \raggedright\small{\bf #2}}}}} + +\newcommand{\leftquery}[2][0pt]{% + \marginpar{%\vspace*{#1}% + {\parbox{\marginparwidth}{% + \raggedright\small{\hskip5pc\bf #2}}}}} + + +\newenvironment{queries}[1][9.99]{% + \begingroup + \thispagestyle{empty} + \advance\@enumdepth \@ne + \edef\@enumctr{enum\romannumeral\the\@enumdepth} + \def\labelenumi{\arabic{enumi})} + \def\labelenumii{\alph{enumii})} + \begin{list}{\csname label\@enumctr\endcsname}{%\small% + \setlength{\topsep}{12\p@}% + \setlength{\itemsep}{6\p@}% + \setlength{\leftmargin}{\z@}% + \settowidth{\labelwidth}{\bfseries#1}% + \setlength{\labelsep}{1.5em}% + \addtolength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep} + \def\makelabel##1{\hss\llap{{##1}}} + }} +{\end{list}\endgroup} + +% Short-form coding +\newcommand\tetal{{{\rm et~al.}}} +\newcommand\etal{\textit{et~al.}} +\newcommand\eg{\textit{e.g.}} +\newcommand\ie{\textit{i.e.}} +\let\endash\textendash + +\def\dbond{\raise0.18ex\hbox{$=$}} +\def\bond{\raise0.18ex\hbox{$-$}} + +\def\endash{--} +\def\emdash{\,--\,} +\def\sdot#1{{\buildrel{\scriptscriptstyle\bullet}\over{\hbox{$#1$}}}} +\def\ssdot#1{{\buildrel{\scriptscriptstyle\bullet\bullet}\over{\hbox{$#1$}}}} + +\def\refmsg{\noindent\hangindent=1em}% + +\def\z{\phantom} + +%%%For New Table + +\newcount\mscount +\def\multispan#1{\omit \mscount#1\relax + \loop\ifnum\mscount>\@ne \sp@n\repeat} +\def\sp@n{\span\omit\advance\mscount\m@ne} + +\hyphenation{Table} +\hyphenation{Figure} +\hyphenation{Section} +\hyphenation{equation} +\hyphenation{Theorem} +\hyphenation{Lemma} +\hyphenation{Algorithm} +\hyphenation{Definition} +\hyphenation{Corollary} +\hyphenation{Proof} +\hyphenation{Remark} + +\def\bcontinued{({\it continued\/})} +\def\tcontinued{Continued} + +\def\dd{{\rm d}} +\def\ee{{\rm e}} + +\newdimen\p@renwd + +\def\spbordermatrix#1{\begingroup \m@th + \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% + \ialign{$##$\hfil\kern2\p@\kern\p@renwd&\thinspace\hfil$##$\hfil + &&\quad\hfil$##$\hfil\crcr + \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}% + #1\crcr\omit\strut\cr}}% + \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{$\kern\wd\@ne\kern-\p@renwd\left[\kern-\wd\@ne + \global\setbox\@ne\vbox{\box\@ne\kern2\p@}% + \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\hskip-\bmskip\right]$}% + \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup} + + +\def\sqbordermatrix#1{\begingroup \m@th + \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% + \ialign{$##$\hfil\kern2\p@\kern\p@renwd&\thinspace\hfil$##$\hfil + &&\quad\hfil$##$\hfil\crcr + \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}% + #1\crcr\omit\strut\cr}}% + \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{$\kern\wd\@ne\kern-\p@renwd\left[\kern-\wd\@ne + \global\setbox\@ne\vbox{\box\@ne\kern2\p@}% + \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right]$}% + \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup} + +\def\llbordermatrix#1{\begingroup \m@th + \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% + \ialign{$##$\hfil\kern2\p@\kern\p@renwd&\thinspace\hfil$##$\hfil + &&\quad\hfil$##$\hfil\crcr + \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}% + #1\crcr\omit\strut\cr}}% + \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{$\kern\wd\@ne\kern-\p@renwd\left[\kern-\wd\@ne + \global\setbox\@ne\vbox{\box\@ne\kern2\p@}% + \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right.$}% + \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup} + +\def\lbordermatrix#1{\begingroup \m@th + \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% + \ialign{$##$\hfil\kern2\p@\kern\p@renwd&\thinspace\hfil$##$\hfil + &&\quad\hfil$##$\hfil\crcr + \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}% + #1\crcr\omit\strut\cr}}% + \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{$\left[\kern\wd\@ne\kern-\p@renwd\kern-\wd\@ne + \global\setbox\@ne\vbox{\box\@ne\kern2\p@}% + \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right.$}% + \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup} + +\newdimen\bmskip +\bmskip=0pt + +\def\rbordermatrix#1{\begingroup \m@th + \setbox\z@\vbox{\def\cr{\crcr\noalign{\kern2\p@\global\let\cr\endline}}% + \ialign{\hfil$##$\hfil\kern6\p@\kern\p@renwd&\thinspace\hfil$##$\hfil + &&\quad\hfil$##$\hfil\crcr + \omit\strut\hfil\crcr\noalign{\kern-\baselineskip}% + #1\crcr\omit\strut\cr}}% + \setbox\tw@\vbox{\unvcopy\z@\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{\unhbox\@ne\unskip\global\setbox\@ne\lastbox}% + \setbox\tw@\hbox{$\left.\kern\wd\@ne\kern-\p@renwd\kern-\wd\@ne + \global\setbox\@ne\vbox{\box\@ne\kern2\p@} + \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\hskip-\bmskip\right]$}% + \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup} + +\chardef\permil="89% + +\usepackage{textcomp} +\let\euro\texteuro + +\newcommand{\address}[1]{\gdef\@address{#1}}\gdef\@address{}% +\newcommand{\corres}[1]{\gdef\@corres{{Authors for correspondence:} #1}}\gdef\@corres{}% + +\def\name#1{#1\newline} +\def\affil#1{{\textsuperscript{#1}}} + +\def\add#1#2{{\textsuperscript{#1}}{#2\newline}} +\def\ladd#1#2{{\textsuperscript{#1}}{#2}\vspace*{1.5pt}} +\def\fadd#1#2{{\textsuperscript{#1}}{#2}} +\def\email#1{#1} + +\newcommand\emailrule[1]{Email: #1\par\noindent\protect\rule{82.5mm}{.5pt}} + +\usepackage[splitrule]{footmisc} + +\definecolor{mag}{cmyk}{0,.36,0,0} +\definecolor{titcolor}{cmyk}{0.75,0,0.05,0} + +\usepackage{marginnote} + +\definecolor{mag}{cmyk}{0,.36,0,0} +\def\surname#1{\fboxsep=1pt\colorbox{mag}{#1}}% + +\def\runetal{\hbox{\fontsize{6.5}{9}\selectfont\it E\kern0.35pt T\ A\kern0.35pt L.}} + +\newcommand{\aubio}[1]{\vspace{1\baselineskip}{\noindent #1}} + +\def\@journal@title{{\it COB} (\year@info), page~\thepage\ of \pageref{LastPage}\ $\copyright$\ The Authors, \year@info} + +\def\@print@issn{0269-9648/11} +\def\@doi@fixed@field{10.1242/\jabbr@info.} +\def\@doi@variable@field{00000000000000000000} +\def\jourinf{\jname@info\ (\year@info) \vol@info, \jabbr@info\art-id@info. doi:10.1242/\jabbr@info.\art-id@info} + +\renewcommand{\copyright@line}{\textcopyright\ The Authors \year@info} + +\def\ack#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Acknowledgements}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} +\def\competing#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Competing interests}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} +\def\contribution#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Contribution}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} +\def\funding#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Funding}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} +\def\data#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Data availability}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} +\def\supplementary#1{{\vskip7.5pt\noindent{\fontfamily{\sfdefault}\fontseries{b}\fontshape{n}\fontsize{7.5}{9}\selectfont Supplementary}\par\noindent\fontfamily{\sfdefault}\fontsize{7}{9}\selectfont#1}} + +\usepackage{url} +\urlstyle{rm} +\def\TCH#1{\textbf{#1}} +\art-id{xxxxxx} +\Year{2019} + +\usepackage{subfig} + +\makeatletter +\newbox\figurecaptionbox +\long\def\@makecaption#1#2{\vspace{\abovecaptionskip}\par% + \setbox\figurecaptionbox=\hbox{\fontfamily{\sfdefault}\fontsize{7.5}{9}\selectfont + {\bfseries#1}\enskip{#2}}% + \ifdim\wd\figurecaptionbox<\hsize +\centerline{\fontfamily{\sfdefault}\box\figurecaptionbox} + \else + \fontsize{7.5}{9}\selectfont + \unhbox\figurecaptionbox + \par + \fi} +\makeatother + +\ifDEV +\jname{Development} +\jabbr{dev} +\else +\ifJEB +\jname{Journal of Experimental Biology} +\jabbr{jeb} +\else +\ifJCS +\jname{Journal of Cell Science} +\jabbr{jcs} +\else +\ifDMM +\jname{Disease Models \& Mechanisms} +\jabbr{dmm} +\else +\ifBIO +\jname{Biology Open} +\jabbr{bio} +\else +\ClassError{PLEASE INSERT THE RESPECTIVE JOURNAL OPTION} +\fi +\fi +\fi +\fi +\fi + +\ifDEV +\def\JNAME{Development} +\def\JABBR{DEV} +\else +\ifJEB +\def\JNAME{Journal of Experimental Biology} +\def\JABBR{JEB} +\else +\ifJCS +\def\JNAME{Journal of Cell Science} +\def\JABBR{JCS} +\else +\ifDMM +\def\JNAME{Disease Models \& Mechanisms} +\def\JABBR{DMM} +\else +\ifBIO +\def\JNAME{Biology Open} +\def\JABBR{BIO} +\fi +\fi +\fi +\fi +\fi + + +\endinput diff --git a/COB_Publisher_Logo.eps b/COB_Publisher_Logo.eps new file mode 100644 index 0000000..22defc7 Binary files /dev/null and b/COB_Publisher_Logo.eps differ diff --git a/COB_Publisher_Logo.pdf b/COB_Publisher_Logo.pdf new file mode 100644 index 0000000..f10fd78 Binary files /dev/null and b/COB_Publisher_Logo.pdf differ diff --git a/Linenumber_Sample.pdf b/Linenumber_Sample.pdf new file mode 100644 index 0000000..f1af38b Binary files /dev/null and b/Linenumber_Sample.pdf differ diff --git a/SIunits.sty b/SIunits.sty new file mode 100644 index 0000000..464e83c --- /dev/null +++ b/SIunits.sty @@ -0,0 +1,580 @@ +%% +%% This is file `SIunits.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% SIunits.dtx (with options: `package') +%% +%% Copyright (c) 1998-2002 Marcel Heldoorn . +%% +%% This program 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.3a or later is part of all distributions of LaTeX version 2003/12/01 or later. +%% +%% For error reports in case of UNCHANGED versions see the readme.txt file. +%% +%% Please do not request updates from me directly. Distribution is done through the +%% Comprehensive TeX Archive Network (CTAN). +%% +\def\SIunits@RCS$#1: #2 #3${#2} +\def\filename{SIunits.dtx}%Source File Name +\xdef\fileversion{\SIunits@RCS$Revision: 1.36 $}%Revision generated by CS-RCS +\xdef\filedate{\SIunits@RCS$Date: 2007/12/02 12:00:00 $}%Date generated by CS-RCS +\let\docversion=\fileversion +\let\docdate=\filedate +\NeedsTeXFormat{LaTeX2e}[1997/12/01] +\ProvidesPackage{SIunits} + [\filedate\space v\fileversion\space + Support for the International System of units (MH)] + \def\packagemessage{} +\typeout{\packagemessage} +\newif\if@redefsquare\@redefsquarefalse +\newif\if@defsquaren\@defsquarenfalse +\newif\if@redefGray\@redefGrayfalse +\newif\if@defGray\@defGrayfalse +\newif\if@textstyle\@textstylefalse +\newif\if@optionbinary\@optionbinaryfalse +\newif\if@optionNoAMS\@optionNoAMSfalse +\newif\if@inunitcommand\@inunitcommandfalse +\newlength{\@qskwidth} +\newif\if@defitalian\@defitalianfalse +\DeclareRobustCommand\SI@fstyle[1]{\mathrm{#1}} +\DeclareTextSymbolDefault{\SImu}{TS1} +\DeclareTextSymbol{\SImu}{TS1}{181} % micro sign +\DeclareFontEncoding{TS1}{}{} +\DeclareFontSubstitution{TS1}{cmr}{m}{n} +\DeclareFontFamily{OML}{eur}{\skewchar\font127} \DeclareFontShape{OML}{eur}{m}{n}{<5> <6> + <7> <8> <9> gen * eurm <10><10.95><12><14.4><17.28><20.74><24.88>eurm10}{} +\DeclareSymbolFont{greek}{OML}{eur}{m}{n} +\DeclareMathSymbol{\upmu}{\mathord}{greek}{"16} +\newcommand*\SIunits[1][thickspace,thickqspace]{\@for\SIunits@@:=#1% + \do{\SIunits@execopt\SIunits@@}} +\newcommand*\SIunits@execopt[1]{\@ifundefined{SIunits@opt@#1}% + {\PackageWarning{SIunits}{Requested option `#1' not provided}}% + {\@nameuse{SIunits@opt@#1}}} +\newcommand*\SIunits@opt@thickspace{% + \@thickspace{runtime option `thickspace' provided!}} +\newcommand*\SIunits@opt@mediumspace{% + \@mediumspace{runtime option `mediumspace' provided!}} +\newcommand*\SIunits@opt@thinspace{% + \@thinspace{runtime option `thinspace' provided!}} +\newcommand*\SIunits@opt@cdot{% + \@cdot{runtime option `cdot' provided!}} +\newcommand*\SIunits@opt@thickqspace{% + \@thickqspace{runtime option `thickqspace' provided!}} +\newcommand*\SIunits@opt@mediumqspace{% + \@mediumqspace{runtime option `mediumqspace' provided!}} +\newcommand*\SIunits@opt@thinqspace{% + \@thinqspace{runtime option `thinqspace' provided!}} +\DeclareRobustCommand{\@text}{% + \ifmmode\expandafter\@text@\else\expandafter\mbox\fi} +\let\nfss@text\@text% +\def\@text@#1{\mathchoice% + {\textdef@\displaystyle\f@size{#1}}% + {\textdef@\textstyle\tf@size{\firstchoice@false #1}}% + {\textdef@\textstyle\sf@size{\firstchoice@false #1}}% + {\textdef@\textstyle\ssf@size{\firstchoice@false #1}}% + \check@mathfonts}% +\def\textdef@#1#2#3{\hbox{{% + \everymath{#1}% + \let\f@size#2\selectfont% + #3}}}% +\newif\iffirstchoice@% +\firstchoice@true% +\def\stepcounter#1{% + \iffirstchoice@% + \addtocounter{#1}\@ne% + \begingroup \let\@elt\@stpelt \csname cl@#1\endcsname \endgroup + \fi% +}% +\DeclareRobustCommand*{\meter}{\metre} +\DeclareRobustCommand*{\deka}{\deca} +\DeclareRobustCommand*{\dekad}{\decad} +\DeclareRobustCommand*{\NoAMS}{\addprefix{\micro}{\mbox{\SImu}}} +\DeclareRobustCommand{\addunit}[2]{\newcommand{#1}{\ensuremath{\SI@fstyle{#2}}}} +\DeclareRobustCommand{\addprefix}[2]{\newcommand{#1}{\ensuremath{\SI@fstyle{#2}}}} +\DeclareRobustCommand*{\unitskip}[1]{\renewcommand{\usk}{\ensuremath{#1}}} +\DeclareRobustCommand*{\quantityskip}[1]{\renewcommand{\@qsk}{\ensuremath{#1}}} +\DeclareRobustCommand*{\per}{\ensuremath{\SI@fstyle{/}}} +\DeclareRobustCommand*{\usk}{\ensuremath{\;}} +\DeclareRobustCommand*{\@qsk}{\ensuremath{\;}} +\renewcommand{\cdot}{\,\mbox{\textperiodcentered}\,} +\newcommand{\@cdot}[1]{\DeclareRobustCommand*{\usk}{\ensuremath{\cdot}}\typeout{#1}} +\newcommand{\@thickspace}[1]{\DeclareRobustCommand*{\usk}{\ensuremath{\;}}\typeout{#1}} +\newcommand{\@mediumspace}[1]{\DeclareRobustCommand*{\usk}{\ensuremath{\:}}\typeout{#1}} +\newcommand{\@thinspace}[1]{\DeclareRobustCommand*{\usk}{\ensuremath{\,}}\typeout{#1}} +\newcommand{\@thickqspace}[1]{\DeclareRobustCommand*{\@qsk}{\ensuremath{\;}}\typeout{#1}} +\newcommand{\@mediumqspace}[1]{\DeclareRobustCommand*{\@qsk}{\ensuremath{\:}}\typeout{#1}} +\newcommand{\@thinqspace}[1]{\DeclareRobustCommand*{\@qsk}{\ensuremath{\,}}\typeout{#1}} +{\catcode`\.=13\gdef.{\usk}} +\newcommand{\period@active}[1]{\begingroup\mathcode`\.="8000\ensuremath{#1}\endgroup} +\DeclareRobustCommand{\unit}[2]{\@inunitcommandtrue% + \ensuremath{\SI@fstyle{#1\@qsk\period@active{#2}}}% + \@inunitcommandfalse} +\DeclareRobustCommand{\one}{\settowidth{\@qskwidth}{\@qsk}\hspace*{-\@qskwidth}} +\DeclareRobustCommand{\no@qsk}{% + \if@inunitcommand% + \one% + \else% + \relax% + \fi% +} +\DeclareRobustCommand{\power}[2]{\ensuremath{\SI@fstyle{#1}^{\SI@fstyle{#2}}}} +\AtBeginDocument{% + \if@redefsquare + \providecommand{\square}[1]{\power{#1}{2}} + \renewcommand{\square}[1]{\power{#1}{2}} + \typeout{Option `amssymb' provided! ^^J + Command \protect\square\space redefined by SIunits package!} + \typeout{} + \else + \if@defsquaren + \providecommand{\squaren}[1]{\power{#1}{2}} + \renewcommand{\squaren}[1]{\power{#1}{2}} + \typeout{Option `squaren' provided! ^^J + Command \protect\squaren\space defined by SIunits package!} + \typeout{} + \else + \@ifundefined{square}{% + \newcommand*{\square}[1]{\power{#1}{2}} + }{% + \PackageError{SIunits}{% + The command \protect\square\space was already defined.\MessageBreak + Possibly due to the amssymb package}% + {Hint: use option `amssymb' or `squaren' with SIunits package.\MessageBreak + See SIunits.dvi or readme.txt section: Known problems and limitations.} + } %\ifundefined{square} + \fi %\if@defsquaren + \fi %\if@redefsquare + \if@defitalian + \PackageWarning{SIunits}{Option `italian' provided.\MessageBreak + Command \protect\unit\space defined by babel.\MessageBreak + Mind to use \protect\unita\space instead.}% + \DeclareRobustCommand{\unita}[2]{% + \@inunitcommandtrue% + \ensuremath{\SI@fstyle{#1\@qsk\period@active{#2}}}% + \@inunitcommandfalse% + }% + \fi%\if@defitalian +} %\AtBeginDocument +\DeclareRobustCommand{\SI@square}[1] + {\if@defsquaren% + \squaren{#1}% + \else + \square{#1}% + \fi %\if@defsquaren + } +\DeclareRobustCommand*{\squared}{\ensuremath{^{\SI@fstyle{2}}}} +\DeclareRobustCommand*{\cubic}[1]{\power{#1}{3}} +\DeclareRobustCommand*{\cubed}{\ensuremath{^{\SI@fstyle{3}}}} +\DeclareRobustCommand*{\fourth}[1]{\power{#1}{4}} +\RequirePackage{amstext} +\DeclareRobustCommand*{\SIminus}{% + \let\SI@tempa\relax + \ifmmode + \edef\SI@tempb{bold}% + \ifx\math@version\SI@tempb + \let\SI@tempa\boldmath% + \fi + \else + \if b\expandafter\@car\f@series\@nil + \let\SI@tempa\bfseries% + \fi + \fi + \text{\SI@tempa$-$}% +} +\DeclareRobustCommand*{\reciprocal}[1]{\power{#1}{\SIminus1}} +\DeclareRobustCommand*{\rp}{\reciprocal} +\DeclareRobustCommand*{\rpsquare}[1]{\power{#1}{\SIminus2}} +\DeclareRobustCommand*{\rpsquared}{\ensuremath{^{\SI@fstyle{\SIminus2}}}} +\DeclareRobustCommand*{\rpcubic}[1]{\power{#1}{\SIminus3}} +\DeclareRobustCommand*{\rpcubed}{\ensuremath{^{\SI@fstyle{\SIminus3}}}} +\DeclareRobustCommand*{\rpfourth}[1]{\power{#1}{\SIminus4}} +\addprefix{\yocto}{y} +\addprefix{\zepto}{z} +\addprefix{\atto}{a} +\addprefix{\femto}{f} +\addprefix{\pico}{p} +\addprefix{\nano}{n} +\AtBeginDocument{% +\if@optionNoAMS% + \addprefix{\micro}{\mbox{\SImu}}% +\else% + \addprefix{\micro}{\upmu}% + \fi% +\if@textstyle% + \DeclareRobustCommand{\micro}{{\ensuremath{\@text{\SImu}}}}% +\fi} +\addprefix{\milli}{m} +\addprefix{\centi}{c} +\addprefix{\deci}{d} +\addprefix{\deca}{da} +\addprefix{\hecto}{h} +\addprefix{\kilo}{k} +\addprefix{\mega}{M} +\addprefix{\giga}{G} +\addprefix{\tera}{T} +\addprefix{\peta}{P} +\addprefix{\exa}{E} +\addprefix{\zetta}{Z} +\addprefix{\yotta}{Y} +\DeclareRobustCommand*{\yoctod}{\power{10}{-24}} +\DeclareRobustCommand*{\zeptod}{\power{10}{-21}} +\DeclareRobustCommand*{\attod}{\power{10}{-18}} +\DeclareRobustCommand*{\femtod}{\power{10}{-15}} +\DeclareRobustCommand*{\picod}{\power{10}{-12}} +\DeclareRobustCommand*{\nanod}{\power{10}{-9}} +\DeclareRobustCommand*{\microd}{\power{10}{-6}} +\DeclareRobustCommand*{\millid}{\power{10}{-3}} +\DeclareRobustCommand*{\centid}{\power{10}{-2}} +\DeclareRobustCommand*{\decid}{\power{10}{-1}} +\DeclareRobustCommand*{\decad}{\power{10}{1}} +\DeclareRobustCommand*{\hectod}{\power{10}{2}} +\DeclareRobustCommand*{\kilod}{\power{10}{3}} +\DeclareRobustCommand*{\megad}{\power{10}{6}} +\DeclareRobustCommand*{\gigad}{\power{10}{9}} +\DeclareRobustCommand*{\terad}{\power{10}{12}} +\DeclareRobustCommand*{\petad}{\power{10}{15}} +\DeclareRobustCommand*{\exad}{\power{10}{18}} +\DeclareRobustCommand*{\zettad}{\power{10}{21}} +\DeclareRobustCommand*{\yottad}{\power{10}{24}} +\addunit{\gram}{g} +\addunit{\metre}{m} +\addunit{\kilogram}{\kilo\gram} +\addunit{\second}{s} +\addunit{\ampere}{A} +\addunit{\kelvin}{K} +\addunit{\mole}{mol} +\addunit{\candela}{cd} +\addunit{\radian}{rad} +\addunit{\steradian}{sr} +\addunit{\hertz}{Hz} +\addunit{\newton}{N} +\addunit{\pascal}{Pa} +\addunit{\joule}{J} +\addunit{\watt}{W} +\addunit{\coulomb}{C} +\addunit{\volt}{V} +\addunit{\farad}{F} +\addunit{\ohm}{\ensuremath{\Omega}} +\addunit{\siemens}{S} +\addunit{\weber}{Wb} +\addunit{\tesla}{T} +\addunit{\henry}{H} +\newcommand{\degreecelsius}{\protect\@inunitcommandfalse\ensuremath{\SI@fstyle{\degree\Celsius}}} +\addunit{\celsius}{\degreecelsius} +\addunit{\lumen}{lm} +\addunit{\lux}{lx} +\addunit{\becquerel}{Bq} +\AtBeginDocument{% +\if@redefGray + \providecommand{\gray}{\ensuremath{\SI@fstyle{Gy}}} + \renewcommand{\gray}{\ensuremath{\SI@fstyle{Gy}}} + \typeout{Option `pstricks' provided! ^^J + Command \protect\gray\space redefined by SIunits package!} + \typeout{} + \else + \if@defGray + \providecommand{\Gray}{\ensuremath{\SI@fstyle{Gy}}} + \renewcommand{\Gray}{\ensuremath{\SI@fstyle{Gy}}} + \typeout{Option `Gray' provided! ^^J + Command \protect\Gray\space defined by SIunits package!} + \typeout{} + \else + \@ifundefined{gray}{% + \newcommand*{\gray}{\ensuremath{\SI@fstyle{Gy}}} + }{% + \PackageWarningNoLine{SIunits}{% + The command \protect\gray\space was already defined.\MessageBreak + Possibly due to the pstricks package} + \typeout{Hint: use option `pstricks' or `Gray' with SIunits package.} + \typeout{See SIunits.dvi or readme.txt section: Known problems and limitations.} + \typeout{} + } %\ifundefined{gray} + \fi %\if@defGray + \fi %\if@redefGray +} %\AtBeginDocument +\addunit{\sievert}{Sv} +\addunit{\katal}{kat} + +\newcommand*\SIunits@opt@derivedinbase{% +\typeout{Option 'derivedinbase' provided!^^J} +\addunit{\radianbase}% + {\metre\usk\reciprocal\metre} +\addunit{\steradianbase}% + {\squaremetre\usk\rpsquare\metre} +\addunit{\hertzbase}% + {\reciprocal\second} +\addunit{\newtonbase}% + {\metre\usk\kilogram\usk\second\rpsquared} +\addunit{\pascalbase}% + {\reciprocal\metre\usk\kilogram\usk\second\rpsquared} +\addunit{\joulebase}% + {\squaremetre\usk\kilogram\usk\second\rpsquared} +\addunit{\wattbase}% + {\squaremetre\usk\kilogram\usk\rpcubic\second} +\addunit{\coulombbase}% + {\ampere\usk\second} +\addunit{\voltbase}% + {\squaremetre\usk\kilogram\usk\rpcubic\second\usk\reciprocal\ampere} +\addunit{\faradbase}% + {\rpsquare\metre\usk\reciprocal\kilogram\usk\fourth\second\usk\ampere\squared} +\addunit{\ohmbase}% + {\squaremetre\usk\kilogram\usk\rpcubic\second\usk\rpsquare\ampere} +\addunit{\siemensbase}% + {\rpsquare\metre\usk\reciprocal\kilogram\usk\cubic\second\usk\ampere\squared} +\addunit{\weberbase}% + {\squaremetre\usk\kilogram\usk\second\rpsquared\usk\reciprocal\ampere} +\addunit{\teslabase}% + {\kilogram\usk\second\rpsquared\usk\reciprocal\ampere} +\addunit{\henrybase}% + {\squaremetre\usk\kilogram\usk\second\rpsquared\usk\rpsquare\ampere} +\addunit{\celsiusbase}% + {\kelvin} +\addunit{\lumenbase}% + {\candela\usk\squaremetre\usk\rpsquare\metre} +\addunit{\luxbase}% + {\candela\usk\squaremetre\usk\rpfourth\metre} +\addunit{\becquerelbase}% + {\hertzbase} +\addunit{\graybase}% + {\squaremetre\usk\second\rpsquared} +\addunit{\sievertbase}% + {\graybase} +\addunit{\katalbase}% + {\rp\second\usk\mole } +} +\newcommand*\SIunits@opt@derived{% +\addunit{\derradian}% + {\metre\usk\reciprocal\metre} +\addunit{\dersteradian}% + {\squaremetre\usk\rpsquare\metre} +\addunit{\derhertz}% + {\reciprocal\second} +\addunit{\dernewton}% + {\metre\usk\kilogram\usk\second\rpsquared} +\addunit{\derpascal}% + {\newton\usk\rpsquare\metre} +\addunit{\derjoule}% + {\newton\usk\metre} +\addunit{\derwatt}% + {\joule\usk\reciprocal\second} +\addunit{\dercoulomb}% + {\ampere\usk\second} +\addunit{\dervolt}% + {\watt\usk\reciprocal\ampere} +\addunit{\derfarad}% + {\coulomb\usk\reciprocal\volt} +\addunit{\derohm}% + {\volt\usk\reciprocal\ampere} +\addunit{\dersiemens}% + {\ampere\usk\reciprocal\volt} +\addunit{\derweber}% + {\squaremetre\usk\kilogram\usk\second\rpsquared\usk\reciprocal\ampere} +\addunit{\dertesla}% + {\weber\usk\rpsquare\metre} +\addunit{\derhenry}% + {\weber\usk\reciprocal\ampere} +\addunit{\dercelsius}% + {\kelvin} +\addunit{\derlumen}% + {\candela\usk\steradian} +\addunit{\derlux}% + {\lumen\usk\rpsquare\metre} +\addunit{\derbecquerel}% + {\derhertz} +\addunit{\dergray}% + {\joule\usk\reciprocal\kilogram} +\addunit{\dersievert}% + {\dergray} +\addunit{\derkatal}% + {\katalbase} + \typeout{Option `derived' provided!}} +\addunit{\minute}{min} +\addunit{\hour}{h} +\addunit{\dday}{d} +\addunit{\degree}{\no@qsk\ensuremath{^{\circ}}} +\addunit{\paminute}{\no@qsk\ensuremath{'}} +\addunit{\arcminute}{\no@qsk\ensuremath{'}} +\addunit{\pasecond}{\no@qsk\ensuremath{''}} +\addunit{\arcsecond}{\no@qsk\ensuremath{''}} +\addunit{\ton}{t} +\addunit{\tonne}{t} +\addunit{\liter}{L} +\addunit{\litre}{l} +\addunit{\neper}{Np} +\addunit{\bel}{B} +\addunit{\curie}{Ci} +\addunit{\rad}{rad} +\addunit{\arad}{rd} +\addunit{\rem}{rem} +\addunit{\roentgen}{R} +\addunit{\electronvolt}{e\kern-0.05ex\volt} +\addunit{\atomicmass}{u} +\addunit{\atomicmassunit}{u} +\addunit{\dalton}{Da} +\addunit{\are}{a} +\addunit{\hectare}{\hecto\are} +\addunit{\barn}{b} +\addunit{\bbar}{bar} +\addunit{\gal}{Gal} +\addunit{\angstrom}{\mbox{{\AA}}} +\addunit{\rperminute}{r\per\minute} +\addunit{\rpersecond}{r\per\second} +\addunit{\squaremetre}{\SI@square\metre} +\addunit{\cubicmetre}{\cubic\metre} +\addunit{\graypersecond}{\gray\per\second} +\addunit{\graypersecondnp}{\gray\usk\reciprocal\second} +\addunit{\metrepersquaresecond}{\metre\per\second\squared} +\addunit{\metrepersquaresecondnp}{\metre\usk\second\rpsquared} +\addunit{\joulepermole}{\joule\per\mole} +\addunit{\joulepermolenp}{\joule\usk\reciprocal\mole} +\addunit{\molepercubicmetre}{\mole\per\cubic\metre} +\addunit{\molepercubicmetrenp}{\mole\usk\rpcubic\metre} +\addunit{\radianpersquaresecond}{\radian\per\second\squared} +\addunit{\radianpersquaresecondnp}{\radian\usk\second\rpsquared} +\addunit{\kilogramsquaremetrepersecond}{\kilogram\usk\squaremetre\per\second} +\addunit{\kilogramsquaremetrepersecondnp}{\kilogram\usk\squaremetre\usk\reciprocal\second} +\addunit{\radianpersecond}{\radian\per\second} +\addunit{\radianpersecondnp}{\radian\usk\reciprocal\second} +\addunit{\squaremetrepercubicmetre}{\squaremetre\per\cubic\metre} +\addunit{\squaremetrepercubicmetrenp}{\squaremetre\usk\rpcubic\metre} +\addunit{\katalpercubicmetre}{\katal\per\cubic\metre} +\addunit{\katalpercubicmetrenp}{\katal\usk\rpcubic\metre} +\addunit{\coulombpermol}{\coulomb\per\mole} +\addunit{\coulombpermolnp}{\coulomb\usk\reciprocal\mole} +\addunit{\amperepersquaremetre}{\ampere\per\squaremetre} +\addunit{\amperepersquaremetrenp}{\ampere\usk\rpsquare\metre} +\addunit{\kilogrampercubicmetre}{\kilogram\per\cubic\metre} +\addunit{\kilogrampercubicmetrenp}{\kilogram\usk\rpcubic\metre} +\addunit{\squaremetrepernewtonsecond}{\squaremetre\per\newton\usk\second} +\addunit{\squaremetrepernewtonsecondnp}{\squaremetre\usk\reciprocal\newton\usk\reciprocal\second} +\addunit{\pascalsecond}{\pascal\usk\second} +\addunit{\coulombpercubicmetre}{\coulomb\per\cubic\metre} +\addunit{\coulombpercubicmetrenp}{\coulomb\usk\rpcubic\metre} +\addunit{\amperemetresecond}{\ampere\usk\metre\usk\second} +\addunit{\voltpermetre}{\volt\per\metre} +\addunit{\voltpermetrenp}{\volt\usk\reciprocal\metre} +\addunit{\coulombpersquaremetre}{\coulomb\per\squaremetre} +\addunit{\coulombpersquaremetrenp}{\coulomb\usk\rpsquare\metre} +\addunit{\faradpermetre}{\farad\per\metre} +\addunit{\faradpermetrenp}{\farad\usk\reciprocal\metre} +\addunit{\ohmmetre}{\ohm\usk\metre} +\addunit{\kilowatthour}{\kilo\watt\hour} +\addunit{\wattpersquaremetre}{\watt\per\squaremetre} +\addunit{\wattpersquaremetrenp}{\watt\usk\rpsquare\metre} +\addunit{\joulepersquaremetre}{\joule\per\squaremetre} +\addunit{\joulepersquaremetrenp}{\joule\usk\rpsquare\metre} +\addunit{\newtonpercubicmetre}{\newton\per\cubic\metre} +\addunit{\newtonpercubicmetrenp}{\newton\usk\rpcubic\metre} +\addunit{\newtonperkilogram}{\newton\per\kilogram} +\addunit{\newtonperkilogramnp}{\newton\usk\reciprocal\kilogram} +\addunit{\jouleperkelvin}{\joule\per\kelvin} +\addunit{\jouleperkelvinnp}{\joule\usk\reciprocal\kelvin} +\addunit{\jouleperkilogram}{\joule\per\kilogram} +\addunit{\jouleperkilogramnp}{\joule\usk\reciprocal\kilogram} +\addunit{\coulombperkilogram}{\coulomb\per\kilogram} +\addunit{\coulombperkilogramnp}{\coulomb\usk\reciprocal\kilogram} +\addunit{\squaremetrepersecond}{\squaremetre\per\second} +\addunit{\squaremetrepersecondnp}{\squaremetre\usk\reciprocal\second} +\addunit{\squaremetrepersquaresecond}{\squaremetre\per\second\squared} +\addunit{\squaremetrepersquaresecondnp}{\squaremetre\usk\second\rpsquared} +\addunit{\kilogrammetrepersecond}{\kilogram\usk\metre\per\second} +\addunit{\kilogrammetrepersecondnp}{\kilogram\usk\metre\usk\reciprocal\second} +\addunit{\candelapersquaremetre}{\candela\per\squaremetre} +\addunit{\candelapersquaremetrenp}{\candela\usk\rpsquare\metre} +\addunit{\amperepermetre}{\ampere\per\metre} +\addunit{\amperepermetrenp}{\ampere\usk\reciprocal\metre} +\addunit{\joulepertesla}{\joule\per\tesla} +\addunit{\jouleperteslanp}{\joule\usk\reciprocal\tesla} +\addunit{\henrypermetre}{\henry\per\metre} +\addunit{\henrypermetrenp}{\henry\usk\reciprocal\metre} +\addunit{\kilogrampersecond}{\kilogram\per\second} +\addunit{\kilogrampersecondnp}{\kilogram\usk\reciprocal\second} +\addunit{\kilogrampersquaremetresecond}{\kilogram\per\squaremetre\usk\second} +\addunit{\kilogrampersquaremetresecondnp}{\kilogram\usk\rpsquare\metre\usk\reciprocal\second} +\addunit{\kilogrampersquaremetre}{\kilogram\per\squaremetre} +\addunit{\kilogrampersquaremetrenp}{\kilogram\usk\rpsquare\metre} +\addunit{\kilogrampermetre}{\kilogram\per\metre} +\addunit{\kilogrampermetrenp}{\kilogram\usk\reciprocal\metre} +\addunit{\joulepermolekelvin}{\joule\per\mole\usk\kelvin} +\addunit{\joulepermolekelvinnp}{\joule\usk\reciprocal\mole\usk\reciprocal\kelvin} +\addunit{\kilogramperkilomole}{\kilogram\per\kilo\mole} +\addunit{\kilogramperkilomolenp}{\kilogram\usk\kilo\reciprocal\mole} +\addunit{\kilogramsquaremetre}{\kilogram\usk\squaremetre} +\addunit{\kilogramsquaremetrenp}{\kilogramsquaremetre} +\addunit{\kilogrammetrepersquaresecond}{\kilogram\usk\metre\per\second\squared} +\addunit{\kilogrammetrepersquaresecondnp}{\kilogram\usk\metre\usk\second\rpsquared} +\addunit{\newtonpersquaremetre}{\newton\per\squaremetre} +\addunit{\newtonpersquaremetrenp}{\newton\usk\rpsquare\metre} +\addunit{\persquaremetresecond}{1\per\squaremetre\usk\second} +\addunit{\persquaremetresecondnp}{\rpsquare\metre\usk\reciprocal\second} +\addunit{\wattperkilogram}{\watt\per\kilogram} +\addunit{\wattperkilogramnp}{\watt\usk\reciprocal\kilogram} +\addunit{\wattpercubicmetre}{\watt\per\cubic\metre} +\addunit{\wattpercubicmetrenp}{\watt\usk\rpcubic\metre} +\addunit{\wattpersquaremetresteradian}{\watt\per\squaremetre\usk\steradian} +\addunit{\wattpersquaremetresteradiannp}{\watt\usk\rpsquare\metre\usk\rp\steradian} +\addunit{\jouleperkilogramkelvin}{\joule\per\kilogram\usk\kelvin} +\addunit{\jouleperkilogramkelvinnp}{\joule\usk\reciprocal\kilogram\usk\reciprocal\kelvin} +\addunit{\squaremetreperkilogram}{\squaremetre\per\kilogram} +\addunit{\rpsquaremetreperkilogram}{\squaremetre\usk\reciprocal\kilogram} +\addunit{\cubicmetreperkilogram}{\cubic\metre\per\kilogram} +\addunit{\rpcubicmetreperkilogram}{\cubic\metre\usk\reciprocal\kilogram} +\addunit{\newtonpermetre}{\newton\per\metre} +\addunit{\newtonpermetrenp}{\newton\usk\reciprocal\metre} +\addunit{\Celsius}{\ensuremath{\SI@fstyle{C}}} +\addunit{\wattpermetrekelvin}{\watt\per\metre\usk\kelvin} +\addunit{\wattpermetrekelvinnp}{\watt\usk\reciprocal\metre\usk\reciprocal\kelvin} +\addunit{\newtonmetre}{\newton\usk\metre} \addunit{\newtonmetrenp}{\newtonmetre} +\addunit{\squaremetrepercubicsecond}{\squaremetre\per\cubic\second} +\addunit{\squaremetrepercubicsecondnp}{\squaremetre\usk\rpcubic\second} +\addunit{\metrepersecond}{\metre\per\second} +\addunit{\metrepersecondnp}{\metre\usk\reciprocal\second} +\addunit{\joulepercubicmetre}{\joule\per\cubicmetre} +\addunit{\joulepercubicmetrenp}{\joule\usk\rpcubic\metre} +\addunit{\kilogrampercubicmetrecoulomb}{\kilogram\per\cubic\metre\usk\coulomb} +\addunit{\kilogrampercubicmetrecoulombnp}{\kilogram\usk\rpcubic\metre\usk\reciprocal\coulomb} +\addunit{\cubicmetrepersecond}{\cubicmetre\per\second} +\addunit{\rpcubicmetrepersecond}{\cubicmetre\usk\reciprocal\second} +\addunit{\kilogrampersecondcubicmetre}{\kilogram\per\second\usk\cubicmetre} +\addunit{\kilogrampersecondcubicmetrenp}{\kilogram\usk\reciprocal\second\usk\rpcubic\metre} + +\DeclareOption{cdot}{\@cdot{Option `cdot' provided!}} +\DeclareOption{thickspace}{\@thickspace{Option `thickspace' provided!}} +\DeclareOption{mediumspace}{\@mediumspace{Option `mediumspace' provided!}} +\DeclareOption{thinspace}{\@thinspace{Option `thinspace' provided!}} +\DeclareOption{thickqspace}{\@thickqspace{Option `thickqspace' provided!}} +\DeclareOption{mediumqspace}{\@mediumqspace{Option `mediumqspace' provided!}} +\DeclareOption{thinqspace}{\@thinqspace{Option `thinqspace' provided!}} +\DeclareOption{textstyle}{\renewcommand\SI@fstyle[1]{\@text{\protect#1}}% +\@textstyletrue% +\typeout{Option `textstyle' provided!}} +\DeclareOption{amssymb}{\@redefsquaretrue% +\typeout{Option `amssymb' provided!}} +\DeclareOption{squaren}{\@defsquarentrue% +\typeout{Option `squaren' provided!}} +\DeclareOption{pstricks}{\@redefGraytrue% +\typeout{Option `pstricks' provided!}} +\DeclareOption{Gray}{\@defGraytrue% +\typeout{Option `Gray' provided!}} +\DeclareOption{italian}{\@defitaliantrue% +\typeout{Option `italian' provided!}} +\DeclareOption{binary}{\@optionbinarytrue } +\AtEndOfPackage{\if@optionbinary\RequirePackage{binary}\fi} +\DeclareOption{derivedinbase}{\SIunits@opt@derivedinbase} +\DeclareOption{derived}{\SIunits@opt@derived} +\DeclareOption{noams}{\@optionNoAMStrue% +\typeout{Option `noams' provided!}} +\DeclareOption*{\PackageWarningNoLine{SIunits}{What is `\CurrentOption'?}} +\InputIfFileExists{SIunits.cfg}{}% +{\PackageWarningNoLine{SIunits}{You have no `SIunits.cfg' file installed. +\MessageBreak I will assume you are using `thickspace' and `thickqspace'} +\ExecuteOptions{thickspace,thickqspace}} +\ProcessOptions\relax +%% +%% Source: $Id: SIunits.dtx,v 1.33 2002/08/01 11:20:00 root Exp root $ +%% +%% End of file `SIunits.sty'. diff --git a/TI-lineno-COB.sty b/TI-lineno-COB.sty new file mode 100644 index 0000000..0286654 --- /dev/null +++ b/TI-lineno-COB.sty @@ -0,0 +1,102 @@ +\usepackage[switch,mathlines,displaymath]{lineno} +%\runninglinenumbers %% for continous line numbering regardless of box and minipage but only on left side in single/double column +\linenumbers %% properly in single/double column but boxes and minipage linenos not getting continuous + +\def\linenumberfont{\usefont{T1}{ptm}{m}{n}\color{red}\fontsize{8}{10}\selectfont} +\if@twocolumn +\setlength\marginparwidth{.75cm} +\setlength\marginparsep{19.5\p@} +\else +\setlength\marginparwidth{20pt} +\setlength\marginparsep{24pt} +\fi +\newcommand\linenomathWithnumbersforams{% + \ifLineNumbers + %\ifx\@@par\@@@par\else + \ifnum\interlinepenalty>-\linenopenaltypar + \global\holdinginserts\thr@@ + \advance\interlinepenalty \linenopenalty + \ifhmode % v4.3 + \advance\predisplaypenalty \linenopenalty + \fi + %\advance\postdisplaypenalty \linenopenalty + \advance\interdisplaylinepenalty \linenopenalty + \fi + \fi + \ignorespaces + } + +\newcommand\linenomathWithnumbersformultline{% + \ifLineNumbers + %\ifx\@@par\@@@par\else + \ifnum\interlinepenalty>-\linenopenaltypar + \global\holdinginserts\thr@@ + \advance\interlinepenalty \linenopenalty + \ifhmode % v4.3 + %\advance\predisplaypenalty \linenopenalty + \fi + %\advance\postdisplaypenalty \linenopenalty + \advance\interdisplaylinepenalty \linenopenalty + \fi + \fi + \ignorespaces + } + + + +\newcommand*\patchAmsMathEnvironmentForLineno[1]{% +\expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname +\expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname +\renewenvironment{#1}% +{\def\linenomath{\linenomathWithnumbersforams}%added + \@namedef{linenomath*}{\linenomathNonumbers}%added +\linenomath\csname old#1\endcsname}% +{\csname oldend#1\endcsname\endlinenomath}}% +\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{% +\patchAmsMathEnvironmentForLineno{#1}% +\patchAmsMathEnvironmentForLineno{#1*}% +}% + +\AtBeginDocument{% +\patchBothAmsMathEnvironmentsForLineno{equation}% deleted +\patchBothAmsMathEnvironmentsForLineno{align}% +\patchBothAmsMathEnvironmentsForLineno{flalign}% +\patchBothAmsMathEnvironmentsForLineno{alignat}% +\patchBothAmsMathEnvironmentsForLineno{gather}% +%\patchBothAmsMathEnvironmentsForLineno{multline}% +%\patchBothAmsMathEnvironmentsForLineno{split}% +\patchAmsMathEnvironmentForLineno{array}% +%\patchAmsMathEnvironmentForLineno{split}% +} + +%%\AtBeginDocument{% + \let\LN@align\align + \let\LN@endalign\endalign + \renewenvironment{align}% + {\linenomath\LN@align}% + {\LN@endalign\endlinenomath}% +%%} + + +\renewenvironment{multline}{\linenomathWithnumbersformultline% + \start@multline\st@rredfalse +}{% + \iftagsleft@ \@xp\lendmultline@ \else \@xp\rendmultline@ \fi + \ignorespacesafterend +\endlinenomath} +\renewenvironment{multline*}{\linenomathWithnumbersformultline\start@multline\st@rredtrue}{\endmultline\endlinenomath} + +\def\insplit@{% + \global\setbox\z@\vbox\bgroup + \Let@ \chardef\dspbrk@context\@ne \restore@math@cr + \default@tag % disallow use of \tag here + \ialign\bgroup + \hfil% + \strut@ + $\m@th\displaystyle{##}$% + &$\m@th\displaystyle{{}##}$% + \hfill % Why not \hfil?---dmj, 1994/12/28 + \crcr\noalign{\global\advance\c@linenumber\@ne}% +} + +\endinput diff --git a/animal_welfare.odt b/animal_welfare.odt new file mode 100644 index 0000000..a659f4f Binary files /dev/null and b/animal_welfare.odt differ diff --git a/LED_detect.py b/code/LED_detect.py similarity index 100% rename from LED_detect.py rename to code/LED_detect.py diff --git a/README.md b/code/README.md similarity index 100% rename from README.md rename to code/README.md diff --git a/code/__pycache__/event_time_correlations.cpython-310.pyc b/code/__pycache__/event_time_correlations.cpython-310.pyc new file mode 100644 index 0000000..739529b Binary files /dev/null and b/code/__pycache__/event_time_correlations.cpython-310.pyc differ diff --git a/complete_analysis.py b/code/complete_analysis.py similarity index 100% rename from complete_analysis.py rename to code/complete_analysis.py diff --git a/ethogram.py b/code/ethogram.py similarity index 100% rename from ethogram.py rename to code/ethogram.py diff --git a/eval_LED.py b/code/eval_LED.py similarity index 100% rename from eval_LED.py rename to code/eval_LED.py diff --git a/event_time_analysis.py b/code/event_time_analysis.py similarity index 100% rename from event_time_analysis.py rename to code/event_time_analysis.py diff --git a/event_time_correlations.py b/code/event_time_correlations.py similarity index 100% rename from event_time_correlations.py rename to code/event_time_correlations.py diff --git a/event_videos.py b/code/event_videos.py similarity index 100% rename from event_videos.py rename to code/event_videos.py diff --git a/code/figures/bu/2019-11-25-09_59.png b/code/figures/bu/2019-11-25-09_59.png new file mode 100644 index 0000000..2526678 Binary files /dev/null and b/code/figures/bu/2019-11-25-09_59.png differ diff --git a/code/figures/bu/2019-11-26-10_00.png b/code/figures/bu/2019-11-26-10_00.png new file mode 100644 index 0000000..6b21d17 Binary files /dev/null and b/code/figures/bu/2019-11-26-10_00.png differ diff --git a/code/figures/bu/2019-11-27-10_00.png b/code/figures/bu/2019-11-27-10_00.png new file mode 100644 index 0000000..b9cdd18 Binary files /dev/null and b/code/figures/bu/2019-11-27-10_00.png differ diff --git a/code/figures/bu/2019-11-28-09_58.png b/code/figures/bu/2019-11-28-09_58.png new file mode 100644 index 0000000..62097bf Binary files /dev/null and b/code/figures/bu/2019-11-28-09_58.png differ diff --git a/code/figures/bu/2019-11-29-09_59.png b/code/figures/bu/2019-11-29-09_59.png new file mode 100644 index 0000000..3c5a417 Binary files /dev/null and b/code/figures/bu/2019-11-29-09_59.png differ diff --git a/code/figures/bu/2019-12-02-10_00.png b/code/figures/bu/2019-12-02-10_00.png new file mode 100644 index 0000000..700aa09 Binary files /dev/null and b/code/figures/bu/2019-12-02-10_00.png differ diff --git a/code/figures/bu/2019-12-03-10_01.png b/code/figures/bu/2019-12-03-10_01.png new file mode 100644 index 0000000..eeb522c Binary files /dev/null and b/code/figures/bu/2019-12-03-10_01.png differ diff --git a/code/figures/bu/2019-12-04-10_00.png b/code/figures/bu/2019-12-04-10_00.png new file mode 100644 index 0000000..1a9a1b8 Binary files /dev/null and b/code/figures/bu/2019-12-04-10_00.png differ diff --git a/code/figures/bu/2019-12-06-10_00.png b/code/figures/bu/2019-12-06-10_00.png new file mode 100644 index 0000000..6ddd59a Binary files /dev/null and b/code/figures/bu/2019-12-06-10_00.png differ diff --git a/code/figures/bu/2019-12-09-10_00.png b/code/figures/bu/2019-12-09-10_00.png new file mode 100644 index 0000000..6d03f75 Binary files /dev/null and b/code/figures/bu/2019-12-09-10_00.png differ diff --git a/code/figures/bu/2019-12-10-10_00.png b/code/figures/bu/2019-12-10-10_00.png new file mode 100644 index 0000000..a6cc8d4 Binary files /dev/null and b/code/figures/bu/2019-12-10-10_00.png differ diff --git a/code/figures/bu/2019-12-11-10_00.png b/code/figures/bu/2019-12-11-10_00.png new file mode 100644 index 0000000..a0d8653 Binary files /dev/null and b/code/figures/bu/2019-12-11-10_00.png differ diff --git a/code/figures/bu/2019-12-12-10_00.png b/code/figures/bu/2019-12-12-10_00.png new file mode 100644 index 0000000..228b347 Binary files /dev/null and b/code/figures/bu/2019-12-12-10_00.png differ diff --git a/code/figures/bu/2019-12-16-10_00.png b/code/figures/bu/2019-12-16-10_00.png new file mode 100644 index 0000000..4059992 Binary files /dev/null and b/code/figures/bu/2019-12-16-10_00.png differ diff --git a/code/figures/bu/2020-03-13-10_00.png b/code/figures/bu/2020-03-13-10_00.png new file mode 100644 index 0000000..fad6639 Binary files /dev/null and b/code/figures/bu/2020-03-13-10_00.png differ diff --git a/code/figures/bu/2020-03-16-10_00.png b/code/figures/bu/2020-03-16-10_00.png new file mode 100644 index 0000000..3101cde Binary files /dev/null and b/code/figures/bu/2020-03-16-10_00.png differ diff --git a/code/figures/bu/2020-03-18-10_34.png b/code/figures/bu/2020-03-18-10_34.png new file mode 100644 index 0000000..9e59996 Binary files /dev/null and b/code/figures/bu/2020-03-18-10_34.png differ diff --git a/code/figures/bu/2020-03-19-10_00.png b/code/figures/bu/2020-03-19-10_00.png new file mode 100644 index 0000000..7e7157d Binary files /dev/null and b/code/figures/bu/2020-03-19-10_00.png differ diff --git a/code/figures/bu/2020-03-20-10_00.png b/code/figures/bu/2020-03-20-10_00.png new file mode 100644 index 0000000..da1a51b Binary files /dev/null and b/code/figures/bu/2020-03-20-10_00.png differ diff --git a/code/figures/bu/2020-03-23-09_58.png b/code/figures/bu/2020-03-23-09_58.png new file mode 100644 index 0000000..efd6ba8 Binary files /dev/null and b/code/figures/bu/2020-03-23-09_58.png differ diff --git a/code/figures/bu/2020-03-24-10_00.png b/code/figures/bu/2020-03-24-10_00.png new file mode 100644 index 0000000..34f75e8 Binary files /dev/null and b/code/figures/bu/2020-03-24-10_00.png differ diff --git a/code/figures/bu/2020-03-25-10_00.png b/code/figures/bu/2020-03-25-10_00.png new file mode 100644 index 0000000..05a561d Binary files /dev/null and b/code/figures/bu/2020-03-25-10_00.png differ diff --git a/code/figures/bu/2020-03-31-09_59.png b/code/figures/bu/2020-03-31-09_59.png new file mode 100644 index 0000000..f17c227 Binary files /dev/null and b/code/figures/bu/2020-03-31-09_59.png differ diff --git a/code/figures/bu/2020-05-11-10_00.png b/code/figures/bu/2020-05-11-10_00.png new file mode 100644 index 0000000..5ca4969 Binary files /dev/null and b/code/figures/bu/2020-05-11-10_00.png differ diff --git a/code/figures/bu/2020-05-12-10_00.png b/code/figures/bu/2020-05-12-10_00.png new file mode 100644 index 0000000..c40c25c Binary files /dev/null and b/code/figures/bu/2020-05-12-10_00.png differ diff --git a/code/figures/bu/2020-05-13-10_00.png b/code/figures/bu/2020-05-13-10_00.png new file mode 100644 index 0000000..94eb5e5 Binary files /dev/null and b/code/figures/bu/2020-05-13-10_00.png differ diff --git a/code/figures/bu/2020-05-14-10_00.png b/code/figures/bu/2020-05-14-10_00.png new file mode 100644 index 0000000..fc9ee74 Binary files /dev/null and b/code/figures/bu/2020-05-14-10_00.png differ diff --git a/code/figures/bu/2020-05-15-10_00.png b/code/figures/bu/2020-05-15-10_00.png new file mode 100644 index 0000000..722187d Binary files /dev/null and b/code/figures/bu/2020-05-15-10_00.png differ diff --git a/code/figures/bu/2020-05-18-10_00.png b/code/figures/bu/2020-05-18-10_00.png new file mode 100644 index 0000000..627f76d Binary files /dev/null and b/code/figures/bu/2020-05-18-10_00.png differ diff --git a/code/figures/bu/2020-05-19-10_00.png b/code/figures/bu/2020-05-19-10_00.png new file mode 100644 index 0000000..51c7e50 Binary files /dev/null and b/code/figures/bu/2020-05-19-10_00.png differ diff --git a/code/figures/bu/2020-05-21-10_00.png b/code/figures/bu/2020-05-21-10_00.png new file mode 100644 index 0000000..9b7d2e1 Binary files /dev/null and b/code/figures/bu/2020-05-21-10_00.png differ diff --git a/code/figures/bu/2020-05-25-10_00.png b/code/figures/bu/2020-05-25-10_00.png new file mode 100644 index 0000000..d711453 Binary files /dev/null and b/code/figures/bu/2020-05-25-10_00.png differ diff --git a/code/figures/bu/2020-05-27-10_00.png b/code/figures/bu/2020-05-27-10_00.png new file mode 100644 index 0000000..bf15e12 Binary files /dev/null and b/code/figures/bu/2020-05-27-10_00.png differ diff --git a/code/figures/bu/2020-05-28-10_00.png b/code/figures/bu/2020-05-28-10_00.png new file mode 100644 index 0000000..676e362 Binary files /dev/null and b/code/figures/bu/2020-05-28-10_00.png differ diff --git a/code/figures/bu/2020-05-29-10_00.png b/code/figures/bu/2020-05-29-10_00.png new file mode 100644 index 0000000..f672240 Binary files /dev/null and b/code/figures/bu/2020-05-29-10_00.png differ diff --git a/code/figures/bu/2020-06-02-10_00.png b/code/figures/bu/2020-06-02-10_00.png new file mode 100644 index 0000000..ff92f2d Binary files /dev/null and b/code/figures/bu/2020-06-02-10_00.png differ diff --git a/code/figures/bu/2020-06-03-10_10.png b/code/figures/bu/2020-06-03-10_10.png new file mode 100644 index 0000000..f1f3cc7 Binary files /dev/null and b/code/figures/bu/2020-06-03-10_10.png differ diff --git a/code/figures/bu/2020-06-04-10_00.png b/code/figures/bu/2020-06-04-10_00.png new file mode 100644 index 0000000..cc200a1 Binary files /dev/null and b/code/figures/bu/2020-06-04-10_00.png differ diff --git a/code/figures/bu/2020-06-05-10_00.png b/code/figures/bu/2020-06-05-10_00.png new file mode 100644 index 0000000..bab173a Binary files /dev/null and b/code/figures/bu/2020-06-05-10_00.png differ diff --git a/code/figures/bu/2020-06-08-10_00.png b/code/figures/bu/2020-06-08-10_00.png new file mode 100644 index 0000000..adf1354 Binary files /dev/null and b/code/figures/bu/2020-06-08-10_00.png differ diff --git a/code/figures/bu/2020-06-09-10_00.png b/code/figures/bu/2020-06-09-10_00.png new file mode 100644 index 0000000..4318140 Binary files /dev/null and b/code/figures/bu/2020-06-09-10_00.png differ diff --git a/code/figures/bu/2020-06-10-10_00.png b/code/figures/bu/2020-06-10-10_00.png new file mode 100644 index 0000000..39b46db Binary files /dev/null and b/code/figures/bu/2020-06-10-10_00.png differ diff --git a/code/figures/bu/2020-06-11-10_00.png b/code/figures/bu/2020-06-11-10_00.png new file mode 100644 index 0000000..0d9feef Binary files /dev/null and b/code/figures/bu/2020-06-11-10_00.png differ diff --git a/code/figures/bu/chasing_progression.png b/code/figures/bu/chasing_progression.png new file mode 100644 index 0000000..0d9e3ac Binary files /dev/null and b/code/figures/bu/chasing_progression.png differ diff --git a/code/figures/bu/chirp$_{lose}$_progression.png b/code/figures/bu/chirp$_{lose}$_progression.png new file mode 100644 index 0000000..8456ede Binary files /dev/null and b/code/figures/bu/chirp$_{lose}$_progression.png differ diff --git a/code/figures/bu/chirp$_{win}$_progression.png b/code/figures/bu/chirp$_{win}$_progression.png new file mode 100644 index 0000000..d4011e1 Binary files /dev/null and b/code/figures/bu/chirp$_{win}$_progression.png differ diff --git a/code/figures/bu/chirp_lose_on_chase_off.png b/code/figures/bu/chirp_lose_on_chase_off.png new file mode 100644 index 0000000..5aa48b3 Binary files /dev/null and b/code/figures/bu/chirp_lose_on_chase_off.png differ diff --git a/code/figures/bu/chirp_lose_on_chase_off_by_sexes.png b/code/figures/bu/chirp_lose_on_chase_off_by_sexes.png new file mode 100644 index 0000000..97a441f Binary files /dev/null and b/code/figures/bu/chirp_lose_on_chase_off_by_sexes.png differ diff --git a/code/figures/bu/chirp_lose_on_chase_on.png b/code/figures/bu/chirp_lose_on_chase_on.png new file mode 100644 index 0000000..f3076c6 Binary files /dev/null and b/code/figures/bu/chirp_lose_on_chase_on.png differ diff --git a/code/figures/bu/chirp_lose_on_chase_on_by_sexes.png b/code/figures/bu/chirp_lose_on_chase_on_by_sexes.png new file mode 100644 index 0000000..f13118c Binary files /dev/null and b/code/figures/bu/chirp_lose_on_chase_on_by_sexes.png differ diff --git a/code/figures/bu/chirp_lose_on_contact.png b/code/figures/bu/chirp_lose_on_contact.png new file mode 100644 index 0000000..976dee9 Binary files /dev/null and b/code/figures/bu/chirp_lose_on_contact.png differ diff --git a/code/figures/bu/chirp_lose_on_contact_by_sexes.png b/code/figures/bu/chirp_lose_on_contact_by_sexes.png new file mode 100644 index 0000000..b858ec6 Binary files /dev/null and b/code/figures/bu/chirp_lose_on_contact_by_sexes.png differ diff --git a/code/figures/bu/chirp_lose_on_rise_win.png b/code/figures/bu/chirp_lose_on_rise_win.png new file mode 100644 index 0000000..4b8ec22 Binary files /dev/null and b/code/figures/bu/chirp_lose_on_rise_win.png differ diff --git a/code/figures/bu/chirp_lose_on_rise_win_by_sexes.png b/code/figures/bu/chirp_lose_on_rise_win_by_sexes.png new file mode 100644 index 0000000..bc9aceb Binary files /dev/null and b/code/figures/bu/chirp_lose_on_rise_win_by_sexes.png differ diff --git a/code/figures/bu/chirp_win_on_chase_off.png b/code/figures/bu/chirp_win_on_chase_off.png new file mode 100644 index 0000000..9bf5031 Binary files /dev/null and b/code/figures/bu/chirp_win_on_chase_off.png differ diff --git a/code/figures/bu/chirp_win_on_chase_off_by_sexes.png b/code/figures/bu/chirp_win_on_chase_off_by_sexes.png new file mode 100644 index 0000000..61e6fa5 Binary files /dev/null and b/code/figures/bu/chirp_win_on_chase_off_by_sexes.png differ diff --git a/code/figures/bu/chirp_win_on_chase_on.png b/code/figures/bu/chirp_win_on_chase_on.png new file mode 100644 index 0000000..5dfecc7 Binary files /dev/null and b/code/figures/bu/chirp_win_on_chase_on.png differ diff --git a/code/figures/bu/chirp_win_on_chase_on_by_sexes.png b/code/figures/bu/chirp_win_on_chase_on_by_sexes.png new file mode 100644 index 0000000..b9c4f25 Binary files /dev/null and b/code/figures/bu/chirp_win_on_chase_on_by_sexes.png differ diff --git a/code/figures/bu/chirp_win_on_contact.png b/code/figures/bu/chirp_win_on_contact.png new file mode 100644 index 0000000..5c401aa Binary files /dev/null and b/code/figures/bu/chirp_win_on_contact.png differ diff --git a/code/figures/bu/chirp_win_on_contact_by_sexes.png b/code/figures/bu/chirp_win_on_contact_by_sexes.png new file mode 100644 index 0000000..4031c06 Binary files /dev/null and b/code/figures/bu/chirp_win_on_contact_by_sexes.png differ diff --git a/code/figures/bu/chirp_win_on_rise_lose.png b/code/figures/bu/chirp_win_on_rise_lose.png new file mode 100644 index 0000000..a1b1a97 Binary files /dev/null and b/code/figures/bu/chirp_win_on_rise_lose.png differ diff --git a/code/figures/bu/chirp_win_on_rise_lose_by_sexes.png b/code/figures/bu/chirp_win_on_rise_lose_by_sexes.png new file mode 100644 index 0000000..31d19df Binary files /dev/null and b/code/figures/bu/chirp_win_on_rise_lose_by_sexes.png differ diff --git a/code/figures/bu/chirps [n]_per_paring.png b/code/figures/bu/chirps [n]_per_paring.png new file mode 100644 index 0000000..9ada6a3 Binary files /dev/null and b/code/figures/bu/chirps [n]_per_paring.png differ diff --git a/code/figures/bu/chirps$_{lose}$_categories.png b/code/figures/bu/chirps$_{lose}$_categories.png new file mode 100644 index 0000000..e872cb1 Binary files /dev/null and b/code/figures/bu/chirps$_{lose}$_categories.png differ diff --git a/code/figures/bu/chirps$_{lose}$_iei.png b/code/figures/bu/chirps$_{lose}$_iei.png new file mode 100644 index 0000000..60a0fc6 Binary files /dev/null and b/code/figures/bu/chirps$_{lose}$_iei.png differ diff --git a/code/figures/bu/chirps$_{win}$_categories.png b/code/figures/bu/chirps$_{win}$_categories.png new file mode 100644 index 0000000..08c5e49 Binary files /dev/null and b/code/figures/bu/chirps$_{win}$_categories.png differ diff --git a/code/figures/bu/chirps$_{win}$_iei.png b/code/figures/bu/chirps$_{win}$_iei.png new file mode 100644 index 0000000..9b678a0 Binary files /dev/null and b/code/figures/bu/chirps$_{win}$_iei.png differ diff --git a/code/figures/bu/chirps_by_experince.png b/code/figures/bu/chirps_by_experince.png new file mode 100644 index 0000000..ac6e9e5 Binary files /dev/null and b/code/figures/bu/chirps_by_experince.png differ diff --git a/code/figures/bu/chirps_per_pairing.png b/code/figures/bu/chirps_per_pairing.png new file mode 100644 index 0000000..9ada6a3 Binary files /dev/null and b/code/figures/bu/chirps_per_pairing.png differ diff --git a/code/figures/bu/chirps_vs_dEODf.png b/code/figures/bu/chirps_vs_dEODf.png new file mode 100644 index 0000000..c3a8bad Binary files /dev/null and b/code/figures/bu/chirps_vs_dEODf.png differ diff --git a/code/figures/bu/chirps_vs_dSize.png b/code/figures/bu/chirps_vs_dSize.png new file mode 100644 index 0000000..008d924 Binary files /dev/null and b/code/figures/bu/chirps_vs_dSize.png differ diff --git a/code/figures/bu/contact_progression.png b/code/figures/bu/contact_progression.png new file mode 100644 index 0000000..a5b3608 Binary files /dev/null and b/code/figures/bu/contact_progression.png differ diff --git a/code/figures/bu/correlations_chase_count_comp_dur0.png b/code/figures/bu/correlations_chase_count_comp_dur0.png new file mode 100644 index 0000000..4bfccd2 Binary files /dev/null and b/code/figures/bu/correlations_chase_count_comp_dur0.png differ diff --git a/code/figures/bu/correlations_chase_count_comp_dur1.png b/code/figures/bu/correlations_chase_count_comp_dur1.png new file mode 100644 index 0000000..ca53e83 Binary files /dev/null and b/code/figures/bu/correlations_chase_count_comp_dur1.png differ diff --git a/code/figures/bu/correlations_chase_count_contact_count.png b/code/figures/bu/correlations_chase_count_contact_count.png new file mode 100644 index 0000000..7268b45 Binary files /dev/null and b/code/figures/bu/correlations_chase_count_contact_count.png differ diff --git a/code/figures/bu/correlations_chase_count_med_chase_dur.png b/code/figures/bu/correlations_chase_count_med_chase_dur.png new file mode 100644 index 0000000..57a31f7 Binary files /dev/null and b/code/figures/bu/correlations_chase_count_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_chirps_lose_chase_count.png b/code/figures/bu/correlations_chirps_lose_chase_count.png new file mode 100644 index 0000000..deec0d3 Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_chase_count.png differ diff --git a/code/figures/bu/correlations_chirps_lose_comp_dur0.png b/code/figures/bu/correlations_chirps_lose_comp_dur0.png new file mode 100644 index 0000000..a438669 Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_comp_dur0.png differ diff --git a/code/figures/bu/correlations_chirps_lose_comp_dur1.png b/code/figures/bu/correlations_chirps_lose_comp_dur1.png new file mode 100644 index 0000000..6f2527b Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_comp_dur1.png differ diff --git a/code/figures/bu/correlations_chirps_lose_contact_count.png b/code/figures/bu/correlations_chirps_lose_contact_count.png new file mode 100644 index 0000000..7bfd5c1 Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_contact_count.png differ diff --git a/code/figures/bu/correlations_chirps_lose_med_chase_dur.png b/code/figures/bu/correlations_chirps_lose_med_chase_dur.png new file mode 100644 index 0000000..d30b8ba Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_chirps_lose_rises_lose.png b/code/figures/bu/correlations_chirps_lose_rises_lose.png new file mode 100644 index 0000000..e12a09c Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_rises_lose.png differ diff --git a/code/figures/bu/correlations_chirps_lose_rises_win.png b/code/figures/bu/correlations_chirps_lose_rises_win.png new file mode 100644 index 0000000..e7c5443 Binary files /dev/null and b/code/figures/bu/correlations_chirps_lose_rises_win.png differ diff --git a/code/figures/bu/correlations_chirps_win_chase_count.png b/code/figures/bu/correlations_chirps_win_chase_count.png new file mode 100644 index 0000000..c23df07 Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_chase_count.png differ diff --git a/code/figures/bu/correlations_chirps_win_chirps_lose.png b/code/figures/bu/correlations_chirps_win_chirps_lose.png new file mode 100644 index 0000000..8fe7379 Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_chirps_lose.png differ diff --git a/code/figures/bu/correlations_chirps_win_comp_dur0.png b/code/figures/bu/correlations_chirps_win_comp_dur0.png new file mode 100644 index 0000000..129a827 Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_comp_dur0.png differ diff --git a/code/figures/bu/correlations_chirps_win_comp_dur1.png b/code/figures/bu/correlations_chirps_win_comp_dur1.png new file mode 100644 index 0000000..195053c Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_comp_dur1.png differ diff --git a/code/figures/bu/correlations_chirps_win_contact_count.png b/code/figures/bu/correlations_chirps_win_contact_count.png new file mode 100644 index 0000000..089043d Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_contact_count.png differ diff --git a/code/figures/bu/correlations_chirps_win_med_chase_dur.png b/code/figures/bu/correlations_chirps_win_med_chase_dur.png new file mode 100644 index 0000000..0078e42 Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_chirps_win_rises_lose.png b/code/figures/bu/correlations_chirps_win_rises_lose.png new file mode 100644 index 0000000..5f0a62e Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_rises_lose.png differ diff --git a/code/figures/bu/correlations_chirps_win_rises_win.png b/code/figures/bu/correlations_chirps_win_rises_win.png new file mode 100644 index 0000000..d62e784 Binary files /dev/null and b/code/figures/bu/correlations_chirps_win_rises_win.png differ diff --git a/code/figures/bu/correlations_comp_dur0_comp_dur1.png b/code/figures/bu/correlations_comp_dur0_comp_dur1.png new file mode 100644 index 0000000..f804b4b Binary files /dev/null and b/code/figures/bu/correlations_comp_dur0_comp_dur1.png differ diff --git a/code/figures/bu/correlations_contact_count_comp_dur0.png b/code/figures/bu/correlations_contact_count_comp_dur0.png new file mode 100644 index 0000000..3212f36 Binary files /dev/null and b/code/figures/bu/correlations_contact_count_comp_dur0.png differ diff --git a/code/figures/bu/correlations_contact_count_comp_dur1.png b/code/figures/bu/correlations_contact_count_comp_dur1.png new file mode 100644 index 0000000..09062eb Binary files /dev/null and b/code/figures/bu/correlations_contact_count_comp_dur1.png differ diff --git a/code/figures/bu/correlations_contact_count_med_chase_dur.png b/code/figures/bu/correlations_contact_count_med_chase_dur.png new file mode 100644 index 0000000..d655f88 Binary files /dev/null and b/code/figures/bu/correlations_contact_count_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_dEODf_chase_count.png b/code/figures/bu/correlations_dEODf_chase_count.png new file mode 100644 index 0000000..5245cf9 Binary files /dev/null and b/code/figures/bu/correlations_dEODf_chase_count.png differ diff --git a/code/figures/bu/correlations_dEODf_chirps_lose.png b/code/figures/bu/correlations_dEODf_chirps_lose.png new file mode 100644 index 0000000..3d45b5e Binary files /dev/null and b/code/figures/bu/correlations_dEODf_chirps_lose.png differ diff --git a/code/figures/bu/correlations_dEODf_chirps_win.png b/code/figures/bu/correlations_dEODf_chirps_win.png new file mode 100644 index 0000000..e9656f8 Binary files /dev/null and b/code/figures/bu/correlations_dEODf_chirps_win.png differ diff --git a/code/figures/bu/correlations_dEODf_comp_dur0.png b/code/figures/bu/correlations_dEODf_comp_dur0.png new file mode 100644 index 0000000..44b79c7 Binary files /dev/null and b/code/figures/bu/correlations_dEODf_comp_dur0.png differ diff --git a/code/figures/bu/correlations_dEODf_comp_dur1.png b/code/figures/bu/correlations_dEODf_comp_dur1.png new file mode 100644 index 0000000..94fca9b Binary files /dev/null and b/code/figures/bu/correlations_dEODf_comp_dur1.png differ diff --git a/code/figures/bu/correlations_dEODf_contact_count.png b/code/figures/bu/correlations_dEODf_contact_count.png new file mode 100644 index 0000000..faae89a Binary files /dev/null and b/code/figures/bu/correlations_dEODf_contact_count.png differ diff --git a/code/figures/bu/correlations_dEODf_med_chase_dur.png b/code/figures/bu/correlations_dEODf_med_chase_dur.png new file mode 100644 index 0000000..38bdcc0 Binary files /dev/null and b/code/figures/bu/correlations_dEODf_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_dEODf_rises_lose.png b/code/figures/bu/correlations_dEODf_rises_lose.png new file mode 100644 index 0000000..acd5f6b Binary files /dev/null and b/code/figures/bu/correlations_dEODf_rises_lose.png differ diff --git a/code/figures/bu/correlations_dEODf_rises_win.png b/code/figures/bu/correlations_dEODf_rises_win.png new file mode 100644 index 0000000..e21793b Binary files /dev/null and b/code/figures/bu/correlations_dEODf_rises_win.png differ diff --git a/code/figures/bu/correlations_dsize_chase_count.png b/code/figures/bu/correlations_dsize_chase_count.png new file mode 100644 index 0000000..4c5bdcd Binary files /dev/null and b/code/figures/bu/correlations_dsize_chase_count.png differ diff --git a/code/figures/bu/correlations_dsize_chirps_lose.png b/code/figures/bu/correlations_dsize_chirps_lose.png new file mode 100644 index 0000000..4a3f68b Binary files /dev/null and b/code/figures/bu/correlations_dsize_chirps_lose.png differ diff --git a/code/figures/bu/correlations_dsize_chirps_win.png b/code/figures/bu/correlations_dsize_chirps_win.png new file mode 100644 index 0000000..dbba9cd Binary files /dev/null and b/code/figures/bu/correlations_dsize_chirps_win.png differ diff --git a/code/figures/bu/correlations_dsize_comp_dur0.png b/code/figures/bu/correlations_dsize_comp_dur0.png new file mode 100644 index 0000000..9f369ee Binary files /dev/null and b/code/figures/bu/correlations_dsize_comp_dur0.png differ diff --git a/code/figures/bu/correlations_dsize_comp_dur1.png b/code/figures/bu/correlations_dsize_comp_dur1.png new file mode 100644 index 0000000..0517c62 Binary files /dev/null and b/code/figures/bu/correlations_dsize_comp_dur1.png differ diff --git a/code/figures/bu/correlations_dsize_contact_count.png b/code/figures/bu/correlations_dsize_contact_count.png new file mode 100644 index 0000000..df834bf Binary files /dev/null and b/code/figures/bu/correlations_dsize_contact_count.png differ diff --git a/code/figures/bu/correlations_dsize_dEODf.png b/code/figures/bu/correlations_dsize_dEODf.png new file mode 100644 index 0000000..a23b244 Binary files /dev/null and b/code/figures/bu/correlations_dsize_dEODf.png differ diff --git a/code/figures/bu/correlations_dsize_med_chase_dur.png b/code/figures/bu/correlations_dsize_med_chase_dur.png new file mode 100644 index 0000000..9c0518d Binary files /dev/null and b/code/figures/bu/correlations_dsize_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_dsize_rises_lose.png b/code/figures/bu/correlations_dsize_rises_lose.png new file mode 100644 index 0000000..81b6da0 Binary files /dev/null and b/code/figures/bu/correlations_dsize_rises_lose.png differ diff --git a/code/figures/bu/correlations_dsize_rises_win.png b/code/figures/bu/correlations_dsize_rises_win.png new file mode 100644 index 0000000..33e8e1b Binary files /dev/null and b/code/figures/bu/correlations_dsize_rises_win.png differ diff --git a/code/figures/bu/correlations_med_chase_dur_comp_dur0.png b/code/figures/bu/correlations_med_chase_dur_comp_dur0.png new file mode 100644 index 0000000..bb16af8 Binary files /dev/null and b/code/figures/bu/correlations_med_chase_dur_comp_dur0.png differ diff --git a/code/figures/bu/correlations_med_chase_dur_comp_dur1.png b/code/figures/bu/correlations_med_chase_dur_comp_dur1.png new file mode 100644 index 0000000..a8d7447 Binary files /dev/null and b/code/figures/bu/correlations_med_chase_dur_comp_dur1.png differ diff --git a/code/figures/bu/correlations_rises_lose_chase_count.png b/code/figures/bu/correlations_rises_lose_chase_count.png new file mode 100644 index 0000000..f445c9b Binary files /dev/null and b/code/figures/bu/correlations_rises_lose_chase_count.png differ diff --git a/code/figures/bu/correlations_rises_lose_comp_dur0.png b/code/figures/bu/correlations_rises_lose_comp_dur0.png new file mode 100644 index 0000000..4a0d730 Binary files /dev/null and b/code/figures/bu/correlations_rises_lose_comp_dur0.png differ diff --git a/code/figures/bu/correlations_rises_lose_comp_dur1.png b/code/figures/bu/correlations_rises_lose_comp_dur1.png new file mode 100644 index 0000000..f222713 Binary files /dev/null and b/code/figures/bu/correlations_rises_lose_comp_dur1.png differ diff --git a/code/figures/bu/correlations_rises_lose_contact_count.png b/code/figures/bu/correlations_rises_lose_contact_count.png new file mode 100644 index 0000000..86d51c5 Binary files /dev/null and b/code/figures/bu/correlations_rises_lose_contact_count.png differ diff --git a/code/figures/bu/correlations_rises_lose_med_chase_dur.png b/code/figures/bu/correlations_rises_lose_med_chase_dur.png new file mode 100644 index 0000000..5c56ddf Binary files /dev/null and b/code/figures/bu/correlations_rises_lose_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_rises_win_chase_count.png b/code/figures/bu/correlations_rises_win_chase_count.png new file mode 100644 index 0000000..0dc7a7c Binary files /dev/null and b/code/figures/bu/correlations_rises_win_chase_count.png differ diff --git a/code/figures/bu/correlations_rises_win_comp_dur0.png b/code/figures/bu/correlations_rises_win_comp_dur0.png new file mode 100644 index 0000000..9654102 Binary files /dev/null and b/code/figures/bu/correlations_rises_win_comp_dur0.png differ diff --git a/code/figures/bu/correlations_rises_win_comp_dur1.png b/code/figures/bu/correlations_rises_win_comp_dur1.png new file mode 100644 index 0000000..647832f Binary files /dev/null and b/code/figures/bu/correlations_rises_win_comp_dur1.png differ diff --git a/code/figures/bu/correlations_rises_win_contact_count.png b/code/figures/bu/correlations_rises_win_contact_count.png new file mode 100644 index 0000000..dbc7a06 Binary files /dev/null and b/code/figures/bu/correlations_rises_win_contact_count.png differ diff --git a/code/figures/bu/correlations_rises_win_med_chase_dur.png b/code/figures/bu/correlations_rises_win_med_chase_dur.png new file mode 100644 index 0000000..ed46c28 Binary files /dev/null and b/code/figures/bu/correlations_rises_win_med_chase_dur.png differ diff --git a/code/figures/bu/correlations_rises_win_rises_lose.png b/code/figures/bu/correlations_rises_win_rises_lose.png new file mode 100644 index 0000000..b463866 Binary files /dev/null and b/code/figures/bu/correlations_rises_win_rises_lose.png differ diff --git a/code/figures/bu/rise_lose_on_chase_off.png b/code/figures/bu/rise_lose_on_chase_off.png new file mode 100644 index 0000000..080e85f Binary files /dev/null and b/code/figures/bu/rise_lose_on_chase_off.png differ diff --git a/code/figures/bu/rise_lose_on_chase_off_by_sexes.png b/code/figures/bu/rise_lose_on_chase_off_by_sexes.png new file mode 100644 index 0000000..14a4339 Binary files /dev/null and b/code/figures/bu/rise_lose_on_chase_off_by_sexes.png differ diff --git a/code/figures/bu/rise_lose_on_chase_on.png b/code/figures/bu/rise_lose_on_chase_on.png new file mode 100644 index 0000000..050d212 Binary files /dev/null and b/code/figures/bu/rise_lose_on_chase_on.png differ diff --git a/code/figures/bu/rise_lose_on_chase_on_by_sexes.png b/code/figures/bu/rise_lose_on_chase_on_by_sexes.png new file mode 100644 index 0000000..0f82db6 Binary files /dev/null and b/code/figures/bu/rise_lose_on_chase_on_by_sexes.png differ diff --git a/code/figures/bu/rise_lose_on_chirp_win.png b/code/figures/bu/rise_lose_on_chirp_win.png new file mode 100644 index 0000000..bf07ff8 Binary files /dev/null and b/code/figures/bu/rise_lose_on_chirp_win.png differ diff --git a/code/figures/bu/rise_lose_on_chirp_win_by_sexes.png b/code/figures/bu/rise_lose_on_chirp_win_by_sexes.png new file mode 100644 index 0000000..1ce076e Binary files /dev/null and b/code/figures/bu/rise_lose_on_chirp_win_by_sexes.png differ diff --git a/code/figures/bu/rise_lose_on_contact.png b/code/figures/bu/rise_lose_on_contact.png new file mode 100644 index 0000000..4dc51c8 Binary files /dev/null and b/code/figures/bu/rise_lose_on_contact.png differ diff --git a/code/figures/bu/rise_lose_on_contact_by_sexes.png b/code/figures/bu/rise_lose_on_contact_by_sexes.png new file mode 100644 index 0000000..c0c7c80 Binary files /dev/null and b/code/figures/bu/rise_lose_on_contact_by_sexes.png differ diff --git a/code/figures/bu/rise_vs_chirp_count.png b/code/figures/bu/rise_vs_chirp_count.png new file mode 100644 index 0000000..78da963 Binary files /dev/null and b/code/figures/bu/rise_vs_chirp_count.png differ diff --git a/code/figures/bu/rise_win_on_chase_off.png b/code/figures/bu/rise_win_on_chase_off.png new file mode 100644 index 0000000..d3863fd Binary files /dev/null and b/code/figures/bu/rise_win_on_chase_off.png differ diff --git a/code/figures/bu/rise_win_on_chase_off_by_sexes.png b/code/figures/bu/rise_win_on_chase_off_by_sexes.png new file mode 100644 index 0000000..d08223d Binary files /dev/null and b/code/figures/bu/rise_win_on_chase_off_by_sexes.png differ diff --git a/code/figures/bu/rise_win_on_chase_on.png b/code/figures/bu/rise_win_on_chase_on.png new file mode 100644 index 0000000..980fbdc Binary files /dev/null and b/code/figures/bu/rise_win_on_chase_on.png differ diff --git a/code/figures/bu/rise_win_on_chase_on_by_sexes.png b/code/figures/bu/rise_win_on_chase_on_by_sexes.png new file mode 100644 index 0000000..84a5314 Binary files /dev/null and b/code/figures/bu/rise_win_on_chase_on_by_sexes.png differ diff --git a/code/figures/bu/rise_win_on_chirp_lose.png b/code/figures/bu/rise_win_on_chirp_lose.png new file mode 100644 index 0000000..310fb92 Binary files /dev/null and b/code/figures/bu/rise_win_on_chirp_lose.png differ diff --git a/code/figures/bu/rise_win_on_chirp_lose_by_sexes.png b/code/figures/bu/rise_win_on_chirp_lose_by_sexes.png new file mode 100644 index 0000000..d23bde1 Binary files /dev/null and b/code/figures/bu/rise_win_on_chirp_lose_by_sexes.png differ diff --git a/code/figures/bu/rise_win_on_contact.png b/code/figures/bu/rise_win_on_contact.png new file mode 100644 index 0000000..e19bbda Binary files /dev/null and b/code/figures/bu/rise_win_on_contact.png differ diff --git a/code/figures/bu/rise_win_on_contact_by_sexes.png b/code/figures/bu/rise_win_on_contact_by_sexes.png new file mode 100644 index 0000000..8dbb4a5 Binary files /dev/null and b/code/figures/bu/rise_win_on_contact_by_sexes.png differ diff --git a/code/figures/bu/rises$_{lose}$_categories.png b/code/figures/bu/rises$_{lose}$_categories.png new file mode 100644 index 0000000..dbdfedd Binary files /dev/null and b/code/figures/bu/rises$_{lose}$_categories.png differ diff --git a/code/figures/bu/rises$_{lose}$_iei.png b/code/figures/bu/rises$_{lose}$_iei.png new file mode 100644 index 0000000..c762634 Binary files /dev/null and b/code/figures/bu/rises$_{lose}$_iei.png differ diff --git a/code/figures/bu/rises$_{lose}$_progression.png b/code/figures/bu/rises$_{lose}$_progression.png new file mode 100644 index 0000000..1932eb4 Binary files /dev/null and b/code/figures/bu/rises$_{lose}$_progression.png differ diff --git a/code/figures/bu/rises$_{win}$_categories.png b/code/figures/bu/rises$_{win}$_categories.png new file mode 100644 index 0000000..8ef7e0c Binary files /dev/null and b/code/figures/bu/rises$_{win}$_categories.png differ diff --git a/code/figures/bu/rises$_{win}$_iei.png b/code/figures/bu/rises$_{win}$_iei.png new file mode 100644 index 0000000..8f2fec0 Binary files /dev/null and b/code/figures/bu/rises$_{win}$_iei.png differ diff --git a/code/figures/bu/rises$_{win}$_progression.png b/code/figures/bu/rises$_{win}$_progression.png new file mode 100644 index 0000000..507544e Binary files /dev/null and b/code/figures/bu/rises$_{win}$_progression.png differ diff --git a/code/figures/bu/rises_by_experince.png b/code/figures/bu/rises_by_experince.png new file mode 100644 index 0000000..b438cf0 Binary files /dev/null and b/code/figures/bu/rises_by_experince.png differ diff --git a/code/figures/bu/rises_per_pairing.png b/code/figures/bu/rises_per_pairing.png new file mode 100644 index 0000000..a16e574 Binary files /dev/null and b/code/figures/bu/rises_per_pairing.png differ diff --git a/code/figures/bu/rises_vs_dEODf.png b/code/figures/bu/rises_vs_dEODf.png new file mode 100644 index 0000000..d5be6e2 Binary files /dev/null and b/code/figures/bu/rises_vs_dEODf.png differ diff --git a/code/figures/bu/rises_vs_dSize.png b/code/figures/bu/rises_vs_dSize.png new file mode 100644 index 0000000..382daf4 Binary files /dev/null and b/code/figures/bu/rises_vs_dSize.png differ diff --git a/code/figures/chirps_by_experince.png b/code/figures/chirps_by_experince.png new file mode 100644 index 0000000..ac6e9e5 Binary files /dev/null and b/code/figures/chirps_by_experince.png differ diff --git a/code/figures/chirps_per_pairing.png b/code/figures/chirps_per_pairing.png new file mode 100644 index 0000000..9ada6a3 Binary files /dev/null and b/code/figures/chirps_per_pairing.png differ diff --git a/code/figures/event_meta/chase_duration_progression.png b/code/figures/event_meta/chase_duration_progression.png new file mode 100644 index 0000000..b9f96ed Binary files /dev/null and b/code/figures/event_meta/chase_duration_progression.png differ diff --git a/code/figures/event_meta/chasing_progression.png b/code/figures/event_meta/chasing_progression.png new file mode 100644 index 0000000..0d9e3ac Binary files /dev/null and b/code/figures/event_meta/chasing_progression.png differ diff --git a/code/figures/event_meta/chirp$_{lose}$_progression.png b/code/figures/event_meta/chirp$_{lose}$_progression.png new file mode 100644 index 0000000..8456ede Binary files /dev/null and b/code/figures/event_meta/chirp$_{lose}$_progression.png differ diff --git a/code/figures/event_meta/chirp$_{win}$_progression.png b/code/figures/event_meta/chirp$_{win}$_progression.png new file mode 100644 index 0000000..d4011e1 Binary files /dev/null and b/code/figures/event_meta/chirp$_{win}$_progression.png differ diff --git a/code/figures/event_meta/chirps$_{lose}$_iei.png b/code/figures/event_meta/chirps$_{lose}$_iei.png new file mode 100644 index 0000000..16304c3 Binary files /dev/null and b/code/figures/event_meta/chirps$_{lose}$_iei.png differ diff --git a/code/figures/event_meta/chirps$_{win}$_iei.png b/code/figures/event_meta/chirps$_{win}$_iei.png new file mode 100644 index 0000000..27949ba Binary files /dev/null and b/code/figures/event_meta/chirps$_{win}$_iei.png differ diff --git a/code/figures/event_meta/contact_progression.png b/code/figures/event_meta/contact_progression.png new file mode 100644 index 0000000..a5b3608 Binary files /dev/null and b/code/figures/event_meta/contact_progression.png differ diff --git a/code/figures/event_meta/rises$_{lose}$_iei.png b/code/figures/event_meta/rises$_{lose}$_iei.png new file mode 100644 index 0000000..6f1df82 Binary files /dev/null and b/code/figures/event_meta/rises$_{lose}$_iei.png differ diff --git a/code/figures/event_meta/rises$_{lose}$_progression.png b/code/figures/event_meta/rises$_{lose}$_progression.png new file mode 100644 index 0000000..1932eb4 Binary files /dev/null and b/code/figures/event_meta/rises$_{lose}$_progression.png differ diff --git a/code/figures/event_meta/rises$_{win}$_iei.png b/code/figures/event_meta/rises$_{win}$_iei.png new file mode 100644 index 0000000..1c9f18e Binary files /dev/null and b/code/figures/event_meta/rises$_{win}$_iei.png differ diff --git a/code/figures/event_meta/rises$_{win}$_progression.png b/code/figures/event_meta/rises$_{win}$_progression.png new file mode 100644 index 0000000..507544e Binary files /dev/null and b/code/figures/event_meta/rises$_{win}$_progression.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_chase_off.png b/code/figures/event_time_corr/chirp_lose_on_chase_off.png new file mode 100644 index 0000000..c562279 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_chase_off.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_chase_off_by_sexes.png b/code/figures/event_time_corr/chirp_lose_on_chase_off_by_sexes.png new file mode 100644 index 0000000..8513240 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_chase_off_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_chase_on.png b/code/figures/event_time_corr/chirp_lose_on_chase_on.png new file mode 100644 index 0000000..a6a9277 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_chase_on.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_chase_on_by_sexes.png b/code/figures/event_time_corr/chirp_lose_on_chase_on_by_sexes.png new file mode 100644 index 0000000..435e481 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_chase_on_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_contact.png b/code/figures/event_time_corr/chirp_lose_on_contact.png new file mode 100644 index 0000000..dfb76f8 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_contact.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_contact_by_sexes.png b/code/figures/event_time_corr/chirp_lose_on_contact_by_sexes.png new file mode 100644 index 0000000..6bd964e Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_contact_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_rise_win.png b/code/figures/event_time_corr/chirp_lose_on_rise_win.png new file mode 100644 index 0000000..aa55f64 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_rise_win.png differ diff --git a/code/figures/event_time_corr/chirp_lose_on_rise_win_by_sexes.png b/code/figures/event_time_corr/chirp_lose_on_rise_win_by_sexes.png new file mode 100644 index 0000000..8a24cf4 Binary files /dev/null and b/code/figures/event_time_corr/chirp_lose_on_rise_win_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_chase_off.png b/code/figures/event_time_corr/chirp_win_on_chase_off.png new file mode 100644 index 0000000..4b0de7f Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_chase_off.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_chase_off_by_sexes.png b/code/figures/event_time_corr/chirp_win_on_chase_off_by_sexes.png new file mode 100644 index 0000000..2ed1aa3 Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_chase_off_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_chase_on.png b/code/figures/event_time_corr/chirp_win_on_chase_on.png new file mode 100644 index 0000000..e08b3a1 Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_chase_on.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_chase_on_by_sexes.png b/code/figures/event_time_corr/chirp_win_on_chase_on_by_sexes.png new file mode 100644 index 0000000..4733d29 Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_chase_on_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_contact.png b/code/figures/event_time_corr/chirp_win_on_contact.png new file mode 100644 index 0000000..8f333f1 Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_contact.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_contact_by_sexes.png b/code/figures/event_time_corr/chirp_win_on_contact_by_sexes.png new file mode 100644 index 0000000..9c11b8e Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_contact_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_rise_lose.png b/code/figures/event_time_corr/chirp_win_on_rise_lose.png new file mode 100644 index 0000000..bb31199 Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_rise_lose.png differ diff --git a/code/figures/event_time_corr/chirp_win_on_rise_lose_by_sexes.png b/code/figures/event_time_corr/chirp_win_on_rise_lose_by_sexes.png new file mode 100644 index 0000000..8a0b7ba Binary files /dev/null and b/code/figures/event_time_corr/chirp_win_on_rise_lose_by_sexes.png differ diff --git a/code/figures/event_time_corr/chirps$_{lose}$_categories.png b/code/figures/event_time_corr/chirps$_{lose}$_categories.png new file mode 100644 index 0000000..5179ccb Binary files /dev/null and b/code/figures/event_time_corr/chirps$_{lose}$_categories.png differ diff --git a/code/figures/event_time_corr/chirps$_{win}$_categories.png b/code/figures/event_time_corr/chirps$_{win}$_categories.png new file mode 100644 index 0000000..23394c8 Binary files /dev/null and b/code/figures/event_time_corr/chirps$_{win}$_categories.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chase_off.png b/code/figures/event_time_corr/rise_lose_on_chase_off.png new file mode 100644 index 0000000..8f359af Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chase_off.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chase_off_by_sexes.png b/code/figures/event_time_corr/rise_lose_on_chase_off_by_sexes.png new file mode 100644 index 0000000..c0494e3 Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chase_off_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chase_on.png b/code/figures/event_time_corr/rise_lose_on_chase_on.png new file mode 100644 index 0000000..d76edc1 Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chase_on.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chase_on_by_sexes.png b/code/figures/event_time_corr/rise_lose_on_chase_on_by_sexes.png new file mode 100644 index 0000000..d07005a Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chase_on_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chirp_win.png b/code/figures/event_time_corr/rise_lose_on_chirp_win.png new file mode 100644 index 0000000..bc3a1dc Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chirp_win.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_chirp_win_by_sexes.png b/code/figures/event_time_corr/rise_lose_on_chirp_win_by_sexes.png new file mode 100644 index 0000000..4d16d8d Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_chirp_win_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_contact.png b/code/figures/event_time_corr/rise_lose_on_contact.png new file mode 100644 index 0000000..4defa56 Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_contact.png differ diff --git a/code/figures/event_time_corr/rise_lose_on_contact_by_sexes.png b/code/figures/event_time_corr/rise_lose_on_contact_by_sexes.png new file mode 100644 index 0000000..5b47a16 Binary files /dev/null and b/code/figures/event_time_corr/rise_lose_on_contact_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chase_off.png b/code/figures/event_time_corr/rise_win_on_chase_off.png new file mode 100644 index 0000000..68ef097 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chase_off.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chase_off_by_sexes.png b/code/figures/event_time_corr/rise_win_on_chase_off_by_sexes.png new file mode 100644 index 0000000..201cc39 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chase_off_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chase_on.png b/code/figures/event_time_corr/rise_win_on_chase_on.png new file mode 100644 index 0000000..5fe7ba6 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chase_on.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chase_on_by_sexes.png b/code/figures/event_time_corr/rise_win_on_chase_on_by_sexes.png new file mode 100644 index 0000000..ba282ac Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chase_on_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chirp_lose.png b/code/figures/event_time_corr/rise_win_on_chirp_lose.png new file mode 100644 index 0000000..1752a65 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chirp_lose.png differ diff --git a/code/figures/event_time_corr/rise_win_on_chirp_lose_by_sexes.png b/code/figures/event_time_corr/rise_win_on_chirp_lose_by_sexes.png new file mode 100644 index 0000000..9143364 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_chirp_lose_by_sexes.png differ diff --git a/code/figures/event_time_corr/rise_win_on_contact.png b/code/figures/event_time_corr/rise_win_on_contact.png new file mode 100644 index 0000000..6478ab4 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_contact.png differ diff --git a/code/figures/event_time_corr/rise_win_on_contact_by_sexes.png b/code/figures/event_time_corr/rise_win_on_contact_by_sexes.png new file mode 100644 index 0000000..54bfca1 Binary files /dev/null and b/code/figures/event_time_corr/rise_win_on_contact_by_sexes.png differ diff --git a/code/figures/event_time_corr/rises$_{lose}$_categories.png b/code/figures/event_time_corr/rises$_{lose}$_categories.png new file mode 100644 index 0000000..8f8e991 Binary files /dev/null and b/code/figures/event_time_corr/rises$_{lose}$_categories.png differ diff --git a/code/figures/event_time_corr/rises$_{win}$_categories.png b/code/figures/event_time_corr/rises$_{win}$_categories.png new file mode 100644 index 0000000..751ebea Binary files /dev/null and b/code/figures/event_time_corr/rises$_{win}$_categories.png differ diff --git a/code/figures/example_trials/2019-11-25-09_59.png b/code/figures/example_trials/2019-11-25-09_59.png new file mode 100644 index 0000000..2526678 Binary files /dev/null and b/code/figures/example_trials/2019-11-25-09_59.png differ diff --git a/code/figures/example_trials/2019-11-26-10_00.png b/code/figures/example_trials/2019-11-26-10_00.png new file mode 100644 index 0000000..6b21d17 Binary files /dev/null and b/code/figures/example_trials/2019-11-26-10_00.png differ diff --git a/code/figures/example_trials/2019-11-27-10_00.png b/code/figures/example_trials/2019-11-27-10_00.png new file mode 100644 index 0000000..b9cdd18 Binary files /dev/null and b/code/figures/example_trials/2019-11-27-10_00.png differ diff --git a/code/figures/example_trials/2019-11-28-09_58.png b/code/figures/example_trials/2019-11-28-09_58.png new file mode 100644 index 0000000..62097bf Binary files /dev/null and b/code/figures/example_trials/2019-11-28-09_58.png differ diff --git a/code/figures/example_trials/2019-11-29-09_59.png b/code/figures/example_trials/2019-11-29-09_59.png new file mode 100644 index 0000000..3c5a417 Binary files /dev/null and b/code/figures/example_trials/2019-11-29-09_59.png differ diff --git a/code/figures/example_trials/2019-12-02-10_00.png b/code/figures/example_trials/2019-12-02-10_00.png new file mode 100644 index 0000000..700aa09 Binary files /dev/null and b/code/figures/example_trials/2019-12-02-10_00.png differ diff --git a/code/figures/example_trials/2019-12-03-10_01.png b/code/figures/example_trials/2019-12-03-10_01.png new file mode 100644 index 0000000..eeb522c Binary files /dev/null and b/code/figures/example_trials/2019-12-03-10_01.png differ diff --git a/code/figures/example_trials/2019-12-04-10_00.png b/code/figures/example_trials/2019-12-04-10_00.png new file mode 100644 index 0000000..1a9a1b8 Binary files /dev/null and b/code/figures/example_trials/2019-12-04-10_00.png differ diff --git a/code/figures/example_trials/2019-12-06-10_00.png b/code/figures/example_trials/2019-12-06-10_00.png new file mode 100644 index 0000000..6ddd59a Binary files /dev/null and b/code/figures/example_trials/2019-12-06-10_00.png differ diff --git a/code/figures/example_trials/2019-12-09-10_00.png b/code/figures/example_trials/2019-12-09-10_00.png new file mode 100644 index 0000000..6d03f75 Binary files /dev/null and b/code/figures/example_trials/2019-12-09-10_00.png differ diff --git a/code/figures/example_trials/2019-12-10-10_00.png b/code/figures/example_trials/2019-12-10-10_00.png new file mode 100644 index 0000000..a6cc8d4 Binary files /dev/null and b/code/figures/example_trials/2019-12-10-10_00.png differ diff --git a/code/figures/example_trials/2019-12-11-10_00.png b/code/figures/example_trials/2019-12-11-10_00.png new file mode 100644 index 0000000..a0d8653 Binary files /dev/null and b/code/figures/example_trials/2019-12-11-10_00.png differ diff --git a/code/figures/example_trials/2019-12-12-10_00.png b/code/figures/example_trials/2019-12-12-10_00.png new file mode 100644 index 0000000..228b347 Binary files /dev/null and b/code/figures/example_trials/2019-12-12-10_00.png differ diff --git a/code/figures/example_trials/2019-12-16-10_00.png b/code/figures/example_trials/2019-12-16-10_00.png new file mode 100644 index 0000000..4059992 Binary files /dev/null and b/code/figures/example_trials/2019-12-16-10_00.png differ diff --git a/code/figures/example_trials/2020-03-13-10_00.png b/code/figures/example_trials/2020-03-13-10_00.png new file mode 100644 index 0000000..fad6639 Binary files /dev/null and b/code/figures/example_trials/2020-03-13-10_00.png differ diff --git a/code/figures/example_trials/2020-03-16-10_00.png b/code/figures/example_trials/2020-03-16-10_00.png new file mode 100644 index 0000000..3101cde Binary files /dev/null and b/code/figures/example_trials/2020-03-16-10_00.png differ diff --git a/code/figures/example_trials/2020-03-18-10_34.png b/code/figures/example_trials/2020-03-18-10_34.png new file mode 100644 index 0000000..9e59996 Binary files /dev/null and b/code/figures/example_trials/2020-03-18-10_34.png differ diff --git a/code/figures/example_trials/2020-03-19-10_00.png b/code/figures/example_trials/2020-03-19-10_00.png new file mode 100644 index 0000000..7e7157d Binary files /dev/null and b/code/figures/example_trials/2020-03-19-10_00.png differ diff --git a/code/figures/example_trials/2020-03-20-10_00.png b/code/figures/example_trials/2020-03-20-10_00.png new file mode 100644 index 0000000..da1a51b Binary files /dev/null and b/code/figures/example_trials/2020-03-20-10_00.png differ diff --git a/code/figures/example_trials/2020-03-23-09_58.png b/code/figures/example_trials/2020-03-23-09_58.png new file mode 100644 index 0000000..efd6ba8 Binary files /dev/null and b/code/figures/example_trials/2020-03-23-09_58.png differ diff --git a/code/figures/example_trials/2020-03-24-10_00.png b/code/figures/example_trials/2020-03-24-10_00.png new file mode 100644 index 0000000..34f75e8 Binary files /dev/null and b/code/figures/example_trials/2020-03-24-10_00.png differ diff --git a/code/figures/example_trials/2020-03-25-10_00.png b/code/figures/example_trials/2020-03-25-10_00.png new file mode 100644 index 0000000..05a561d Binary files /dev/null and b/code/figures/example_trials/2020-03-25-10_00.png differ diff --git a/code/figures/example_trials/2020-03-31-09_59.png b/code/figures/example_trials/2020-03-31-09_59.png new file mode 100644 index 0000000..f17c227 Binary files /dev/null and b/code/figures/example_trials/2020-03-31-09_59.png differ diff --git a/code/figures/example_trials/2020-05-11-10_00.png b/code/figures/example_trials/2020-05-11-10_00.png new file mode 100644 index 0000000..5ca4969 Binary files /dev/null and b/code/figures/example_trials/2020-05-11-10_00.png differ diff --git a/code/figures/example_trials/2020-05-12-10_00.png b/code/figures/example_trials/2020-05-12-10_00.png new file mode 100644 index 0000000..c40c25c Binary files /dev/null and b/code/figures/example_trials/2020-05-12-10_00.png differ diff --git a/code/figures/example_trials/2020-05-13-10_00.png b/code/figures/example_trials/2020-05-13-10_00.png new file mode 100644 index 0000000..94eb5e5 Binary files /dev/null and b/code/figures/example_trials/2020-05-13-10_00.png differ diff --git a/code/figures/example_trials/2020-05-14-10_00.png b/code/figures/example_trials/2020-05-14-10_00.png new file mode 100644 index 0000000..fc9ee74 Binary files /dev/null and b/code/figures/example_trials/2020-05-14-10_00.png differ diff --git a/code/figures/example_trials/2020-05-15-10_00.png b/code/figures/example_trials/2020-05-15-10_00.png new file mode 100644 index 0000000..722187d Binary files /dev/null and b/code/figures/example_trials/2020-05-15-10_00.png differ diff --git a/code/figures/example_trials/2020-05-18-10_00.png b/code/figures/example_trials/2020-05-18-10_00.png new file mode 100644 index 0000000..627f76d Binary files /dev/null and b/code/figures/example_trials/2020-05-18-10_00.png differ diff --git a/code/figures/example_trials/2020-05-19-10_00.png b/code/figures/example_trials/2020-05-19-10_00.png new file mode 100644 index 0000000..51c7e50 Binary files /dev/null and b/code/figures/example_trials/2020-05-19-10_00.png differ diff --git a/code/figures/example_trials/2020-05-21-10_00.png b/code/figures/example_trials/2020-05-21-10_00.png new file mode 100644 index 0000000..9b7d2e1 Binary files /dev/null and b/code/figures/example_trials/2020-05-21-10_00.png differ diff --git a/code/figures/example_trials/2020-05-25-10_00.png b/code/figures/example_trials/2020-05-25-10_00.png new file mode 100644 index 0000000..d711453 Binary files /dev/null and b/code/figures/example_trials/2020-05-25-10_00.png differ diff --git a/code/figures/example_trials/2020-05-27-10_00.png b/code/figures/example_trials/2020-05-27-10_00.png new file mode 100644 index 0000000..bf15e12 Binary files /dev/null and b/code/figures/example_trials/2020-05-27-10_00.png differ diff --git a/code/figures/example_trials/2020-05-28-10_00.png b/code/figures/example_trials/2020-05-28-10_00.png new file mode 100644 index 0000000..676e362 Binary files /dev/null and b/code/figures/example_trials/2020-05-28-10_00.png differ diff --git a/code/figures/example_trials/2020-05-29-10_00.png b/code/figures/example_trials/2020-05-29-10_00.png new file mode 100644 index 0000000..f672240 Binary files /dev/null and b/code/figures/example_trials/2020-05-29-10_00.png differ diff --git a/code/figures/example_trials/2020-06-02-10_00.png b/code/figures/example_trials/2020-06-02-10_00.png new file mode 100644 index 0000000..ff92f2d Binary files /dev/null and b/code/figures/example_trials/2020-06-02-10_00.png differ diff --git a/code/figures/example_trials/2020-06-03-10_10.png b/code/figures/example_trials/2020-06-03-10_10.png new file mode 100644 index 0000000..f1f3cc7 Binary files /dev/null and b/code/figures/example_trials/2020-06-03-10_10.png differ diff --git a/code/figures/example_trials/2020-06-04-10_00.png b/code/figures/example_trials/2020-06-04-10_00.png new file mode 100644 index 0000000..cc200a1 Binary files /dev/null and b/code/figures/example_trials/2020-06-04-10_00.png differ diff --git a/code/figures/example_trials/2020-06-05-10_00.png b/code/figures/example_trials/2020-06-05-10_00.png new file mode 100644 index 0000000..bab173a Binary files /dev/null and b/code/figures/example_trials/2020-06-05-10_00.png differ diff --git a/code/figures/example_trials/2020-06-08-10_00.png b/code/figures/example_trials/2020-06-08-10_00.png new file mode 100644 index 0000000..adf1354 Binary files /dev/null and b/code/figures/example_trials/2020-06-08-10_00.png differ diff --git a/code/figures/example_trials/2020-06-09-10_00.png b/code/figures/example_trials/2020-06-09-10_00.png new file mode 100644 index 0000000..4318140 Binary files /dev/null and b/code/figures/example_trials/2020-06-09-10_00.png differ diff --git a/code/figures/example_trials/2020-06-10-10_00.png b/code/figures/example_trials/2020-06-10-10_00.png new file mode 100644 index 0000000..39b46db Binary files /dev/null and b/code/figures/example_trials/2020-06-10-10_00.png differ diff --git a/code/figures/example_trials/2020-06-11-10_00.png b/code/figures/example_trials/2020-06-11-10_00.png new file mode 100644 index 0000000..0d9feef Binary files /dev/null and b/code/figures/example_trials/2020-06-11-10_00.png differ diff --git a/code/figures/markov/agonistic_categories.png b/code/figures/markov/agonistic_categories.png new file mode 100644 index 0000000..6e650d1 Binary files /dev/null and b/code/figures/markov/agonistic_categories.png differ diff --git a/code/figures/markov/event_counts.png b/code/figures/markov/event_counts.png new file mode 100644 index 0000000..f7b134c Binary files /dev/null and b/code/figures/markov/event_counts.png differ diff --git a/code/figures/markov/markov_0_destination.png b/code/figures/markov/markov_0_destination.png new file mode 100644 index 0000000..688d00e Binary files /dev/null and b/code/figures/markov/markov_0_destination.png differ diff --git a/code/figures/markov/markov_0_origin.png b/code/figures/markov/markov_0_origin.png new file mode 100644 index 0000000..0edf54c Binary files /dev/null and b/code/figures/markov/markov_0_origin.png differ diff --git a/code/figures/markov/markov_1_destination.png b/code/figures/markov/markov_1_destination.png new file mode 100644 index 0000000..6f52e28 Binary files /dev/null and b/code/figures/markov/markov_1_destination.png differ diff --git a/code/figures/markov/markov_1_origin.png b/code/figures/markov/markov_1_origin.png new file mode 100644 index 0000000..967b2de Binary files /dev/null and b/code/figures/markov/markov_1_origin.png differ diff --git a/code/figures/markov/markov_2_destination.png b/code/figures/markov/markov_2_destination.png new file mode 100644 index 0000000..326481d Binary files /dev/null and b/code/figures/markov/markov_2_destination.png differ diff --git a/code/figures/markov/markov_2_origin.png b/code/figures/markov/markov_2_origin.png new file mode 100644 index 0000000..a484322 Binary files /dev/null and b/code/figures/markov/markov_2_origin.png differ diff --git a/code/figures/markov/markov_3_destination.png b/code/figures/markov/markov_3_destination.png new file mode 100644 index 0000000..cf8b234 Binary files /dev/null and b/code/figures/markov/markov_3_destination.png differ diff --git a/code/figures/markov/markov_3_origin.png b/code/figures/markov/markov_3_origin.png new file mode 100644 index 0000000..e3fad91 Binary files /dev/null and b/code/figures/markov/markov_3_origin.png differ diff --git a/code/figures/markov/markov_4_destination.png b/code/figures/markov/markov_4_destination.png new file mode 100644 index 0000000..1ce3447 Binary files /dev/null and b/code/figures/markov/markov_4_destination.png differ diff --git a/code/figures/markov/markov_4_origin.png b/code/figures/markov/markov_4_origin.png new file mode 100644 index 0000000..ec1e42c Binary files /dev/null and b/code/figures/markov/markov_4_origin.png differ diff --git a/code/figures/markov/markov_5_destination.png b/code/figures/markov/markov_5_destination.png new file mode 100644 index 0000000..2ab9f27 Binary files /dev/null and b/code/figures/markov/markov_5_destination.png differ diff --git a/code/figures/markov/markov_5_origin.png b/code/figures/markov/markov_5_origin.png new file mode 100644 index 0000000..6b4e8ad Binary files /dev/null and b/code/figures/markov/markov_5_origin.png differ diff --git a/code/figures/markov/markov_6_destination.png b/code/figures/markov/markov_6_destination.png new file mode 100644 index 0000000..daee147 Binary files /dev/null and b/code/figures/markov/markov_6_destination.png differ diff --git a/code/figures/markov/markov_6_origin.png b/code/figures/markov/markov_6_origin.png new file mode 100644 index 0000000..5301526 Binary files /dev/null and b/code/figures/markov/markov_6_origin.png differ diff --git a/code/figures/markov/markov_7_destination.png b/code/figures/markov/markov_7_destination.png new file mode 100644 index 0000000..79f09de Binary files /dev/null and b/code/figures/markov/markov_7_destination.png differ diff --git a/code/figures/markov/markov_7_origin.png b/code/figures/markov/markov_7_origin.png new file mode 100644 index 0000000..c98eb21 Binary files /dev/null and b/code/figures/markov/markov_7_origin.png differ diff --git a/code/figures/markov/markov_8_destination.png b/code/figures/markov/markov_8_destination.png new file mode 100644 index 0000000..cb371c6 Binary files /dev/null and b/code/figures/markov/markov_8_destination.png differ diff --git a/code/figures/markov/markov_8_origin.png b/code/figures/markov/markov_8_origin.png new file mode 100644 index 0000000..46537bd Binary files /dev/null and b/code/figures/markov/markov_8_origin.png differ diff --git a/code/figures/markov/markov_destination.png b/code/figures/markov/markov_destination.png new file mode 100644 index 0000000..1deba8f Binary files /dev/null and b/code/figures/markov/markov_destination.png differ diff --git a/code/figures/markov/markov_origin.png b/code/figures/markov/markov_origin.png new file mode 100644 index 0000000..9954d91 Binary files /dev/null and b/code/figures/markov/markov_origin.png differ diff --git a/code/figures/meta_correlations/chirps_vs_dEODf.png b/code/figures/meta_correlations/chirps_vs_dEODf.png new file mode 100644 index 0000000..c3a8bad Binary files /dev/null and b/code/figures/meta_correlations/chirps_vs_dEODf.png differ diff --git a/code/figures/meta_correlations/chirps_vs_dSize.png b/code/figures/meta_correlations/chirps_vs_dSize.png new file mode 100644 index 0000000..008d924 Binary files /dev/null and b/code/figures/meta_correlations/chirps_vs_dSize.png differ diff --git a/code/figures/meta_correlations/corr_abs_dEODf_chirps_lose.png b/code/figures/meta_correlations/corr_abs_dEODf_chirps_lose.png new file mode 100644 index 0000000..035be2d Binary files /dev/null and b/code/figures/meta_correlations/corr_abs_dEODf_chirps_lose.png differ diff --git a/code/figures/meta_correlations/corr_abs_dEODf_med_chase_dur.png b/code/figures/meta_correlations/corr_abs_dEODf_med_chase_dur.png new file mode 100644 index 0000000..345480c Binary files /dev/null and b/code/figures/meta_correlations/corr_abs_dEODf_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_chase_count_comp_dur0.png b/code/figures/meta_correlations/corr_chase_count_comp_dur0.png new file mode 100644 index 0000000..d29d6fd Binary files /dev/null and b/code/figures/meta_correlations/corr_chase_count_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_chase_count_comp_dur1.png b/code/figures/meta_correlations/corr_chase_count_comp_dur1.png new file mode 100644 index 0000000..a731460 Binary files /dev/null and b/code/figures/meta_correlations/corr_chase_count_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_chase_count_contact_count.png b/code/figures/meta_correlations/corr_chase_count_contact_count.png new file mode 100644 index 0000000..10d2e50 Binary files /dev/null and b/code/figures/meta_correlations/corr_chase_count_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_chase_count_med_chase_dur.png b/code/figures/meta_correlations/corr_chase_count_med_chase_dur.png new file mode 100644 index 0000000..8cc88aa Binary files /dev/null and b/code/figures/meta_correlations/corr_chase_count_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_chase_count.png b/code/figures/meta_correlations/corr_chirps_lose_chase_count.png new file mode 100644 index 0000000..be06409 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_comp_dur0.png b/code/figures/meta_correlations/corr_chirps_lose_comp_dur0.png new file mode 100644 index 0000000..de67147 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_comp_dur1.png b/code/figures/meta_correlations/corr_chirps_lose_comp_dur1.png new file mode 100644 index 0000000..2a8efac Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_contact_count.png b/code/figures/meta_correlations/corr_chirps_lose_contact_count.png new file mode 100644 index 0000000..654c555 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_med_chase_dur.png b/code/figures/meta_correlations/corr_chirps_lose_med_chase_dur.png new file mode 100644 index 0000000..58e04db Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_rises_lose.png b/code/figures/meta_correlations/corr_chirps_lose_rises_lose.png new file mode 100644 index 0000000..6bb77be Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_rises_lose.png differ diff --git a/code/figures/meta_correlations/corr_chirps_lose_rises_win.png b/code/figures/meta_correlations/corr_chirps_lose_rises_win.png new file mode 100644 index 0000000..bd46063 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_lose_rises_win.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_chase_count.png b/code/figures/meta_correlations/corr_chirps_win_chase_count.png new file mode 100644 index 0000000..f31caa2 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_chirps_lose.png b/code/figures/meta_correlations/corr_chirps_win_chirps_lose.png new file mode 100644 index 0000000..5c5253c Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_chirps_lose.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_comp_dur0.png b/code/figures/meta_correlations/corr_chirps_win_comp_dur0.png new file mode 100644 index 0000000..654b9cc Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_comp_dur1.png b/code/figures/meta_correlations/corr_chirps_win_comp_dur1.png new file mode 100644 index 0000000..5aaa29f Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_contact_count.png b/code/figures/meta_correlations/corr_chirps_win_contact_count.png new file mode 100644 index 0000000..c3e4a3d Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_med_chase_dur.png b/code/figures/meta_correlations/corr_chirps_win_med_chase_dur.png new file mode 100644 index 0000000..b07e8f4 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_rises_lose.png b/code/figures/meta_correlations/corr_chirps_win_rises_lose.png new file mode 100644 index 0000000..f185831 Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_rises_lose.png differ diff --git a/code/figures/meta_correlations/corr_chirps_win_rises_win.png b/code/figures/meta_correlations/corr_chirps_win_rises_win.png new file mode 100644 index 0000000..7cde89b Binary files /dev/null and b/code/figures/meta_correlations/corr_chirps_win_rises_win.png differ diff --git a/code/figures/meta_correlations/corr_comp_dur0_comp_dur1.png b/code/figures/meta_correlations/corr_comp_dur0_comp_dur1.png new file mode 100644 index 0000000..96588e3 Binary files /dev/null and b/code/figures/meta_correlations/corr_comp_dur0_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_contact_count_comp_dur0.png b/code/figures/meta_correlations/corr_contact_count_comp_dur0.png new file mode 100644 index 0000000..9379fb0 Binary files /dev/null and b/code/figures/meta_correlations/corr_contact_count_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_contact_count_comp_dur1.png b/code/figures/meta_correlations/corr_contact_count_comp_dur1.png new file mode 100644 index 0000000..1d8f911 Binary files /dev/null and b/code/figures/meta_correlations/corr_contact_count_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_contact_count_med_chase_dur.png b/code/figures/meta_correlations/corr_contact_count_med_chase_dur.png new file mode 100644 index 0000000..9c417cf Binary files /dev/null and b/code/figures/meta_correlations/corr_contact_count_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_chase_count.png b/code/figures/meta_correlations/corr_dEODf_chase_count.png new file mode 100644 index 0000000..a4841a4 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_chirps_lose.png b/code/figures/meta_correlations/corr_dEODf_chirps_lose.png new file mode 100644 index 0000000..5f214d3 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_chirps_lose.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_chirps_win.png b/code/figures/meta_correlations/corr_dEODf_chirps_win.png new file mode 100644 index 0000000..390ae53 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_chirps_win.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_comp_dur0.png b/code/figures/meta_correlations/corr_dEODf_comp_dur0.png new file mode 100644 index 0000000..f74a706 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_comp_dur1.png b/code/figures/meta_correlations/corr_dEODf_comp_dur1.png new file mode 100644 index 0000000..73951ce Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_contact_count.png b/code/figures/meta_correlations/corr_dEODf_contact_count.png new file mode 100644 index 0000000..22f333b Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_med_chase_dur.png b/code/figures/meta_correlations/corr_dEODf_med_chase_dur.png new file mode 100644 index 0000000..7ee22c4 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_rises_lose.png b/code/figures/meta_correlations/corr_dEODf_rises_lose.png new file mode 100644 index 0000000..25cdbeb Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_rises_lose.png differ diff --git a/code/figures/meta_correlations/corr_dEODf_rises_win.png b/code/figures/meta_correlations/corr_dEODf_rises_win.png new file mode 100644 index 0000000..b272ba1 Binary files /dev/null and b/code/figures/meta_correlations/corr_dEODf_rises_win.png differ diff --git a/code/figures/meta_correlations/corr_dsize_chase_count.png b/code/figures/meta_correlations/corr_dsize_chase_count.png new file mode 100644 index 0000000..2f9e57b Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_dsize_chirps_lose.png b/code/figures/meta_correlations/corr_dsize_chirps_lose.png new file mode 100644 index 0000000..036c9ac Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_chirps_lose.png differ diff --git a/code/figures/meta_correlations/corr_dsize_chirps_win.png b/code/figures/meta_correlations/corr_dsize_chirps_win.png new file mode 100644 index 0000000..4cc167e Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_chirps_win.png differ diff --git a/code/figures/meta_correlations/corr_dsize_comp_dur0.png b/code/figures/meta_correlations/corr_dsize_comp_dur0.png new file mode 100644 index 0000000..e7da48e Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_dsize_comp_dur1.png b/code/figures/meta_correlations/corr_dsize_comp_dur1.png new file mode 100644 index 0000000..c03ec63 Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_dsize_contact_count.png b/code/figures/meta_correlations/corr_dsize_contact_count.png new file mode 100644 index 0000000..b3e9b22 Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_dsize_dEODf.png b/code/figures/meta_correlations/corr_dsize_dEODf.png new file mode 100644 index 0000000..4837796 Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_dEODf.png differ diff --git a/code/figures/meta_correlations/corr_dsize_med_chase_dur.png b/code/figures/meta_correlations/corr_dsize_med_chase_dur.png new file mode 100644 index 0000000..dfe2369 Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_dsize_rises_lose.png b/code/figures/meta_correlations/corr_dsize_rises_lose.png new file mode 100644 index 0000000..d094090 Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_rises_lose.png differ diff --git a/code/figures/meta_correlations/corr_dsize_rises_win.png b/code/figures/meta_correlations/corr_dsize_rises_win.png new file mode 100644 index 0000000..1d08d0b Binary files /dev/null and b/code/figures/meta_correlations/corr_dsize_rises_win.png differ diff --git a/code/figures/meta_correlations/corr_med_chase_dur_comp_dur0.png b/code/figures/meta_correlations/corr_med_chase_dur_comp_dur0.png new file mode 100644 index 0000000..1295de7 Binary files /dev/null and b/code/figures/meta_correlations/corr_med_chase_dur_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_med_chase_dur_comp_dur1.png b/code/figures/meta_correlations/corr_med_chase_dur_comp_dur1.png new file mode 100644 index 0000000..1683699 Binary files /dev/null and b/code/figures/meta_correlations/corr_med_chase_dur_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_rises_lose_chase_count.png b/code/figures/meta_correlations/corr_rises_lose_chase_count.png new file mode 100644 index 0000000..5ba4f06 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_lose_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_rises_lose_comp_dur0.png b/code/figures/meta_correlations/corr_rises_lose_comp_dur0.png new file mode 100644 index 0000000..24e5d81 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_lose_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_rises_lose_comp_dur1.png b/code/figures/meta_correlations/corr_rises_lose_comp_dur1.png new file mode 100644 index 0000000..77006a9 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_lose_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_rises_lose_contact_count.png b/code/figures/meta_correlations/corr_rises_lose_contact_count.png new file mode 100644 index 0000000..faa224d Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_lose_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_rises_lose_med_chase_dur.png b/code/figures/meta_correlations/corr_rises_lose_med_chase_dur.png new file mode 100644 index 0000000..738c619 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_lose_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_chase_count.png b/code/figures/meta_correlations/corr_rises_win_chase_count.png new file mode 100644 index 0000000..03e7552 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_chase_count.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_comp_dur0.png b/code/figures/meta_correlations/corr_rises_win_comp_dur0.png new file mode 100644 index 0000000..cfc84ee Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_comp_dur0.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_comp_dur1.png b/code/figures/meta_correlations/corr_rises_win_comp_dur1.png new file mode 100644 index 0000000..a487bd7 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_comp_dur1.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_contact_count.png b/code/figures/meta_correlations/corr_rises_win_contact_count.png new file mode 100644 index 0000000..7af876f Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_contact_count.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_med_chase_dur.png b/code/figures/meta_correlations/corr_rises_win_med_chase_dur.png new file mode 100644 index 0000000..b151043 Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_med_chase_dur.png differ diff --git a/code/figures/meta_correlations/corr_rises_win_rises_lose.png b/code/figures/meta_correlations/corr_rises_win_rises_lose.png new file mode 100644 index 0000000..7261d7c Binary files /dev/null and b/code/figures/meta_correlations/corr_rises_win_rises_lose.png differ diff --git a/code/figures/meta_correlations/rises_vs_dEODf.png b/code/figures/meta_correlations/rises_vs_dEODf.png new file mode 100644 index 0000000..d5be6e2 Binary files /dev/null and b/code/figures/meta_correlations/rises_vs_dEODf.png differ diff --git a/code/figures/meta_correlations/rises_vs_dSize.png b/code/figures/meta_correlations/rises_vs_dSize.png new file mode 100644 index 0000000..382daf4 Binary files /dev/null and b/code/figures/meta_correlations/rises_vs_dSize.png differ diff --git a/code/figures/rise_vs_chirp_count.png b/code/figures/rise_vs_chirp_count.png new file mode 100644 index 0000000..78da963 Binary files /dev/null and b/code/figures/rise_vs_chirp_count.png differ diff --git a/code/figures/rises_by_experince.png b/code/figures/rises_by_experince.png new file mode 100644 index 0000000..b438cf0 Binary files /dev/null and b/code/figures/rises_by_experince.png differ diff --git a/code/figures/rises_per_pairing.png b/code/figures/rises_per_pairing.png new file mode 100644 index 0000000..a16e574 Binary files /dev/null and b/code/figures/rises_per_pairing.png differ diff --git a/id_meta.csv b/code/id_meta.csv similarity index 100% rename from id_meta.csv rename to code/id_meta.csv diff --git a/order_meta.csv b/code/order_meta.csv similarity index 100% rename from order_meta.csv rename to code/order_meta.csv diff --git a/trail_analysis.py b/code/trail_analysis.py similarity index 100% rename from trail_analysis.py rename to code/trail_analysis.py diff --git a/trial_summary.csv b/code/trial_summary.csv similarity index 100% rename from trial_summary.csv rename to code/trial_summary.csv diff --git a/code/trial_summary_bu.csv b/code/trial_summary_bu.csv new file mode 100644 index 0000000..df38831 --- /dev/null +++ b/code/trial_summary_bu.csv @@ -0,0 +1,44 @@ +,recording,group,win_fish,lose_fish,win_ID,lose_ID,sex_win,sex_lose,size_win,size_lose,EODf_win,EODf_lose,exp_win,exp_lose,chirps_win,chirps_lose,rises_win,rises_lose,draw +0,2019-11-25-09_59,3,1,2,10.0,6.0,f,m,13.2,12.0,713.0544113886845,762.0273047058653,1,1,36,2657,22,165,0 +1,2019-11-26-10_00,3,4,3,3.0,4.0,m,m,15.5,17.5,883.141322780704,918.0584506431281,1,1,472,1322,17,481,0 +2,2019-11-27-10_00,3,5,6,1.0,6.0,f,f,14.4,12.65,728.1663791991439,650.6079943890219,1,1,16,2041,14,311,0 +3,2019-11-28-09_58,3,1,3,3.0,1.0,f,m,13.2,17.5,720.9491781126661,888.9029901347602,2,2,370,30,26,37,0 +4,2019-11-29-09_59,3,4,2,11.0,0.0,m,m,15.5,12.0,927.3677808126133,757.8912786740188,2,2,119,1232,56,161,0 +5,2019-12-02-10_00,3,3,5,3.0,0.0,m,f,17.5,14.4,866.5433040990971,719.3596160671729,3,2,2,759,28,165,0 +6,2019-12-03-10_01,3,1,6,3.0,4.0,f,f,13.2,12.65,709.888382193265,645.345316200243,3,2,61,3191,23,230,0 +7,2019-12-04-10_00,3,3,2,11.0,8.0,m,m,17.5,12.0,867.515070390076,732.5567785654214,4,3,2,1005,31,73,0 +8,2019-12-06-10_00,3,4,6,1.0,2.0,m,f,15.5,12.65,912.2881743174412,652.9837532796978,3,3,34,306,58,188,0 +9,2019-12-09-10_00,3,5,2,5.0,9.0,f,m,14.4,12.0,715.5845509704202,726.7506510306094,4,4,446,2345,10,180,0 +10,2019-12-10-10_00,3,3,6,3.0,2.0,m,f,17.5,12.65,853.973867720756,640.9374451096469,5,4,1,205,31,165,0 +11,2019-12-11-10_00,3,4,1,13.0,1.0,m,f,15.5,13.2,909.5564241038855,704.759181051688,4,5,44,260,48,165,0 +12,2019-12-12-10_00,3,2,6,3.0,5.0,m,f,12.0,12.65,708.2029632781753,649.3215729301896,5,5,55,1489,26,152,0 +13,2019-12-16-10_00,3,4,5,7.0,1.0,m,f,15.5,14.4,911.4475182245616,734.3463774893517,5,5,52,963,39,123,0 +14,2020-03-13-10_00,4,5,4,0.0,1.0,f,f,12.5,12.266666666666666,726.3470010966499,705.1654694195288,2,2,54,941,70,177,0 +15,2020-03-16-10_00,4,3,1,3.0,2.0,m,f,11.933333333333332,11.299999999999999,852.2318545355058,642.0347177867645,3,3,1304,724,57,154,0 +16,2020-03-18-10_34,4,5,3,0.0,4.0,f,m,12.5,11.933333333333332,725.8257351336636,863.6524533012707,3,4,16557,2089,339,43,1 +17,2020-03-19-10_00,4,1,4,0.0,1.0,f,f,11.299999999999999,12.266666666666666,659.5490944255365,697.5034008357667,4,4,52,1583,36,197,0 +18,2020-03-20-10_00,4,5,2,0.0,1.0,f,f,12.5,12.266666666666666,,,4,4,45,665,75,76,0 +19,2020-03-23-09_58,4,2,1,0.0,2.0,f,f,12.266666666666666,11.299999999999999,699.4914052830558,654.7533296886725,5,5,84,1158,17,67,1 +20,2020-03-24-10_00,4,4,3,2.0,1.0,f,m,12.266666666666666,11.933333333333332,684.578069899078,854.0458114588357,5,5,883,2,184,86,1 +21,2020-03-25-10_00,4,5,1,1.0,0.0,f,f,12.5,11.299999999999999,733.5001619575638,647.9874053272127,5,6,819,1831,48,70,1 +22,2020-03-31-09_59,4,3,2,0.0,3.0,m,f,11.933333333333332,12.266666666666666,860.5459022492297,692.2978867242133,6,6,10,225,26,50,1 +23,2020-05-11-10_00,5,1,2,3.0,4.0,m,f,12.333333333333334,13.166666666666666,834.369973908149,667.9762847453638,1,1,4,631,25,230,0 +24,2020-05-12-10_00,5,5,3,7.0,6.0,f,m,19.0,10.666666666666666,697.6088902440882,818.2108387976053,1,1,1,117,8,429,0 +25,2020-05-13-10_00,5,4,2,4.0,7.0,m,f,17.5,13.166666666666666,885.2957289220773,681.372424868242,1,2,34,614,22,98,0 +26,2020-05-14-10_00,5,5,1,4.0,5.0,f,m,19.0,12.333333333333334,703.5828000211009,840.457519990521,2,2,83,316,10,232,0 +27,2020-05-15-10_00,5,4,3,18.0,19.0,m,m,17.5,10.666666666666666,875.2647282681933,824.4852744512042,2,2,98,745,27,255,0 +28,2020-05-18-10_00,5,2,3,3.0,6.0,f,m,13.166666666666666,10.666666666666666,677.7516154017525,837.794665426305,3,3,338,530,28,270,0 +29,2020-05-19-10_00,5,5,4,6.0,7.0,f,m,19.0,17.5,699.3246023368515,881.0368775083901,3,3,628,1457,2,256,0 +30,2020-05-21-10_00,5,5,2,1434.0,1420.0,f,f,19.0,13.166666666666666,702.20947265625,684.967041015625,4,4,86,671,43,257,0 +31,2020-05-25-10_00,5,4,1,30.0,19.0,m,m,17.5,12.333333333333334,880.891870115058,842.1688052017244,4,4,125,165,37,122,0 +32,2020-05-27-10_00,6,3,1,10.0,17.0,f,m,13.5,9.0,686.4001347696975,815.713300982056,1,1,17,92,8,330,0 +33,2020-05-28-10_00,6,2,4,7.0,12.0,m,f,11.0,11.0,774.6150067187118,728.8412253286924,1,1,69,684,84,342,0 +34,2020-05-29-10_00,6,5,3,10.0,12.0,m,f,17.5,13.5,805.4542233630881,681.7640419584177,1,2,373,478,18,58,0 +35,2020-06-02-10_00,6,1,4,7.0,8.0,m,f,9.0,11.0,820.4496652837709,723.7667250846596,2,2,485,1253,69,309,0 +36,2020-06-03-10_10,6,5,2,14.0,5.0,m,m,17.5,11.0,810.7042669363011,783.6640529162586,2,2,54,182,16,74,0 +37,2020-06-04-10_00,6,3,4,6.0,7.0,f,f,13.5,11.0,695.5929553333448,714.6541711375795,3,3,44,994,34,291,0 +38,2020-06-05-10_00,6,2,1,10.0,14.0,m,m,11.0,9.0,804.8998142492978,827.5225072258723,3,3,117,425,41,143,0 +39,2020-06-08-10_00,6,5,3,4.0,0.0,m,f,17.5,13.5,816.1812754102803,691.6736840654672,3,4,1087,170,8,14,1 +40,2020-06-09-10_00,6,3,2,10.0,12.0,f,m,13.5,11.0,691.8529359583595,798.4298849024372,5,4,18,632,21,391,0 +41,2020-06-10-10_00,6,5,1,5.0,8.0,m,m,17.5,9.0,815.498890219021,828.5259822280207,4,4,66,269,1,14,0 +42,2020-06-11-10_00,6,5,4,10.0,13.0,m,f,17.5,11.0,817.6355361855158,730.7609124893474,5,4,144,1100,2,54,0 diff --git a/trial_summary_eval.py b/code/trial_summary_eval.py similarity index 100% rename from trial_summary_eval.py rename to code/trial_summary_eval.py diff --git a/cover_letter.odt b/cover_letter.odt new file mode 100644 index 0000000..0cf717f Binary files /dev/null and b/cover_letter.odt differ diff --git a/journalsabbrv.bib b/journalsabbrv.bib new file mode 100644 index 0000000..787258b --- /dev/null +++ b/journalsabbrv.bib @@ -0,0 +1,129 @@ +@STRING( ActaPhysiolScand = "Acta Physiol Scand" ) +@STRING( AmZool = "Am Zool" ) +@STRING( AnnNYAcadSci = "Ann NY Acad Sci" ) +@STRING( AnimBehav = "Anim Behav" ) +@STRING( AnimBiol = "Anim Biol" ) +@STRING( AnnuRevNeurosci = "Annu Rev Neurosci" ) +@STRING( AnnuRevPhysiol = "Annu Rev Physiol" ) +@STRING( AnnuRevPsychol = "Annu Rev Psychol" ) +@STRING( BehavBrainSci = "Behav Brain Sci" ) +@STRING( BehavBrainRes = "Behav Brain Res" ) +@STRING( BehavEcol = "Behav Ecol" ) +@STRING( BehavEcolSociobiol = "Behav Ecol Sociobiol" ) +@STRING( BiolBull = "Biol Bull" ) +@STRING( BiolCell = "Biol Cell" ) +@STRING( BiolCons = "Biological Conservation" ) +@STRING( BiolCybern = "Biol Cybern" ) +@STRING( BiolLett = "Biol Lett" ) +@STRING( BiolRev = "Biol Rev" ) +@STRING( Biometrika = "Biometrika" ) +@STRING( BiophysJ = "Biophys J" ) +@STRING( Biosystems = "Biosyst" ) +@STRING( BrainBehavEvol = "Brain Behav Evol" ) +@STRING( BrainRes = "Brain Res" ) +@STRING( BrainResRev = "Brain Res Rev" ) +@STRING( BrainResBull = "Brain Res Bull" ) +@STRING( BrainResCognBrainRes = "Brain Res Cogn Brain Res" ) +@STRING( BullMathBiol = "Bull Math Biol" ) +@STRING( CanJZool = "Can J Zool" ) +@STRING( CellTissueRes = "Cell Tissue Res" ) +@STRING( CerebCortex = "Cereb Cortex" ) +@STRING{ CompBiochemPhysiol = "Comp Biochem Physiol"} +@STRING( CurrBiol = "Curr Biol" ) +@STRING( CurrOpinNeurobiol = "Curr Opin Neurobiol" ) +@STRING( eLife = "eLife" ) +@STRING( eNeuro = "eNeuro" ) +@STRING( EuropBiophysJ = "Europ Biophys J" ) +@STRING( EuroJNeurosci = "Euro J Neurosci" ) +@STRING( ExpBrainRes = "Exp Brain Res" ) +@STRING( FluctNoiseLett = "Fluct Noise Lett" ) +@STRING( FrontComputNeurosci = "Front Comput Neurosci" ) +@STRING( FrontNeuroInform = "Front Neuroinform" ) +@STRING( FrontPsychol = "Front Psychol" ) +@STRING( HearRes = "Hear Res" ) +@STRING( Hippocampus = "Hippocampus" ) +@STRING( HormBehav = "Horm Behav" ) +@STRING( IEEETNN = "IEEE TNN" ) +@STRING( IEEETransInfTechBiomed = "IEEE Trans Inf Tech Biomed" ) +@STRING( IntegrCompBiol = "Integr Comp Biol" ) +@STRING( IntJBifChaos = "Int J Bif Chaos" ) +@STRING( IntJInsMorpholEmbryol = "Int J Ins Morphol Embryol" ) +@STRING( IntJNeuralSyst = "Int J Neural Syst" ) +@STRING( JAcoustSocAm = "J Acoust Soc Am" ) +@STRING( JAnimEcol = "J Anim Ecol" ) +@STRING( JARO = "JARO" ) +@STRING( JBiolChem = "J Biol Chem" ) +@STRING( JCellBiol = "J Cell Biol" ) +@STRING( JChemNeuroanat = "J Chem Neuroanat" ) +@STRING( JCompNeurol = "J Comp Neurol" ) +@STRING( JCompPhysiol = "J Comp Physiol" ) +@STRING( JCompPhysiolA = "J Comp Physiol A" ) +@STRING( JCompPhysiolB = "J Comp Physiol B" ) +@STRING( JComputNeurosci = "J Comput Neurosci" ) +@STRING( JEvolBiol = "J Evol Biol" ) +@STRING( JExpBiol = "J Exp Biol" ) +@STRING( JExpZool = "J Exp Zool" ) +@STRING( JFishBiol = "J Fish Biol" ) +@STRING( JGenPhysiol = "J Gen Physiol" ) +@STRING( JInsectBehav = "J Insect Behav" ) +@STRING( JInsectPhysiol = "J Insect Physiol" ) +@STRING( JMathBiol = "J Math Biol" ) +@STRING( JMembrBiol = "J Membr Biol" ) +@STRING( JMorph = "J Morph" ) +@STRING( JNeuralEng = "J Neural Eng " ) +@STRING( JNeurocytol = "J Neurocytol" ) +@STRING( JNeuroGenetics = "J Neuro Genetics" ) +@STRING( JNeurophysiol = "J Neurophysiol" ) +@STRING( JNeurosci = "J Neurosci" ) +@STRING( JNeurosciMethods = "J Neurosci Methods" ) +@STRING( JOSA = "J Opt Soc Am A" ) +@STRING( JPharmacolExpTher = "J Pharmaco Exp Ther" ) +@STRING( JPhysiol = "J Physiol" ) +@STRING( JPhysiolParis = "J Physiol Paris" ) +@STRING{ JPlanktonRes = "J Plankton Res" } +@STRING( JpnJPhysiol = "Jpn J Physiol" ) +@STRING( JStatPhys = "J Stat Phys" ) +@STRING( JTheorBiol = "J Theor Biol" ) +@STRING( JVis = "J Vis" ) +@STRING( MathBiosci = "Math Biosci" ) +@STRING( MicroscResTech = "Microsc Res Tech" ) +@STRING( NatNeurosci = "Nat Neurosci" ) +@STRING( Nature = "Nature" ) +@STRING( NatCommun = "Nat Commun" ) +@STRING( NatRevNeurosci = "Nat Rev Neurosci" ) +@STRING( Naturforsch = "Naturforsch" ) +@STRING( Naturwissenschaften = "Naturwissenschaften" ) +@STRING( Network = "Network Comput Neural Syst" ) +@STRING( NeuralComput = "Neural Comput" ) +@STRING( NeuralNetw = "Neural Netw" ) +@STRING( Neurocomput = "Neurocomput" ) +@STRING( Neuron = "Neuron" ) +@STRING( NeuroReport = "NeuroReport" ) +@STRING( Neuroscience = "Neurosci" ) +@STRING( NeurosciLett = "Neurosci Lett" ) +@STRING( NeurosciRes = "Neurosci Res" ) +@STRING( PflugersArch = {Pflugers Arch} ) +@STRING( PLoSBiol = "PLoS Biol" ) +@STRING( PLoSComputBiol = "PLoS Comput Biol" ) +@STRING( PLoSONE = "PLoS ONE" ) +@STRING( PNAS = "PNAS" ) +@STRING( PhilTransRSocLondBBiolSci = "Phil Trans R Soc Lond B Biol Sci" ) +@STRING( PhysicaD = "Physica D" ) +@STRING( PhysiolRep = "Physiol Rep" ) +@STRING( PhysiolRev = "Physiol Rev" ) +@STRING( PhysRep = "Phys Rep" ) +@STRING( PhysRevA = "Phys Rev A" ) +@STRING( PhysRevE = "Phys Rev E" ) +@STRING( PhysRevLett = "Phys Rev Lett" ) +@STRING( ProcRSocLondBBiolSci = "Proc R Soc Lond B Biol Sci" ) +@STRING( ProcSPIE = "Proc SPIE" ) +@STRING( ProgBrainRes = "Prog Brain Res" ) +@STRING( ProgRetinEyeRes = "Prog Retin Eye Res" ) +@STRING( Science = "Science" ) +@STRING( SIAMJApplMath = "SIAM J Appl Math" ) +@STRING( TheorPopulBiol = "Theor Popul Biol" ) +@STRING{ TICS = "Trends Cog Sci"} +@STRING( TIEE = "Trends Ecol Evol" ) +@STRING( TINS = "Trends Neurosci" ) +@STRING( VisNeurosci = "Vis Neurosci" ) +@STRING( VisionRes = "Vision Res" ) diff --git a/lineno.sty b/lineno.sty new file mode 100644 index 0000000..fcca85e --- /dev/null +++ b/lineno.sty @@ -0,0 +1,3484 @@ + \iffalse; awk '/S[H]ELL1/' lineno.sty|sh;exit; + ... see bottom for .tex documentation ... + +Macro file lineno.sty for LaTeX: attach line numbers, refer to them. + \fi +\def\fileversion{v4.41} \def\filedate{2005/11/02} %VERSION + +%%% Copyright 1995--2003 Stephan I. B"ottcher ; +%%% Copyright 2002--2005 Uwe L"uck, http://www.contact-ednotes.sty.de.vu +%%% for version 4 and code from former Ednotes bundle +%%% --author-maintained. +%%% +%%% This file can be redistributed and/or modified under +%%% the terms of the LaTeX Project Public License; either +%%% version 1.3a of the License, or any later version. +%%% The latest version of this license is in +%%% http://www.latex-project.org/lppl.txt +%%% We did our best to help you, but there is NO WARRANTY. +% +%%% $Id: lineno.sty,v 3.14.2.2 2004/09/13 19:30:39 stephan Exp $ %% was v4.00. +% \title{\texttt{\itshape +%% %% (UL 2004/10/09:) Italic TT is evil +%% %% ... or nice front page layout!? +%% +% lineno.sty \ \fileversion\ \filedate +% \unskip}\\\ \\ +% A \LaTeX\ package to attach +% \\ line numbers to paragraphs +% \unskip}\author{% +% Stephan I. B\"ottcher +% \\ Uwe L\"uck +% \unskip}\date{% +% boettcher@physik.uni-kiel.de +% \\ http://contact-ednotes.sty.de.vu +%% \\ stephan@nevis.columbia.edu +%% \\ Stephan.Boettcher@cern.ch +% \\} +% +% \documentclass[a4paper,12pt]{article}%D +% \usepackage{lineno}%D +%% %% (New v4.00) +% \catcode`\_\active\let_~ +%% %% Beware math!? (/New v4.00) +% \def~{\verb~} +% \let\lessthan< +% \catcode`\<\active +% \def<#1>{$\langle${\itshape#1}\/$\rangle$} +% \catcode`\|\active +%% (New v4.1: \tt star; in box anyway.) +% \def|#1{\ttfamily\string#1} +%% \def|#1{{\ttfamily\string#1}} +%% (/New v4.1) +% \newenvironment{code} +% {\par\runninglinenumbers +% \modulolinenumbers[1]% +% \linenumbersep.3em +% \footnotesize +% \def\linenumberfont +% {\normalfont\tiny\itshape}} +% {} +%% %% (New v4.00) +% {\makeatletter \gdef\scs#1{\texttt +% {\protect\@backslashchar#1}}} +% \def\old{\par\footnotesize} +%% %% (/New v4.00) +%% %% (New v4.1) +% {\catcode`\/\active +% \gdef\path{\begingroup\catcode`\/\active +% \let/\slash\dopath} +% \gdef\dopath#1{\slash\unpenalty#1\endgroup}} +%% %% (/New v4.1) +% +% \begin{document}%D +%% \DocInput{lineno}%D +% \pagewiselinenumbers +% \maketitle +% \pagestyle{headings} +% \tableofcontents +% \sloppy +% +%% %% New v4.00: `...section{%' + \unskip +% \section{% +% Introductions +%% %% New v4.00: `s' +% \unskip} +% +% (New v4.00) Parts of former first section +% have been rendered separate subsections for package +% version_v4.00. (/New v4.00) +% +% \subsection{% +% Introduction to versions $\textrm{v}\lessthan4$ +% \unskip} +% +% This package provides line numbers on paragraphs. +% After \TeX\ has broken a paragraph into lines there will +% be line numbers attached to them, with the possibility to +% make references through the \LaTeX\ ~\ref~, ~\pageref~ +% cross reference mechanism. This includes four issues: +% \begin{itemize} +% \item attach a line number on each line, +% \item create references to a line number, +% \item control line numbering mode, +% \item count the lines and print the numbers. +% \end{itemize} +% The first two points are implemented through patches to +% the output routine. The third by redefining ~\par~, ~\@par~ +% and ~\@@par~. The counting is easy, as long as you want +% the line numbers run through the text. If they shall +% start over at the top of each page, the aux-file as well +% as \TeX s memory have to carry a load for each counted line. +% +% I wrote this package for my wife Petra, who needs it for +% transcriptions of interviews. This allows her to +% precisely refer to passages in the text. It works well +% together with ~\marginpar~s, but not too well with displaymath. +% ~\footnote~s are a problem, especially when they +% are split, but we may get there. +% (New v4.00 UL) Version v4.00 overcomes the problem, I believe. +% (/UL /New v4.00) +% +% lineno.sty works +% surprisingly well with other packages, for +% example, ~wrapfig.sty~. So please try if it +% works with whatever you need, and if it does, +% please tell me, and if it does not, tell me as +% well, so I can try to fix it. +% +% \subsection{% +% Introduction to versions v4.00ff. (UL) +% \unskip} +% +% ~lineno.sty~ has been maintained by Stephan until version_v3.14. +% From version_v4.00 onwards, maintenance is shifting towards +% Uwe L\"uck (UL), who is the author of v4\dots code and of v4\dots +% changes in documentation. This came about as follows. +% +% Since late 2002, Christian Tapp and Uwe L\"uck have employed +% ~lineno.sty~ for their ~ednotes.sty~, a package supporting +% critical editions---cf. +% \[\mbox{\tt +% http://ednotes.sty.de.vu +% \unskip}\] +% ---while you find ~ednotes.sty~ and surrounding files in +% CTAN folder \path{macros/latex/contrib/ednotes}. +% +% Soon, some weaknesses of ~lineno.sty~ showed up, mainly since +% Christian's critical editions (using ~ednotes.sty~) needed lots +% of ~\linelabel~s and footnotes. (These weaknesses are due to +% weaknesses of \LaTeX's ~\marginpar~ mechanism that Stephan +% used for ~\linelabel~.) So we changed some ~lineno.sty~ +% definitions in some extra files, which moreover offered new +% features. We sent these files to Stephan, hoping he would take +% the changes into ~lineno.sty~. However, he was too short of time. +% +% Writing a TUGboat article on Ednotes in 2004, we hoped to +% reduce the number of files in the Ednotes bundle and so asked +% Stephan again. Now he generously offered maintenance to me, so +% I could execute the changes on my own. +% +% The improvements are as follows: +% \begin{itemize}\item +% [(i)] Footnotes placement approaches intentions better +% (footnotes formerly liked to pile up at late pages). +% \item +% [(ii)] The number of ~\linelabel~s in one paragraph is no longer +% limited to 18. +% \item +% [(iii)] ~\pagebreak~, ~\nopagebreak~, ~\vspace~, and the star +% and optional versions of ~\\~ work as one would expect +% (section_\ref{s:MVadj}). %% Added for v4.1 +% \item +% [(iv)] A command is offered which chooses the first line number +% to be printed in the margin +% (subsection_\ref{ss:Mod}). %% Added for v4.1 +% \item +% [(v)] (New v4.1) \LaTeX\ tabular environments (optionally) +% get line numbers as well, and you can refer to them in the +% usual automatic way. (It may be considered a shortcoming that, +% precisely, \emph{rows} are numbered, not lines.---See +% subsection_\ref{ss:Tab}.) +% \item +% [(vi)] We are moving towards referring to math items +% (subsection_\ref{ss:MathRef} and the hooks in +% subsection_\ref{ss:LL}). +% (/New v4.1) +% \end{itemize} +% (Thanks to Stephan for making this possible!) +% +%% Unpublish: +%% You may trace the earlier developments of these changes by +%% requesting our files ~linenox0.sty~, ~linenox1.sty~, and +%% ~lnopatch.sty~. Most of our changes have been in ~linenox0.sty~. +%% Our ~linenox1.sty~ has extended ~linenox0.sty~ for one single +%% purpose in a not very stable way. +%%% (See ~\linenumberpar~ below). +%% ~lnopatch.sty~ has done the first line number thing referred +%% to in case_(iv) up to now. +%% (New v4.1) +%% Case_(v) earlier was provided by our ~edtab02.sty~---now +%% called ~edtable.sty~. +%% (/New v4.1) +% +% Ednotes moreover profits from Stephan's offer with regard +% to the documentation of our code which yielded these +% improvements formerly. This documentation now becomes +% printable, being part of the ~lineno.sty~ documentation. +% +% Of course, Stephan's previous ~lineno.sty~ versions were a great +% and ingenious work and exhibit greatest \TeX pertise. I never +% could have done this. I learnt a lot in studying the code when +% Christian pointed out strange output results and error +% messages, and there are still large portions of ~lineno.sty~ +% which I don't understand (consider only pagewise numbering of +% lines). Fortunately, Stephan has offered future help if +% needed.---My code for attaching line numbers to \emph{tabular +% environments} (as mentioned above, now still in +% ~edtable.sty~) %% %% TODO +% developed from macros which Stephan and Christian experimented +% with in December 2002. Stephan built the basics. +% (However, I then became too proud to follow his advice only to +% use and modify ~longtable.sty~.) +% +% There are some issues concerning use of counters on which I +% don't agree with Stephan and where I would like to change the +% code if ~lineno.sty~ is ``mine'' as Stephan offered. However, +% Stephan is afraid of compatibility problems from which, in +% particular, his wife could suffer in the near future. So he +% demanded that I change as little as possible for my first +% version. Instead of executing changes that I plan I just offer +% my opinions at the single occasions. I hope to get in touch +% this way with users who consider subtle features vital which I +% consider strange. +% +% On the other hand, the sections on improvements of the +% implementation have been blown up very much and may be tiring +% and litte understandable for mere \emph{users}. These users +% may profit from the present presentation just by jumping to +% sections_\ref{s:Opts} and_\ref{s:UserCmds}. There is a user's +% guide ulineno.tex which may be even more helpful, but it has +% not been updated for a while. %% TODO +% +% \subsection{% +% Availability +% \unskip} +% +% In case you have found the present file otherwise than from +% CTAN: A recent version and documentation of this package +% should be available from CTAN folder +% \path{macros/latex/contrib/lineno}. +% Or mail to one of the addresses at top of file. +% +% \subsection{% +% Introductory code +% \unskip} +% +% This style option is written for \LaTeXe, November 1994 or later, +% since we need the ~\protected@write~ macro. +% +% (New v4.00) And we use ~\newcommand*~ for +% controlling length of user macro arguments, which has been +% available since December 1994. +%% + +\NeedsTeXFormat{LaTeX2e}[1994/12/01] +%% [1994/11/04] +\ProvidesPackage{lineno} + [\filedate\space line numbers on paragraphs \fileversion] +% (/New v4.00) +%% +%% History of versions: +%% v1.00 1995/03/31 SIB: first release for Petra's interview transcriptions +%% v1.01 1995/10/28 SIB: added ~pagewise~ mode +%% v1.02 1995/11/15 SIB: added ~modulo~ option +%% v1.03 1995/12/05 SIB: pagewise: try to reduce the hash-size requirements +%% v2.00 1995/12/06 SIB: .. it works, new user interface +%% v2.01 1996/09/17 SIB: put into CVS +%% v2.02 1997/03/17 SIB: add: \@reinserts, for footnotes +%% v2.04 1998/03/09 SIB: add: linenomath environment +%% v2.05 1998/04/26 SIB: add: prevgraf test +%% v2.06 1999/03/02 SIB: LPPL added +%% v3.00 1999/06/11 SiB: include the extension in the main file +%% v3.01 1999/08/28 SiB: \@reinserts -> \holdinginserts +%% v3.02 2000/03/10 SiB: \@LN@output +%% v3.03 2000/07/01 SiB: \@LN@ExtraLabelItems, hyperref +%% v3.04 2000/12/17 SiB: longtable compatibility. +%% v3.05 2001/01/02 SiB: [fleqn] detection. +%% v3.05a 2001/01/04 SiB: [fleqn] detection reverted for eqnarray. +%% v3.06 2001/01/17 SiB: [twocolumn] mode support. +%% v3.07 2001/07/30 SiB: [hyperref] option obsoleted. +%% v3.08 2001/08/02 SiB: linenomath wrapping for \[ \] +%% v3.08a 2001/08/04 SiB: linenomath wrapping for \[ \] fixed +%% v3.08b 2002/01/27 SiB: enquotation typo fix +%% v3.09 2003/01/14 SIB: hyperref detection fix +%% v3.10 2003/04/15 FMi: \MakeLineNo fix for deep boxes +%% v3.10a 2003/11/12 Uwe Lck: \lineref typo fix +%% v4.00 2004/09/02 UL: included linenox0, linenox1, lnopatch code with +%% documentation, usually indicated by `New v4.00'; +%% discussions of old code, indicated by `UL'; +%% LPPL v.1 -> LPPL v1.3, `program' -> `file'; +%% first lines with \filedate and \fileversion, +%% according nawk lines; `November 1994 or later', +%% some earlier documentation typos (including a few +%% bad minus signs), { -> {% and } -> \unskip} at +%% line ends (so, e.g., alignment in TOC works); \scs. +%% 2004/09/03 UL: removed everything which indicated that the +%% present file were named `lineno4.sty'. +%% v4.1 2004/09/19 UL: Inserted Stephan's identification line, removed +%% some TODOs and remarks from v4.00. +%% 2004/10/04 UL: Added acknowledgement for Daniel Doherty; +%% `(New v4.00)' with [|\firstlinenumber]; changed +%% TODOs; Refining -> Redefining (\vadjust). +%% 2004/10/05 UL: ednmath0 -> mathrefs; \catcode`\~ -> \active; +%% \path; refined section on options `mathrefs'; +%% changes in introduction. +%% 2004/10/06 UL: Changed/removed TODOs, e.g., for edtable.sty. +%% 2004/10/11 UL: Reminders: linenox0/1/lnopatch.sty obsolete; +%% \tt star in list of commands. +%% 2004/10/12 UL: Corrected blank lines in lineno.tex. +%% 2004/10/19 UL: Fixed minor typos; remark on \if@LN@edtable. +%% v4.1a 2004/11/07 UL: LPPL v1.3a. +%% v4.1b 2004/11/13 UL: Comment on \outputpenalty values. +%% v4.1c 2005/01/10 UL: Contact via http. +%% v4.11 2005/02/20 UL: Error message with \linelabel when not numbering. +%% 2005/03/07 UL: Removed \linelabel from ss:Tab heading, consider +%% marginal line numbers as well, revised ss:Tab. +%% Added a few lines on missing explanations to +%% s:UserCmds. Corrected some code alignments. +%% 2005/03/08 UL: Require recent edtable.sty. +%% + +%% v4.2 2005/03/21 UL: "Physical page" counter works with \include. +%% 2005/04/17 UL: Raised options section above extensions section +%% (v4.00 disabled `displaymath' option); +%% third arg for \@ifundefined{mathindent}; +%% "bunch of options"; +%% 2005/04/24 UL: compatibility with tamefloats; vplref.sty. +%% 2005/04/25 UL: \number -> \the; wondered -> $$; subsec. appbas; +%% CrtlLN sec -> subsec.; \newcommand* wherever ...; +%% doc. on `other output routines' and `addpageno' +%% (this changed from `varioref'). +%% 2005/04/27 UL: =1\relax -> =\@ne, 0\relax ..., \hb@xt@, +%% \ifx\@@par\@@@par -> \ifLineNumbers, typos, +%% \pagestyle{headings}, LaTeX -> \LaTeX. +%% v4.21 2005/04/28 UL: linenomath section: removed wrong \else's, +%% \holding...: \thr@@, \@LN@outer@holdins, \global. +%% v4.22 2005/05/01 UL: \unvbox\@outputbox; \@LN@col without #1, +%% 2005/05/08 UL: global/local \internall..., \resetl... global, +%% shortened discussions of this and of \newcounter. +%% 2005/05/09 UL: corr.: doc. typo, version history, bad lines; +%% percent; \chardef for modulo, +%% \value{firstlinenumber}. +%% v4.3 2005/05/10 UL: \@backslashchar -> \char`\\ in \scs. +%% 2005/05/11 UL: \linenumbers sets ...outer@holdins; tidied up +%% documentation regarding earlier versions. +%% 2005/05/12 UL: `linenomath' without spurious number above; +%% `displaymath' default; edmac homepage -> +%% ednotes.sty.de.vu, \endlinenomath without +%% numbers: no change of \holdinginserts; +%% \linelabel doesn't go to .aux or mark, +%% hyperref detected; undone 2005/05/10 (bad mark). +%% 2005/05/13 UL: Reworked hyperref detection (new subsec.). +%% 2005/05/15 UL: More typo fixes, corrected terrible confusions in +%% the discussion (v4.22/v4.3) of \new/\stepcounter; +%% new subsec. in `Line number ...'; another +%% implementation of `hyperref' detection. +%% 2005/05/16 UL: Final minor changes. +%% v4.31b /06/14 UL: Extended explanation of \firstlinenumbers +%% and package options; \@LN@ifgreat@critical; +%% \modulolinenumbers*. Sent to Ednotes.news only. +%% v4.31 2005/06/15 UL: \modulolinenumbers* with \firstlinenumber{1}; +%% " -> ``/''; more doc. on \firstlinenumber . +%% 2005/06/20 UL: Typo fix. +%% 2005/10/01 UL: Warning about \mod...* with pagewise mode. +%% v4.31a /10/02 UL: Minor changes of appearance of doc., e.g., +%% \[ for $$. +%% v4.32b /10/15 UL: Support for \addvspace; removed comments that +%% had been invisible already for some time; +%% made clear with which environments the +%% linenomath environment is not needed. +%% v4.32ab /10/15 UL: Observe \if@nobreak with support for \addvspace. +%% v4.32 2005/10/17 UL: Just made it official and sent it to CTAN. +%% v4.33b /10/23 UL: \if@nobreak\nobreak\fi -> \nobreak . +%% v4.33ab /10/24 UL: \LineNoLaTeXOutput without \@tempswafalse; +%% undid v4.22: \[unv]box\@outputbox (space is OK, +%% \unvbox pushes short columns down); \@LN@kern@z@ . +%% v4.4b 2005/10/24 UL: Another tidying-up of the discussion of +%% \stepcounter{linenumber}; \@LN@screenoff@pen +%% replaces \@LN@kern@z@, \@LN@depthbox . +%% v4.4 2005/10/27 UL: Just made official for CTAN. +%% v4.4a 2005/10/29 UL: Undid change of discussion of +%% \stepcounter{linenumber} (confusion again). +%% v4.41 2005/11/02 UL: Raised \CheckCommand*. +%% +%% Acknowledgements: +%% v3.06: Donald Arseneau, pointed to mparhack.sty. +%% v3.07+: Frank Mittelbach, points out inconsistencies in the +%% user interface. +%% v3.10: Frank Mittelbach \MakeLineNo fix for deep boxes +%% v4.00: Daniel Doherty points out clash of \pagewise... with resetting +%% page number. +%% v4.21: Much testing work by Erik Luijten. +%% v4.3: `displaymath' default by Erik Luijten's suggestion. +%% v4.31: \modulolinenumbers* is an idea of Hillel Chayim Yisraeli's. +%% v4.32: Support for \addvspace due to Saravanan M.'s observation. +%% v4.33: Different support for \addvspace due to bug reports by +%% Saravanan M.'s and David Josef Dev. +%% v4.4: David Josef Dev points out that \kern\z@ after a paragraph +%% tends to place its final baseline wrongly. +% +% +% \section{% +% Put the line numbers to the lines +% \unskip} +% +% (New v4.00) This section contained the most +% basic package code previously. For various purposes of +% version_4\dots, much of these basics have been to be modified. +% Much of my (UL's) reasoning on these modifications has been to +% be reported. Sorry, the present section has been blown up +% awfully thus and contains ramifications that may be difficult +% to trace. We add some ~\subsection~ commands in order to cope +% with the new situation. (/New v4.00) +% +% \subsection{% +% Basic code of \texttt{lineno.sty} \scs{output} +% \unskip}\label{ss:output} +% +% The line numbers have to be attached by the output +% routine. We simply set the ~\interlinepenalty~ to $-100000$. +% The output routine will be called after each line in the +% paragraph, except the last, where we trigger by ~\par~. +% The ~\linenopenalty~ is small enough to compensate a bunch of +% penalties (e.g., with ~\samepage~). +% +% (New v3.04) Longtable uses +% ~\penalty~$-30000$. The lineno penalty range was +% shrunk to $-188000 \dots -32000$. (/New v3.04) +% (New v4.00) New values are listed below (11111f.). (/New v4.00) + +\newcount\linenopenalty\linenopenalty=-100000 + +%% TODO v4.4+: +% (UL) Hm. It is never needed below +% that this is a counter. ~\def\linenopenalty{-100000\relax}~ +% would do. (I guess this consumes more memory, but it +% is more important to save counters than to save memory.) +% I was frightened by ~-\linenopenalty~ below, but indeed +% \TeX\ interprets the string ~--100000~ as 100000. +% Has any user or extension package writer ever called +% ~\linenopenalty=xxx~, or could I really change this?---The +% counter is somewhat faster than the macro. Together with the +% compatibility question this seems to support keeping the +% counter. (???) +%% Note that Stephan chose ~\mathchardef~ below, +%% so his choice above seems to have been deliberate. +%% <- no point, \mathchardef token is fast. +% (/UL) + +\mathchardef\linenopenaltypar=32000 + +% So let's make a hook to ~\output~, the direct way. The \LaTeX\ +% macro ~\@reinserts~ puts the footnotes back on the page. +% +% (New v3.01) ~\@reinserts~ badly +% screws up split footnotes. The bottom part is +% still on the recent contributions list, and the +% top part will be put back there after the bottom +% part. Thus, since lineno.sty does not play well +% with ~\inserts~ anyway, we can safely experiment +% with ~\holdinginserts~, without making things +% much worse. +% +% Or that's what I thought, but: Just activating +% ~\holdinginserts~ while doing the ~\par~ will +% not do the trick: The ~\output~ routine may be +% called for a real page break before all line +% numbers are done, and how can we get control +% over ~\holdinginserts~ at that point? +% +% Let's try this: When the ~\output~ routine is +% run with ~\holdinginserts=3~ for a real page +% break, then we reset ~\holdinginserts~ and +% restart ~\output~. +% +% Then, again, how do we keep the remaining +% ~\inserts~ while doing further line numbers? +% +% If we find ~\holdinginserts~=$-3$ we activate it again +% after doing ~\output~. (/New v3.01) +% +% (New v3.02) To work with +% multicol.sty, the original output routine is now +% called indirectly, instead of being replaced. +% When multicol.sty changes ~\output~, it is a +% toks register, not the real thing. (/New v3.02) +% +% (New v4.00) Two further complications are added. +%% +%% TODO v4.3+: Or three, ~\@nobreakfalse~ after ~\MakeLineNo~ +%% for getting rid of ~\@LN@nopagebreak~. +% \begin{itemize}\item +% [(i)] Problems with footnotes formerly resulted from +% \LaTeX's ~\@reinserts~ in ~\@specialoutput~ which Stephan's +% ~\linelabel~ called via the ~\marginpar~ mechanism. +% \item +% [(ii)] \LaTeX\ commands using ~\vadjust~ formerly didn't work +% as one would have hoped. The problem is as follows: +% Printing the line number results from +% a box that the output routine inserts at the place of the +% ~\interlinepenalty~. ~\vadjust~ items appear \emph{above} the +% ~\interlinepenalty~ (\TeX book p._105). So ~\pagebreak~, e.g., +% formerly sent the line number to the next page, while the +% penalty from ~\nopagebreak~ could not tie the following line, +% since it was screened off by the line number box.---Our trick +% is putting the ~\vadjust~ items into a list macro from which +% the output routine transfers them into the vertical list, +% below the line number box. +% \end{itemize} +% In this case_(ii), like in case_(i), footnotes would suffer +% if ~\holdinginserts~ were non-positive. Indeed, in both +% cases_(i) and_(ii) we tackle the footnote problem by extending +% that part of Stephan's output routine that is active when +% ~\holdinginserts~ is positive. This extension writes the line +% number ~\newlabel~ to the .aux file (which was formerly done +% under $~\holdinginserts~=-3$) and handles the ~\vadjust~ +% items.---To trigger ~\output~ and its ~\linelabel~ or, resp., +% ~\vadjust~ part, the list of signal penalties started +% immediately before is increased here (first for ~\linelabel~, +% second for postponed ~\vadjust~ items): + +\mathchardef\@Mllbcodepen=11111 +\mathchardef\@Mppvacodepen=11112 + +% (/New v4.00) (New v4.2) David Kastrup urges to use a private +% name instead of ~\the\output~ (LaTeX-L-list). Otherwise an +% ~\output~ routine loaded later and using ~\newtoks\output~ +% again may get lost entirely. So we change use of ~\@LN@output~, +% using it for the former purpose. Reference to what appeared +% with the name of ~\output~ here lasts for a few lines and then +% is given away. + +\let\@tempa\output +\newtoks\output +\let\@LN@output\output +\output=\expandafter{\the\@tempa} + +% Now we add two cases to Stephan's output routine. (New v4.00) + +\@tempa={% +% (/New 4.2) + \LineNoTest + \if@tempswa +%% +%% (UL) Learnt that even in def.s blank line means ~\par~. +%% to leave visual space in present file with having a +%% blank line neither in present nor in .tex file, +%% use double comment mark (`%%'). (/UL) +%% +% (New v4.00) +% We insert recognition of waiting ~\linelabel~ items--- +%% + \ifnum\outputpenalty=-\@Mllbcodepen + \WriteLineNo +%% +% ---and of waiting ~\vadjust~ items: +%% + \else + \ifnum\outputpenalty=-\@Mppvacodepen + \PassVadjustList + \else +%% +%% Now we give control back to Stephan. +% (/New v4.00) (New v4.2) Outsource ``Standard'' output +% ---which occurs so rarely---to subsection_\ref{ss:LLO}: +%% + \LineNoLaTeXOutput +% (/New v4.2) (New v4.00) +% Two new ~\fi~s for the ~\linelabel~ and ~\vadjust~ tests--- +%% + \fi + \fi +%% +% ---and the remaining is +%%%next three lines are +% Stephan's code again: +% (/New v4.00) +%% + \else + \MakeLineNo + \fi + } + +% (New v4.00) Our new macros +% ~\WriteLineNo~ and ~\PassVadjustList~ will be dealt with in +% sections_\ref{s:LNref} and_\ref{ss:PVadj}. (/New v4.00) +% +% \subsection{% +% \scs{LineNoTest} +% \unskip} +% +% The float mechanism inserts ~\interlinepenalty~s during +% ~\output~. So carefully reset it before going on. Else +% we get doubled line numbers on every float placed in +% horizontal mode, e.g, from ~\linelabel~. +% +% Sorry, neither a ~\linelabel~ nor a ~\marginpar~ should +% insert a penalty, else the following linenumber +% could go to the next page. Nor should any other +% float. So let us suppress the ~\interlinepenalty~ +% altogether with the ~\@nobreak~ switch. +% +% Since (ltspace.dtx, v1.2p)[1996/07/26], the ~\@nobreaktrue~ does +% it's job globally. We need to do it locally here. + +\def\LineNoTest{% + \let\@@par\@@@par + \ifnum\interlinepenalty<-\linenopenaltypar + \advance\interlinepenalty-\linenopenalty + \@LN@nobreaktrue + \fi + \@tempswatrue + \ifnum\outputpenalty>-\linenopenaltypar\else + \ifnum\outputpenalty>-188000\relax + \@tempswafalse + \fi + \fi + } + +\def\@LN@nobreaktrue{\let\if@nobreak\iftrue} % renamed v4.33 + +% (UL) I thought here were +% another case of the save stack problem explained in \TeX book, +% p._301, namely through both local and global changing +% ~\if@nobreak~. However, ~\@LN@nobreak~ is called during +% ~\@LN@output~ only, while ~\@nobreaktrue~ is called by \LaTeX's +% ~\@startsection~ only. The latter never happens during +% ~\@LN@output~. So there is no local value of ~\if@nobreak~ on +% save stack when ~\@nobreaktrue~ acts, since ~\the\@LN@output~ +% (where ~\@LN@output~ is a new name for the original ~\output~) +% is executed within a group (\TeX book p._21). +%% +%% 2004/09/19 Removed nonsense here according to Stephan 2004/09/04. +%% +% (/UL) +% +% \subsection{% +% Other output routines (v4.2) +% \unskip}\label{ss:LLO} +% +% I had thought of dealing with bad interference of footnotes +% (and ~\enlargethispage~) with (real) ~\marginpar~s and floats +% \emph{here}. Yet this is done in +% \[ +% ~http://~\mbox{[CTAN]} +% ~/macros/latex/contrib/tamefloats/tameflts.sty~ +% \] +% now, and I prefer striving for compatibility with the latter. +% (See there for expanding on the problem.) +% This requires returning the special absolute value of +% ~\holdinginserts~ that ~lineno.sty~ finds at the end of a newly +% typeset paragraph---now done in subsection_\ref{ss:calls} +% (~\linenumberpar~). +% The former ~\LineNoHoldInsertsTest~ has been filled into here. +%% ---`3' is replaced by ~\thr@@~ for a while. ~\thr@@~ is +%% useful practice since plain \TeX, but Stephan may have been +%% wise in suspecting that \LaTeX\ once could forsake ~\thr@@~. +%% The same holds for ~\@M=10000~. +% Note: when the following code is invoked, we have +% ~\if@tempswa~_ =_~\iftrue~. +% WARNING: I am still not sure whether the present code is good +% for cooperating with other packages that use ~\holdinginserts~. + +\def\LineNoLaTeXOutput{% + \ifnum \holdinginserts=\thr@@ % v4.33 without \@tempswafalse + \global\holdinginserts-\thr@@ + \unvbox\@cclv + \ifnum \outputpenalty=\@M \else \penalty\outputpenalty \fi + \else + \if@twocolumn \let\@makecol\@LN@makecol \fi + \the\@LN@output % finally following David Kastrup's advice. + \ifnum \holdinginserts=-\thr@@ + \global\holdinginserts\thr@@ \fi + \fi +} + +% \textit{More on dealing with output routines from other +% packages:} +% Since ~lineno.sty~'s output routine is called at least once +% for each output line, I think it should be in \TeX's +% original ~\output~, while output routines dealing with +% building pages and with floats etc.\ should be filled into +% registers addressed by ~\output~ after ~\newtoks\output~. +% Therefore \begin{enumerate} +% \item +% ~tameflts.sty~ should be loaded \emph{after} ~lineno.sty~; +% \item +% if a class changes ~\output~ (APS journal class revtex4, +% e.g.), ~lineno.sty~ should be loaded by ~\RequirePackage~ +% [here presumably following some options in +% brackets]~{lineno}~ \emph{preceding} ~\documentclass~. +% \item +% If you actually maintain such a class, please consider +% loading ~lineno.sty~ on some draft option. The bunch of +% lineno's package options may be a problem, but perhaps the +% purpose of your class is offering only very few of lineno's +% options anyway, maybe just one. +% \end{enumerate} +% The latter may also be needed with classes that don't follow +% David Kastrup's rule on changing ~\output~. +% +% \subsection{% +% \scs{MakeLineNo}: Actually attach line number +% \unskip}\label{ss:MLN} +% +% We have to return all the page to the current page, and +% add a box with the line number, without adding +% breakpoints, glue or space. The depth of our line number +% should be equal to the previous depth of the page, in +% case the page breaks here, and the box has to be moved up +% by that depth. +% +% The ~\interlinepenalty~ comes after the ~\vadjust~ from a +% ~\linelabel~, so we increment the line number \emph{after} +% printing it. The macro ~\makeLineNumber~ produces the +% text of the line number, see section \ref{appearance}. +% +% (UL) I needed a while to understand +% the sentence on incrementing. Correctly: writing the +% ~\newlabel~ to the .aux file is triggered by the signal +% penalty that ~\end@float~ inserts via ~\vadjust~. +% However, this could be changed by our new ~\PostponeVadjust~. +% After ~\c@linenumber~ has been introduced as a \LaTeX\ +% counter, it might be preferable that it behaved like standard +% \LaTeX\ counters which are incremented shortly before printing. +% But this may be of little practical relevance in this case, +% as ~\c@linenumber~ is driven in a very non-standard +% way.---However still, this behaviour of ~\c@linenumber~ +% generates a problem with our ~edtable.sty~. +%% \unskip---Before, +%% I thought that Stephan had reported his reasoning incorrectly +%% and rather did this because of his ~\resetlinenumber~ which +%% initializes ~\c@linenumber~ to 1 instead of 0---the latter is +%% usual with \LaTeX\ counters. Cf._additional comment at +%% ~\resetlinenumber~. +% (/UL). +% +% Finally we put in the natural ~\interlinepenalty~, except +% after the last line. +% +% (New v3.10) Frank Mittelbach points out that box255 may be +% less deep than the last box inside, so he proposes to +% measure the page depth with ~\boxmaxdepth=\maxdimen~. +% (/New v3.10) +% +% (UL, New v4.00) We also resume the matter of +% ~\vadjust~ items that was started in section_\ref{ss:output}. +% +% \TeX\ puts only nonzero interline +% penalties into the vertical list (\TeX book p._105), while +% ~lineno.sty~ formerly replaced the signal interline penalty by +% something closing with an explicit penalty of the value that +% the interline penalty would have without ~lineno.sty~. +% This is usually 0. Now, explicit vertical penalties can be +% very nasty with respect to ~\nopagebreak~, e.g., a low (even +% positive) ~\widowpenalty~ may force a widow where you +% explicitly tried to forbid it by ~\nopagebreak~ +% (see explanation soon below). +% The ~\nopagebreak~ we create here would never work if all +% those zero penalties were present.---On +% the other hand, we cannot just omit Stephan's zero penalties, +% because \TeX\ puts a penalty of 10000 after what ~lineno.sty~ +% inserts (\TeX book p._125). This penalty must be overridden +% to allow page breaks between ordinary lines. To revive +% ~\nopagebreak~, we therefore replace those zero (or low) +% penalties by penalties that the user demanded by +% ~\nopagebreak~.---This mechanism is not perfect and does not +% exactly restore the original \LaTeX\ working of ~\pagebreak~ +% and ~\nopagebreak~. Viz., if there are several vertical +% penalties after a line which were produced by closely sitting +% ~\[no]pagebreak~s, without ~lineno.sty~ the lowest penalty would +% be effective (cf._\TeX book exercise_14.10). Our mechanism, by +% contrast, chooses the \emph{last} user-set penalty of the line +% as the effective one. It would not be very difficult to come +% more close to the original mechanism, but until someone urges +% us we will cling to the present simple way. You may consider an +% advantage of the difference between our mechanism and the +% original one that the user here can actually override low +% penalties by ~\nopagebreak~, which may be what a lay \LaTeX\ +% user would expect. +%% ---Zero glue would do instead of zero +%% penalty! This could make things easier. Maybe next time. +%% <- v4.4: No, problem with column depth. +% (/UL, /New v4.00) + +\def\MakeLineNo{% + \@LN@maybe@normalLineNumber % v4.31 + \boxmaxdepth\maxdimen\setbox\z@\vbox{\unvbox\@cclv}% + \@tempdima\dp\z@ \unvbox\z@ + \sbox\@tempboxa{\hb@xt@\z@{\makeLineNumber}}% +%% +% (New v4.00) Previously, +% \begin{old}\begin{verbatim} +% % \stepcounter{linenumber}% +% \end{verbatim} +% \end{old} +%% %% TODO: Still first `\begin{old}'? +% followed. (Of course, there was no +% comment mark; I put it there to make +% reading the actual code easy.) +% +% (New v4.22: improved) Why not just +% \[~\global\advance\c@linenumber\@ne~?\] +% ~\stepcounter~ additionally resets ``subordinate'' +% counters, but which could these (usefully) be? +% Again, may be column counters with ~edtable.sty~!? +% +% But then, our ~edtable.sty~ and its ~longtable~ option +% should use it as well. So use a shorthand supporting +% uniformity. You can even use it as a hook for choosing +% ~\global\advance\c@linenumber\@ne~ instead of our choice. +% (/New v4.22) +%% + \stepLineNumber +%% +% (New v4.4) Now +%% + \ht\@tempboxa\z@ \@LN@depthbox +%% +% appends the box containing the line number without changing +% ~\prevdepth~---see end of section. +% Now is the time for inserting the $\dots$ (/New v4.4) +%% The line number has now been placed (it may be invisible +%% depending on the modulo feature), so +%% we can insert the +% ~\vadjust~ items. We cannot do this much later, because +% their right place is above the artificial interline +% penalty which Stephan's code will soon insert +% (cf._\TeX book p._105). The next command is just ~\relax~ +% if no ~\vadjust~ items have been accumulated for the +% current line. Otherwise it is a list macro inserting +% the ~\vadjust~ items and finally resetting itself. +% (This is made in section_\ref{ss:PVadj} below.) +% If the final item is a penalty, it is stored so it can +% compete with other things about page breaking. +%% + \@LN@do@vadjusts + \count@\lastpenalty +%% +% At this place, +% \begin{old}\begin{verbatim} +% % \ifnum\outputpenalty=-\linenopenaltypar\else +% \end{verbatim} +% \end{old} +% originally followed. We need something \emph{before} the +% ~\else~: +%% + \ifnum\outputpenalty=-\linenopenaltypar + \ifnum\count@=\z@ \else +%% +% So final ~\pagebreak[0]~ or ~\nopagebreak[0]~ has no +% effect---but this will make a difference after headings only, +% where nobody should place such a thing anyway. +%% + \xdef\@LN@parpgbrk{% + \penalty\the\count@ + \global\let\noexpand\@LN@parpgbrk + \noexpand\@LN@screenoff@pen}% v4.4 +%% +% That penalty will replace former ~\kern\z@~ in +% ~\linenumberpar~, see subsection_\ref{ss:calls}.---A +% few days earlier, I tried to send just a penalty value. +% However, the ~\kern\z@~ in ~\linenumberpar~ is crucial, +% as I then found out. See below.---The final penalty is +% repeated, but this does no harm. (It would not be very +% difficult to avoid the repeating, but it may even be +% less efficient.) It may be repeated due to the previous +% ~\xdef~, but it may be repeated as well below in the +% present macro where artificial interline penalty is to +% be overridden. +%% + \fi + \else +%% +% (/New v4.00) +%% Corrected code alignment with v4.11. + \@tempcnta\outputpenalty + \advance\@tempcnta -\linenopenalty +%% +% (New v4.00) +% \begin{old}\begin{verbatim} +% % \penalty\@tempcnta +% \end{verbatim} +% \end{old} +% followed previously. To give ~\nopagebreak~ a chance, +% we do +%% Corrected code alignment with v4.11. + \penalty \ifnum\count@<\@tempcnta \@tempcnta \else \count@ \fi +%% +% instead.---In ~linenox0.sty~, the ~\else~ thing once was omitted. +% Sergei Mariev's complaint (thanks!) showed that it is vital +% (see comment before ~\MakeLineNo~). +% The remaining ~\fi~ from previous package version closes the +% ~\ifnum\outputpenalty~\dots +% (/New v4.00) +%% + \fi + } + +% (New v4.00) + +\newcommand\stepLineNumber{\stepcounter{linenumber}} + +% For reason, see use above. (/New v4.00) +%% %% TODO v4.4+: ~\newcommand~ more often!? +% +% (New v4.4) The depth preserving trick is drawn here from +% ~\MakeLineNo~ because it will be used again in +% section_\ref{ss:calls}. + +\def\@LN@depthbox{% + \dp\@tempboxa=\@tempdima + \nointerlineskip \kern-\@tempdima \box\@tempboxa} + +% (/New v4.4) +% +% \section{% +% Control line numbering +% \unskip} +% \subsection{% +% Inserting \scs{output} calls %% own subsec. v4.4. +% \unskip}\label{ss:calls} +% The line numbering is controlled via ~\par~. \LaTeX\ +% saved the \TeX-primitive ~\par~ in ~\@@par~. We push it +% one level further out, and redefine ~\@@par~ to insert +% the ~\interlinepenalty~ needed to trigger the +% line numbering. And we need to allow pagebreaks after a +% paragraph. +% +% New (2.05beta): the prevgraf test. A paragraph that ends with a +% displayed equation, a ~\noindent\par~ or ~wrapfig.sty~ produce empty +% paragraphs. These should not get a spurious line number via +% ~\linenopenaltypar~. + +\let\@@@par\@@par +\newcount\linenoprevgraf + +% (UL) And needs ~\linenoprevgraf~ +% to be a counter? Perhaps there may be a paragraph having +% thousands of lines, so ~\mathchardef~ doesn't suffice (really??). +%% +%% %% TODO: limitations of lines per paragraph elsewhere? +%% %% Signal penalties, e.g.!? ~\deadcycles~!? +%% +% A macro ending on ~\relax~ might suffice, but would be +% somewhat slow. I think I will use ~\mathchardef~ next time. +% Or has any user used ~\linenoprevgraf~? (/UL) + +%% v4.33: changed code alignment for better understanding. +\def\linenumberpar{% + \ifvmode \@@@par \else + \ifinner \@@@par \else + \xdef\@LN@outer@holdins{\the\holdinginserts}% v4.2 + \advance \interlinepenalty \linenopenalty + \linenoprevgraf \prevgraf + \global \holdinginserts \thr@@ + \@@@par + \ifnum\prevgraf>\linenoprevgraf + \penalty-\linenopenaltypar + \fi +%% +% (New v4.00) +% \begin{old}\begin{verbatim} +% % \kern\z@ +% \end{verbatim} +% \end{old} +% was here previously. What for? +% According to \TeX book p._125, Stephan's +% interline penalty is changed into 10000. At the end of a +% paragraph, the ~\parskip~ would follow that penalty of 10000, +% so there could be a page break neither at the +% ~\parskip~ nor at the ~\baselineskip~ (\TeX book p._110)---so +% there could never be a page break between two paragraphs. +% So something must screen off the 10000 penalty. +% Indeed, the ~\kern~ is a place to break. +% (Stephan once knew this: see `allow pagebreaks' above.) +% +% Formerly, I tried to replace ~\kern\z@~ by +% \begin{old}\begin{verbatim} +% % \penalty\@LN@parpgpen\relax +% \end{verbatim} +% \end{old} +% ---but this allows a page break after heading. So: +%% + \@LN@parpgbrk +%% +%% After heading, ~\kern\z@~ resulting from previous line +%% (see below) is followed by ~\write~ or ~\penalty10000~, +%% so causes no page break. +% +% These and similar changes were formerly done by ~linenox1.sty~. +% (/New v4.00) +% +% (New v4.4) +% A ~\belowdisplayskip~ may precede the previous when the paragraph +% ends on a display-math; or there may be a ~\topsep~ from a list, etc. +% ~\addvspace~ couldn't take account for it with ~\kern\z@~ +% here. v4.32 therefore moved the space down -- with at least two +% bad consequences. +% Moreover, David Josef Dev observes that ~\kern\z@~ may +% inappropriately yield column depth 0pt. +% For these reasons, we introduce ~\@LN@screenoff@pen~ below. +% (/New v4.4) +%% + \global\holdinginserts\@LN@outer@holdins % v4.2 + \advance\interlinepenalty -\linenopenalty + \fi % from \ifinner ... \else + \fi} % from \ifvmode ... \else + +% (New v4.00, v4.4) Initialize ~\@LN@parpgbrk~, accounting +% for earlier space and for appropriate columndepth. +% We use former ~\MakeLineNo~'s depth-preverving trick +% ~\@LN@depthbox~ again: + +\def\@LN@screenoff@pen{% + \ifdim\lastskip=\z@ + \@tempdima\prevdepth \setbox\@tempboxa\null + \@LN@depthbox \fi} + +\global\let\@LN@parpgbrk\@LN@screenoff@pen + +% (/New v4.4, v4.00) +% \subsection{% +% Turning on/off %% own subsec. v4.4. +% \unskip}\label{ss:OnOff} +% The basic commands to enable and disable line numbers. +% ~\@par~ and ~\par~ are only touched, when they are ~\let~ +% to ~\@@@par~/~\linenumberpar~. The line number may be +% reset to 1 with the star-form, or set by an optional +% argument ~[~~]~. +% +% (New v4.00) We add ~\ifLineNumbers~ etc.\ since +% a number of our new adjustments need to know whether +% linenumbering is active. This just provides a kind of +% shorthand for ~\ifx\@@par\linenumberpar~; moreover it is +% more stable: who knows what may happen to ~\@@par~?---A +% caveat: ~\ifLineNumbers~ may be wrong. E.g., it may be +% ~\iffalse~ where it acts, while a ~\linenumbers~ a few +% lines below---in the same paragraph---brings about that +% the line where the ~\ifLineNumbers~ appears gets a +% marginal number. +%% Better implementation suggested below. +%% +% (New v4.3) Just noticed: Such tricks have been +% disallowed with v4.11, see subsections_\ref{ss:LL} +% and_\ref{ss:OnOff}.---Moreover, the switching between +% meanings of ~\linelabel~ for a possible error message +% as of v4.11 is removed. Speed is difficult to esteem +% and also depends on applications. Just use the most +% simple code you find. (/New v4.3) + +\newif\ifLineNumbers \LineNumbersfalse + +% (/New v4.00) + +\def\linenumbers{% + \LineNumberstrue % v4.00 + \xdef\@LN@outer@holdins{\the\holdinginserts}% v4.3 +%% +% (New v4.3) The previous line is for ~{linenomath}~ +% in a first numbered paragraph. (/New v4.3) +%% + \let\@@par\linenumberpar + % \let\linelabel\@LN@linelabel % v4.11, removed v4.3 + \ifx\@par\@@@par\let\@par\linenumberpar\fi + \ifx\par\@@@par\let\par\linenumberpar\fi + \@LN@maybe@moduloresume % v4.31 + \@ifnextchar[{\resetlinenumber}%] + {\@ifstar{\resetlinenumber}{}}% + } + +\def\nolinenumbers{% + \LineNumbersfalse % v4.00 + \let\@@par\@@@par + % \let\linelabel\@LN@LLerror % v4.11, removed v4.3 + \ifx\@par\linenumberpar\let\@par\@@@par\fi + \ifx\par\linenumberpar\let\par\@@@par\fi + } + +% (New v4.00) Moreover, it is useful to switch to +% ~\nolinenumbers~ in ~\@arrayparboxrestore~. We postpone this +% to section_\ref{ss:ReDef} where we'll have an appending macro +% for doing this. (/New v4.00) +% +% What happens with a display math? Since ~\par~ is not executed, +% when breaking the lines before a display, they will not get +% line numbers. Sorry, but I do not dare to change +% ~\interlinepenalty~ globally, nor do I want to redefine +% the display math environments here. +% \begin{displaymath} +% display \ math +% \end{displaymath} +% See the subsection below, for a wrapper environment to make +% it work. But that requires to wrap each and every display +% in your \LaTeX\ source %%. +%% v4.3: +% (see option ~displaymath~ in subsections_\ref{ss:v3opts} +% and_\ref{ss:display} for some relief [UL]). +% +% The next two commands are provided to turn on line +% numbering in a specific mode. Please note the difference: +% for pagewise numbering, ~\linenumbers~ comes first to +% inhibit it from seeing optional arguments, since +% re-/presetting the counter is useless. + +\def\pagewiselinenumbers{\linenumbers\setpagewiselinenumbers} +\def\runninglinenumbers{\setrunninglinenumbers\linenumbers} + +% Finally, it is a \LaTeX\ style, so we provide for the use +% of environments, including the suppression of the +% following paragraph's indentation. +% +%% TODO: v4.4+: +% (UL) I am drawing the following +% private thoughts of Stephan's to publicity so that others may +% think about them---or to remind myself of them in an efficient +% way. (/UL) +%% UL changed `%%%' to `% %' below. +%% TODO: add \par to \linenumbers, if called from an environment. %% v4.3 +%% ToDO: add an \@endpe hack if \linenumbers are turned on +% \begin{old}\begin{verbatim} +% % TO DO: add \par to \linenumbers, if called from an environment. +% % To DO: add an \@endpe hack if \linenumbers are turned on +% % in horizontal mode. {\par\parskip\z@\noindent} or +% % something. +% \end{verbatim} +% \end{old} +% (UL) However, I rather think that ~\linenumbers~ and %% v4.31 +% ~\nolinenumbers~ should execute a ~\par~ already. (Then the +% ~\par~s in the following definitions should be removed.) (/UL) + +\@namedef{linenumbers*}{\par\linenumbers*} +\@namedef{runninglinenumbers*}{\par\runninglinenumbers*} + +\def\endlinenumbers{\par\@endpetrue} +\let\endrunninglinenumbers\endlinenumbers +\let\endpagewiselinenumbers\endlinenumbers +\expandafter\let\csname endlinenumbers*\endcsname\endlinenumbers +\expandafter\let\csname endrunninglinenumbers*\endcsname\endlinenumbers +\let\endnolinenumbers\endlinenumbers + +% +% \subsection{% +% Display math +% \unskip}\label{ss:DM} +% +% Now we tackle the problem to get display math working. +% There are different options. +% \begin{enumerate}\item[ +% 1.] Precede every display math with a ~\par~. +% Not too good. +% \item[ +% 2.] Change ~\interlinepenalty~ and associates globally. +% Unstable. +% \item[ +% 3.] Wrap each display math with a ~{linenomath}~ +% environment. +% \end{enumerate} +% We'll go for option 3. See if it works: +% \begin{linenomath} +% \begin{equation} +% display \ math +% \end{equation} +% \end{linenomath} +% The star form ~{linenomath*}~ should also number the lines +% of the display itself, +% \begin{linenomath*} +% \begin{eqnarray} +% multi && line \\ +% display && math \\ +% & +% \begin{array}{c} +% with \\ +% array +% \end{array} +% & +% \end{eqnarray} +% \end{linenomath*} +% including multline displays. +% +% First, here are two macros to turn +% on linenumbering on paragraphs preceeding displays, with +% numbering the lines of the display itself, or without. +% The ~\ifx..~ tests if line numbering is turned on. It +% does not harm to add these wrappers in sections that are +% not numbered. Nor does it harm to wrap a display +% twice, e.q, in case you have some ~{equation}~s wrapped +% explicitely, and later you redefine ~\equation~ to do it +% automatically. +% +% (New v4.3) To avoid the spurious line number above a +% display in vmode, I insert ~\ifhmode~. (/New v4.3) + +\newcommand\linenomathNonumbers{% + \ifLineNumbers +%% \ifx\@@par\@@@par\else + \ifnum\interlinepenalty>-\linenopenaltypar + \global\holdinginserts\thr@@ + \advance\interlinepenalty \linenopenalty + \ifhmode % v4.3 + \advance\predisplaypenalty \linenopenalty + \fi + \fi + \fi + \ignorespaces + } + +\newcommand\linenomathWithnumbers{% + \ifLineNumbers +%% \ifx\@@par\@@@par\else + \ifnum\interlinepenalty>-\linenopenaltypar + \global\holdinginserts\thr@@ + \advance\interlinepenalty \linenopenalty + \ifhmode % v4.3 + \advance\predisplaypenalty \linenopenalty + \fi + \advance\postdisplaypenalty \linenopenalty + \advance\interdisplaylinepenalty \linenopenalty + \fi + \fi + \ignorespaces + } + +% The ~{linenomath}~ environment has two forms, with and +% without a star. The following two macros define the +% environment, where the stared/non-stared form does/doesn't number the +% lines of the display or vice versa. + +\newcommand\linenumberdisplaymath{% + \def\linenomath{\linenomathWithnumbers}% + \@namedef{linenomath*}{\linenomathNonumbers}% + } + +\newcommand\nolinenumberdisplaymath{% + \def\linenomath{\linenomathNonumbers}% + \@namedef{linenomath*}{\linenomathWithnumbers}% + } + +\def\endlinenomath{% + \ifLineNumbers % v4.3 + \global\holdinginserts\@LN@outer@holdins % v4.21 + \fi + \global % v4.21 support for LaTeX2e earlier than 1996/07/26. + \@ignoretrue +} +\expandafter\let\csname endlinenomath*\endcsname\endlinenomath + +% The default is not to number the lines of a display. But +% the package option ~mathlines~ may be used to switch +% that behavior. + +\nolinenumberdisplaymath + +% +% \section{% +% Line number references +% \unskip}\label{s:LNref} +% \subsection{% +% Internals %% New subsec. v4.3. +% \unskip} +% The only way to get a label to a line number in a +% paragraph is to ask the output routine to mark it. +% +% (New v4.00) The following two paragraphs don't hold any +% longer, see below. (/New v4.00) +% \begin{old}\begin{verbatim} +% % We use the marginpar mechanism to hook to ~\output~ for a +% % second time. Marginpars are floats with number $-1$, we +% % fake marginpars with No $-2$. Originally, every negative +% % numbered float was considered to be a marginpar. +% % +% % The float box number ~\@currbox~ is used to transfer the +% % label name in a macro called ~\@LNL@~. +% \end{verbatim} +% \end{old} +% A ~\newlabel~ is written to the aux-file. The reference +% is to ~\theLineNumber~, \emph{not} ~\thelinenumber~. +% This allows to hook in, as done below for pagewise line +% numbering. +% +% (New v3.03) The ~\@LN@ExtraLabelItems~ are added for a hook +% to keep packages like ~{hyperref}~ happy. (/New v3.03) +% +% (New v4.00) +% We fire the ~\marginpar~ mechanism, so we leave \LaTeX's +% ~\@addmarginpar~ untouched. +% \begin{old}\begin{verbatim} +% % \let\@LN@addmarginpar\@addmarginpar +% % \def\@addmarginpar{% +% % \ifnum\count\@currbox>-2\relax +% % \expandafter\@LN@addmarginpar +% % \else +% % \@cons\@freelist\@currbox +% % \protected@write\@auxout{}{% +% % \string\newlabel +% % {\csname @LNL@\the\@currbox\endcsname}% +% % {{\theLineNumber}{\thepage}\@LN@ExtraLabelItems}}% +% % \fi} +% \end{verbatim} +% \end{old} +% OK, we keep Stephan's ~\@LN@ExtraLabelItems~: +% (/New v4.00) + +\let\@LN@ExtraLabelItems\@empty + +% (New v4.00) +% We imitate the ~\marginpar~ mechanism without using the +% ~\@freelist~ boxes. ~\linelabel~ will indeed place a signal +% penalty (~\@Mllbcodepen~, new), and it will put a label into +% some list macro ~\@LN@labellist~. A new part of the output +% routine will take the labels from the list and will write +% ~\newlabel~s to the .aux file. +% +% The following is a version of \LaTeX's ~\@xnext~. + +\def\@LN@xnext#1\@lt#2\@@#3#4{\def#3{#1}\gdef#4{#2}} + +% This takes an item ~#1~ from a list ~#4~ into ~#3~; +% to be used as ~\expandafter\@LN@xnext#4\@@#3#4~. +% Our lists use ~\@lt~ after each item for separating. +% Indeed, there will be another list macro which can +% appear as argument ~#4~, this will be used for moving +% ~\vadjust~ items (section_\ref{ss:PVadj}). +% The list for ~\linelabel~s is the following: + +\global\let\@LN@labellist\@empty + +% The next is the new part of the output routine writing the +% ~\newlabel~ to the .aux file. Since it is no real page output, +% the page is put back to top of the main vertical list. + +\def\WriteLineNo{% + \unvbox\@cclv + \expandafter \@LN@xnext \@LN@labellist \@@ + \@LN@label \@LN@labellist + \protected@write\@auxout{}{\string\newlabel{\@LN@label}% + {{\theLineNumber}{\thepage}\@LN@ExtraLabelItems}}% +} + +% (/New v4.00) +% +% \subsection{% +% The \scs{linelabel} command +% \unskip}\label{ss:LL} +% To refer to a place in line ~\ref{~~}~ at page +% ~\pageref{~~}~ you place a ~\linelabel{~~}~ at +% that place. +% +% \linelabel{demo} +% \marginpar{\tiny\raggedright +% See if it works: This paragraph +% starts on page \pageref{demo}, line +% \ref{demo}. +% \unskip}% +% (New v4.11) +% \begin{old}\begin{verbatim} +% % If you use this command outside a ~\linenumbers~ +% % paragraph, you will get references to some bogus +% % line numbers, sorry. But we don't disable the command, +% % because only the ~\par~ at the end of a paragraph may +% % decide whether to print line numbers on this paragraph +% % or not. A ~\linelabel~ may legally appear earlier than +% % ~\linenumbers~. +% \end{verbatim} +% \end{old} +% This trick is better not allowed---see subsections_\ref{ss:LL} +% and_\ref{ss:OnOff}. +% (/New v4.11) +% +% ~\linelabel~ +% \begin{old}\begin{verbatim} +% %, via a fake float number $-2$, %% new mechanism v4.00 +% \end{verbatim} +% \end{old} +% puts a +% ~\penalty~ into a ~\vadjust~, which triggers the +% pagebuilder after putting the current line to the main +% vertical list. A ~\write~ is placed on the main vertical +% list, which prints a reference to the current value of +% ~\thelinenumber~ and ~\thepage~ at the time of the +% ~\shipout~. +% +% A ~\linelabel~ is allowed only in outer horizontal mode. +% In outer vertical mode we start a paragraph, and ignore +% trailing spaces (by fooling ~\@esphack~). +% +% (New v4.00) We aim at relaxing the previous condition. +% We insert a hook ~\@LN@mathhook~ and a shorthand +% ~\@LN@postlabel~ to support the ~mathrefs~ option which +% allows ~\linelabel~ in math mode. +% +% The next paragraph is no longer valid. +% \begin{old}\begin{verbatim} +% % The argument of ~\linelabel~ is put into a macro with a +% % name derived from the number of the allocated float box. +% % Much of the rest is dummy float setup. +% \end{verbatim} +% \end{old} +% (/New v4.00) +% +% (New v4.11) +% \begin{old}\begin{verbatim} +% % \def\linelabel#1{% +% \end{verbatim} +% \end{old} +% I forgot ~\linenumbers~ today, costed me hours or so. + +\def\@LN@LLerror{\PackageError{lineno}{% + \string\linelabel\space without \string\linenumbers}{% + Just see documentation. (New feature v4.11)}\@gobble} + +% (New v4.3) Here some things have changed for v4.3. +% The previous ~#1~ has been replaced by ~\@gobble~. +% Ensuing, the ~\linelabel~ error message is re-implemented. +% I find it difficult to compare efficiency of slight +% alternatives---so choose an easy one. Explicit switching +% in ~\linenumbers~ and ~\nolinenumbers~ is an additional +% command that may better be avoided. + +\newcommand\linelabel{% + \ifLineNumbers \expandafter \@LN@linelabel + \else \expandafter \@LN@LLerror \fi} +%%\let\linelabel\@LN@LLerror + +\gdef\@LN@linelabel#1{% +%% +% ~\gdef~ for hyperref ``symbolically''. (/New v4.11) +%% + \ifx\protect\@typeset@protect +%% +% $\gets$ And a ~\linelabel~ should never be replicated in a +% mark or a TOC entry. (/New v4.3) +%% + \ifvmode + \ifinner \else + \leavevmode \@bsphack \@savsk\p@ + \fi + \else + \@bsphack + \fi + \ifhmode + \ifinner + \@parmoderr + \else +%% +% (New v4.00) +%% + \@LN@postlabel{#1}% +% \begin{old}\begin{verbatim} +% % \@floatpenalty -\@Mii +% % \@next\@currbox\@freelist +% % {\global\count\@currbox-2% +% % \expandafter\gdef\csname @LNL@\the\@currbox\endcsname{#1}}% +% % {\@floatpenalty\z@ \@fltovf \def\@currbox{\@tempboxa}}% +% % \begingroup +% % \setbox\@currbox \color@vbox \vbox \bgroup \end@float +% % \endgroup +% % \@ignorefalse \@esphack +% \end{verbatim} +% \end{old} +% (/New v4.00) +%% + \@esphack +%% +% (New v4.00) +% The ~\@ignorefalse~ was appropriate before because the +% ~\@Esphack~ in ~\end@float~ set ~\@ignoretrue~. Cf._\LaTeX's +% ~\@xympar~. (/New v4.00) +%% + \fi + \else +%% +% (New v4.00) +%% + \@LN@mathhook{#1}% +% \begin{old}\begin{verbatim} +% % \@parmoderr +% \end{verbatim} +% \end{old} +% Instead of complaining, you may just do your job. +% (/New v4.00) +%% + \fi + \fi + } + +% (New v4.00) The shorthand just does what happened +% with ~linenox0.sty~ before ~ednmath0.sty~ (New v4.1: +% now ~mathrefs~ option) appeared, and +% the hook is initialized to serve the same purpose. +% So errors come just where Stephan had built them in, +% and this is just the \LaTeX\ ~\marginpar~ behaviour. + +\def\@LN@postlabel#1{\g@addto@macro\@LN@labellist{#1\@lt}% + \vadjust{\penalty-\@Mllbcodepen}} +\def\@LN@mathhook#1{\@parmoderr} + +% (/New v4.00) +% +% \modulolinenumbers[3] +% \firstlinenumber{1} +% \section{% +% The appearance of the line numbers +% \unskip}\label{appearance} +% \subsection{% +% Basic code %% own subsec. v4.2. +% \unskip} +% +% The line numbers are set as ~\tiny\sffamily\arabic{linenumber}~, +% $10pt$ left of the text. With options to place it +% right of the text, or . . . +% +% . . . here are the hooks: + +\def\makeLineNumberLeft{% + \hss\linenumberfont\LineNumber\hskip\linenumbersep} + +\def\makeLineNumberRight{% + \linenumberfont\hskip\linenumbersep\hskip\columnwidth + \hb@xt@\linenumberwidth{\hss\LineNumber}\hss} + +\def\linenumberfont{\normalfont\tiny\sffamily} + +\newdimen\linenumbersep +\newdimen\linenumberwidth + +\linenumberwidth=12pt +\linenumbersep=12pt + +% Margin switching requires ~pagewise~ numbering mode, but +% choosing the left or right margin for the numbers always +% works. + +\def\switchlinenumbers{\@ifstar + {\let\makeLineNumberOdd\makeLineNumberRight + \let\makeLineNumberEven\makeLineNumberLeft}% + {\let\makeLineNumberOdd\makeLineNumberLeft + \let\makeLineNumberEven\makeLineNumberRight}% + } + +\def\setmakelinenumbers#1{\@ifstar + {\let\makeLineNumberRunning#1% + \let\makeLineNumberOdd#1% + \let\makeLineNumberEven#1}% + {\ifx\c@linenumber\c@runninglinenumber + \let\makeLineNumberRunning#1% + \else + \let\makeLineNumberOdd#1% + \let\makeLineNumberEven#1% + \fi}% + } + +\def\leftlinenumbers{\setmakelinenumbers\makeLineNumberLeft} +\def\rightlinenumbers{\setmakelinenumbers\makeLineNumberRight} + +\leftlinenumbers* + +% ~\LineNumber~ is a hook which is used for the modulo stuff. +% It is the command to use for the line number, when you +% customize ~\makeLineNumber~. Use ~\thelinenumber~ to +% change the outfit of the digits. +% +% +% We will implement two modes of operation: +% \begin{itemize} +% \item numbers ~running~ through (parts of) the text +% \item ~pagewise~ numbers starting over with one on top of +% each page. +% \end{itemize} +% Both modes have their own count register, but only one is +% allocated as a \LaTeX\ counter, with the attached +% facilities serving both. + +\newcounter{linenumber} +\newcount\c@pagewiselinenumber +\let\c@runninglinenumber\c@linenumber + +% Only the running mode counter may be reset, or preset, +% for individual paragraphs. The pagewise counter must +% give a unique anonymous number for each line. +% +% (New v4.3) ~\newcounter{linenumber}~ +% was the only ~\newcounter~ in the whole package, and +% formerly I was near using ~\newcount~ instead. Yet +% ~\newcounter~ may be quite useful for ~\includeonly~. +% It also supports resetting ``subcounters'', but what +% could these be? Well, ~edtable~ might introduce a +% subcounter for columns. +% (Note that \LaTeX's setting commands would work with +% ~\newcount\c@linenumber~ already, apart from this. +% And perhaps sometimes ~\refstepcounter{linenumber}~ +% wouldn't work---cf._my discussion of ~\stepcounter~ in +% subsection_\ref{ss:MLN}, similarly ~\refstep...~ would +% be quite useless. +% Even the usual redefinitions of ~\thelinenumber~ would +% work. It is nice, on the other hand, that +% ~\thelinenumber~ is predefined here. \LaTeX's +% initialization of the value perhaps just serves making +% clear \LaTeX\ counters should always be changed +% globally.---Shortened and improved the discussion here.) +% (/New v4.3) +% +% (New v4.22) +% ~\c@linenumber~ usually is---globally---incremented by +% ~\stepcounter~ (at present), so resetting it locally would +% raise the save stack problem of \TeX book p._301, moreover +% it would be is useless, there is no hope of keeping the +% values local (but see subsection_\ref{ss:ILN}). So I insert +% ~\global~: (/New v4.22) + +\newcommand*\resetlinenumber[1][\@ne]{% + \global % v4.22 + \c@runninglinenumber#1\relax} + +% (New v4.00) +% \begin{old}\begin{verbatim} +% % \newcommand\resetlinenumber[1][1]{\c@runninglinenumber#1} +% \end{verbatim} +% \end{old} +% Added ~\relax~, being quite sure that this does no harm +% and is quite important, as with ~\setcounter~ etc. +% I consider this a bug fix (although perhaps no user has +% ever had a problem with this). (/New v4.00) +% +% (v4.22: I had made much fuss about resetting subordinate +% counters here---removed, somewhat postponed.) +% +%% TODO v4.4+: +%% \newcommand*\resetlinenumber[1][\@ne]{% +%% \ifx\c@linenumber\c@runninglinenumber +%% \global\c@linenumber#1\relax +%% \global\advance\c@linenumber\m@ne +%% \stepLineNumber +%% \else +%% \PackageError{lineno}%% Shorthand!? +%% {You can't reset line number in pagewise mode}% +%% {This should suffice.}% +%% \fi +%% } +% +% \subsection{% +% Running line numbers +% \unskip} +% +% Running mode is easy, ~\LineNumber~ and ~\theLineNumber~ +% produce ~\thelinenumber~, which defaults to +% ~\arabic{linenumber}~, using the ~\c@runninglinenumber~ +% counter. This is the default mode of operation. + +\def\makeRunningLineNumber{\makeLineNumberRunning} + +\def\setrunninglinenumbers{% + \def\theLineNumber{\thelinenumber}% + \let\c@linenumber\c@runninglinenumber + \let\makeLineNumber\makeRunningLineNumber + } + +\setrunninglinenumbers\resetlinenumber + +% +% \subsection{% +% Pagewise line numbers +% \unskip}\label{ss:PW} +% +% Difficult, if you think about it. The number has to be +% printed when there is no means to know on which page it +% will end up, except through the aux-file. My solution +% is really expensive, but quite robust. +% +% With version ~v2.00~ the hashsize requirements are +% reduced, because we do not need one controlsequence for +% each line any more. But this costs some computation time +% to find out on which page we are. +% +% ~\makeLineNumber~ gets a hook to log the line and page +% number to the aux-file. Another hook tries to find out +% what the page offset is, and subtracts it from the counter +% ~\c@linenumber~. Additionally, the switch +% ~\ifoddNumberedPage~ is set true for odd numbered pages, +% false otherwise. + +\def\setpagewiselinenumbers{% + \let\theLineNumber\thePagewiseLineNumber + \let\c@linenumber\c@pagewiselinenumber + \let\makeLineNumber\makePagewiseLineNumber + } + +\def\makePagewiseLineNumber{\logtheLineNumber\getLineNumber + \ifoddNumberedPage + \makeLineNumberOdd + \else + \makeLineNumberEven + \fi + } + +% Each numbered line gives a line to the aux file +% \begin{verse} +% ~\@LN{~~}{~~}~ +% \end{verse} +% very similar to the ~\newlabel~ business, except that we need +% an arabic representation of the page number, not what +% there might else be in ~\thepage~. + +\def\logtheLineNumber{\protected@write\@auxout{}{% +%% +% (New v4.00) (UL) +% As Daniel Doherty observed, the earlier line +% \begin{old}\begin{verbatim} +% % \string\@LN{\the\c@linenumber}{\noexpand\the\c@page}}} +% \end{verbatim} +% \end{old} +% here may lead into an infinite loop when the user resets +% the page number (think of ~\pagenumbering~, e.g.). +% Stephan and I brief\/ly discussed the matter and decided +% to introduce a ``physical''-page counter to which +% ~\logtheLineNumber~ refers. It was Stephan's idea to use +% ~\cl@page~ for reliably augmenting the ``physical''-page +% counter. However, this relies on the output routine once +% doing ~\stepcounter{page}~. Before Stephan's +% suggestion, I had thought of appending the stepping to +% \LaTeX's ~\@outputpage~.---So the macro definition ends +% as follows. +%% + \string\@LN{\the\c@linenumber}{% +%% +% (New v4.2) +%% \noexpand\number\n@LN@truepage}}} +%% +% The `truepage' counter must start with ~\c@~ so it works +% with ~\include~, and the ~\@addtoreset~ below is needed +% for the same purpose. +%% + \noexpand\the\c@LN@truepage}}} + +%% \newcount\n@LN@truepage +%% \g@addto@macro\cl@page{\global\advance\n@LN@truepage\@ne} +\newcount\c@LN@truepage +\g@addto@macro\cl@page{\global\advance\c@LN@truepage\@ne} +\@addtoreset{LN@truepage}{@ckpt} + +% (/New v4.2) I had thought of offering more +% features of a \LaTeX\ counter. However, the user should +% better \emph{not} have access to this counter. ~\c@page~ +% should suffice as a pagewise master counter.---To be sure, +% along the present lines the user \emph{can} manipulate +% ~\c@LN@truepage~ by ~\stepcounter{page}~. E.g., she might +% do this in order to manually insert a photograph. Well, +% seems not to harm. +% +% The above usage of ~\g@addto@macro~ and ~\cl@page~ may be +% not as stable as Stephan intended. His proposal used +% ~\xdef~ directly. But he used ~\cl@page~ as well, and who +% knows \dots{} And as to ~\g@addto@macro~, I have introduced +% it for list macros anyway. +% (/UL) (/New v4.00) +% +% From the aux-file we get one macro ~\LN@P~ for each +% page with line numbers on it. This macro calls four other +% macros with one argument each. These macros are +% dynamically defined to do tests and actions, to find out +% on which page the current line number is located. +% +% We need sort of a pointer to the first page with line +% numbers, initiallized to point to nothing: + +\def\LastNumberedPage{first} +\def\LN@Pfirst{\nextLN\relax} + +% The four dynamic macros are initiallized to reproduce +% themselves in an ~\xdef~ + +\let\lastLN\relax % compare to last line on this page +\let\firstLN\relax % compare to first line on this page +\let\pageLN\relax % get the page number, compute the linenumber +\let\nextLN\relax % move to the next page + +% During the end-document run through the aux-files, we +% disable ~\@LN~. I may put in a check here later, to give +% a rerun recommendation. + +\AtEndDocument{\let\@LN\@gobbletwo} + +% Now, this is the tricky part. First of all, the whole +% definition of ~\@LN~ is grouped, to avoid accumulation +% on the save stack. Somehow ~\csname~~\endcsname~ pushes +% an entry, which stays after an ~\xdef~ to that . +% +% If ~\LN@P~ is undefined, initialize it with the +% current page and line number, with the +% \emph{pointer-to-the-next-page} pointing to nothing. And +% the macro for the previous page will be redefined to point +% to the current one. +% +% If the macro for the current page already exists, just +% redefine the \emph{last-line-number} entry. +% +% Finally, save the current page number, to get the pointer to the +% following page later. + +\def\@LN#1#2{{\expandafter\@@LN + \csname LN@P#2C\@LN@column\expandafter\endcsname + \csname LN@PO#2\endcsname + {#1}{#2}}} + +\def\@@LN#1#2#3#4{\ifx#1\relax + \ifx#2\relax\gdef#2{#3}\fi + \expandafter\@@@LN\csname LN@P\LastNumberedPage\endcsname#1% + \xdef#1{\lastLN{#3}\firstLN{#3}% + \pageLN{#4}{\@LN@column}{#2}\nextLN\relax}% + \else + \def\lastLN##1{\noexpand\lastLN{#3}}% + \xdef#1{#1}% + \fi + \xdef\LastNumberedPage{#4C\@LN@column}} + +% The previous page macro gets its pointer to the +% current one, replacing the ~\relax~ with the cs-token +% ~\LN@P~. + +\def\@@@LN#1#2{{\def\nextLN##1{\noexpand\nextLN\noexpand#2}% + \xdef#1{#1}}} + +% Now, to print a line number, we need to find the page, +% where it resides. This will most probably be the page where +% the last one came from, or maybe the next page. However, it can +% be a completely different one. We maintain a cache, +% which is ~\let~ to the last page's macro. But for now +% it is initialized to expand ~\LN@first~, where the poiner +% to the first numbered page has been stored in. + +\def\NumberedPageCache{\LN@Pfirst} + +% To find out on which page the current ~\c@linenumber~ is, +% we define the four dynamic macros to do something usefull +% and execute the current cache macro. ~\lastLN~ is run +% first, testing if the line number in question may be on a +% later page. If so, disable ~\firstLN~, and go on to the +% next page via ~\nextLN~. + +\def\testLastNumberedPage#1{\ifnum#1<\c@linenumber + \let\firstLN\@gobble + \fi} + +% Else, if ~\firstLN~ finds out that we need an earlier +% page, we start over from the beginning. Else, ~\nextLN~ +% will be disabled, and ~\pageLN~ will run +% ~\gotNumberedPage~ with four arguments: the first line +% number on this column, the page number, the column +% number, and the first line on the page. + +\def\testFirstNumberedPage#1{\ifnum#1>\c@linenumber + \def\nextLN##1{\testNextNumberedPage\LN@Pfirst}% + \else + \let\nextLN\@gobble + \def\pageLN{\gotNumberedPage{#1}}% + \fi} + +% We start with ~\pageLN~ disabled and ~\nextLN~ defined to +% continue the search with the next page. + +\long\def \@gobblethree #1#2#3{} + +\def\testNumberedPage{% + \let\lastLN\testLastNumberedPage + \let\firstLN\testFirstNumberedPage + \let\pageLN\@gobblethree + \let\nextLN\testNextNumberedPage + \NumberedPageCache + } + +% When we switch to another page, we first have to make +% sure that it is there. If we are done with the last +% page, we probably need to run \TeX\ again, but for the +% rest of this run, the cache macro will just return four +% zeros. This saves a lot of time, for example if you have +% half of an aux-file from an aborted run, in the next run +% the whole page-list would be searched in vain again and +% again for the second half of the document. +% +% If there is another page, we iterate the search. + +\def\testNextNumberedPage#1{\ifx#1\relax + \global\def\NumberedPageCache{\gotNumberedPage0000}% + \PackageWarningNoLine{lineno}% + {Linenumber reference failed, + \MessageBreak rerun to get it right}% + \else + \global\let\NumberedPageCache#1% + \fi + \testNumberedPage + } + +% \linelabel{demo2} +% \marginpar{\tiny\raggedright +% Let's see if it finds the label +% on page \pageref{demo}, +% line \ref{demo}, and back here +% on page \pageref{demo2}, line +% \ref{demo2}. +% \unskip}% +% To separate the official hooks from the internals there is +% this equivalence, to hook in later for whatever purpose: + +\let\getLineNumber\testNumberedPage + +% So, now we got the page where the number is on. We +% establish if we are on an odd or even page, and calculate +% the final line number to be printed. + +\newif\ifoddNumberedPage +\newif\ifcolumnwiselinenumbers +\columnwiselinenumbersfalse + +\def\gotNumberedPage#1#2#3#4{\oddNumberedPagefalse + \ifodd \if@twocolumn #3\else #2\fi\relax\oddNumberedPagetrue\fi + \advance\c@linenumber\@ne + \ifcolumnwiselinenumbers + \subtractlinenumberoffset{#1}% + \else + \subtractlinenumberoffset{#4}% + \fi + } + +% You might want to run the pagewise mode with running line +% numbers, or you might not. It's your choice: + +\def\runningpagewiselinenumbers{% + \let\subtractlinenumberoffset\@gobble + } + +\def\realpagewiselinenumbers{% + \def\subtractlinenumberoffset##1{\advance\c@linenumber-##1\relax}% + } + +\realpagewiselinenumbers + +% For line number references, we need a protected call to +% the whole procedure, with the requested line number stored +% in the ~\c@linenumber~ counter. This is what gets printed +% to the aux-file to make a label: + +\def\thePagewiseLineNumber{\protect + \getpagewiselinenumber{\the\c@linenumber}}% + +% And here is what happens when the label is refered to: + +\def\getpagewiselinenumber#1{{% + \c@linenumber #1\relax\testNumberedPage + \thelinenumber + }} + +% % +% A summary of all per line expenses: +% \begin{description}\item +% [CPU:] The ~\output~ routine is called for each line, +% and the page-search is done. +% \item +% [DISK:] One line of output to the aux-file for each +% numbered line +% \item +% [MEM:] One macro per page. Great improvement over v1.02, +% which had one control sequence per line in +% addition. It blew the hash table after some five +% thousand lines. +% \end{description} +% +% \subsection{% +% Twocolumn mode (New v3.06) +% \unskip} +% +% Twocolumn mode requires another patch to the ~\output~ +% routine, in order to print a column tag to the .aux +% file. + +\AtBeginDocument{% v4.2, revtex4.cls (e.g.). + % <- TODO v4.4+: Or better in \LineNoLaTeXOutput!? + \let\@LN@orig@makecol\@makecol} +\def\@LN@makecol{% + \@LN@orig@makecol + \setbox\@outputbox \vbox{% + \boxmaxdepth \@maxdepth + \protected@write\@auxout{}{% + \string\@LN@col{\if@firstcolumn1\else2\fi}% + }% + \box\@outputbox + }% \vbox +} %% TODO cf. revtexln.sty. + +\def\@LN@col{\def\@LN@column} % v4.22, removed #1. +\@LN@col{1} + +% +% \subsection{% +% Numbering modulo $m$, starting at $f$ +%% Numbering modulo 5 +% \unskip}\label{ss:Mod} +% +% Most users want to have only one in five lines numbered. +% ~\LineNumber~ is supposed to produce the outfit of the +% line number attached to the line, while ~\thelinenumber~ +% is used also for references, which should appear even if +% they are not multiples of five. +% +% (New v4.00) Moreover, some users want to +% control which line number should be printed first. Support +% of this is now introduced here---see ~\firstlinenumber~ +% below.---~numline.sty~ by Michael Jaegermann and +% James Fortune offers controlling which \emph{final} +% line numbers should not be printed. What is +% it good for? We ignore this here until some user demands +% it.---Peter Wilson's ~ledmac.sty~ offers much different +% choices of line numbers to be printed, due to Wayne Sullivan. +% (/New v4.00) +% +% (New v4.22) ~\c@linenumbermodulo~ is rendered a +% fake counter, as discussed since v4.00. So it can +% no longer be set by ~\setcounter~. ~\modulolinenumbers~ +% serves this purpose. Well, does anybody want to do +% what worked with ~\addtocounter~? (Then please tell +% me.)---At least, ~\value~ still works. For the same +% purpose I rename the fake `firstlinenumber' counter +% ~\n@...~ to ~\c@...~. (/New v4.22) +% \begin{old}\begin{verbatim} +% % \newcount\c@linenumbermodulo % removed for v4.22 +% \end{verbatim} +% \end{old} +% +%% Removed for v4.22: +%% (UL) On my question why, e.g., +%% ~\chardef~ would not have sufficed, Stephan couldn't remember +%% exactly; guessed that he wanted to offer \LaTeX\ counter +%% facilities. However, the typical ones don't come this way. +%% So I'm quite sure that I will change this next time. +%% +%% However, I observed at least two times that users gave a very +%% high value to ~\c@linenumbermodulo~ in order to suppress +%% printing of the line number. One of these users preferred an +%% own way of handling line numbers, just wanted to use +%% ~\linelabel~ and ~ednotes.sty~ features. Should we support this? +%% I rather would like to advise them to +%% ~\let\makeLineNumber\relax~. (/UL) +% +% (New v4.00) \par +% ~\themodulolinenumber~ waits for being declared +% ~\LineNumber~ by ~\modulolinenumbers~. (This has +% been so before, no change.) Here is how it +% looked before: +% \begin{old}\begin{verbatim} +% % \def\themodulolinenumber{{\@tempcnta\c@linenumber +% % \divide\@tempcnta\c@linenumbermodulo +% % \multiply\@tempcnta\c@linenumbermodulo +% % \ifnum\@tempcnta=\c@linenumber\thelinenumber\fi +% % }} +% \end{verbatim} +% \end{old} +% (UL) This was somewhat slow. This arithmetic +% happens at every line. This time I tend to declare an extra +%% TODO v4.4+ +% line counter (as opposed to my usual recommendations to use +% counters as rarely as possible) which is stepped every line. +% It could be incremented in the same way as ~\c@LN@truepage~ +% is incremented via ~\cl@page~! This is another point in favour +% of ~{linenumber}~ being a \LaTeX\ counter! +% When this new counter equals ~\c@linenumbermodulo~, it is reset, +% and ~\thelinenumber~ is executed.---It gets much slower by my +% support of controlling the first line number below. I should +% improve this.---On +%% %% TODO v4.4+--pagewise!? +% the other hand, time expense means very little nowadays, +% while the number of \TeX\ counters still is limited. +% +% For the same purpose, moreover, attaching the line number +% box could be intercepted earlier (in ~\MakeLineNo~), +% without changing ~\LineNumber~. However, this may be +% bad for the latter's announcement as a wizard interface +% in section_\ref{s:UserCmds}. +%% +%% I wonder about Stephan's group. Its only effect is that +%% ~\@tempcnta~ is restored after using it. What for is this? +%% I tend to remove the group braces. %% TODO v4.4+ +% (/UL) +% +% Here is the new code. It is very near to my ~lnopatch.sty~ +% code which introduced the first line number feature +% before.---I add starting with a ~\relax~ which is so often +% recommended---without understanding this really. At least, +% it will not harm.---Former group braces appear as +% ~\begingroup~/~\endgroup~ here. + +\def\themodulolinenumber{\relax + \ifnum\c@linenumber<\c@firstlinenumber \else + \begingroup + \@tempcnta\c@linenumber + \advance\@tempcnta-\c@firstlinenumber + \divide\@tempcnta\c@linenumbermodulo + \multiply\@tempcnta\c@linenumbermodulo + \advance\@tempcnta\c@firstlinenumber + \ifnum\@tempcnta=\c@linenumber \thelinenumber \fi + \endgroup + \fi +} + +% (/New v4.00) +% +% The user command to set the modulo counter: +% (New v4.31) \dots\ a star variant is introduced to implement +% Hillel Chayim Yisraeli's idea to print the first line number +% after an interruption of the edited text by some editor's +% text, regardless of the modulo. If it is 1, it is printed only +% with ~\firstlinenumber{1}~. I.e., you use ~\modulolinenumbers*~ +% for the new feature, without the star you get the simpler +% behaviour that we have had so far. And you can switch back +% from the refined behaviour to the simple one by using +% ~\modulolinenumbers~ without the star.---This enhancement +% is accompanied by a new package option ~modulo*~ which just +% executes ~\modulolinenumbers*~ +% (subsection_\ref{ss:v3opts}).---`With ~\firstlinenumber{1}~' +% exactly means: `1' is printed if and only if the last +% ~\firstlinenumber~ before or in the paragraph that follows +% the ``interruption'' has argument `1' (or something +% \emph{expanding} to `1', or (to) something that \TeX\ +% ``reads'' as 1, e.g.: a \TeX\ count register storing +% 1).---At present, this behaviour may be unsatisfactory with +% pagewise line-numbering $\dots$ I'll make an experimental +% extra package if someone complains \dots + +\newcommand\modulolinenumbers{% + \@ifstar + {\def\@LN@maybe@moduloresume{% + \global\let\@LN@maybe@normalLineNumber + \@LN@normalLineNumber}% + \@LN@modulolinenos}% + {\let\@LN@maybe@moduloresume\relax \@LN@modulolinenos}% +} + +\global\let\@LN@maybe@normalLineNumber\relax +\let\@LN@maybe@moduloresume\relax +\gdef\@LN@normalLineNumber{% + \ifnum\c@linenumber=\c@firstlinenumber \else + \ifnum\c@linenumber>\@ne + \def\LineNumber{\thelinenumber}% + \fi + \fi +%% +% ~\def~ instead of ~\let~ enables taking account of a +% redefinition of ~\thelinenumber~ in a present numbering +% environment (e.g.). +%% + \global\let\@LN@maybe@normalLineNumber\relax} + +% Instead of changing ~\LineNumber~ directly by +% ~LN@moduloresume~, these tricks enable ~\modulolinenumbers*~ +% to act as locally as I can make it. I don't know how to +% avoid that the output routine switches back to the normal +% modulo behaviour by a global change. (An ~\aftergroup~ may +% fail in admittedly improbable cases.) + +\newcommand*\@LN@modulolinenos[1][\z@]{% +%% +% The definition of this macro is that of the former +% ~\modulolinenumbers~. (/New v4.31) +%% + \let\LineNumber\themodulolinenumber + \ifnum#1>\@ne + \chardef % v4.22, note below + \c@linenumbermodulo#1\relax + \else\ifnum#1=\@ne +% \begin{old}\begin{verbatim} +% % \def\LineNumber{\thelinenumber}% +% \end{verbatim} +% \end{old} +% (New v4.00) I am putting something here to enable +% ~\firstlinenumber~ with $~\c@linenumbermodulo~=1$. +% With ~lnopatch.sty~, a trick was offered for this purpose. +% It is now obsolete. +% + \def\LineNumber{\@LN@ifgreat\thelinenumber}% +%% +% (/New v4.00) +%% + \fi\fi + } + +% (New v4.00) The default of ~\@LN@ifgreat~ is + +\let\@LN@ifgreat\relax + +% The previous changes as soon as ~\firstlinenumber~ is used: + +\newcommand*\firstlinenumber[1]{% + \chardef\c@firstlinenumber#1\relax +%% +% No counter, little values allowed only---OK?---(UL) +% The change is local---OK? The good thing is that +% ~\global\firstlinenumber{~~}~ works. Moreover, +% ~\modulolinenumbers~ acts locally as well. (/UL) +% +% (New v4.31) +%% + \let\@LN@ifgreat\@LN@ifgreat@critical} + +\def\@LN@ifgreat@critical{% + \ifnum\c@linenumber<\c@firstlinenumber + \expandafter \@gobble + \fi}% + +% (/New v4.31) +% +% The default +% value of ~\c@firstlinenumber~ %% v4.31 +% is 0. This is best for what one would expect from modulo +% printing. + +\let\c@firstlinenumber=\z@ + +% +% For usage and effects of ~\modulolinenumbers~ and %% v4.31 +% ~\firstlinenumbers~, please consult section_\ref{s:UserCmds}. +% Two details on ~\firstlinenumbers~ here: +% (i)_~\firstlinenumber~ acts on a paragraph if and only if +% (a)_the paragraph is broken into lines ``in line-numbering +% mode'' (after ~\linenumbers~, e.g.); +% (b)_it is the last occurrence of a ~\firstlinenumbers~ +% before or in the paragraph. +% (The practical applications of this that I can imagine +% don't seem appealing to me.) +% Cf._the explanation above of how ~\modulolinenumbers~ and +% ~\firstlinenumbers~ interact---for this and for (ii), +% which is concerned with possible arguments for +% ~\firstlinenumbers~. +% +% Note that the line numbers of the present section +% demonstrate the two devices. (/New v4.00) + +%%\setcounter{linenumbermodulo}{5} +\chardef\c@linenumbermodulo=5 % v4.2; ugly? +\modulolinenumbers[1] + +% (New v4.22) The new implementation through ~\chardef~ +% decreases the functionality and raises certain compatibility +% problems. I face this without fear. The maximum modulo value +% is now ~255~. I expect that this suffices for usual applications. +% However, some users have ``abused'' ~lineno.sty~ to get +% ~ednotes.sty~ features without line numbers, so have set the +% modulo to a value beyond the total number of lines in their +% edition. This ought to be replaced by +% ~\let\makeLineNumber\relax~. (/New v4.22) +% +% \section{% +% Package options +% \unskip}\label{s:Opts} +% +% (New v4.1) +% The last heading formerly was the heading of what is now +% subsection_\ref{ss:v3opts}. The options declared there were +% said to execute user commands only. This was wrong already +% concerning ~displaymath~ and ~hyperref~. At least, however, +% these options were no or almost no occasion to skip definitions +% or allocations. This is different with the options that we now +% insert. +% +%% (New v4.2) v4.00 moved the ``options'' below the +%% ``extensions''. This was bad with ~\do@mlineno~ in +%% subsection_\ref{ss:v3opts} which is to control +%% subsection_\ref{ss:display}---undone here. (/New v4.2) +% +% \subsection{% +% Extended referencing to line numbers. (v4.2) +% \unskip} +% This subsection explains and declares package option ~addpageno~. %% v4.31 +% +% If a line to whose number you refer by ~\ref~ is not on the +% present page, it may be useful to add the number of the page +% on which the line occurs---and perhaps it should not be added +% otherwise. In general, you could use the Standard \LaTeX\ +% package varioref for this. However, the latter usually +% produces verbose output like `on the preceding page'--- +% unless costumized---, while in critical editions, e.g., one +% may prefer just adding the page number and some mark on the +% left of the line number, irrespectively of how far the page is +% apart etc. To support this, package option ~addpageno~ +% provides a command ~\vpagelineref~ to be used in place of +% ~\ref~. This produces, e.g., `34.15' when referring to line_15 +% on page_34 while the present page is not 34. You can customize +% the outcome, see the package file ~vplref.sty~ where the code +% and further details are. You may conceive of +% ~\vpagelineref~ as a certain customization of varioref's +% ~\vref~. +% +% This implies that option ~addpageno~ requires the files +% ~vplref.sty~ and ~varioref.sty~. ~addpageno~ automatically +% loads both of them. Yet you can also load ~varioref.sty~ +% on your own to use its package options. +% +% Of course, you might better introduce a shorter command name +% for ~\vpagelineref~ for your work, while we cannot predict +% here what shorthand will fit your work. E.g., +% ~\newcommand{\lref}{\vpagelineref}~. +% +% If you really want to add the page number in \emph{any} case, +% use, e.g., some ~\myref~ instead of ~\ref~, after +% \[~newcommand*{\myref}{\pageref{#1}.\ref{#1}}~\] +% or what you like. You don't need the ~addpageno~ option in +% this case. +% +% ~addpageno~ is due to a suggestion by Sergei Mariev. + +\DeclareOption{addpageno}{% + \AtEndOfPackage{\RequirePackage{vplref}[2005/04/25]}} + +% \subsection{% +% \scs{linelabel} in math mode +% \unskip}\label{ss:MathRef} +% +% We have made some first steps towards allowing ~\linelabel~ in +% math mode. Because our code for this is presently experimental, +% we leave it to the user to decide for the experiment by calling +% option ~mathrefs~. We are in a hurry now and thus leave the +% code, explanations, and discussion in the separate package +% ~ednmath0.sty~. Maybe we later find the time to improve the +% code and move the relevant content of ~ednmath0.sty~ to here. +% The optimal situation would be to define ~\linelabel~ from +% the start so it works in math mode, omitting the ~mathrefs~ +% option. +% +% Actually, this package even provides adjustments for analogously +% allowing ~ednotes.sty~ commands in math mode. Loading the package +% is postponed to ~\AtBeginDocument~ when we know whether these +% adjustments are needed. + +\DeclareOption{mathrefs}{\AtBeginDocument + {\RequirePackage{ednmath0}[2004/08/20]}} + +% +% \subsection{% +% Arrays, tabular environments (Revised v4.11) +% \unskip}\label{ss:Tab} +% +% This subsection explains and declares package options %% v4.31 +% ~edtable~, ~longtable~, and ~nolongtablepatch~. +% +% The standard \LaTeX\ tabular environments come as single +% boxes, so the ~lineno.sty~ versions before v4.00 treated them as +% (parts of) single lines, printing (at most) one line number +% beside each and stepping the line number counter once only. +% Moreover, ~\linelabel~s got lost. Of course, tables are +% usually so high that you will want to treat each row like a +% line. (Christian Tapp even desires that the lines of table +% entries belonging to a single row are treated like ordinary +% lines.) Footnotes get lost in such environments as well, which +% was bad for ~ednotes.sty~. +% +% We provide adjustments to count lines, print their numbers +% etc.\ as desired at least for \emph{some} \LaTeX\ tabular +% environments. (Like with other details, ``some'' is to some +% extent explained in ~edtable.sty~.) We do this similarly as +% with option ~mathrefs~ before. We leave code +% and explanations in the separate package ~edtable.sty~. +% (For wizards: this package provides adjustments for +% ~ednotes.sty~ as well. However, in the present case we don't try +% to avoid them unless ~ednotes.sty~ is loaded.) +% Package option ~edtable~ +% defines---by loading ~edtable.sty~---an environment ~{edtable}~ +% which is able to change some \LaTeX\ tabular environments +% with the desired effects. (v4.11: ~edtable.sty~ v1.3 counts +% \LaTeX's ~{array}~ [etc.\@] as a ``tabular environment'' as +% well.) +% +% The ~{edtable}~ environment doesn't help with ~longtable.sty~, +% however. To make up for this, ~{longtable}~ is adjusted in a +% different way---and this happens only when another ~lineno.sty~ +% option ~longtable~ is called. In this case, option ~edtable~ +% needn't be called explicitly: option ~longtable~ works as if +% ~edtable~ had been called. +% +% Now, we are convinced that vertical spacing around +% ~{longtable}~ works wrongly---see \LaTeX\ bugs database +% tools/3180 and 3485, or see explanations in the package +% ~ltabptch.sty~ (which is to be obtained from CTAN folder +% \path{macros/latex/ltabptch}). Our conviction is so strong +% that the ~longtable~ option loads---after ~longtable.sty~---the +% patch package ~ltabptch.sty~. If the user doesn't want this +% (maybe preferring her own arrangement with the vertical +% spacing), she can forbid it by calling ~nolongtablepatch~. +% +% The following code just collects some choices, which are +% then executed in section_\ref{ss:ExOpt}. We use an ~\if...~ +% without ~\newif~ since ~\if...true~ and ~\if...false~ +% would occur at most two times and only within the present +% package. (~\AtEndOfClass{\RequirePackage{edtable}}~ +% could be used instead, I just overlooked this. Now I don't +% change it because it allows to change the version requirement +% at one place only.) + +\let\if@LN@edtable\iffalse + +\DeclareOption{edtable}{\let\if@LN@edtable\iftrue} + +\DeclareOption{longtable}{\let\if@LN@edtable\iftrue + \PassOptionsToPackage{longtable}{edtable}} + +\DeclareOption{nolongtablepatch}{% + \PassOptionsToPackage{nolongtablepatch}{edtable}} + +% (/New v4.1) +% +% \subsection{% +% Switch among settings +% \unskip}\label{ss:v3opts} +% +% There is a bunch of package options that execute %% v4.2 +%% There is a bunch of package options, all of them executing +%% executing only user commands (see below). %% Cf. start of section. +% user commands only. +% +% Options ~left~ (~right~) put the line numbers on the left +% (right) margin. This works in all modes. ~left~ is the +% default. + +\DeclareOption{left}{\leftlinenumbers*} + +\DeclareOption{right}{\rightlinenumbers*} + +% Option ~switch~ (~switch*~) puts the line numbers on the +% outer (inner) margin of the text. This requires running +% the pagewise mode, but we turn off the page offset +% subtraction, getting sort of running numbers again. The +% ~pagewise~ option may restore true pagewise mode later. + +\DeclareOption{switch}{\setpagewiselinenumbers + \switchlinenumbers + \runningpagewiselinenumbers} + +\DeclareOption{switch*}{\setpagewiselinenumbers + \switchlinenumbers*% + \runningpagewiselinenumbers} + +% In twocolumn mode, we can switch the line numbers to +% the outer margin, and/or start with number 1 in each +% column. Margin switching is covered by the ~switch~ +% options. + +\DeclareOption{columnwise}{\setpagewiselinenumbers + \columnwiselinenumberstrue + \realpagewiselinenumbers} + +% The options ~pagewise~ and ~running~ select the major +% linenumber mechanism. ~running~ line numbers refer to a real +% counter value, which can be reset for any paragraph, +% even getting multiple paragraphs on one page starting +% with line number one. ~pagewise~ line numbers get a +% unique hidden number within the document, but with the +% opportunity to establish the page on which they finally +% come to rest. This allows the subtraction of the page +% offset, getting the numbers starting with 1 on top of each +% page, and margin switching in twoside formats becomes +% possible. The default mode is ~running~. +% +% The order of declaration of the options is important here +% ~pagewise~ must come after ~switch~, to overide running +% pagewise mode. ~running~ comes last, to reset the running +% line number mode, e.g, after selecting margin switch mode +% for ~pagewise~ running. Once more, if you specify all +% three of the options ~[switch,pagewise,running]~, the +% result is almost nothing, but if you later say +% ~\pagewiselinenumbers~, you get margin switching, with +% real pagewise line numbers. +% +\DeclareOption{pagewise}{\setpagewiselinenumbers + \realpagewiselinenumbers} + +\DeclareOption{running}{\setrunninglinenumbers} + +% The option ~modulo~ causes only those linenumbers to be +% printed which are multiples of five. + +\DeclareOption{modulo}{\modulolinenumbers\relax} + +% Option ~modulo*~ modifies ~modulo~ in working like +% ~\modulolinenumbers*~---see section_\ref{s:UserCmds}. + +\DeclareOption{modulo*}{\modulolinenumbers*\relax} + +% The package option ~mathlines~ switches the behavior of +% the ~{linenomath}~ environment with its star-form. +% Without this option, the ~{linenomath}~ environment does +% not number the lines of the display, while the star-form +% does. With this option, its just the opposite. +% +%%% 1999-06-10: renamed ~displaymath~ to ~mathlines~. + +\DeclareOption{mathlines}{\linenumberdisplaymath} + +% ~displaymath~ now calls for wrappers of the standard +% \LaTeX\ display math environment. This was previously +% done by ~mlineno.sty~. +% +% (New v4.3) Option `displaymath' becomes default according +% to Erik \mbox{Luijten}'s suggestion. I was finally convinced +% of this as soon as I discovered how to avoid a spurious line +% number above ~\begin{linenomath}~ (subsection_\ref{ss:DM}). +% ~\endlinenomath~ provides ~\ignorespaces~, so what could go +% wrong now? + +\DeclareOption{displaymath}{\PackageWarningNoLine{lineno}{% + Option [displaymath] is obsolete -- default now!}} +%% +%%\let\do@mlineno\relax +%%\DeclareOption{displaymath}{\let\do@mlineno\@empty} +% (/New v4.3) +% +% \subsection{% +% Compatibility with \texttt{hyperref} %% own subsec. v4.3. +% \unskip} +% The ~hyperref~ package, via ~nameref~, requires three more +% groups in the second argment of a ~\newlabel~. Well, why +% shouldn't it get them? (New v3.07) The presence of the +% ~nameref~ package is now detected automatically +% ~\AtBeginDocument~. (/New v3.07) (Fixed in v3.09) We try +% to be smart, and test ~\AtBeginDocument~ if the ~nameref~ +% package is loaded, but ~hyperref~ postpones the loading of +% ~nameref~ too, so this is all in vain. +% +% (New v4.3) But we can also test at the first ~\linelabel~. +% Regarding the error-message for misplaced ~\linelabel~ from v4.11: +% previously, ~\linenumbers~ rendered ~\linelabel~ the genuine +% version of ~\linelabel~ from the start on. This doesn't work +% now, since ~\@LN@linelabel~ may change its meaning after the +% first ~\linenumbers~ and before a next one (if there is some). +% (/New v4.3) + +\DeclareOption{hyperref}{\PackageWarningNoLine{lineno}{% + Option [hyperref] is obsolete. + \MessageBreak The hyperref package is detected automatically.}} + +\AtBeginDocument{% + \@ifpackageloaded{nameref}{% +%% +% (New v4.3) ``Global'' is merely ``symbolic'' ~\AtBeginDoc...~. +% If ~nameref~ is not detected here, the next ~\@LN@linelabel~ +% will do almost the same, then globally indeed. +%% + \gdef\@LN@ExtraLabelItems{{}{}{}}% + }{% + \global\let\@LN@@linelabel\@LN@linelabel + \gdef\@LN@linelabel{% +%% +% ~\@ifpackageloaded~ is ``preamble only'', its---very +% internal---preamble definition is replicated here: +%% + \expandafter + \ifx\csname ver@nameref.sty\endcsname\relax \else + \gdef\@LN@ExtraLabelItems{{}{}{}}% + \fi +%% +% Now aim at the ``usual'' behaviour: +%% + \global\let\@LN@linelabel\@LN@@linelabel + \global\let\@LN@@linelabel\relax + \@LN@linelabel + }% + }% +} + +% (/New v4.3) +% +% (New v4.1) +% \subsection{% +% A note on calling so many options +% \unskip} +% +% The number of package options may stimulate worrying about how to +% \emph{enter} all the options that one would like to use---they may +% not fit into one line. Fortunately, you can safely break code lines +% after the commas separating the option names in the ~\usepackage~ +% command (no comment marks needed). +% +% \subsection{% +% Execute options +% \unskip}\label{ss:ExOpt} +% +% We stop declaring options and execute the ones that are +% called by the user. (/New v4.1) + +\ProcessOptions + +% (New v4.1) Now we know whether ~edtable.sty~ is wanted +% and (if it is) with which options it is to be called. + +\if@LN@edtable \RequirePackage{edtable}[2005/03/07] \fi + +% (/New v4.1) +% +% \section{% +% Former package extensions +% \label{s:Xt}\unskip} +% +% The extensions in this section were previously supplied +% in separate ~.sty~ files. +% +% \subsection{% +% $display math$ +% \unskip}\label{ss:display} +%% (New v4.32) +% (New v4.3) From now on, you no longer need to type +% the ~{linenomath}~ environment with the ~\[~, ~{equation}~, +% and ~{eqnarray}~ environments---and you no longer need to +% use the former package option ~displaymath~ for this feature. +% (/New v4.3) +%% (/New v4.32) +% +% The standard \LaTeX\ display math environments are +% wrapped in a ~{linenomath}~ environment. +% +% (New 3.05) The ~[fleqn]~ option of the standard +% \LaTeX\ classes defines the display math +% environments such that line numbers appear just +% fine. Thus, we need not do any tricks when +% ~[fleqn]~ is loaded, as indicated by presents of +% the ~\mathindent~ register. (/New 3.05) +% +% (New 3.05a) for ~{eqnarray}~s we rather keep the +% old trick. (/New 3.05a) +% +% (New 3.08) Wrap ~\[~ and ~\]~ into ~{linenomath}~, +% instead of ~{displaymath}~. Also save the definition +% of ~\equation~, instead of replicating the current +% \LaTeX\ definition. (/New 3.08) + +%%\ifx\do@mlineno\@empty + \@ifundefined{mathindent}{ + +%% \AtBeginDocument{% + \let\LN@displaymath\[% + \let\LN@enddisplaymath\]% + \renewcommand\[{\begin{linenomath}\LN@displaymath}% + \renewcommand\]{\LN@enddisplaymath\end{linenomath}}% +% + \let\LN@equation\equation + \let\LN@endequation\endequation + \renewenvironment{equation}% + {\linenomath\LN@equation}% + {\LN@endequation\endlinenomath}% +%% } + + }{}% \@ifundefined{mathindent} -- 3rd arg v4.2, was \par! + +%%\AtBeginDocument{% + \let\LN@eqnarray\eqnarray + \let\LN@endeqnarray\endeqnarray + \renewenvironment{eqnarray}% + {\linenomath\LN@eqnarray}% + {\LN@endeqnarray\endlinenomath}% +%%} + +%%\fi + +% (UL) Indeed. The \LaTeX\ macros are saved for +% unnumbered mode, which is detected by ~\linenomath~. +% (/UL) +% +% \subsection{% +% Line numbers in internal vertical mode +% \unskip}\label{ss:ILN} +% +% The command ~\internallinenumbers~ adds line numbers in +% internal vertical mode, but with limitations: we assume +% fixed baseline skip. +% +% (v4.22) v3.10 provided a global (~\global\advance~) +% as well as a local version (star-form, using +% ~\c@internallinenumber~). ~\resetlinenumbers~ acted +% locally and was here used with the global version---save +% stack danger, \TeX book p._301---in v4.00 I +% disabled the global version therefore. Now I find that +% it is better to keep a global version, and the now global +% ~\resetlinenumbers~ is perfect for this. The global version +% allows continuing the ``internal'' numbers in the ensuing +% ``external'' text, and---unless reset by brackets +% argument---continuing the above series of line numbers. +% As with v3.10, the local version always starts with +% line number one. A new ~\@LN@iglobal~ steps ~\global~ly +% in the global version, otherwise it is ~\relax~. +% (I also remove all my stupid discussions as of v4.00. +% And I use ~\newcommand~.) (v4.22) + +\let\@LN@iglobal\global % v4.22 + +\newcommand\internallinenumbers{\setrunninglinenumbers + \let\@@par\internallinenumberpar + \ifx\@par\@@@par\let\@par\internallinenumberpar\fi + \ifx\par\@@@par\let\par\internallinenumberpar\fi + \ifx\@par\linenumberpar\let\@par\internallinenumberpar\fi + \ifx\par\linenumberpar\let\par\internallinenumberpar\fi + \@ifnextchar[{\resetlinenumber}%] + {\@ifstar{\let\c@linenumber\c@internallinenumber + \let\@LN@iglobal\relax % v4.22 + \c@linenumber\@ne}{}}% + } + +\let\endinternallinenumbers\endlinenumbers +\@namedef{internallinenumbers*}{\internallinenumbers*} +\expandafter\let\csname endinternallinenumbers*\endcsname\endlinenumbers + +\newcount\c@internallinenumber +\newcount\c@internallinenumbers + +\newcommand\internallinenumberpar{% + \ifvmode\@@@par\else\ifinner\@@@par\else\@@@par + \begingroup + \c@internallinenumbers\prevgraf + \setbox\@tempboxa\hbox{\vbox{\makeinternalLinenumbers}}% + \dp\@tempboxa\prevdepth + \ht\@tempboxa\z@ + \nobreak\vskip-\prevdepth + \nointerlineskip\box\@tempboxa + \endgroup + \fi\fi + } + +\newcommand\makeinternalLinenumbers{% + \ifnum\c@internallinenumbers>\z@ % v4.2 + \hb@xt@\z@{\makeLineNumber}% + \@LN@iglobal % v4.22 + \advance\c@linenumber\@ne + \advance\c@internallinenumbers\m@ne + \expandafter\makeinternalLinenumbers\fi + } + % TODO v4.4+: star: line numbers right!? cf. lnocapt.sty + +% +% \subsection{% +% Line number references with offset +% \unskip} +% +% This extension defines macros to refer to line +% numbers with an offset, e.g., to refer to a line +% which cannot be labeled directly (display math). +% This was formerly knows as ~rlineno.sty~. +% +% To refer to a pagewise line number with offset: +% \begin{quote} +% ~\linerefp[~~]{~