aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2023-06-24 19:15:28 +0200
committerRobert Alessi <alessi@robertalessi.net>2023-06-24 19:15:28 +0200
commit0d79b9e8e68240db85a066621ddf406f1bfdfe6b (patch)
tree71fe411d390a2a0882d3ddf8cec20db2182da22c
parent90cf4bb17e7fa6363050630b74668722dd857fbe (diff)
downloadekdosis-0d79b9e8e68240db85a066621ddf406f1bfdfe6b.tar.gz
added \ekd@parafootnotemark and \ekd@parafootnotetext. updated documentation
-rw-r--r--ekdosis.dtx399
1 files changed, 357 insertions, 42 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 8230ead..7364f5f 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -59,7 +59,7 @@ Alessi <alessi@robertalessi.net>
59%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 59%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
60%<package>\ProvidesPackage{ekdosis} 60%<package>\ProvidesPackage{ekdosis}
61%<*package> 61%<*package>
62 [2023/06/22 v1.5-dev Typesetting TEI xml-compliant critical editions] 62 [2023/06/24 v1.5-dev Typesetting TEI xml-compliant critical editions]
63%</package> 63%</package>
64%<*driver> 64%<*driver>
65\begin{filecontents}[noheader,overwrite]{bibdata.xml} 65\begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -199,6 +199,21 @@ Alessi <alessi@robertalessi.net>
199 </imprint> 199 </imprint>
200 </monogr> 200 </monogr>
201 </biblStruct> 201 </biblStruct>
202 <biblStruct type="book" xml:id="KnuthTeXBook">
203 <monogr>
204 <title level="m">The TeXBook</title>
205 <author>
206 <forename>Donald E.</forename>
207 <surname>Knuth</surname>
208 </author>
209 <edition>32</edition>
210 <imprint>
211 <pubPlace>Reading, Mass.</pubPlace>
212 <publisher>Addison–Wesley</publisher>
213 <date>2013</date>
214 </imprint>
215 </monogr>
216 </biblStruct>
202</listBibl> 217</listBibl>
203\end{filecontents} 218\end{filecontents}
204\begin{filecontents}[overwrite]{\jobname.bib} 219\begin{filecontents}[overwrite]{\jobname.bib}
@@ -276,6 +291,16 @@ Alessi <alessi@robertalessi.net>
276 location = {Cambridge, MA. -- London} 291 location = {Cambridge, MA. -- London}
277} 292}
278 293
294@Book{KnuthTeXBook,
295 title = {The {\TeX}Book},
296 author = {Knuth, Donald E.},
297 langid = {english},
298 date = 2013,
299 edition = 32,
300 publisher = {Addison--Wesley},
301 location = {Reading, Mass.}
302}
303
279@Book{McDonald1916, 304@Book{McDonald1916,
280 author = {Shakespeare}, 305 author = {Shakespeare},
281 editor = {MacDonald Alden, Raymond}, 306 editor = {MacDonald Alden, Raymond},
@@ -526,6 +551,7 @@ Alessi <alessi@robertalessi.net>
526\DeclareApparatus{rtl}[ 551\DeclareApparatus{rtl}[
527 direction=RL, 552 direction=RL,
528 delim=\hskip0.75em] 553 delim=\hskip0.75em]
554\DeclareApparatus{notes}[bhook=\textbf{Notes:}]
529\DeclareWitness{M}{M}{\emph{Marcianus Gr.} 269}[ 555\DeclareWitness{M}{M}{\emph{Marcianus Gr.} 269}[
530 settlement=Venice, 556 settlement=Venice,
531 institution=Marciana Library, 557 institution=Marciana Library,
@@ -604,6 +630,8 @@ Alessi <alessi@robertalessi.net>
604\DeclareSource{sDrak}{\emph{Drakenborch}} 630\DeclareSource{sDrak}{\emph{Drakenborch}}
605% Homer, Odyssey 631% Homer, Odyssey
606\DeclareScholar{hZen}{Zen.}[rawname=Zenodotus] 632\DeclareScholar{hZen}{Zen.}[rawname=Zenodotus]
633% Footnotes
634\TeXtoTEIPat{\pno ~}{p. }
607% Shakespeare's Sonnets: 635% Shakespeare's Sonnets:
608\NewDocumentEnvironment{ekdcenter}{}{\par\centering}{\nobreak\par} 636\NewDocumentEnvironment{ekdcenter}{}{\par\centering}{\nobreak\par}
609\NewDocumentCommand{\ekdlettrine}{mm}{% 637\NewDocumentCommand{\ekdlettrine}{mm}{%
@@ -1957,12 +1985,13 @@ yesterday.
1957% quoted or cited in the text of the edition (\emph{apparatus 1985% quoted or cited in the text of the edition (\emph{apparatus
1958% fontium}), references to testimonia, or quotations of the edited 1986% fontium}), references to testimonia, or quotations of the edited
1959% text by other authors (\emph{apparatus testium}), explanatory notes, 1987% text by other authors (\emph{apparatus testium}), explanatory notes,
1960% and so forth.\footnote{See below, \vref{ref:type-note}.} Once 1988% and so forth.\footnote{See below, \vnref{ref:type-note} and
1961% additional layers have been defined and assigned to new 1989% \vnref{sec:footnotes} for details.} Once additional layers have been
1962% \enquote*{types}, such as \enquote*{testium} and the like, these 1990% defined and assigned to new \enquote*{types}, such as
1963% types can be used as values appended to the |type| \enquote*{named 1991% \enquote*{testium} and the like, these types can be used as values
1964% option}. For more information about inserting notes in 1992% appended to the |type| \enquote*{named option}. For more information
1965% multiple-layer apparatus, see \vref{sec:notes-in-multilayer-app}. 1993% about inserting notes in multiple-layer apparatus, see
1994% \vref{sec:notes-in-multilayer-app}.
1966% 1995%
1967% \mansee \pkg{ekdosis} also provides a two-argument \cs{App} command 1996% \mansee \pkg{ekdosis} also provides a two-argument \cs{App} command
1968% which is strictly equivalent to \cs{app} but allows for much more 1997% which is strictly equivalent to \cs{app} but allows for much more
@@ -3627,12 +3656,13 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3627% just loading the \pkg{fnpos} package in the 3656% just loading the \pkg{fnpos} package in the
3628% preamble.\footcite{fnpos} 3657% preamble.\footcite{fnpos}
3629% 3658%
3630% \danger The \pkg{footmisc} package\footcite{footmisc} is not 3659% \danger \phts\label{ref:footmisc} The \pkg{footmisc}
3631% compatible with \pkg{ekdosis}. More precisely, \pkg{footmisc} is 3660% package\footcite{footmisc} is not compatible with
3632% incompatible with the way the \cs{footnote} command is defined 3661% \pkg{ekdosis}. More precisely, \pkg{footmisc} is incompatible with
3633% inside the |alignment| environment. Therefore, \pkg{footmisc} can 3662% the way the \cs{footnote} command is defined inside the |alignment|
3634% only be used on the condition that no regular \cs{footnote} be 3663% environment. Therefore, \pkg{footmisc} can only be used on the
3635% inserted in the |alignment| environment. 3664% condition that no regular \cs{footnote} be inserted in the
3665% |alignment| environment.
3636% 3666%
3637% \section{Laying Out the Apparatus Criticus} 3667% \section{Laying Out the Apparatus Criticus}
3638% \label{sec:apparatus-layout} 3668% \label{sec:apparatus-layout}
@@ -4410,6 +4440,214 @@ argument of the
4410% 4440%
4411% \subsection{Footnotes Combined Into a Single Paragraph} 4441% \subsection{Footnotes Combined Into a Single Paragraph}
4412% \label{sec:footnotes} 4442% \label{sec:footnotes}
4443% \newfeature[v1.5] As already said \vpageref{ref:footmisc}, the
4444% \pkg{footmisc} package is not compatible with
4445% \pkg{ekdosis}. Therefore, it cannot be used to reformat short
4446% footnotes so as to combine them all into a single paragraph. This
4447% is why \pkg{ekdosis} provides a mechanism of its own to insert such
4448% footnotes in a specific layer of the apparatus criticus.
4449%
4450% \DescribeMacro{\SetFootnotes} \cs{SetFootnotes}\marg{csv list of
4451% footnote settings} can be used either in the preamble or at any
4452% point of the document to cause a new ouput routine to reformat the
4453% notes into a single paragraph. This command accepts the following
4454% list of |key-value| optional arguments:---
4455% \DescribeOption{layout}|layout|$=$\verb+default|paragraph+
4456% \hfill\tcboxverb{Default: not set}\\
4457% |layout=paragraph| instructs \pkg{ekdosis} to reformat the notes
4458% into a single paragraph, while |layout=default| reverts to the
4459% standard output routine.\\
4460% \DescribeOption{type}|type|$=$\meta{type}
4461% \hfill\tcboxverb{Initially set as 'default'}\\
4462% The keyword |type| is used here in the exact same meaning as
4463% described above \vpageref{ref:app-type}.
4464% \textoiquote|type|\textciquote\ refers to
4465% any layer of critical notes defined by means of
4466% \cs{DeclareApparatus}\footnote{See above
4467% \vref{sec:declaring-layers}.} as fit to receive the footnotes shaped
4468% as a single paragraph.\\
4469% \DescribeOption{textfnmark}|textfnmark|$=$\marg{code}
4470% \hfill\tcboxverb{Default: \textsuperscript{#1}}\\
4471% |textfnmark| takes as value the code used to format the footnote
4472% mark that is inserted in the main text. |#1| is the placeholder for
4473% the figure that refers to the footnote. For instance,
4474% |textfnmark=\textsuperscript{#1}| prints the footnote mark
4475% superscripted.\\
4476% \DescribeOption{appfnmark}|appfmark|$=$\marg{code}
4477% \hfill\tcboxverb{Default: \textsuperscript{#1}}\\
4478% |appfnmark| operates on the mark that is inserted in the footnote
4479% block the same way as |textfnmark| does on the footnote mark in the
4480% main text. As an example, |appfnmark=\hskip 1em\textsuperscript{#1}|
4481% first inserts a generous spacing between the items then prints the
4482% mark superscripted.
4483%
4484% \DescribeMacro{\footnote} \cs{footnote}\oarg{options}\marg{text}
4485% When the mechanism described above is set in motion, the optional
4486% argument of \cs{footnote} accepts the following list of optional
4487% arguments:---\\
4488% \DescribeOption{layout}|type|$=$\meta{type}
4489% \hfill\tcboxverb{Default: as defined in \SetFoonotes}\\
4490% |type| allows to specify any layer of critical notes in which the
4491% contents of the footnote is to be printed.\\
4492% \DescribeOption{mark}|mark|=\meta{mark}
4493% \hfill\tcboxverb{Default: \thefootnote}\\
4494% |mark| allows to print any other mark in place of the standard
4495% footnote number. When this option is used, the |footnote| counter is
4496% not incremented.
4497%
4498% \DescribeMacro{\footnotemark}\DescribeMacro{\footnotetext}
4499% \cs{footnotemark}\oarg{mark} and
4500% \cs{footnotetext}\oarg{options}\marg{text} are the companions of
4501% \cs{footnote}. The former replaces the definition of and behaves as
4502% its standard counterpart while the latter does the same as the
4503% \cs{footnote} command described above and accepts the same optional
4504% arguments except that it does not print any mark in the main text.
4505%
4506% \danger It is however not advisable to use \cs{footnotemark} and
4507% \cs{footnotetext} for these commands are not suitable for
4508% \texttt{TEI xml} export.
4509%
4510% The following example illustrates how short footnotes can be
4511% combined into one single layer of critical notes:---
4512%
4513% \iffalse
4514%<*example>
4515% \fi
4516\begin{minted}[linenos=false]{latex}
4517% Preamble:
4518\DeclareApparatus{notes}[bhook=\textbf{Notes:}]
4519\SetFootnotes{
4520 layout = paragraph,
4521 type = notes,
4522 textfnmark = \textsuperscript{#1},
4523 appfnmark = \unskip\hskip 1em\textsuperscript{#1}
4524}
4525
4526% Document:
4527\begin{ekdosis}
4528 (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And now
4529 for our next trick,\footnote{First footnote.} let's consider an
4530 application to short footnotes.\footnote{Second footnote. (Every
4531 once in a while, a long footnote might occur, just to make things
4532 difficult.)} The footnotes\footnote{Third footnote.} at the bottom
4533 of this page \app{\lem{look}\rdg{should look}}
4534 funny,\footnote{Fourth footnote.} because most of
4535 them\footnote[mark=*, type=default]{This note \emph{doesn't count},
4536 literally. And for some reason, I decided it should sneak into the
4537 default layer of critical notes.} are quite short.\footnote{Fifth
4538 footnote. (This is incredibly boring, but it's just an example.)}
4539 When a document has lots of footnotes,\footnote{Another.} and when
4540 most of them\footnote{And another.} take only a small part of a
4541 line,\footnote{Ho hum.} the output routine\footnote{Umpteenth
4542 footnote.} ought to reformat them in some more appropriate
4543 way.\footnote{Oodles of them.}
4544\end{ekdosis}
4545\end{minted}
4546% \iffalse
4547%</example>
4548% \fi
4549%
4550% \needspace{7\baselineskip}
4551% PDF output:---
4552% \medskip
4553% \SetFootnotes{
4554% layout = paragraph,
4555% type = notes,
4556% textfnmark = \textsuperscript{#1},
4557% appfnmark = \unskip\hskip 1em\textsuperscript{#1}
4558% }
4559% \resetlinenumber
4560% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
4561% \setcounter{footnote}{0}
4562% \begin{specimen}
4563% (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And
4564% now for our next trick,\footnote{First footnote.} let's consider
4565% an application to short footnotes.\footnote{Second
4566% footnote. (Every once in a while, a long footnote might occur,
4567% just to make things difficult.)} The footnotes\footnote{Third
4568% footnote.} at the bottom of this page \app{\lem{look}\rdg{should
4569% look}} funny,\footnote{Fourth footnote.} because most of
4570% them\footnote[mark=*, type=default]{This note \emph{doesn't
4571% count}, literally. And for some reason, I decided it should
4572% sneak into the default layer of critical notes.} are quite
4573% short.\footnote{Fifth footnote. (This is incredibly boring, but
4574% it's just an example.)} When a document has lots of
4575% footnotes,\footnote{Another.} and when most of them\footnote{And
4576% another.} take only a small part of a line,\footnote{Ho hum.}
4577% the output routine\footnote{Umpteenth footnote.} ought to
4578% reformat them in some more appropriate way.\footnote{Oodles of
4579% them.}
4580% \end{specimen}
4581% \end{alignment}
4582% \SetFootnotes{layout = default}
4583%
4584% \texttt{TEI xml} output:---
4585%
4586% \iffalse
4587%<*example>
4588% \fi
4589\begin{minted}[linenos=false]{xml}
4590<p>(From
4591<bibl corresp="#KnuthTeXBook">
4592 <biblScope>
4593 <quote>Dirty Tricks</quote>, p.&#160;395</biblScope>
4594</bibl>) And now for our next trick,
4595<note place="bottom">First footnote.</note>let's consider
4596an application to short footnotes.
4597<note place="bottom">Second footnote. (Every once in a
4598while, a long footnote might occur, just to make things
4599difficult.)</note>The footnotes
4600<note place="bottom">Third footnote.</note>at the bottom of
4601this page
4602<app>
4603 <lem>look</lem>
4604 <rdg>should look</rdg>
4605</app>funny,
4606<note place="bottom">Fourth footnote.</note>because most of
4607them
4608<note type="default" place="bottom">This note
4609<emph>doesn't count</emph>, literally. And for some reason,
4610I decided it should sneak into the default layer of
4611critical notes.</note>are quite short.
4612<note place="bottom">Fifth footnote. (This is incredibly
4613boring, but it's just an example.)</note>When a document
4614has lots of footnotes,
4615<note place="bottom">Another.</note>and when most of them
4616<note place="bottom">And another.</note>take only a small
4617part of a line,
4618<note place="bottom">Ho hum.</note>the output routine
4619<note place="bottom">Umpteenth footnote.</note>ought to
4620reformat them in some more appropriate way.
4621<note place="bottom">Oodles of them.</note></p>
4622\end{minted}
4623% \iffalse
4624%</example>
4625% \fi
4626%
4627% \mansee Obviously, the mechanism just described only operates on
4628% texts equipped with an apparatus criticus. A way to have footnotes
4629% shaped as a single paragraph attached to a text that includes no
4630% variants, such a translation arranged on the facing page, is
4631% therefore to format this translation environment as if it were to
4632% receive an apparatus criticus, then remove the line numbering from
4633% it, like so:---
4634%
4635% \iffalse
4636%<*example>
4637% \fi
4638\begin{minted}[linenos=false]{latex}
4639% Preamble:
4640\SetAlignment{
4641 texts=edition;translation,
4642 apparatus=edition;translation
4643}
4644\AtBeginEnvironment{translation}{
4645 \SetLineation{lineation=none}
4646}
4647\end{minted}
4648% \iffalse
4649%</example>
4650% \fi
4413% 4651%
4414% \needspace{4\baselineskip} 4652% \needspace{4\baselineskip}
4415% \section{Poetry} 4653% \section{Poetry}
@@ -4929,6 +5167,7 @@ substantiall fewell,}
4929% \fi 5167% \fi
4930% \end{remarks} 5168% \end{remarks}
4931% 5169%
5170% \needspace{14\baselineskip}
4932% PDF output:--- 5171% PDF output:---
4933% \medskip 5172% \medskip
4934% 5173%
@@ -4945,7 +5184,6 @@ substantiall fewell,}
4945% \settowidth{\versewidth}{Feed'st thy lights flame with selfe 5184% \settowidth{\versewidth}{Feed'st thy lights flame with selfe
4946% substantiall fewell,} 5185% substantiall fewell,}
4947% \FormatDiv{1}{\begin{ekdcenter}}{\end{ekdcenter}} 5186% \FormatDiv{1}{\begin{ekdcenter}}{\end{ekdcenter}}
4948% \needspace{7\baselineskip}
4949% \resetlinenumber\resetvlinenumber 5187% \resetlinenumber\resetvlinenumber
4950% \begin{alignment}[flush, 5188% \begin{alignment}[flush,
4951% tcols=1, 5189% tcols=1,
@@ -8024,10 +8262,8 @@ Sample text with a \textcolor{red}{word} in red.
8024% \begin{enumerate} 8262% \begin{enumerate}
8025% \item Poetry: \pkg{ekdosis} is now able to load and use the 8263% \item Poetry: \pkg{ekdosis} is now able to load and use the
8026% facilities provided by the \pkg{verse} package. Refined options 8264% facilities provided by the \pkg{verse} package. Refined options
8027% will be added, such as metrical analysis. Arabic poetry through 8265% will be added, such as metrical analysis. Other packages will
8028% the environments and commands provided by the \pkg{arabluatex} 8266% also be considered for inclusion, such as \pkg{poetry} or
8029% package will also be supported. Other packages will also be
8030% considered for inclusion, such as \pkg{poetry} or
8031% \pkg{teubner}. In the end, \pkg{ekdosis} will provide a way for 8267% \pkg{teubner}. In the end, \pkg{ekdosis} will provide a way for
8032% the typesetting of poetry which will allow for more flexibility 8268% the typesetting of poetry which will allow for more flexibility
8033% and compatibility with \texttt{TEI xml}. 8269% and compatibility with \texttt{TEI xml}.
@@ -8244,7 +8480,7 @@ Sample text with a \textcolor{red}{word} in red.
8244% \end{macrocode} 8480% \end{macrocode}
8245% \paragraph{\textsf{ekdosis} Symbol} 8481% \paragraph{\textsf{ekdosis} Symbol}
8246% \begin{macro}{\eKd} 8482% \begin{macro}{\eKd}
8247% \changes{v1.5}{2023/06/22}{Prints \textsf{ekdosis} indentifying 8483% \changes{v1.5}{2023/06/24}{Prints \textsf{ekdosis} indentifying
8248% symbol} As of v1.5, \pkg{ekdosis} has its own identifying 8484% symbol} As of v1.5, \pkg{ekdosis} has its own identifying
8249% symbol. It is produced by \cs{eKd} and best printed with the Old 8485% symbol. It is produced by \cs{eKd} and best printed with the Old
8250% Standard Greek font. 8486% Standard Greek font.
@@ -8507,7 +8743,7 @@ Sample text with a \textcolor{red}{word} in red.
8507% \begin{macro}{\teidirectE} 8743% \begin{macro}{\teidirectE}
8508% \changes{v1.3}{2021/08/18}{direct insertion of elements in the 8744% \changes{v1.3}{2021/08/18}{direct insertion of elements in the
8509% \texttt{TEI xml} file} 8745% \texttt{TEI xml} file}
8510% \changes{v1.5}{2023/06/22}{direct insertion of empty elements in the 8746% \changes{v1.5}{2023/06/24}{direct insertion of empty elements in the
8511% \texttt{TEI xml} file} 8747% \texttt{TEI xml} file}
8512% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} 8748% \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code}
8513% does nothing in \LaTeX. It is only used to insert elements in the 8749% does nothing in \LaTeX. It is only used to insert elements in the
@@ -8522,7 +8758,7 @@ Sample text with a \textcolor{red}{word} in red.
8522% \end{macro} 8758% \end{macro}
8523% \end{macro} 8759% \end{macro}
8524% \begin{macro}{\getTEIxmlid} 8760% \begin{macro}{\getTEIxmlid}
8525% \changes{v1.5}{2023/06/22}{returns \texttt{TEI xml:ids} from a 8761% \changes{v1.5}{2023/06/24}{returns \texttt{TEI xml:ids} from a
8526% csv-list of ids} This command returns from a csv-list of unique 8762% csv-list of ids} This command returns from a csv-list of unique
8527% identifiers declared in commands such as \cs{DeclareWitness} and the 8763% identifiers declared in commands such as \cs{DeclareWitness} and the
8528% like a space-separated list of their corresponding |xml:id|s, each 8764% like a space-separated list of their corresponding |xml:id|s, each
@@ -8998,7 +9234,7 @@ Sample text with a \textcolor{red}{word} in red.
8998\newlength{\ekd@app@localheight} 9234\newlength{\ekd@app@localheight}
8999% \end{macrocode} 9235% \end{macrocode}
9000% \begin{macro}{\localappheight} 9236% \begin{macro}{\localappheight}
9001% \changes{v1.5}{2023/06/22}{changes the height of the apparatus 9237% \changes{v1.5}{2023/06/24}{changes the height of the apparatus
9002% criticus} 9238% criticus}
9003% \cs{localappheight}\marg{dimen} can be used to change locally the 9239% \cs{localappheight}\marg{dimen} can be used to change locally the
9004% length of \cs{ekd@app@height} set by the |appheight| option of 9240% length of \cs{ekd@app@height} set by the |appheight| option of
@@ -9017,7 +9253,7 @@ Sample text with a \textcolor{red}{word} in red.
9017% \end{macrocode} 9253% \end{macrocode}
9018% \end{macro} 9254% \end{macro}
9019% \begin{macro}{\addtoappheight} 9255% \begin{macro}{\addtoappheight}
9020% \changes{v1.5}{2023/06/22}{increases or decreases the height of the 9256% \changes{v1.5}{2023/06/24}{increases or decreases the height of the
9021% apparatus criticus} 9257% apparatus criticus}
9022% As the name suggests, in contrast to \cs{localappheight}, 9258% As the name suggests, in contrast to \cs{localappheight},
9023% \cs{addtoappheight}\marg{dimen} is used to increase or decrease 9259% \cs{addtoappheight}\marg{dimen} is used to increase or decrease
@@ -9304,7 +9540,7 @@ Sample text with a \textcolor{red}{word} in red.
9304% The following commands are provided to set and control the maximum 9540% The following commands are provided to set and control the maximum
9305% number of lines printed on each page. 9541% number of lines printed on each page.
9306% \begin{macro}{\setmaxlines} 9542% \begin{macro}{\setmaxlines}
9307% \changes{v1.5}{2023/06/22}{limits the number of lines per page} 9543% \changes{v1.5}{2023/06/24}{limits the number of lines per page}
9308% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer 9544% \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer
9309% $\geq 1$, can be used either in the preamble or at any point of the 9545% $\geq 1$, can be used either in the preamble or at any point of the
9310% document to set the maximum number of lines to be printed on each 9546% document to set the maximum number of lines to be printed on each
@@ -9315,7 +9551,7 @@ Sample text with a \textcolor{red}{word} in red.
9315% \end{macrocode} 9551% \end{macrocode}
9316% \end{macro} 9552% \end{macro}
9317% \begin{macro}{\localmaxlines} 9553% \begin{macro}{\localmaxlines}
9318% \changes{v1.5}{2023/06/22}{changes the maximum number of lines 9554% \changes{v1.5}{2023/06/24}{changes the maximum number of lines
9319% locally} 9555% locally}
9320% Once a maximum number of lines per page has been set, 9556% Once a maximum number of lines per page has been set,
9321% \cs{localmaxlines}\marg{n} can be used to adjust this number on a 9557% \cs{localmaxlines}\marg{n} can be used to adjust this number on a
@@ -9328,7 +9564,7 @@ Sample text with a \textcolor{red}{word} in red.
9328% \end{macrocode} 9564% \end{macrocode}
9329% \end{macro} 9565% \end{macro}
9330% \begin{macro}{\addtomaxlines} 9566% \begin{macro}{\addtomaxlines}
9331% \changes{v1.5}{2023/06/22}{adds or subtracts lines from a given page} 9567% \changes{v1.5}{2023/06/24}{adds or subtracts lines from a given page}
9332% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as 9568% Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as
9333% argument the number of lines one wishes to add or substract from the 9569% argument the number of lines one wishes to add or substract from the
9334% number that has been set by \cs{setmaxlines}. As a result, \meta{n} 9570% number that has been set by \cs{setmaxlines}. As a result, \meta{n}
@@ -9341,7 +9577,7 @@ Sample text with a \textcolor{red}{word} in red.
9341% \end{macrocode} 9577% \end{macrocode}
9342% \end{macro} 9578% \end{macro}
9343% \begin{macro}{\nomaxlines} 9579% \begin{macro}{\nomaxlines}
9344% \changes{v1.5}{2023/06/22}{unsets \cs{setmaxlines}} 9580% \changes{v1.5}{2023/06/24}{unsets \cs{setmaxlines}}
9345% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. 9581% \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}.
9346% \begin{macrocode} 9582% \begin{macrocode}
9347\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} 9583\def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}}
@@ -9405,7 +9641,7 @@ Sample text with a \textcolor{red}{word} in red.
9405% \end{macrocode} 9641% \end{macrocode}
9406% \end{macro} 9642% \end{macro}
9407% \begin{macro}{\App} 9643% \begin{macro}{\App}
9408% \changes{v1.5}{2023/06/22}{To be used conjointly with 9644% \changes{v1.5}{2023/06/24}{To be used conjointly with
9409% \texttt{ekdosis.el}} 9645% \texttt{ekdosis.el}}
9410% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and 9646% In contrast to \cs{app}, \cs{App} takes two mandatory arguments and
9411% accepts one optional argument like so: 9647% accepts one optional argument like so:
@@ -10202,16 +10438,24 @@ Sample text with a \textcolor{red}{word} in red.
10202 code appfnmark = \protected\def\ekdappfnmark##1{#1}, 10438 code appfnmark = \protected\def\ekdappfnmark##1{#1},
10203 initial appfnmark = \textsuperscript{#1} 10439 initial appfnmark = \textsuperscript{#1}
10204} 10440}
10205\newif\ifekd@fnmark 10441% \end{macrocode}
10442% A conditional \cs{ifekd@chfnmark} is defined so that \pkg{ekdosis}
10443% may know whether the footnote number has to be replaced with some
10444% other mark.
10445% \begin{macrocode}
10446\newif\ifekd@chfnmark
10447% \end{macrocode}
10448% These are the keys to be used by \cs{ekd@parafootnote}:---
10449% \begin{macrocode}
10206\ekvdefinekeys{ekd@infootnotes}{ 10450\ekvdefinekeys{ekd@infootnotes}{
10207 store type = \ekdfn@type, 10451 store type = \ekdfn@type,
10208 initial type = default, 10452 initial type = default,
10209 code mark = \ekd@fnmarktrue 10453 code mark = \ekd@chfnmarktrue
10210 \protected\def\ekd@fnmark@value{#1} 10454 \protected\def\ekd@fnmark@value{#1}
10211} 10455}
10212% \end{macrocode} 10456% \end{macrocode}
10213% \begin{macro}{\SetFootnotes} 10457% \begin{macro}{\SetFootnotes}
10214% \changes{v1.5}{2023/06/22}{footnotes combined into a single 10458% \changes{v1.5}{2023/06/24}{footnotes combined into a single
10215% paragraph} \cs{SetFootnotes}\marg{options} can be used in the 10459% paragraph} \cs{SetFootnotes}\marg{options} can be used in the
10216% preamble or at any point of the document. |layout=paragraph| 10460% preamble or at any point of the document. |layout=paragraph|
10217% instructs \pkg{ekdosis} to combine all footnotes into a single 10461% instructs \pkg{ekdosis} to combine all footnotes into a single
@@ -10223,20 +10467,22 @@ Sample text with a \textcolor{red}{word} in red.
10223% \end{macrocode} 10467% \end{macrocode}
10224% \end{macro} 10468% \end{macro}
10225% \begin{macro}{\ekd@parafootnote} 10469% \begin{macro}{\ekd@parafootnote}
10226% \cs{ekd@parafootnote}\oarg{layer}\marg{contents} holds the new 10470% \cs{ekd@parafootnote}\oarg{options}\marg{contents} holds the new
10227% definition of \cs{footnote}. This command accepts an optional 10471% definition of \cs{footnote}. This command accepts an optional
10228% argument that can be used to specify the layer in which the 10472% argument that can be used to specify the layer in which the
10229% contents of the footnote is to be printed. 10473% contents of the footnote is to be printed or any other mark to be
10474% printed in place of the footnote number.
10230% \begin{macrocode} 10475% \begin{macrocode}
10231\NewDocumentCommand{\ekd@parafootnote}{O{} m}{% 10476\NewDocumentCommand{\ekd@parafootnote}{O{} m}{%
10232 \ifekd@state 10477 \ifekd@state
10233 \bgroup 10478 \bgroup
10234 \ekvset{ekd@infootnotes}{#1}% 10479 \ekvset{ekd@infootnotes}{#1}%
10235 \ifekd@fnmark 10480 \ifekd@chfnmark
10236 \edef\ekd@parafn@mark{% 10481 \edef\ekd@parafn@mark{%
10237 \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}% 10482 \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}%
10238 \edef\ekd@inparafn@mark{% 10483 \edef\ekd@inparafn@mark{%
10239 \ekdappfnmark{\LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}% 10484 \ekdappfnmark{%
10485 \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}%
10240 \else 10486 \else
10241 \refstepcounter{footnote}% 10487 \refstepcounter{footnote}%
10242 \edef\ekd@parafn@mark{\LRnum{\thefootnote}}% 10488 \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
@@ -10249,7 +10495,8 @@ Sample text with a \textcolor{red}{word} in red.
10249 \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% 10495 \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}%
10250 \add@apparatus 10496 \add@apparatus
10251 \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}% 10497 \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}%
10252 \luadirect{tex.sprint(ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}% 10498 \luadirect{tex.sprint(
10499 ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}%
10253 \ekd@around@fnmark{\ekd@parafn@mark}% 10500 \ekd@around@fnmark{\ekd@parafn@mark}%
10254 \ifekd@mapps 10501 \ifekd@mapps
10255 \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}% 10502 \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}%
@@ -10263,6 +10510,70 @@ Sample text with a \textcolor{red}{word} in red.
10263} 10510}
10264% \end{macrocode} 10511% \end{macrocode}
10265% \end{macro} 10512% \end{macro}
10513% \begin{macro}{\ekd@parafootnotemark}
10514% \cs{ekd@parafootnotemark}\oarg{mark} replaces the definition of the
10515% standard \cs{footnotemark} command.
10516% \begin{macrocode}
10517\NewDocumentCommand{\ekd@parafootnotemark}{o}{%
10518 \ifekd@state
10519 \bgroup
10520 \IfNoValueTF{#1}{%
10521 \refstepcounter{footnote}%
10522 \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
10523 }{%
10524 \edef\ekd@parafn@mark{%
10525 \LRnum{\unexpanded\expandafter{#1}}}%
10526 }%
10527 \leavevmode
10528 \ekd@around@fnmark{\ekd@parafn@mark}%
10529 \egroup
10530 \else
10531 \IfNoValueTF{#1}{\footnotemark}{\footnotemark[#1]}%
10532 \fi
10533}
10534% \end{macrocode}
10535% \end{macro}
10536% \begin{macro}{\ekd@parafootnotetext}
10537% \cs{ekd@parafootnotetext}\oarg{options}\marg{text} replaces the
10538% definition of the standard \cs{footnotetext} command. It does the
10539% same as \cs{ekd@parafootnote} except that it does not print any
10540% mark in the main text.
10541% \begin{macrocode}
10542\NewDocumentCommand{\ekd@parafootnotetext}{O{} m}{%
10543 \ifekd@state
10544 \bgroup
10545 \ekvset{ekd@infootnotes}{#1}%
10546 \ifekd@chfnmark
10547 \edef\ekd@parafn@mark{%
10548 \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}%
10549 \edef\ekd@inparafn@mark{%
10550 \ekdappfnmark{%
10551 \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}%
10552 \else
10553 \edef\ekd@parafn@mark{\LRnum{\thefootnote}}%
10554 \edef\ekd@inparafn@mark{\ekdappfnmark{\LRnum{\thefootnote}}}%
10555 \fi
10556 \leavevmode
10557 \stepcounter{ekd@lab}%
10558 \zlabel{ekd:\theekd@lab}%
10559 \luadirect{ekdosis.storeabspg(
10560 \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}%
10561 \add@apparatus
10562 \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}%
10563 \luadirect{tex.sprint(
10564 ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}%
10565 \ifekd@mapps
10566 \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}%
10567 \else
10568 \unconditional@appin{\ekd@inparafn@mark #2}%
10569 \fi
10570 \egroup
10571 \else
10572 \footnotetext[#1]{#2}%
10573 \fi
10574}
10575% \end{macrocode}
10576% \end{macro}
10266% \paragraph{Emendations and Conjectures} 10577% \paragraph{Emendations and Conjectures}
10267% Here follows the |key-value| options to be used by 10578% Here follows the |key-value| options to be used by
10268% \cs{SetCritSymbols} below:--- 10579% \cs{SetCritSymbols} below:---
@@ -10375,7 +10686,7 @@ Sample text with a \textcolor{red}{word} in red.
10375% \end{macro} 10686% \end{macro}
10376% \paragraph{Lacunae} 10687% \paragraph{Lacunae}
10377% \begin{macro}{\ilabel} 10688% \begin{macro}{\ilabel}
10378% \changes{v1.5}{2023/06/22}{recalls and sets the ending label of 10689% \changes{v1.5}{2023/06/24}{recalls and sets the ending label of
10379% lemmas used to mark lacunae in witnesses} When \cs{lem} has been 10690% lemmas used to mark lacunae in witnesses} When \cs{lem} has been
10380% used with the optional argument |ilabel=<label>|, 10691% used with the optional argument |ilabel=<label>|,
10381% \cs{ilabel}\marg{label} must be used to mark the point where the 10692% \cs{ilabel}\marg{label} must be used to mark the point where the
@@ -10421,6 +10732,8 @@ Sample text with a \textcolor{red}{word} in red.
10421 \ekd@statetrue 10732 \ekd@statetrue
10422 \ifekd@parafootnotes 10733 \ifekd@parafootnotes
10423 \RenewCommandCopy\footnote\ekd@parafootnote 10734 \RenewCommandCopy\footnote\ekd@parafootnote
10735 \RenewCommandCopy\footnotemark\ekd@parafootnotemark
10736 \RenewCommandCopy\footnotetext\ekd@parafootnotetext
10424 \fi 10737 \fi
10425} 10738}
10426\NewDocumentCommand{\EkdosisOff}{}{% 10739\NewDocumentCommand{\EkdosisOff}{}{%
@@ -10524,6 +10837,8 @@ Sample text with a \textcolor{red}{word} in red.
10524 \fi 10837 \fi
10525 \ifekd@parafootnotes 10838 \ifekd@parafootnotes
10526 \RenewCommandCopy\footnote\ekd@parafootnote 10839 \RenewCommandCopy\footnote\ekd@parafootnote
10840 \RenewCommandCopy\footnotemark\ekd@parafootnotemark
10841 \RenewCommandCopy\footnotetext\ekd@parafootnotetext
10527 \fi 10842 \fi
10528} 10843}
10529\NewDocumentCommand{\EkdosisColStop}{}{% 10844\NewDocumentCommand{\EkdosisColStop}{}{%
@@ -10704,7 +11019,7 @@ Sample text with a \textcolor{red}{word} in red.
10704% \end{macrocode} 11019% \end{macrocode}
10705% \end{macro} 11020% \end{macro}
10706% \begin{macro}{\ekdEOprint} 11021% \begin{macro}{\ekdEOprint}
10707% \changes{v1.5}{2023/06/22}{Sets headers and footers on 11022% \changes{v1.5}{2023/06/24}{Sets headers and footers on
10708% \enquote{paired} facing pages} 11023% \enquote{paired} facing pages}
10709% To set headers and footers on \enquote{paired} facing pages, 11024% To set headers and footers on \enquote{paired} facing pages,
10710% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like 11025% \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like
@@ -10744,7 +11059,7 @@ Sample text with a \textcolor{red}{word} in red.
10744% counter to set the value of the page numbers. This counter should be 11059% counter to set the value of the page numbers. This counter should be
10745% incremented every two pages. 11060% incremented every two pages.
10746% \begin{counter}{pairedpage} 11061% \begin{counter}{pairedpage}
10747% \changes{v1.5}{2023/06/22}{A counter incremented every two pages} 11062% \changes{v1.5}{2023/06/24}{A counter incremented every two pages}
10748% |pairedpage| is first set as a global counter:--- 11063% |pairedpage| is first set as a global counter:---
10749% \begin{macrocode} 11064% \begin{macrocode}
10750\newcounter{pairedpage} 11065\newcounter{pairedpage}
@@ -10752,19 +11067,19 @@ Sample text with a \textcolor{red}{word} in red.
10752% \end{macrocode} 11067% \end{macrocode}
10753% \end{counter} 11068% \end{counter}
10754% \begin{macro}{\setpairedpagenum} 11069% \begin{macro}{\setpairedpagenum}
10755% \changes{v1.5}{2023/06/22}{sets the same page number on paired 11070% \changes{v1.5}{2023/06/24}{sets the same page number on paired
10756% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of 11071% pages} \cs{setpairedpagenum}\marg{number} is used just ahead of
10757% the alignment environment to set the number of the first left-hand 11072% the alignment environment to set the number of the first left-hand
10758% paired page. 11073% paired page.
10759% \begin{macro}{\setpairedpage} 11074% \begin{macro}{\setpairedpage}
10760% \changes{v1.5}{2023/06/22}{sets the page number of the first paired 11075% \changes{v1.5}{2023/06/24}{sets the page number of the first paired
10761% page} \cs{setpairedpage} is an argument-less command meant to be 11076% page} \cs{setpairedpage} is an argument-less command meant to be
10762% issued in commands used to set headers or footers before 11077% issued in commands used to set headers or footers before
10763% \cs{thepage}. This command has the counter |pairedpage| 11078% \cs{thepage}. This command has the counter |pairedpage|
10764% incremented on right-hand pages only, and sets |page| $\leftarrow$ 11079% incremented on right-hand pages only, and sets |page| $\leftarrow$
10765% |pairedpage| on every page. 11080% |pairedpage| on every page.
10766% \begin{macro}{\resetpagenumber} 11081% \begin{macro}{\resetpagenumber}
10767% \changes{v1.5}{2023/06/22}{resets normal running page numbers} 11082% \changes{v1.5}{2023/06/24}{resets normal running page numbers}
10768% \cs{resetpagenumber} must be used right out of \enquote{mirrored} 11083% \cs{resetpagenumber} must be used right out of \enquote{mirrored}
10769% paired pages alignment environments. This argument-less command 11084% paired pages alignment environments. This argument-less command
10770% corrects any numbering error on the page following the edition 11085% corrects any numbering error on the page following the edition