% \iffalse meta-comment % % reledmac.dtx % Author: Peter Wilson (Herries Press) herries dot press at earthlink dot net % Maintainer:Maïeul Rouquette maieul at maieul dot net % Copyright 2003 -- 2005 Peter R. Wilson / 2011-.. Maïeul Rouquette % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either % version 1.3 of this license or (at your option) any % later version. % The latest version of the license is in % http://www.latex-project.org/lppl.txt % and version 1.3 or later is part of all distributions of % LaTeX version 2003/06/01 or later. % % This work has the LPPL maintenance status "maintained". % % This work consists of the files listed in the README file. % % %<*driver> \documentclass[twoside]{ltxdoc} \usepackage{url} \usepackage[draft=false, plainpages=false, pdfpagelabels, bookmarksnumbered, % hyperindex=true hyperindex=false ]{hyperref} \addtolength\marginparwidth{30pt} \usepackage[mono=false]{libertine} \usepackage[series={A,B},noend,noeledsec,nofamiliar]{reledmac} \usepackage[english]{babel} \usepackage{xspace} \usepackage{doctools} \usepackage{graphicx,metalogo} % Index and Changelog in one column \makeatletter \renewenvironment{theglossary}{% \@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35\p@ \glossary@prologue% \GlossaryParms \let\item\@idxitem \ignorespaces} {\if@restonecol\onecolumn\else\clearpage\fi} \def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi \columnseprule \z@ \columnsep 35\p@ \index@prologue% \IndexParms \let\item\@idxitem \ignorespaces} \def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} \@mparswitchfalse \makeatother \EnableCrossrefs \RecordChanges \CodelineIndex %%\OnlyDescription \renewcommand{\MakeUppercase}[1]{#1} \pagestyle{headings} \setcounter{StandardModuleDepth}{1} \usepackage{longtable} \begin{document} \raggedbottom \DocInput{reledmac.dtx} \end{document} % % % \fi % % \newcommand{\reff}[1]{\ref{#1} p.~\pageref{#1}} % % \makeatletter % \newcommand*{\DescribeIt}{\leavevmode\@bsphack\begingroup\MakePrivateLetters % \Describe@It} % \newcommand*{\Describe@It}[1]{\endgroup % \marginpar{\raggedleft\PrintDescribeEnv{#1}}% % \SpecialItIndex{#1}\@esphack\ignorespaces} % \newcommand*{\SpecialItIndex}[1]{\@bsphack % \index{#1\actualchar{\protect\ttfamily#1}\encapchar usage}\@esphack} % % \DoNotIndex{\@,\@@par,\@beginparpenalty,\@empty} % \DoNotIndex{\@flushglue,\@input} % \DoNotIndex{\@makefnmark,\@makeother,\@maketitle} % \DoNotIndex{\@namedef,\@ne,\@spaces,\@tempa} % \DoNotIndex{\@tempb,\@tempswafalse,\@tempswatrue} % \DoNotIndex{\@thanks,\@thefnmark,\@topnum} % \DoNotIndex{\@@,\@elt,\@forloop,\@fortmp,\@gtempa,\@totalleftmargin} % \DoNotIndex{\",\/,\@ifundefined,\@nil,\@verbatim,\@vobeyspaces} % \DoNotIndex{\|,\~,\ ,\active,\advance,\aftergroup,\begingroup,\bgroup} % \DoNotIndex{\mathcal,\csname,\def,\documentstyle,\dospecials,\edef} % \DoNotIndex{\egroup} % \DoNotIndex{\else,\endcsname,\endgroup,\endinput,\endtrivlist} % \DoNotIndex{\expandafter,\fi,\fnsymbol,\futurelet,\gdef,\global} % \DoNotIndex{\hbox,\hss,\if,\if@inlabel,\if@tempswa,\if@twocolumn} % \DoNotIndex{\ifcase} % \DoNotIndex{\ifcat,\iffalse,\ifx,\ignorespaces,\index,\input,\item} % \DoNotIndex{\jobname,\kern,\leavevmode,\leftskip,\let,\llap,\lower} % \DoNotIndex{\m@ne,\next,\newpage,\nobreak,\noexpand,\nonfrenchspacing} % \DoNotIndex{\obeylines,\or,\protect,\raggedleft,\rightskip,\rm,\sc} % \DoNotIndex{\setbox,\setcounter,\small,\space,\string,\strut} % \DoNotIndex{\strutbox} % \DoNotIndex{\thefootnote,\thispagestyle,\topmargin,\trivlist,\tt} % \DoNotIndex{\twocolumn,\typeout,\vss,\vtop,\xdef,\z@} % \DoNotIndex{\,,\@bsphack,\@esphack,\@noligs,\@vobeyspaces,\@xverbatim} % \DoNotIndex{\`,\catcode,\end,\escapechar,\frenchspacing,\glossary} % \DoNotIndex{\hangindent,\hfil,\hfill,\hskip,\hspace,\ht,\it,\langle} % \DoNotIndex{\leaders,\long,\makelabel,\marginpar,\markboth,\mathcode} % \DoNotIndex{\mathsurround,\mbox,\newcount,\newdimen,\newskip} % \DoNotIndex{\nopagebreak} % \DoNotIndex{\parfillskip,\parindent,\parskip,\penalty,\raise,\rangle} % \DoNotIndex{\section,\setlength,\TeX,\topsep,\underline,\unskip,\verb} % \DoNotIndex{\vskip,\vspace,\widetilde,\\,\%,\@date,\@defpar} % \DoNotIndex{\[,\{,\},\]} % \DoNotIndex{\count@,\ifnum,\loop,\today,\uppercase,\uccode} % \DoNotIndex{\baselineskip,\begin,\tw@} % \DoNotIndex{\a,\b,\c,\d,\e,\f,\g,\h,\i,\j,\k,\l,\m,\n,\o,\p,\q} % \DoNotIndex{\r,\s,\t,\u,\v,\w,\x,\y,\z,\A,\B,\C,\D,\E,\F,\G,\H} % \DoNotIndex{\I,\J,\K,\L,\M,\N,\O,\P,\Q,\R,\S,\T,\U,\V,\W,\X,\Y,\Z} % \DoNotIndex{\1,\2,\3,\4,\5,\6,\7,\8,\9,\0} % \DoNotIndex{\!,\#,\$,\&,\',\(,\),\+,\.,\:,\;,\<,\=,\>,\?,\_} % \DoNotIndex{\discretionary,\immediate,\makeatletter,\makeatother} % \DoNotIndex{\meaning,\newenvironment,\par,\relax,\renewenvironment} % \DoNotIndex{\repeat,\scriptsize,\selectfont,\the,\undefined} % \DoNotIndex{\arabic,\do,\makeindex,\null,\number,\show,\write,\@ehc} % \DoNotIndex{\@author,\@ehc,\@ifstar,\@sanitize,\@title,\everypar} % \DoNotIndex{\if@minipage,\if@restonecol,\ifeof,\ifmmode} % \DoNotIndex{\lccode,\newtoks,\onecolumn,\openin,\p@,\SelfDocumenting} % \DoNotIndex{\settowidth,\@resetonecoltrue,\@resetonecolfalse,\bf} % \DoNotIndex{\clearpage,\closein,\lowercase,\@inlabelfalse} % \DoNotIndex{\selectfont,\mathcode,\newmathalphabet,\rmdefault} % \DoNotIndex{\bfdefault} % \DoNotIndex{\newcommand,\renewcommand,\providecommand} % \DoNotIndex{\ ,\to,\hsize,\multiply,\textit} % % \newcommand{\dtxfilename}{\texttt{reledmac.dtx}} % \GetFileInfo{reledmac.sty} % ^^A To put the changes in the right order : see http://tex.stackexchange.com/a/74113/7712 %\makeatletter % \let\org@changes@\changes@ % \def\my@changes v#1.#2.#3\@nil{% % \org@changes@{v#1.\six@digits{#2}.#3=v#1.#2.#3}% % }% % \newcommand*{\six@digits}[1]{% % \ifnum#1<100000 0\fi % \ifnum#1<10000 0\fi % \ifnum#1<1000 0\fi % \ifnum#1<100 0\fi % \two@digits{#1}% % }% % \renewcommand*{\changes@}[1]{% % \my@changes#1.\@nil % }% %\makeatother % \newcommand{\edmac}{\protect\package{edmac}\xspace} % \newcommand{\tabmac}{\protect\package{tabmac}\xspace} % \newcommand{\edstanza}{\protect\package{edstanza}\xspace} % \newcommand{\ledmac}{\protect\package{ledmac}\xspace} % \newcommand{\Ledmac}{\protect\package{Ledmac}\xspace} % \newcommand{\ledpar}{\protect\package{ledpar}\xspace} % \newcommand{\Ledpar}{\protect\package{Ledpar}\xspace} % \newcommand{\eledmac}{\protect\package{eledmac}\xspace} % \newcommand{\Eledmac}{\protect\package{Eledmac}\xspace} % \newcommand{\eledpar}{\protect\package{eledpar}\xspace} % \newcommand{\Eledpar}{\protect\package{Eledpar}\xspace} % \newcommand{\reledmac}{\protect\package{reledmac}\xspace} % \newcommand{\Reledmac}{\protect\package{Reledmac}\xspace} % \newcommand{\reledpar}{\protect\package{reledpar}\xspace} % \newcommand{\Reledpar}{\protect\package{Reledpar}\xspace} % \let\macpackage\reledmac % \let\parpackage\reledpar % \let\Macpackage\reledmac % \let\Parpackage\reledpar % \newcommand{\texbook}{\textit{TeXbook}\xspace} % \newcommand{\thetexbook}{\textit{The TeXbook}\xspace} % % \newcommand{\egstart}{% % \par % \begingroup % \centering % \begin{minipage}{0.45\textwidth}} % \newcommand{\egmid}{% % \end{minipage}\hfill\begin{minipage}{0.45\textwidth}} % \newcommand{\egend}{% % \end{minipage}\par\endgroup} % \changes{v0.1.0}{2003/03/25}{First public release} % \changes{v0.2.0}{2003/08/16}{Added tabmac code, and extended indexing} % \changes{v0.2.1}{2003/09/13}{Bug fixes and match with mempatch v1.8} % \changes{v0.2.2}{2003/11/09}{Improved paragraph footnotes} % \changes{v0.2.2}{2003/11/09}{New Dekker example} % \changes{v0.3.0}{2004/02/14}{Includes edstanza and more} % \changes{v0.3.1}{2004/02/18}{Not released. Added remarks about the parallel package} % \changes{v0.4.0}{2004/02/29}{Added minipage, etc., support} % \changes{v0.4.1}{2004/03/28}{Not released. Minor editorial improvements and code tweaks} % \changes{v0.5.0}{2004/04/04}{Added sidenotes, familiar footnotes in numbered text} % \changes{v0.5.1}{2004/04/10}{Fixed right line numbers killed in v0.5} % \changes{v0.6.0}{2004/11/16}{Fixed long paragraphs looping} % \changes{v0.6.0}{2004/11/16}{Prepared for eledpar package} % \changes{v0.6.0}{2004/12/10}{Fixed minor typos} % \changes{v0.7.0}{2005/02/18}{Tidying up for eledpar and ledarab packages} % \changes{v0.7.0}{2005/02/18}{Replaced all \protect\cs{interAfootnotelinepenalty}, etc., % by just \protect\cs{interfootnotelinepenalty}} % \changes{v0.7.0}{2005/03/02}{eledmac having been available for 2 years, % deleted the commented out original edmac texts} % \changes{v0.7.0}{2011/06/17}{Ma\"ieul Rouquette new maintainer} % \changes{v0.8.0}{2011/17/06}{Bug on endnotes fixed: in a // text, all endnotes will print and be placed at the ends of columns (!)} % \changes{v0.8.1}{2011/07/14}{Bug on \protect\cs{edtext} ; \protect\cs{critex} ; \protect\cs{lemma} fixed: we can now us non-switching commands} % \changes{v0.9.0}{2011/08/03}{No more ledpatch. All patches are now in the main file.} % \changes{v0.9.1}{2011/08/08}{Fix some bugs linked to integrating ledpatch on the main file.} % \changes{v0.10.0}{2011/08/22}{Corrections to \protect\cs{section} and other titles in numbered sections} % \changes{v0.11.0}{2011/09/16}{Makes it possible to add a symbol on each verse's hanging, as in French typography. Redefines the command \protect\cs{hangingsymbol} to define the character.} % \changes{v0.12.0}{2011/10/01}{Possibility to number the pstart with the commands \protect\cs{numberpstarttrue}.} % \changes{v0.12.0}{2011/10/01}{For compatibility with eledpar, possibility to use \protect\cs{autopar} on the right side.} % \changes{v0.12.1}{2011/10/02}{The numbering of \protect\cs{pstarts} restarts on each \protect\cs{beginnumbering}.} % \changes{v0.12.1}{2011/10/02}{Don't number \protect\cs{pstarts} of stanza.} % \changes{v0.13.0}{2011/11/08}{New stanzaindentsrepetition counter: to repeat stanza indents every \emph{n} verses.} % \changes{v0.13.1}{2011/11/18}{\protect\cs{thepstartL} and \protect\cs{thepstartR} use now \protect\cs{bfseries} and not \protect\cs{bf}, which is deprecated and makes conflicts with memoir class.} % \changes{v0.14.0}{2012/04/04}{Tweaked \protect\cs{edlabel} to get correct line number if the command is first element of a paragraph.} % \changes{v1.0.0}{2012/09/15}{Some compatibility break with eledmac. Change of name: eledmac.} % \changes{v1.1.0}{2012/09/25}{New package option: parapparatus.} % \changes{v1.4.0}{2012/11/16}{Compatibility with LuaTeX of RTL notes.} % \changes{v1.4.2}{2012/12/12}{Debug with some special classes.} % \changes{v1.4.3}{2012/12/18}{Spurious space after familiar footnotes.} % \changes{v1.4.4}{2013/02/18}{Label inside familiar footnotes.} % \changes{v1.4.5}{2013/03/02}{Bug with komasscript + eledpar + chapter.} % \changes{v1.4.6}{2013/04/15}{Bug with memoir class introduced by 1.4.5.} % \changes{v1.4.8}{2013/07/02}{Corrects a bug with parallel texts introduced by 1.1.} % \changes{v1.6.1}{2013/10/27}{Corrects a false hanging verse when a verse is exactly the length of a line.} % \changes{v1.4.0}{2012/11/16}{Compatibility with LuaTeX of RTL notes.} % \changes{v1.8.0}{2013/12/13}{Compatibility with parledgroup option of eledpar package.} % \changes{v1.8.2}{2014/01/31}{Debug compatibility problem with hebrew option of babel package.} % \changes{v1.8.3}{2014/02/03}{Fixes spurious spaces added by v1.7.0.} % \changes{v1.10.0}{2014/02/27}{Add \protect\cs{pstartref} and \protect\cs{xpstartref} to refer to a pstart number (extension of \protect\cs{edlabel}).} % \changes{v1.10.1}{2014/02/28}{Compatibility with \textsf{cleveref}.} % \changes{v1.10.2}{2014/03/17}{Compatibility of stanza with v1.8a of babel-greek.} % \changes{v1.10.3}{2014/04/07}{Debug of cross-referencing.} % \changes{v1.10.4}{2014/04/09}{Debug of critical notes in edtabular environnment.} % \changes{v1.10.5}{2014/04/14}{Debug of \protect\cs{xxref}.} % \changes{v1.10.5}{2014/04/14}{Debug of \protect\cs{pausenumbering}.} % \changes{v1.10.6}{2014/05/01}{Debug of interaction between \protect\cs{autopar} and\protect\cs{pausenumbering}.} % \changes{v1.11.1}{2014/05/29}{Correct a bug when a critical note starts with plus or minus.} % \changes{v1.12.0}{2014/08/05}{Compatibility with \protect\package{musixtex}.} % \changes{v1.12.0}{2014/08/05}{Debug eledmac sectioning command after using \protect\cs{resumenumbering}.} % \changes{v1.12.3}{2014/08/15}{Underline lemma in \protect\cs{eledxxx} when using draft mode.} % \changes{v1.12.3}{2014/08/15}{Correct bug with side and familiar notes in tabular environments.} % \changes{v1.12.3}{2014/08/15}{Debug left and right notes (bugs added by 1.12.0)} % \changes{v1.12.3}{2014/08/15}{Debug \protect\cs{eledxxx} with some paper size} % \changes{v1.12.4}{2014/08/25}{Debug spurious page breaks before \protect\cs{chapter} (bug added in 1.12.0)} % \changes{v1.13.1}{2014/09/25}{Debug quotation environment inside of a \protect\cs{pstart} preceded by a sectioning command.} % \changes{v1.13.1}{2014/09/25}{Coming back of page and line breaking penalties's management, deleted by error in v0.17.} % \changes{v1.13.2}{2014/09/30}{Fix bug with normal footnotes, added by v1.13.0.} % \changes{v1.13.3}{2014/10/04}{Fix extra spaces with paragraphed footnotes, added by v1.13.0.} % \changes{v1.13.4}{2014/10/20}{Fix bug with index when memoir class is used without hyperref} % \changes{v1.15.0}{2015/01/12}{Fix bug with footnotes layout when using some options of the geometry package (bug add by v1.13.0).} % \changes{v1.16.0}{2015/01/23}{Compatibility of standard footnotes with some biblatex styles.} % \changes{v1.16.0}{2015/01/23}{New \protect\cs{stanzaindent} command.} % \changes{v1.18.0}{2015/02/23}{Compatibility with \LuaLaTeX\ RTL languages.} % \changes{v1.19.0}{2015/03/06}{\protect\cs{Xmaxhnotes} and \protect\cs{maxhnotesX} work now for both two-columns and three-columns setting.} % \changes{v1.19.0}{2015/03/06}{Compatibility with \protect\package{eledpar} v.1.13.0.} % \changes{v1.19.1}{2015/03/12}{Call \protect\cs{correct@footinsX@box} and \protect\cs{correct@Xfootins@box} directly in \protect\cs{print@notesX@forpages} and \protect\cs{print@Xnotes@forpages}, that is in \protect\package{eledpar}.} % \changes{v1.20.0}{2015/03/22}{Correct \protect\cs{Xinplaceofnumber} hook.} % \changes{v1.20.0}{2015/03/22}{Add series option.} % \changes{v1.20.0}{2015/03/22}{Fix issues with RTL text in notes when using \LuaLaTeX.} % \changes{v1.20.0}{2015/03/22}{The \protect\cs{newif}s are not followed by boolean values set to false, because it is the \TeX\ default setting.} % \changes{v1.20.0}{2015/03/22}{Explicit error message when calling \protect\cs{Xfootnote} outside of \protect\cs{edtext}.} % \changes{v1.20.0}{2015/03/22}{Fix bug with line number typesetting direction when using \protect\cs{eledsection} and similar commands for RTL texts with \LuaLaTeX.} % \changes{v1.21.0}{2015/04/13}{\protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend} are now compatible with \protect\cs{autopar}} % \changes{v1.21.0}{2015/04/13}{Fix bug with space between columns with notes in two columns (bug added in v1.13.0).} % \changes{v1.21.0}{2015/04/13}{Add nocritical, noend, nofamiliar and noledgroup options.} % \changes{v1.21.0}{2015/04/13}{Fix bug with \protect\cs{maxhnotesX} when using \protect\cs{foottwocolX} or \protect\cs{footthreecolX}.} % \changes{v1.21.0}{2015/04/13}{Add \protect\cs{Xtwolinesbutnotmore} and \protect\cs{Xtwolinesonlyinsamepage}.} % \changes{v1.21.0}{2015/04/13}{Fix bug when a \protect\cs{Xfootnote} follows a \protect\cs{Xendnote} in the second argument of \protect\cs{edtext} (bug added in eledmac 1.0.0 !).} % \changes{v1.21.0}{2015/04/13}{Add noeledsec package option} % \changes{v1.21.0}{2015/04/13}{parapparatus option works now with familiar footnotes.} % \changes{v1.21.0}{2015/04/13}{Add \protect\cs{beforenotesX} and \protect\cs{Xbeforenotes} features for notes set in two and three column.} % \changes{v1.21.0}{2015/04/13}{Debug \protect\cs{beforenotesX} \protect\cs{maxhnotesX} \protect\cs{noteswidthliketwocolumnsX} and \protect\cs{afterruleX} with footnotes set in two and three columns.} % \changes{v1.21.0}{2015/04/13}{\protect\cs{Xafterrule} and \protect\cs{afterruleX} features no longer create problems of overflowing at the bottom of the page.} % \changes{v1.21.0}{2015/04/13}{\protect\cs{preXnotes} and \protect\cs{prenotesX} features no longer create problems of overflowing at the bottom of the page.} % \changes{v1.21.0}{2015/04/13}{Fix spurious space after first page number in \protect\cs{doendnotes}. oldprintnpnumspace option allows to come back to previous setting} % \changes{v1.21.0}{2015/04/13}{\protect\cs{chapter} inside optional argument of \protect\cs{pstart} works when typesetting parallel pages} % \changes{v1.22.0}{2015/04/25}{When using hyperref package, internal links in index or with \protect\cs{edlineref} are now targeted to the top and not longer to the bottom of the lines they refer to.} % \changes{v1.22.0}{2015/04/25}{Provides support for xindy.} % \changes{v1.22.0}{2015/04/25}{Adds hyperlink for references to notes in indices.} % \changes{v1.22.0}{2015/04/25}{Fix conflict between noend package option and edtabularx environments} % \changes{v1.22.1}{2015/04/29}{Fix bug (added on v1.22.0) with \protect\cs{Xinplaceofnumber} hook.} % \changes{v1.23.0}{2015/05/18}{Compatibility between nofamiliar/nocriticals option and minipage/ledgroup.} % \changes{v1.23.0}{2015/05/18}{Fix error of \protect\cs{iftrue} not closed.} % \changes{v1.23.0}{2015/05/18}{Allow use of \protect\cs{sameword} with inputenc managing of UTF-8.} % \changes{v1.23.0}{2015/05/18}{Error message when using \protect\cs{beginnumbering}…\protect\cs{endnumbering} without \protect\cs{pstart}.} % \changes{v1.23.0}{2015/05/18}{New tools to ensure the line-list file uses the right version of commands when upgrading the eledmac version.} % \changes{v1.23.0}{2015/05/18}{Fix bug with \protect\cs{skipnumbering} called immediately after a \protect\cs{pstart}.} % \changes{v1.23.0}{2015/05/18}{Fix spurious space with \protect\cs{skipnumbering} (bug added on v1.21.0).} % \changes{v1.23.1}{2015/05/20}{Fix bug with \protect\cs{lemma} command in the right side.} % \changes{v1.23.2}{2015/05/29}{Compatibility with \LaTeX's release 2015.} % \changes{v1.24.0}{2015/06/02}{We can reinitialize \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend} providing to it an empty argument.} % \changes{v1.24.1}{2015/06/21}{\protect\cs{lemma} is disabled when using `nocritical` option.} % \changes{v1.24.2}{2015/06/26}{Fix incompatibility between `nofamiliar` option and `memoir` package.} % \changes{v1.24.3}{2015/07/07}{Restore marginal numbers and notes with sectioning command (bug introduced in v1.21.0)} % \changes{v1.24.4}{2015/07/19}{Fix spurious space with \protect\cs{edindex} when using xindy+hyperref option.} % \changes{v1.24.5}{2015/07/16}{Fix bug of indent, when a added in 1.1.0, when a \protect\cs{beginnumbering} immediately follow a sectioning command.} % \changes{v2.0.0}{2015/07/19}{Package's name becomes \reledmac.} % \changes{v2.0.0}{2015/07/19}{In order to have a more consistent name's convention, many names has been changed.} % \changes{v2.0.0}{2015/07/19}{Many \LaTeX's output macros are now patched and not override.} % \changes{v2.0.0}{2015/07/19}{Add nonum option for endnotes.} % \changes{v2.0.0}{2015/07/19}{Add \protect\cs{Xendinplaceofnumber} hook.} % \changes{v2.0.0}{2015/07/19}{Add \protect\cs{Xendnonumber} hook.} % \changes{v2.0.0}{2015/07/19}{Fix bug when printing only one series of endnotes, but wanted to keep endnotes for other series.} % \changes{v2.0.1}{2015/07/27}{Fix incompatibility between optional argument of \protect\cs{pstart} and \protect\cs{numberpstarttrue}} % \changes{v2.0.1}{2015/07/27}{Fix bug in eledmac-compat option} % \hyphenation{man-u-script man-u-scripts} % % % % \title{\Macpackage \\ % Typeset scholarly editions with \LaTeX\thanks{This file (\dtxfilename) % has version number \fileversion, last revised \filedate.}} % % \author{% % Ma\"ieul Rouquette\thanks{\texttt{maieul at maieul dot net}} \\ % {\small based on the original \protect\package{ledmac} by} \\ % Peter Wilson \\ % Herries Press \\ % {\small which was based on the original \edmac, \tabmac{} and \edstanza{} by} \\ % John Lavagnino, Dominik Wujastyk, Herbert Breger and Wayne Sullivan. % } % % \date{} % % % \maketitle % % % \begin{abstract} % % The \macpackage provides many tool in order to typesset scholarly edition. % It is base on the \eledmac package, which was was based on \ledmac package, which was based on \edmac \TeX\ package. % % It can be use in combination with \parpackage in order to typeset two texts in parallel, like an original text and its translation in modern language. % % % \Macpackage provides many tools and options. Normally, they are all documented in this file. % Also provided is a help folder, ``\href{examples/.}{examples}''. The folder contains additional examples (although not for all cases). % Example starting by ``1-'' are for basic uses, those starting by ``2-'' are for advanced uses. % % To report bugs or request a new feature, please go to ledmac GitHub page and click on ``New Issue'': \url{https://github.com/maieul/ledmac/issues/}. You must create an account on github.com to access my page (maieul/ledmac). GitHub accounts are free for open-source users. You can post messages in English or in French (preferred). % % You can subscribe to the \macpackage mail list in:\\ \url{http://geekographie.maieul.net/146} % \end{abstract} % % \renewcommand{\numberline}[1]{#1~} % \tableofcontents % % % % % % % % \section{Introduction} % % \subsection{Aim of the package} % % The \Eledmac{} package, together with LaTeX, provides several % important facilities for formatting critical editions of texts in % a traditional manner. Major features include: % \begin{itemize} % \item automatic stepped line numbering, by page, section or paragraph; % \item sub-lineation within the main series of line numbers; % \item variant readings automatically keyed to line numbers; % \item caters for both prose and verse; % \item multiple series of the footnotes and endnotes; % \item block or columnar formatting of the footnotes; % \item simple tabular material may be line numbered; % \item indexing keyed to page and line numbers. % \end{itemize} % % % \Eledmac{} allows the scholar engaged in preparing a critical % edition to focus attention wholly on the task of creating the % critical text and evaluating the variant readings, text-critical % notes and testimonia. \LaTeX{} and \Eledmac{} will take care of % the formatting and visual correlation of all the disparate types % of information. % % % Apart from \macpackage there are some other \LaTeX\ packages for % critical edition typesetting. % However, the am of \macpackage is to provide a ``all in one'' and flexible tool in the field of critical edition. % % Any suggestion for new features are welcome. % % % This manual contains a general description of how to use \macpackage and % the complete source code for the package, % with extensive documentation (in sections~\ref{overview} and following, numbered in Roman numeric) % It finish by a list of action to do when migrating from some version to other, a historical of the change and an index to the % source code. % We do not suggest that you need to % read the source code for this package in order to use it; we % provide this code primarily for reference, and many of our % comments on it repeat material that is also found in % the earlier sections. % % But no documentation, however % thorough, can cover every question that comes up, and many can be % answered quickly by consultation of the code. On a first reading, % we suggest that you should read only the general documentation in % sections~\ref{howto}, unless you are particularly interested in the innards of \macpackage. % % \subsection{History} % % \subsubsection{\edmac} % % The original version of \edmac{} was \texttt{TEXTED.TEX}, written % by John Lavagnino\index{Lavagnino, John} % in late 1987 and early 1988 for formatting % critical editions of English plays. % % John passed these macros on to Dominik Wujastyk\index{Wujastyk, Dominik} % who, in % September--October 1988, added the footnote paragraphing mechanism, % margin swapping and other changes to suit his own purposes, making the % style more like that traditionally used for classical texts in Latin and % Greek (e.g., the Oxford Classical Texts series). He also wrote some % extra documentation and sent the files out to several people. This % version of the macros was the first to be called \edmac. % % The present version was developed in the summer of 1990, with the % intent of adding necessary features, streamlining and documenting % the code, and further generalizing it to make it easily adaptable % to the needs of editors in different disciplines. John did most % of the general reworking and documentation, with the financial % assistance of the Division of the Humanities and Social Sciences, % California Institute of Technology. Dominik adapted the code to % the conventions of Frank Mittelbach's\index{Mittelbach, Frank} % \verb"doc" option, and added some documentation, multiple-column % footnotes, cross-references, and crop marks.\footnote{This version of % the macros was used to format the Sanskrit text in volume I of {\em % Metarules of P\=a\d ninian Grammar\/} by Dominik Wujastyk (Groningen: % Forsten, 1993).} A description by John and Dominik of this version of % \edmac{} was published as `An overview of \edmac: a \PlainTeX\ % format for critical editions', \emph{TUGboat} \textit{11} (1990), % pp.\,623--643. % % From 1991 through 1994, the macros continued % to evolve, and were tested at a % number of sites. We are very grateful to all the members of the % (now defunct) % \verb"edmac@mailbase.ac.uk" discussion group who helped us with % smoothing out bugs and infelicities in the macros. % Ron Whitney\index{Whitney, Ron} and our anonymous reviewer at % the TUG were both of great help in ironing out last-minute % wrinkles, while Ron made some important suggestions which may help % to make future versions of \edmac{} even more efficient. % Wayne % Sullivan,\index{Sullivan, Wayne} in particular, provided several % important fixes and contributions, including adapting the % Mittelbach\slash % Sch\"opf\index{Sch\"opf, Rainer}\index{Mittelbach, Frank} `New % Font Selection Scheme' for use with \PlainTeX\ and \edmac. % Another project Wayne has worked % on is a \verb"DVI" post-processor which works with an \edmac{} % that has been slightly modified to output \protect\cs{special}s. This % combination enables you to recover to some extent the text of % each line, as {\sc ascii} code, facilitating the creation of % concordances, an {\em index verborum}, etc. % % At the time of writing (1994), we are pleased to be able to say that \edmac{} is % being used for real-life book production of several interesting % editions, such as the Latin texts of Euclid's {\sl % Elements},\footnote{Gerhard Brey\index{Brey, Gerhard} used \edmac{} in % the production of Hubert L. L. Busard\index{Busard, Hubert L. L.} and % Menso Folkerts,\index{Folkerts, Menso} {\em Robert of Chester's % (?)\index{Chester, Robert of} Redaction of Euclid's\index{Euclid} {\em % Elements}, the so-called Adelard II\index{Adelard II} Version}, 2 vols., % (Basel, Boston, Berlin: Birkh\"auser, 1992).} an edition of the letters % of Nicolaus Copernicus,\footnote{Being prepared at the German Copernicus % Research Institute, Munich.}\index{Copernicus, Nicolaus} Simon % Bredon's\index{Bredon, Simon} {\em Arithmetica},\footnote{Being prepared % by Menso Folkerts {\em et al.}, at the Institut f\"ur Geschichte der % Naturwissenschaften in Munich.} a Latin translation by Plato of % Tivoli\index{Plato of Tivoli} of an Arabic astrolabe % text,\footnote{Richard Lorch,\index{Lorch, Richard} Gerhard % Brey\index{Brey, Gerhard} {\em et al.}, at the same Institute.} a Latin % translation of part II of the Arabic {\em Algebra\/} by Ab\=u K\=amil % Shuj\=a' b. Aslam,\index{Abu Kamil Shuja' b. Aslam}\footnote{Richard % Lorch, `Ab\=u K\=amil on the Pentagon and Decagon' in {\em Vestigia % Mathematica}, ed.\ M. Folkerts and J. P. Hogendijk (Amsterdam, Atlanta: % Rodopi, 1993).} the Latin {\em Rithmachia\/} of Werinher von % Tegernsee,\footnote{Menso Folkerts, `Die {\em Rithmachia\/} des Werinher % von Tegernsee', ibid.} a middle-Dutch romance epic on the % Crusades,\footnote{Geert H. M. Claassens,\index{Claassens, Geert H. M.} % {\em De Middelnederlandse Kruisvaartromans}, (Amsterdam: Schiphower en % Brinkman, 1993).} a seventeenth-century Hungarian politico-philosophical % tract,\footnote{Emil Hargittay, {\em Cs\'aky Istv\'an: Politica % philosophiai Okoskod\'as-szerint val\'o rendes \'eletnek p\'eld\'aja % (1664--1674)\/} (Budapest: Argumentum Kiad\'o, 1992).} an anonymous % Latin compilation from Hungary entitled {\em Sermones Compilati in % Studio Gererali Quinqeecclesiensi in Regno Ungarie},\footnote{Being % produced, as was the previous book, by Gyula Mayer\index{Mayer, Gyula} % in Budapest.} the collected letters and papers of % Leibniz,\index{Leibniz}\footnote{Leibniz, {\em S\"amtliche Schriften und % Briefe}, series {\sc I, III, VII,} being edited by Dr.\ H. % Breger\index{Breger, Herbert}, Dr. N. G\"adeke\index{G\"adeke, Nora} and % others, % at the Leibniz-Archiv, Nieders\"achsische Landesbibliothek, Hannover. % (see \url{http://www.nlb-hannover.de/Leibniz})} % Theodosius's\index{Theodosius} {\em Spherics}, the German {\em % Algorismus} of Sacrobosco,\index{Sacrobosco} the Sanskrit text of the % {\em K\={a}\'{s}ik\={a}\-v\d{r}tti\/} of V\={a}mana\index{Vamana} and % Jay\={a}ditya\index{Jayaditya},\footnote{Being prepared at Poona and % Lausanne Universities.} and the English texts of Thomas % Middleton's\index{Middleton, Thomas} collected works. % % \subsubsection{\ledmac} % % % % Version 1.0 of \tabmac{} was released by % Herbert Breger\index{Breger, Herbert} in October % 1996. This added the capability for typesetting tabular material. % % Version 0.01 of \edstanza{} was released by % Wayne Sullivan~\index{Sullivan, Wayne} % in June 1992, to help a colleague with typesetting Irish verse. % % In March 2003 Peter Wilson started an attempt to port \edmac{} % from TeX to LaTeX. The starting point was \edmac{} version 3.16 % as documented on 19 July 1994 (available from CTAN). In August 2003 % the \tabmac{} functions were added; the starting point for these % being version 1.0 of Ocober 1996. The \edstanza{} (v0.01) functions were % added in February 2004. Sidenotes and regular footnotes in numbered % text were added in April 2004. % % This port was called \ledmac (\LaTeX\ \edmac). % % Since July~2011, ledmac is maintained by Ma\"ieul Rouquette. Is it more and more powerful and flexible, but also more and more divergent from original TeX macro. % % \subsubsection{\eledmac} % Important changes were put in version 1.0, to make \ledmac more easily extensible (see \reff{displayoptions}). % These changes can trigger small problems with the old customization. % % That is why a new name was selected: \eledmac (extended \ledmac). % % To migrate from \ledmac to \eledmac, please read Appendix \ref{migration} (p.~\pageref{migration}). % % \subsubsection{\reledmac} % % \eledmac has facilitated the creation of customized critical edition. % However, this was made in a non systematic way in method to customize them. % % In other side, many deprecated commands were keept, and many technical debt was accumulated, blocking the futur evolution. % % For all these reasons, Maïeul Rouquette decided to make a spring cleaning. % As some commands name were changed, the ascendant compatibility was (a little) broken. % % A new name was selected: \reledmac (extended renewed \eledmac). % To migrate from \eledmac to \reledmac, please read Appendix \ref{migration:reledmac} (p.~\pageref{migration:reledmac}). % \subsection{List of works edited with (r)(e)ledmac} % A collaborative list of works edited with (r)(e)ledmac is available on \url{https://www.zotero.org/groups/critical_editions_typeset_with_edmac_ledmac_and_eledmac/items}. Please add your own edition made with (r)(e)ledmac. % % \section{How the package works}\label{howto} % % % The \macpackage package is a three-pass package like % \LaTeX\ itself. % Although your textual apparatus and line % numbers will be printed even on the first run, it takes two more % passes through \LaTeX\ to be sure that everything gets to its right % place. Any changes you make to the input file may similarly % require three passes to get everything to the right place, if the % changes alter the number of lines or notes. \Macpackage will tell % you that you need to make more runs, when it notices, but it does % not expend the labor to check this thoroughly. If you have % problems with a line or two misnumbered at the top of a page, try % running \LaTeX\ once or twice more. % % A file may mix \emph{numbered} and \emph{unnumbered} text. % % Numbered text is printed with marginal line numbers and can include % footnotes and endnotes that are referenced to those line numbers: % this is how you will want to print the text that you are editing. % % Unnumbered text is not printed with line numbers, and you can't % use \macpackage's note commands with it: this is appropriate for % introductions and other material added by the editor around the % edited text. % % % \section{Options} % The package can be loaded with a number of global options which are listed here. % There are two types of options: options which provide specific features and option which optimize package's performance. % It is advised to read the relevant parts of the handbook before reading the first type of option, but you can look at the second type in you first reading of handbook. % \subsection{Specific features} % \begin{description} % \item[draft] underlines lemmas in the main text. % \item[eledmac-compat] help to migrate from \eledmac to \reledmac (see \reff{eledmac-compat}). % \item[nopbinverse] prevents page break inside verses. % \item[noquotation] by default, the quotation environment is redefined inside numbered text. You can disable this redefinition with \verb|noquotation| (see \reff{noquotation}). % \item[parapparatus] by default, the apparatus cannot contain paragraph breaks; this option enables paragraphing inside the apparatus. % \item[xindy] and \verb|xindy+hyperref| are for selecting \verb+xindy+ as the index processor (\reff{xindy}). % \item[widthliketwocolumns] set the width of the text disposed on one column to be the same as the width of the text disposed on two parallel columns with \parpackage. This is useful when alternating between normal and parallel typesetting. % \end{description} % \subsection{Optimize package's performance}\label{option:performance} % \begin{description} % \item[nocritical] disables tools for critical footnotes (\protect\cs{Afootnote}, \protect\cs{Bfootnote} etc.). If you do not need critical footnotes, this option lets \eledmac\ run faster. % It will also preserve room for other packages. % \item[noeledsec] disables tools for \protect\cs{eledsection} and related commands (\reff{eledsection}). % \item[noend] disables tools for endnotes (\protect\cs{Aendnote}, \protect\cs{Bendnote} etc.). If you do not need endnotes, this option lets \eledmac\ run faster. % It will also preserve room for other packages. % \item[nofamiliar] disables tools for familiar footnotes (\protect\cs{footnoteA}, \protect\cs{footnoteB} etc.). If you do not need familiar footnotes, this option lets \eledmac\ run faster. % It will also preserve room for other packages. % \item[noledgroup] \macpackage allows to use of series of critical notes and new series of normal notes inside minipage and ledgroup environments (see~\reff{ledgroup}). However, such features use up computer memory, at the expense of other processing needs. So if you do not need this feature, use \verb+noledgroup+ option. This should make \macpackage faster. % \item[series] \Macpackage defines five levels of notes: A, B, C, D, E. % Using all these levels consumes memory space and processing speed. % This is why, if your work does not require all of the A-E series, you can narrow down the available number of series. % For example, if you only need A and B series, call the package with \verb+series={A,B}+ option. % \end{description} % \section{Text lines and paragraphs numbering} % \subsection{Text lines numbering} % \DescribeMacro{\beginnumbering} % \DescribeMacro{\endnumbering} % Each section of numbered text must be preceded by % \protect\cs{beginnumbering} and followed by \protect\cs{endnumbering}, like this: \\ % \egstart % \begin{verbatim} % \beginnumbering % text % \endnumbering % \end{verbatim} % \egend % % The \protect\cs{beginnumbering} macro resets the line number to zero, % reads an auxiliary file called \meta{jobname}.\file{nn} (where % \meta{jobname} is the name of the main input file for this job, % and \file{nn} is 1 for the first numbered section, 2 for % the second section, and so on), and then creates a new version of % this auxiliary file to collect information during this run. The % first instance of \protect\cs{beginnumbering} also opens a file called % \meta{jobname}\file{.end} to receive the text of the endnotes. % \protect\cs{endnumbering} closes the \meta{jobname}.\file{nn} file. % % If the line numbering of a text is to be continuous from start to end, % then the whole text will be typed between one pair of % \protect\cs{beginnumbering} and \protect\cs{endnumbering} commands. But your text % will most often contain chapter or other divisions marking sections % that should be independently numbered, and these will be appropriate % places to begin new numbered sections. % % \Macpackage has to read and store % in memory % a certain amount of information about the entire section when it % encounters a \protect\cs{beginnumbering} command, so it speeds up the % processing and reduces memory use when a text is divided into a larger % number of sections (at the expense of multiplying the number of % external files that are generated). % % \subsection{Paragraphs} % \subsubsection{Basis} % \DescribeMacro{\pstart} % \DescribeMacro{\pend} % Within a numbered section, each paragraph of numbered text must % be marked using the \protect\cs{pstart} and \protect\cs{pend} commands like this: \\ % \egstart % \begin{verbatim} % \pstart % Paragraph of text. % \pend % \end{verbatim} % \egend % % Text that appears within a numbered section but is not marked with % \protect\cs{pstart} and \protect\cs{pend} will not be numbered. % % The following example shows the proper section and paragraph % markup, and the kind of output that would typically be generated: % \egstart % \begin{verbatim} % \beginnumbering % \pstart % This is a sample paragraph, with % lines numbered automatically. % \pend % % \pstart % This paragraph too has its % lines automatically numbered. % \pend % % The lines of this paragraph are % not numbered. % % \pstart % And here the numbering begins % again. % \pend % \endnumbering % \end{verbatim} % \egend % % \subsubsection{Producting automatically \protect\cs{pstart}\ldots{}\protect\cs{pend}} % \DescribeMacro{\autopar}\label{autopar} % You can use \protect\cs{autopar} to avoid the nuisance of this paragraph markup % and still have every paragraph automatically numbered. The scope of the % \protect\cs{autopar} command needs to be limited by keeping it within a group, as % follows: % \egstart % \begin{verbatim} % \begingroup % \beginnumbering % \autopar % % A paragraph of numbered text. % % Another paragraph of numbered % text. % % \endnumbering % \endgroup % \end{verbatim} % \egend % % \protect\cs{autopar} fails, however, on paragraphs that start with a % \verb"{" or with any other command that starts a new group before it % generates any text. Such paragraphs need to be started explicitly, % before the new group is opened, % using \protect\cs{indent}, \protect\cs{noindent}, or \protect\cs{leavevmode}, or using % \protect\cs{pstart} itself.\footnote{For a detailed study of the % reasons for this restriction, see Barbara Beeton, `Initiation % rites', \textit{TUGboat} \textbf{12} (1991), % pp.\,257--258.\protect\index{Beeton, Barbara Ann Neuhaus Friend}} % % \subsubsection{Content before specific \protect\cs{pstart} and after specific \protect\cs{pend}}\label{pstart:optionalarg} % \changes{v1.12.0}{2014/08/05}{Optional arguments for \protect\cs{pstart} and \protect\cs{pend}.} % \DescribeMacro{\AtEveryPstart} % \DescribeMacro{\AtEveryPend} % Both \protect\cs{pstart} and \protect\cs{pend} can take a optional argument, in brackets. % Its content will be printed before the beginning of \protect\cs{pstart} / after the end of \protect\cs{pend} instead of the argument of \protect\cs{AtEveryPstart} / \protect\cs{AtEveryPend}. % If you need to start a \protect\cs{pstart} by brackets, or to add brackets after a \protect\cs{pend}, just add a \protect\cs{relax} between \protect\cs{pstart}/\protect\cs{pend} and the brackets. % %. This feature is also useful when typesetting verses (see~\reff{verse}) or \protect\package{eledpar} (see~\reff{eledpar}). % % A \protect\cs{noindent} is automatically added before this argument. % \subsubsection{Content before every \protect\cs{pstart} and after every \protect\cs{pend}} % \changes{v1.15.0}{2015/01/12}{New commands \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend}.} % \label{AtEveryPstart} \DescribeMacro{\AtEveryPstart}\DescribeMacro{\AtEveryPend} % You can use both \protect\cs{AtEveryPstart} and \protect\cs{AtEveryPend}. % Their arguments will be printed before every \protect\cs{pstart} begins / after every \protect\cs{pend} ends. % \subsubsection{Numbering paragraphs (\protect\cs{pstart})} % \changes{v0.12.0}{2011/10/01}{Possibility to number \protect\cs{pstart}.} % It is possible to insert a number at every \protect\cs{pstart} command. You must use the \DescribeMacro{\numberpstarttrue}\protect\cs{numberpstarttrue} command to have it. You can stop the numbering with \DescribeMacro{\numberpstartfalse}\protect\cs{numberpstartfalse}. % You can redefine the command \DescribeMacro{\thepstart}\protect\cs{thepstart} to change style. % You can change the value of the pstart number by using \emph{after} \protect\cs{beginnumbering}: % \begin{verbatim} % \setcounter{numberpstart}{value} % \end{verbatim} % On each \protect\cs{beginnumbering} the numbering restarts. % \changes{v0.15.0}{2012/06/11}{Possibility to print \protect\cs{pstart} number inside.} % % \DescribeMacro{\sidepstartnumtrue} % With the \protect\cs{sidepstartnumtrue} command, the number of \protect\cs{pstart} will be printed inside. In this case, the line number will be not printed. % % \changes{v1.1.0}{2012/09/25}{Add \protect\cs{labelpstarttrue}.} % \DescribeMacro{\labelpstarttrue} % With the \protect\cs{labelpstarttrue} command, a \protect\cs{label} added just after a \protect\cs{pstart} will refer to the number of this pstart. % \subsubsection{Languages written in Right to Left} % If you use languages written in right to left, we \LuaLaTeX\ or \XeLaTeX, so % you must switch text direction \protect\cs{before} the \protect\cs{pstart} command. % \subsubsection{Memory limits} % \textbf{This paragraph is kept for history, but problem described below should not appear with recent version of \LaTeX.} % \label{pause} % \DescribeMacro{\pausenumbering} % \DescribeMacro{\resumenumbering} % \Macpackage stores a lot of information about line numbers and % footnotes in memory as it goes through a numbered section. But % at the end of such a section, it empties its memory out, so to % speak. If your text has a very long numbered section it is % possible that your \LaTeX\ may reach its memory limit. There are % two solutions to this. % The first is to get a larger \LaTeX\ with % increased memory. % % The second solution is to % split your long section into several smaller ones. The trouble % with this is that your line numbering will start again at zero % with each new section. To avoid this problem, we provide % \protect\cs{pausenumbering} and \protect\cs{resumenumbering} which are just % like \protect\cs{endnumbering} \ldots\ \protect\cs{beginnumbering}, except that % they arrange for your line numbering to continue across the break. % Use \protect\cs{pausenumbering} only between numbered paragraphs: % \egstart % \begin{verbatim} % \beginnumbering % \pstart % Paragraph of text. % \pend % \pausenumbering % % \resumenumbering % \pstart % Another paragraph. % \pend % \endnumbering % \end{verbatim} % \egend % % We have % defined these commands as two macros, in case you find it necessary % to insert text between numbered sections without disturbing the % line numbering. But if you are really just using these macros to % save memory, you might as well say % \egstart % \begin{verbatim} % \newcommand{\memorybreak}{\pausenumbering\resumenumbering} % \end{verbatim} % and say \protect\cs{memorybreak} between the relevant \protect\cs{pend} and % \protect\cs{pstart}. % \egend % % \subsection{Lineation commands} % \subsubsection{Disabling lineation} % \DescribeMacro{\numberlinefalse} \DescribeMacro{\numberlinetrue} % Line numbering can be disabled with \protect\cs{numberlinefalse}. It can be enabled again with \protect\cs{numberlinetrue}. % \subsubsection{Setting lineation start and step} % \DescribeMacro{\firstlinenum} % \DescribeMacro{\linenumincrement} % By default, \macpackage numbers every 5th line. There are two counters, % \verb?firstlinenum? and \verb?linenumincrement?, that control this % behaviour; they can be changed using \protect\cs{firstlinenum}\marg{num} and % \protect\cs{linenumincrement}\marg{num}. \protect\cs{firstlinenum} specifies the first % line that will have a printed number, and \protect\cs{linenumincrement} is % the difference between succesive % numbered lines. For example, to start printing numbers at the first line % and to have every other line numbered: \\ % \verb?\firstlinenum{1} \linenumincrement{2}? % % \DescribeMacro{\firstsublinenum} % \DescribeMacro{\sublinenumincrement} % There are similar commands, \protect\cs{firstsublinenum}\marg{num} and % \protect\cs{sublinenumincrement}\marg{num} for controlling sub-line numbering. % % \DescribeMacro{\linenumberlist} % You can define \protect\cs{linenumberlist} to specify a non-uniform distribution % of printed line numbers. For example: \\ % \verb?\def\linenumberlist{1,2,3,5,7,11,13,17,19,23,29}? \\ % to have numbers printed on prime-numbered lines only. There must be % no spaces within the definition which consists of comma-separated decimal % numbers. The numbers can be in any order but it is easier to read if you % put them in numerical order. Either omitting the definition of % \protect\cs{linenumberlist} or following the vacuous definition \\ % \verb?\def\linenumberlist{}? \\ % the standard numbering sequence is applied. The standard sequence % is that specified by the combination of the \verb+firstlinenum+, % \verb+linenumincrement+, \verb+firstsublinenum+ and % \verb+linenumincrement+ counter values. % % \subsubsection{Setting lineation reset} % \DescribeMacro{\lineation} % \changes{v1.0.0}{2012/09/15}{Debug in lineation command} % Lines can be numbered either by page, by pstart or by section; you specify % this using the \protect\cs{lineation}\marg{arg} % macro, where \meta{arg} is either % \texttt{page}, \texttt{pstart} or \texttt{section}. % You may only use this command at places % where numbering is not in effect; you can't change the lineation system % within a section. You can change it between sections: they don't all % have to use the same lineation system. % The package's standard setting is \verb"\lineation{section}". If the lineation is by pstart, the pstart number will be printed before the line number in the notes. % % \subsubsection{Setting line number margin} % \DescribeMacro{\linenummargin} % The command \protect\cs{linenummargin}\meta{location} specifies the margin % where the line (or pstart) numbers will be printed. The permissable value % for \meta{location} is one out of the list \texttt{left}, \texttt{right}, % \texttt{inner}, or \texttt{outer}, % for example \verb"\linenummargin{inner}". % The package's default setting is \\ % \verb"\linenummargin{left}" \\ % to typeset the numbers in the left hand margin. % You can change this whenever you're not in the middle of % making a paragraph. % % More precisely, the value of % \protect\cs{linenummargin} used is that in effect at the \protect\cs{pend} % of a numbered paragraph. Apart from an initial setting for % \protect\cs{linenummargin}, only change it after a \protect\cs{pend}, whereupon % it will apply to all following numbered paragraphs, until % changed again (changing it between a \protect\cs{pstart} and \protect\cs{pend} % pair will apply the change to all the current paragraph). % % % \subsubsection{Other settings} % % \DescribeMacro{\leftlinenum} % \DescribeMacro{\rightlinenum} % \DescribeMacro{\linenumsep} % When a marginal line number is to be printed, there are a % lot of ways to display it. % You can redefine \protect\cs{leftlinenum} and \protect\cs{rightlinenum} to % change the way marginal line numbers are printed in the % left and right margins respectively; the initial % versions print the number in font \protect\cs{numlabfont} (described % below) at a distance \protect\cs{linenumsep} (initially set to one pica) % from the text. % % \subsection{Changing the line numbers} % % Normally the line numbering starts at 1 for the first line of % a section and steps up by one for each line thereafter. There % are various common modifications of this system, however; the % commands described here allow you to put such modifications % into effect. % % \subsubsection{Sublineation} % \DescribeMacro{\startsub} % \DescribeMacro{\endsub} % You insert the \protect\cs{startsub} and \protect\cs{endsub} commands in your text % to turn sub-lineation on and off. In plays, for % example, stage directions are often numbered with sub-line % numbers: as line $10.1$, $10.2$, % $10.3$, rather than as $11$, $12$, and $13$. % Titles and headings are sometimes numbered with sub-line numbers % as well. % % When sub-lineation is in effect, the line number counter is % frozen and the sub-line counter advances instead. If one of these % commands appears in the middle of a line, it doesn't take effect % until the next line; in other words, a line is counted as a line % or sub-line depending on what it started out as, even if that % changes in the middle. % % \subsubsection{Locking lineation} % \DescribeMacro{\startlock} % \DescribeMacro{\endlock} % The \protect\cs{startlock} command, used in running text, locks the % line number at its current value, until you say \protect\cs{endlock}. % It can tell for itself whether you are in a patch of line or % sub-line numbering. One use for line-number locking is in printing % poetry: there the line numbers should be those of verse lines % rather than of printed lines, even when a verse line requires several % printed lines. % % \DescribeMacro{\lockdisp} % When line-number locking is used, % several printed lines may have the same line number, and you have to % specify whether you want the number attached to the first printed % line or the last, or whether you just want the number printed by % them all. (This assumes that, on the basis of the settings of % the previous parameters, it is necessary to display a line number for % this line.) You specify your preference using \protect\cs{lockdisp}\marg{arg}; its % argument is a word, either \verb+first+, \verb+last+, or \verb+all+. % The package initially sets this as \protect\cs{lockdisp}\verb+{first}+. % % \subsubsection{Setting and changing line number} % \DescribeMacro{\setline} % \DescribeMacro{\advanceline} % In some cases you may want to modify the line numbers that are % automatically calculated: if you are printing only fragments % of a work but want to print line numbers appropriate to a complete % version, for example. The \protect\cs{setline}\marg{num} and % \protect\cs{advanceline}\marg{num} commands % may be used to change the current line's number (or the sub-line % number, if sub-lineation is currently on). They change both the % marginal line numbers and the line numbers passed to the notes. % \protect\cs{setline} takes one argument, the value to which you want % the line number set; it must be $0$ or greater. \protect\cs{advanceline} % takes one argument, an amount that should be added to the current % line number; it may be positive or negative. % % \DescribeMacro{\setlinenum} % The \protect\cs{setline} and \protect\cs{advanceline} macros should only be used % within a \protect\cs{pstart}\ldots\protect\cs{pend} group. The \protect\cs{setlinenum}\marg{num} % command can be used outside such a group, for example between % a \protect\cs{pend} and a \protect\cs{pstart}. It sets the line number % to \meta{num}. % It has no effect if used within a \protect\cs{pstart}\ldots\protect\cs{pend} group. % % \subsubsection{Line number style} % \DescribeMacro{\linenumberstyle} % \DescribeMacro{\sublinenumberstyle} % Line numbers are normally printed as arabic numbers. You can % use \protect\cs{linenumberstyle}\marg{style} to change the numbering style. % \meta{style} must be one of: % \begin{itemize} % \item[\texttt{Alph}] Uppercase letters (A\ldots\ Z). % \item[\texttt{alph}] Lowercase letters (a\ldots\ z). % \item[\texttt{arabic}] Arabic numerals (1, 2, \ldots) % \item[\texttt{Roman}] Uppercase Roman numerals (I, II, \ldots) % \item[\texttt{roman}] Lowercase Roman numerals (i, ii, \ldots) % \end{itemize} % Note that with the \texttt{Alph} or \texttt{alph} styles, `numbers' % must be between 1 and 26 inclusive. % % Similarly \protect\cs{sublinenumberstyle}\marg{style} can be used to change % the numbering style of sub-line numbers, which is normally arabic numerals. % % \subsubsection{Skipping and hidding number} % \DescribeMacro{\skipnumbering} % When inserted into a numbered line the macro \protect\cs{skipnumbering} causes % the numbering of that particular line to be skipped; that is, the line % number is unchanged and no line number will be printed. % Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse. % % \DescribeMacro{\hidenumbering} % \changes{v1.21.0}{2015/04/13}{Add \protect\cs{hidenumbering}} % When inserted into a numbered line the macro \protect\cs{hidenumbering} causes % the number for that particular line to be hidden; namely, no line number will print. % Note that if you use it in \protect\cs{stanza}, you must call it at the beginning of the verse. % \subsubsection{Execute code at each line} % \Macpackage provides to advanced feature for user. % \DescribeMacro{dolinehook}\DescribeMacro{doinsidelinehook} % The argument passed to \protect\cs{dolinehook}\marg{arg} will be executed % before slicing a new line in the paragraph. % The argument passed to \protect\cs{doinsidelinehook}\marg{arg} will be executed before printing a new line. % In many case, the second of two is more useful than the first. % The file \href{examples/2-line_numbers_in_header.tex}{examples/2-line\_numbers\_in\_header.tex} provides an example of use in order to print the first and last line number of a page in the header. % \section{Apparatus commands} % \subsection{Terminology} % We call ``critical notes'' notes which refer to both a lemma, that is a part of text and a line number. % Critical notes are subdivided in critical footnotes and critical endnotes. % % We call ``familiar notes'' notes which refer to a footnote mark in the main text. % % \Macpackage manages many series of notes of each category. % A series of notes is identified by an uppercase letter. % When the series letter is at the beginning of a command name, it refers to a critical footnote. % When the series letter is at the end of a command name, it refers to a critical endnote. % % So : % \begin{itemize} % \item \protect\cs{Afootnote} is a critical footnote of the series A. % \item \protect\cs{Bendnote} is a critical footnote of the series B. % \item \protect\cs{footnoteC} is a critical footnote of the series C. % \end{itemize} % \subsection{Critical notes} % \subsubsection{The lemma} % \DescribeMacro{\edtext} % Within numbered paragraphs, all footnotes and endnotes are generated % by the \protect\cs{edtext} macro: % \begin{verse} % \protect\cs{edtext}\marg{lemma}\marg{commands} % \end{verse} % % % The \meta{lemma} argument is the lemma in the main text: \protect\cs{edtext} % both prints this as part of the text, and makes it available to the % \meta{commands} you specify to generate notes. % % For example: % \egstart % \begin{verbatim} % I am happy : % I saw my friend \edtext{Smith}{ % \Afootnote{Jones C, D.}} % on Tuesday. % \end{verbatim} % \egmid % \beginnumbering % \firstlinenum{1} % \linenumincrement{1} % \pstart % I am happy : I saw my friend \edtext{Smith}{ % \Afootnote{Jones C, D.}} % on Tuesday. % \pend % \endnumbering % \egend % % The lemma \verb?Smith? is printed as part of this sentence in % the text, and is also made available to the footnote % that specifies a variant, \verb?Jones C, D?. The footnote macro % is supplied with the line number at which the lemma appears % in the main text. % % The \meta{lemma} may contain further \protect\cs{edtext} commands. % Nesting makes % it possible to print an explanatory note on a long passage together with % notes on variants for individual words within the passage. For % example: % \egstart % \begin{verbatim} % I am happy : \edtext{I saw my friend % \edtext{Smith}{\Afootnote{Jones % C, D.}} on Tuesday.}{ % \Bfootnote{The date was % July 16, 1954.} % } % \end{verbatim} % \egmid % \beginnumbering % \firstlinenum{1} % \linenumincrement{1} % \pstart % I am happy : \edtext{I saw my friend % \edtext{Smith}{\Afootnote{Jones % C, D.}} on Tuesday.}{ % \Bfootnote{The date was % July 16, 1954.} % } % \pend % \endnumbering % \egend % % However, \protect\cs{edtext} cannot handle overlapping but unnested % notes---for example, one note covering lines 10--15, and another % covering 12--18; a \protect\cs{edtext} that starts in the \meta{lemma} % argument of another \protect\cs{edtext} must end there, too. (The % \protect\cs{lemma} and \protect\cs{linenum} commands may be used to % generate overlapping notes if necessary.) % % \subsubsection{Footnotes} % % The second argument of the \protect\cs{edtext} macro, \meta{commands}, % may contain a series of subsidiary commands that generate % various kinds of notes. % % \DescribeMacro{\Afootnote} % \DescribeMacro{\Bfootnote} % \DescribeMacro{\Cfootnote} % \DescribeMacro{\Dfootnote} % \DescribeMacro{\Efootnote} % Five separate series of the footnotes are maintained; each macro % takes one argument like \protect\cs{Afootnote}\marg{text}. % When all of the six % are used, the \texttt{A} notes appear in a layer just below the main % text, followed by the rest in turn, down to the \texttt{E} notes at % the bottom. % These are the main macros that you will use to construct % the critical apparatus of your text. % % If you need more series of critical notes, please look at \reff{newseries}. % %\changes{v1.0.0}{2012/09/15}{Options nonum and nosep in \protect\cs{Xfootnote}.} %\changes{v1.20.0}{2015/03/22}{Options fulllines in \protect\cs{Xfootnote}.}\label{Xfootnoteopt} %An optional argument can be added before the text of the footnote. Its value is a comma separated list of options. % \label{fulllines}The available options are: % \begin{itemize} % \item \verb|fulllines| to disable \protect\cs{Xtwolines} and \protect\cs{Xmorethantwolines} features for this note (cf. \reff{Xtwolines}). % \item \verb|nonum| to disable line numbering for this note. % \item \verb|nosep| to disable the lemma separator for this note. % \end{itemize} % % Example: \protect\cs{Afootnote}\verb|[nonum]|\marg{text}. % % \subsubsection{Endnotes} % \DescribeMacro{\Aendnote} % \DescribeMacro{\Bendnote} % \DescribeMacro{\Cendnote} % \DescribeMacro{\Dendnote} % \DescribeMacro{\Eendnote} % The package also maintains five separate series of endnotes. % % If you do not need the endnotes facility, you should use \verb+noend+ option when loading \protect\package{eledmac}. % % The mechanism is similar to the one for footnotes: each macro takes one or more optional arguments and one single argument, like:\\ % \protect\cs{Aendnote}\oarg{option}\marg{text}. % % \verb+[