diff options
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r-- | ekdosis.dtx | 4229 |
1 files changed, 3002 insertions, 1227 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 0c669f9..d558e13 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -1,24 +1,23 @@ | |||
1 | % \iffalse meta-comment | 1 | % \iffalse meta-comment |
2 | % | 2 | % |
3 | % ekdosis -- Typesetting TEI xml-compliant critical editions | 3 | % ekdosis -- Typesetting TEI xml-compliant critical editions |
4 | % Copyright (C) 2020--2021 Robert Alessi | 4 | % Copyright (c) 2020, 2021, 2022, 2023 Robert Alessi |
5 | % <alessi@robertalessi.net> | ||
5 | % | 6 | % |
6 | % Please send error reports and suggestions for improvements to Robert | 7 | % Permission to use, copy, modify, and distribute this software for any |
7 | % Alessi <alessi@robertalessi.net> | 8 | % purpose with or without fee is hereby granted, provided that the above |
9 | % copyright notice and this permission notice appear in all copies. | ||
8 | % | 10 | % |
9 | % This program is free software: you can redistribute it and/or modify | 11 | % THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
10 | % it under the terms of the GNU General Public License as published by | 12 | % WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
11 | % the Free Software Foundation, either version 3 of the License, or | 13 | % MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
12 | % (at your option) any later version. | 14 | % ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
15 | % WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
16 | % ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
17 | % OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
13 | % | 18 | % |
14 | % This program is distributed in the hope that it will be useful, but | 19 | % Please send error reports and suggestions for improvements to Robert |
15 | % WITHOUT ANY WARRANTY; without even the implied warranty of | 20 | % Alessi <alessi@robertalessi.net> |
16 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | % General Public License for more details. | ||
18 | % | ||
19 | % You should have received a copy of the GNU General Public License | ||
20 | % along with this program. If not, see | ||
21 | % <http://www.gnu.org/licenses/>. | ||
22 | % | 21 | % |
23 | %<*internal> | 22 | %<*internal> |
24 | \iffalse | 23 | \iffalse |
@@ -28,24 +27,23 @@ | |||
28 | This file is part of the `ekdosis' package | 27 | This file is part of the `ekdosis' package |
29 | 28 | ||
30 | ekdosis -- Typesetting TEI xml-compliant critical editions | 29 | ekdosis -- Typesetting TEI xml-compliant critical editions |
31 | Copyright (C) 2020--2021 Robert Alessi | 30 | Copyright (c) 2020, 2021, 2022, 2023 Robert Alessi |
32 | 31 | <alessi@robertalessi.net> | |
33 | Please send error reports and suggestions for improvements to Robert | ||
34 | Alessi <alessi@robertalessi.net> | ||
35 | 32 | ||
36 | This program is free software: you can redistribute it and/or modify | 33 | Permission to use, copy, modify, and distribute this software for any |
37 | it under the terms of the GNU General Public License as published by | 34 | purpose with or without fee is hereby granted, provided that the above |
38 | the Free Software Foundation, either version 3 of the License, or | 35 | copyright notice and this permission notice appear in all copies. |
39 | (at your option) any later version. | ||
40 | 36 | ||
41 | This program is distributed in the hope that it will be useful, but | 37 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
42 | WITHOUT ANY WARRANTY; without even the implied warranty of | 38 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
43 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 39 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
44 | General Public License for more details. | 40 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
41 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
42 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
43 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
45 | 44 | ||
46 | You should have received a copy of the GNU General Public License | 45 | Please send error reports and suggestions for improvements to Robert |
47 | along with this program. If not, see | 46 | Alessi <alessi@robertalessi.net> |
48 | <http://www.gnu.org/licenses/>. | ||
49 | --]] | 47 | --]] |
50 | 48 | ||
51 | %</luapre> | 49 | %</luapre> |
@@ -61,7 +59,7 @@ along with this program. If not, see | |||
61 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] | 59 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
62 | %<package>\ProvidesPackage{ekdosis} | 60 | %<package>\ProvidesPackage{ekdosis} |
63 | %<*package> | 61 | %<*package> |
64 | [2021/09/06 v1.4-dev Typesetting TEI xml-compliant critical editions] | 62 | [2023/07/29 v1.5-dev Typesetting TEI xml-compliant critical editions] |
65 | %</package> | 63 | %</package> |
66 | %<*driver> | 64 | %<*driver> |
67 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} | 65 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} |
@@ -201,6 +199,21 @@ along with this program. If not, see | |||
201 | </imprint> | 199 | </imprint> |
202 | </monogr> | 200 | </monogr> |
203 | </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> | ||
204 | </listBibl> | 217 | </listBibl> |
205 | \end{filecontents} | 218 | \end{filecontents} |
206 | \begin{filecontents}[overwrite]{\jobname.bib} | 219 | \begin{filecontents}[overwrite]{\jobname.bib} |
@@ -227,6 +240,7 @@ along with this program. If not, see | |||
227 | editor = {Constans, L.-A.}, | 240 | editor = {Constans, L.-A.}, |
228 | volume = 2, | 241 | volume = 2, |
229 | pagination = {none}, | 242 | pagination = {none}, |
243 | entrysubtype = {primary}, | ||
230 | series = {Collection des Universités de France}, | 244 | series = {Collection des Universités de France}, |
231 | publisher = {Les Belles Lettres}, | 245 | publisher = {Les Belles Lettres}, |
232 | location = {Paris} | 246 | location = {Paris} |
@@ -238,30 +252,66 @@ along with this program. If not, see | |||
238 | date = 1869, | 252 | date = 1869, |
239 | editor = {McDevitte, W. A., and Bohn, W. S.}, | 253 | editor = {McDevitte, W. A., and Bohn, W. S.}, |
240 | edition = 1, | 254 | edition = 1, |
255 | entrysubtype = {primary}, | ||
241 | series = {Harper's New Classical Library}, | 256 | series = {Harper's New Classical Library}, |
242 | publisher = {Harper \& Brothers}, | 257 | publisher = {Harper \& Brothers}, |
243 | location = {New York}} | 258 | location = {New York}} |
244 | 259 | ||
260 | @Book{CiceroAtt, | ||
261 | author = {Cicero}, | ||
262 | title = {Ad Atticum epistularum libri sedecim}, | ||
263 | date = 1916, | ||
264 | entrysubtype = {primary}, | ||
265 | editor = {Sjögren, H.}, | ||
266 | editortype = {recensuit}, | ||
267 | series = {Collectio scriptorum ueterum Vpsaliensis}, | ||
268 | publisher = {Eranos' Förlag} | ||
269 | } | ||
270 | |||
271 | @Book{CiceroAttTr, | ||
272 | author = {Cicero}, | ||
273 | title = {Letters to Atticus}, | ||
274 | date = 1919, | ||
275 | entrysubtype = {primary}, | ||
276 | editor = {Winstedt, E.O.}, | ||
277 | series = {The Loeb Classical Library}, | ||
278 | number = 2, | ||
279 | publisher = {William Heinemann \& The MacMillan Co.}, | ||
280 | location = {London -- New York} | ||
281 | } | ||
282 | |||
245 | @MVBook{HomerMurray, | 283 | @MVBook{HomerMurray, |
246 | author = {{Homer}}, | 284 | author = {{Homer}}, |
247 | title = {The Odyssey}, | 285 | title = {The Odyssey}, |
248 | date = 1919, | 286 | date = 1919, |
287 | entrysubtype = {primary}, | ||
249 | editor = {Murray, A. T.}, | 288 | editor = {Murray, A. T.}, |
250 | volumes = 2, | 289 | volumes = 2, |
251 | publisher = {Harvard University Press -- William Heinemann}, | 290 | publisher = {Harvard University Press -- William Heinemann}, |
252 | location = {Cambridge, MA. -- London} | 291 | location = {Cambridge, MA. -- London} |
253 | } | 292 | } |
254 | 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 | |||
255 | @Book{McDonald1916, | 304 | @Book{McDonald1916, |
305 | author = {Shakespeare}, | ||
256 | editor = {MacDonald Alden, Raymond}, | 306 | editor = {MacDonald Alden, Raymond}, |
257 | shorteditor = {MacDonald}, | 307 | shorteditor = {MacDonald}, |
258 | title = {The Sonnets of Shakespeare}, | 308 | title = {The Sonnets}, |
259 | date = 1916, | 309 | date = 1916, |
310 | entrysubtype = {primary}, | ||
260 | titleaddon = {From the Quarto of 1609 with Variorum Readings and | 311 | titleaddon = {From the Quarto of 1609 with Variorum Readings and |
261 | Commentary}, | 312 | Commentary}, |
262 | organization = {Houghton Mifflin Co.}, | 313 | organization = {Houghton Mifflin Co.}, |
263 | publisher = {The Riverside Press Cambridge}, | 314 | publisher = {The Riverside Press Cambridge}, |
264 | options = {useauthor=false, useeditor=true}, | ||
265 | location = {Boston \& New York} | 315 | location = {Boston \& New York} |
266 | } | 316 | } |
267 | 317 | ||
@@ -329,6 +379,15 @@ along with this program. If not, see | |||
329 | version = {1.3} | 379 | version = {1.3} |
330 | } | 380 | } |
331 | 381 | ||
382 | @Software{fgruler, | ||
383 | title = {The Fgruler package}, | ||
384 | titleaddon = {Draw rulers on the foreground or in the text}, | ||
385 | author = {Tómács, Tibor}, | ||
386 | url = {https://ctan.org/pkg/fgruler}, | ||
387 | date = {2022-06-25}, | ||
388 | version = {1.5}, | ||
389 | } | ||
390 | |||
332 | @Software{fnpos, | 391 | @Software{fnpos, |
333 | title = {The Fnpos package}, | 392 | title = {The Fnpos package}, |
334 | titleaddon = {Control the position of footnotes on the page}, | 393 | titleaddon = {Control the position of footnotes on the page}, |
@@ -338,9 +397,18 @@ along with this program. If not, see | |||
338 | version = {1.0} | 397 | version = {1.0} |
339 | } | 398 | } |
340 | 399 | ||
400 | @Software{footmisc, | ||
401 | title = {The Footmisc package}, | ||
402 | titleaddon = {A range of footnote options}, | ||
403 | author = {Mittelbach, Frank and Fairbairns, Robin}, | ||
404 | url = {https://ctan.org/pkg/footmisc}, | ||
405 | date = {2022-05-26}, | ||
406 | version = {6.0e}, | ||
407 | } | ||
408 | |||
341 | @Software{keyfloat, | 409 | @Software{keyfloat, |
342 | title = {The Keyfloat package}, | 410 | title = {The Keyfloat package}, |
343 | subtitle = {Provides a key/value interface for generating | 411 | titleaddon = {Provides a key/value interface for generating |
344 | floats}, | 412 | floats}, |
345 | author = {Dunn, Brian}, | 413 | author = {Dunn, Brian}, |
346 | url = {https://ctan.org/pkg/keyfloat}, | 414 | url = {https://ctan.org/pkg/keyfloat}, |
@@ -366,6 +434,16 @@ along with this program. If not, see | |||
366 | version = {3.7o} | 434 | version = {3.7o} |
367 | } | 435 | } |
368 | 436 | ||
437 | @Software{marginnote, | ||
438 | title = {The Marginnote package}, | ||
439 | titleaddon = {Notes in the margin, even where \textbackslash | ||
440 | marginpar fails}, | ||
441 | author = {Kohm, Markus}, | ||
442 | url = {https://komascript.de/marginnote}, | ||
443 | date = {2018-08-09}, | ||
444 | version = {1.4b}, | ||
445 | } | ||
446 | |||
369 | @Software{paracol, | 447 | @Software{paracol, |
370 | title = {The Paracol package}, | 448 | title = {The Paracol package}, |
371 | titleaddon = {Multiple columns with texts “in parallel”}, | 449 | titleaddon = {Multiple columns with texts “in parallel”}, |
@@ -386,7 +464,7 @@ along with this program. If not, see | |||
386 | 464 | ||
387 | @Software{tcolorbox, | 465 | @Software{tcolorbox, |
388 | title = {The Tcolorbox package}, | 466 | title = {The Tcolorbox package}, |
389 | subtitle = {Coloured boxes, for LaTeX examples and theorems, | 467 | titleaddon = {Coloured boxes, for LaTeX examples and theorems, |
390 | etc}, | 468 | etc}, |
391 | author = {Sturm, Thomas F.}, | 469 | author = {Sturm, Thomas F.}, |
392 | url = {https://ctan.org/pkg/tcolorbox}, | 470 | url = {https://ctan.org/pkg/tcolorbox}, |
@@ -412,6 +490,14 @@ along with this program. If not, see | |||
412 | version = {2.4b} | 490 | version = {2.4b} |
413 | } | 491 | } |
414 | 492 | ||
493 | @Software{xparse, | ||
494 | title = {The Xparse package}, | ||
495 | titleaddon = {A generic document command parser}, | ||
496 | author = {{The LaTeX Team}}, | ||
497 | url = {https://ctan.org/pkg/xparse}, | ||
498 | date = {2022-01-12}, | ||
499 | } | ||
500 | |||
415 | @Software{arabluatex, | 501 | @Software{arabluatex, |
416 | title = {The Arabluatex package}, | 502 | title = {The Arabluatex package}, |
417 | titleaddon = {ArabTeX for LuaLaTeX}, | 503 | titleaddon = {ArabTeX for LuaLaTeX}, |
@@ -430,6 +516,16 @@ along with this program. If not, see | |||
430 | version = {1.3a} | 516 | version = {1.3a} |
431 | } | 517 | } |
432 | 518 | ||
519 | @Software{oldstandard, | ||
520 | title = {Old Standard}, | ||
521 | subtitle = {A Unicode Font for Classical and Medieval Studies}, | ||
522 | titleaddon = {Based on Alexey Kryukov's original Old Standard}, | ||
523 | author = {Alessi, Robert}, | ||
524 | url = {http://ctan.org/pkg/oldstandard}, | ||
525 | date = {2020-12-18}, | ||
526 | version = {2.6} | ||
527 | } | ||
528 | |||
433 | @Software{arabtex, | 529 | @Software{arabtex, |
434 | title = {The Arabtex package}, | 530 | title = {The Arabtex package}, |
435 | titleaddon = {Macros and fonts for typesetting Arabic}, | 531 | titleaddon = {Macros and fonts for typesetting Arabic}, |
@@ -441,13 +537,9 @@ along with this program. If not, see | |||
441 | } | 537 | } |
442 | \end{filecontents} | 538 | \end{filecontents} |
443 | \begin{filecontents}[overwrite]{\jobname-ekd.cfg} | 539 | \begin{filecontents}[overwrite]{\jobname-ekd.cfg} |
444 | %% fixfoot:--- | ||
445 | \DeclareFixedFootnote{\seeekdsep}{See below | ||
446 | \vpageref{ref:ekdsep-subsep} for more information and | ||
447 | \vref{lst:emend-coni-corr}, ll.~23--5 for an illustrative example.} | ||
448 | %% ekdosis:--- | 540 | %% ekdosis:--- |
449 | \footnotelayout{m} | 541 | \SetFootnotes{arrangement=merge} |
450 | \SetCritSymbols{suppbegin = 〈,suppend = 〉} | 542 | \SetCritSymbols{suppbegin = ⟨,suppend = ⟩} |
451 | \EnvtoTEI{ancientgreek}{p}[xml:lang="grc"] | 543 | \EnvtoTEI{ancientgreek}{p}[xml:lang="grc"] |
452 | \DeclareApparatus{fontium}[ | 544 | \DeclareApparatus{fontium}[ |
453 | delim=\hskip0.75em, | 545 | delim=\hskip0.75em, |
@@ -459,6 +551,7 @@ along with this program. If not, see | |||
459 | \DeclareApparatus{rtl}[ | 551 | \DeclareApparatus{rtl}[ |
460 | direction=RL, | 552 | direction=RL, |
461 | delim=\hskip0.75em] | 553 | delim=\hskip0.75em] |
554 | \DeclareApparatus{notes}[bhook=\textbf{Notes:}] | ||
462 | \DeclareWitness{M}{M}{\emph{Marcianus Gr.} 269}[ | 555 | \DeclareWitness{M}{M}{\emph{Marcianus Gr.} 269}[ |
463 | settlement=Venice, | 556 | settlement=Venice, |
464 | institution=Marciana Library, | 557 | institution=Marciana Library, |
@@ -537,6 +630,8 @@ along with this program. If not, see | |||
537 | \DeclareSource{sDrak}{\emph{Drakenborch}} | 630 | \DeclareSource{sDrak}{\emph{Drakenborch}} |
538 | % Homer, Odyssey | 631 | % Homer, Odyssey |
539 | \DeclareScholar{hZen}{Zen.}[rawname=Zenodotus] | 632 | \DeclareScholar{hZen}{Zen.}[rawname=Zenodotus] |
633 | % Footnotes | ||
634 | \TeXtoTEIPat{\pno ~}{p. } | ||
540 | % Shakespeare's Sonnets: | 635 | % Shakespeare's Sonnets: |
541 | \NewDocumentEnvironment{ekdcenter}{}{\par\centering}{\nobreak\par} | 636 | \NewDocumentEnvironment{ekdcenter}{}{\par\centering}{\nobreak\par} |
542 | \NewDocumentCommand{\ekdlettrine}{mm}{% | 637 | \NewDocumentCommand{\ekdlettrine}{mm}{% |
@@ -552,40 +647,60 @@ along with this program. If not, see | |||
552 | \DeclareSource{shWalsh1908}{Wa} | 647 | \DeclareSource{shWalsh1908}{Wa} |
553 | \DeclareScholar{shGod}{Godwin}[rawname=Godwin] | 648 | \DeclareScholar{shGod}{Godwin}[rawname=Godwin] |
554 | \DeclareScholar{shStee}{Stee}[rawname=Steevens, note=Notes in Malone] | 649 | \DeclareScholar{shStee}{Stee}[rawname=Steevens, note=Notes in Malone] |
650 | % Cicero, ad Atticum, VII.9.4 | ||
651 | \DeclareWitness{cicC}{C}{Lectiones quas Cratander in margine editionis, | ||
652 | quae a. 1528 Basileae prodiit, adscripsit} | ||
653 | \DeclareWitness{cicΩ}{Ω}{Consensus codicum Σ et Δ uel archetypum | ||
654 | codicum Italicorum} | ||
555 | \end{filecontents} | 655 | \end{filecontents} |
556 | \documentclass{ltxdoc} | 656 | \documentclass{ltxdoc} |
557 | %\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} | 657 | %\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry} |
558 | \usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry} | 658 | \usepackage[letterpaper,margin=1.25in,left=50mm,nohead]{geometry} |
559 | \usepackage{dox} | 659 | %^^A dox does not work with the latest latex-dev: |
560 | \doxitem{Option}{option}{options} | 660 | \ifdefined\SpecialMacroIndex |
561 | \usepackage{microtype} | 661 | \NewDocElement{Option}{option} |
562 | \usepackage[no-math]{fontspec} | 662 | \NewDocElement[printtype=\textit{cnt.}]{Counter}{counter} |
663 | \else | ||
664 | \usepackage{dox} | ||
665 | \doxitem{Option}{option}{options} | ||
666 | \doxitem{Counter}{counter}{counter} | ||
667 | \fi | ||
668 | \usepackage{fontspec} | ||
563 | \defaultfontfeatures{Renderer=Harfbuzz} | 669 | \defaultfontfeatures{Renderer=Harfbuzz} |
670 | \usepackage{microtype} | ||
564 | \usepackage[latin.classic,greek.ancient,american]{babel} | 671 | \usepackage[latin.classic,greek.ancient,american]{babel} |
565 | \babelfont{rm}{Old Standard} | 672 | \babelfont{rm}[RawFeature=onum]{Old Standard} |
566 | \babelfont{sf}{NewCMSans10-Book} | 673 | \babelfont{sf}{NewComputerModernSans10} |
567 | \babelfont{tt}{NewCMMono10-Book} | 674 | \babelfont{tt}{NewComputerModernMono10} |
568 | \babelfont[greek]{rm}[ | 675 | \babelfont[greek]{rm}[Script=Greek, |
569 | Script=Greek, | 676 | RawFeature={+ss06;onum}] |
570 | RawFeature={+ss05;+ss06} | 677 | {Old Standard} |
571 | ]{Old Standard} | 678 | \newfontfamily{\junicode}{Junicode VF}[ |
572 | \babelfont[greek]{sf}[Script=Greek]{NewCMSans10-Book} | 679 | Language=English, |
573 | \babelfont[greek]{tt}[Script=Greek]{NewCMMono10-Book} | ||
574 | \newfontfamily{\junicode}{Junicode}[ | ||
575 | Ligatures=TeX, | 680 | Ligatures=TeX, |
576 | RawFeature={+hist}] | 681 | RawFeature={dlig,ss08}] |
577 | \newfontfamily\missaali{Missaali Regular} | 682 | \newfontfamily\missaali{Missaali Regular} |
578 | \babeltags{ancientgreek = greek} | 683 | \babeltags{ancientgreek = greek} |
579 | \def\sg#1{\textancientgreek{#1}} | 684 | \def\sg#1{\textancientgreek{#1}} |
580 | \usepackage[Old Standard]{mathfont} | ||
581 | \usepackage[biblatex=true]{embrac} | 685 | \usepackage[biblatex=true]{embrac} |
582 | \usepackage{chifoot} | ||
583 | \usepackage{fixfoot} | ||
584 | \usepackage[nospace,american]{varioref} | 686 | \usepackage[nospace,american]{varioref} |
687 | \usepackage{addlines} | ||
585 | \newcommand\phts{\phantomsection} | 688 | \newcommand\phts{\phantomsection} |
689 | \usepackage{chifoot} | ||
690 | \usepackage{savefnmark} | ||
691 | \usepackage{menukeys} | ||
586 | \usepackage{nameref} | 692 | \usepackage{nameref} |
587 | \usepackage{arabluatex} | 693 | \usepackage{arabluatex} |
588 | \usepackage[parnotes=roman, teiexport=tidy, poetry=verse]{ekdosis} | 694 | \usepackage[parnotes=roman, teiexport=tidy, poetry=verse]{ekdosis} |
695 | \makeatletter | ||
696 | \NewDocumentCommand{\ekdelide}{m}{% | ||
697 | \IfSubStr{#1}{--}{% | ||
698 | \StrBefore{#1}{--}[\@before]% | ||
699 | \StrBehind{#1}{--}[\@behind]% | ||
700 | \luadirect{tex.sprint(ekdosis.numrange( | ||
701 | \luastring{\@before}, | ||
702 | \luastring{\@behind}))}}{#1}} | ||
703 | \makeatother | ||
589 | \AddxmlBibResource{bibdata.xml} | 704 | \AddxmlBibResource{bibdata.xml} |
590 | \usepackage{booktabs} | 705 | \usepackage{booktabs} |
591 | \usepackage{xltabular} | 706 | \usepackage{xltabular} |
@@ -600,6 +715,7 @@ along with this program. If not, see | |||
600 | \setlist{nosep} | 715 | \setlist{nosep} |
601 | \setlist[itemize]{label=\textendash} | 716 | \setlist[itemize]{label=\textendash} |
602 | \setlist[enumerate,1]{label=(\alph*)} | 717 | \setlist[enumerate,1]{label=(\alph*)} |
718 | \setlist[enumerate,2]{label=\roman*.} | ||
603 | \newlist{remarks}{enumerate}{10} | 719 | \newlist{remarks}{enumerate}{10} |
604 | \setlist[remarks]{ | 720 | \setlist[remarks]{ |
605 | label*=\textsc{Rem.} \arabic*, | 721 | label*=\textsc{Rem.} \arabic*, |
@@ -616,12 +732,13 @@ along with this program. If not, see | |||
616 | \newbool{nocolordoc} | 732 | \newbool{nocolordoc} |
617 | \definecolor{ekdcolor}{RGB}{243,241,235} | 733 | \definecolor{ekdcolor}{RGB}{243,241,235} |
618 | \definecolor{cinnamon}{rgb}{0.82, 0.41, 0.12} | 734 | \definecolor{cinnamon}{rgb}{0.82, 0.41, 0.12} |
735 | \definecolor{lavender}{RGB}{152,115,172} | ||
619 | \ifbool{nocolordoc}{ | 736 | \ifbool{nocolordoc}{ |
620 | \colorlet{ekdcolor}{white} | 737 | \colorlet{ekdcolor}{white} |
621 | \colorlet{cinnamon}{black}}{} | 738 | \colorlet{cinnamon}{black} |
739 | \colorlet{lavender}{gray}}{} | ||
622 | \definecolor{gainsboro}{RGB}{222,222,222} | 740 | \definecolor{gainsboro}{RGB}{222,222,222} |
623 | \PassOptionsToPackage{bookmarks=true}{hyperref} | 741 | \PassOptionsToPackage{bookmarks=true}{hyperref} |
624 | \usepackage[obeyspaces]{url} | ||
625 | \usepackage[numbered]{hypdoc} | 742 | \usepackage[numbered]{hypdoc} |
626 | \usepackage[titlematter,loadlang=en|de|fr|es]{metastr} | 743 | \usepackage[titlematter,loadlang=en|de|fr|es]{metastr} |
627 | \hypersetup{ | 744 | \hypersetup{ |
@@ -630,7 +747,6 @@ along with this program. If not, see | |||
630 | linktocpage=true, | 747 | linktocpage=true, |
631 | pdftype={Text} | 748 | pdftype={Text} |
632 | } | 749 | } |
633 | \usepackage{uri} | ||
634 | \labelformat{section}{sect.~#1} | 750 | \labelformat{section}{sect.~#1} |
635 | \labelformat{subsection}{sect.~#1} | 751 | \labelformat{subsection}{sect.~#1} |
636 | \labelformat{subsubsection}{sect.~#1} | 752 | \labelformat{subsubsection}{sect.~#1} |
@@ -638,7 +754,10 @@ along with this program. If not, see | |||
638 | \usepackage[defaultindex=none,citecmd=autocite]{icite} | 754 | \usepackage[defaultindex=none,citecmd=autocite]{icite} |
639 | \bibinput{ekdosis} | 755 | \bibinput{ekdosis} |
640 | \newcommand\vnref[1]{\vref{#1}, \enquote{\nameref{#1}}} | 756 | \newcommand\vnref[1]{\vref{#1}, \enquote{\nameref{#1}}} |
757 | \newcommand\lnref[1]{\getrefnumber{#1}} | ||
641 | \usepackage[style=oxnotes-inote,dashed]{biblatex} | 758 | \usepackage[style=oxnotes-inote,dashed]{biblatex} |
759 | \usepackage{uri} | ||
760 | \usepackage[obeyspaces]{xurl} | ||
642 | \DefineBibliographyStrings{english}{ | 761 | \DefineBibliographyStrings{english}{ |
643 | seenote={cf\adddotspace n\adddotspace}} | 762 | seenote={cf\adddotspace n\adddotspace}} |
644 | \DeclareSourcemap{ | 763 | \DeclareSourcemap{ |
@@ -716,6 +835,8 @@ along with this program. If not, see | |||
716 | \metaset[sep]{draft}{ -- } | 835 | \metaset[sep]{draft}{ -- } |
717 | \metasetlang{en-US} | 836 | \metasetlang{en-US} |
718 | \metaset{title}{ἔκδοσις} | 837 | \metaset{title}{ἔκδοσις} |
838 | \metaset[print]{title}{\href{http://www.ekdosis.org}{\eKd}\hfill | ||
839 | ἔκδοσις\hfill\phantom{\eKd}} | ||
719 | \metaset{date}{\filedate} | 840 | \metaset{date}{\filedate} |
720 | \metaset{draft}{\fileversion} | 841 | \metaset{draft}{\fileversion} |
721 | \metaset{subject}{TEI xml-compliant critical editions} | 842 | \metaset{subject}{TEI xml-compliant critical editions} |
@@ -739,17 +860,23 @@ along with this program. If not, see | |||
739 | Para ver una copia de esta licencia, siga el vínculo: | 860 | Para ver una copia de esta licencia, siga el vínculo: |
740 | \metapick[#1]{licenseurl}.} | 861 | \metapick[#1]{licenseurl}.} |
741 | \metaset{copyrightowner}{\metapick[#1]{author}} | 862 | \metaset{copyrightowner}{\metapick[#1]{author}} |
742 | \metaset{copyrightdate}{2020--2021} | 863 | \metaset{copyrightdate}{2020, 2021, 2022, 2023} |
743 | \metaset{licensemessage}{Permission is granted to copy, distribute | 864 | \metaset{licensemessage}{Permission to use, copy, modify, and |
744 | and/or modify this document under the terms of the GNU Free | 865 | distribute this software for any purpose with or without fee is |
745 | Documentation License, Version 1.3 or any later version published by | 866 | hereby granted, provided that the above copyright notice and this |
746 | the Free Software Foundation; with no Invariant Sections, no | 867 | permission notice appear in all copies. |
747 | Front-Cover Texts, and no Back-Cover Texts. A copy of the license | 868 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
748 | is included in the section entitled ``GNU Free Documentation | 869 | WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
749 | License''.} | 870 | WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
750 | \metaset{licenseurl}{https://www.gnu.org/licenses/fdl-1.3.html} | 871 | AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
872 | DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA | ||
873 | OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | ||
874 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
875 | PERFORMANCE OF THIS SOFTWARE.} | ||
876 | \metaset{licenseurl}{% | ||
877 | https://cvsweb.openbsd.org/src/share/misc/license.template?rev=HEAD} | ||
751 | \metaset[print]{licenseurl}{% | 878 | \metaset[print]{licenseurl}{% |
752 | \url{https://www.gnu.org/licenses/fdl-1.3.html}} | 879 | \url{https://cvsweb.openbsd.org/src/share/misc/license.template?rev=HEAD}} |
753 | \metawritepdfinfo | 880 | \metawritepdfinfo |
754 | \metawritepdfaux | 881 | \metawritepdfaux |
755 | \metawritepdfpreamble | 882 | \metawritepdfpreamble |
@@ -811,7 +938,7 @@ along with this program. If not, see | |||
811 | \usepackage{needspace} | 938 | \usepackage{needspace} |
812 | \NewDocumentCommand{\captof}{O{listing} m O{}}{% | 939 | \NewDocumentCommand{\captof}{O{listing} m O{}}{% |
813 | \bgroup | 940 | \bgroup |
814 | \needspace{5\baselineskip}% | 941 | \nobreak |
815 | \vskip 1ex plus 2pt minus 2pt% | 942 | \vskip 1ex plus 2pt minus 2pt% |
816 | \captionof{#1}{#2}% | 943 | \captionof{#1}{#2}% |
817 | #3% | 944 | #3% |
@@ -900,61 +1027,73 @@ along with this program. If not, see | |||
900 | % \changes{v1.0}{2020/08/14}{Documentation complete} | 1027 | % \changes{v1.0}{2020/08/14}{Documentation complete} |
901 | % | 1028 | % |
902 | % \begin{abstract} | 1029 | % \begin{abstract} |
903 | % \pkg{ekdosis} is a Lua\LaTeX{} package designed for | 1030 | % \pkg{ekdosis} is a Lua\LaTeX{} package designed for multilingual |
904 | % multilingual critical editions. It can be used to typeset texts | 1031 | % critical editions. It can be used to typeset texts and different |
905 | % and different layers of critical notes in any direction accepted | 1032 | % layers of critical notes in any direction accepted by |
906 | % by Lua\TeX. Texts can be arranged in running paragraphs or on | 1033 | % Lua\TeX. Texts can be arranged in running paragraphs or on facing |
907 | % facing pages, in any number of columns which in turn can be | 1034 | % pages, in any number of columns which in turn can be synchronized |
908 | % synchronized or not. In addition to printed texts, | 1035 | % or not. In addition to printed texts, \pkg{ekdosis} can convert |
909 | % \pkg{ekdosis} can convert \texttt{.tex} source files so as to | 1036 | % \texttt{.tex} source files so as to produce \texttt{TEI |
910 | % produce \texttt{TEI xml}-compliant critical | 1037 | % xml}-compliant critical editions. Database-driven encoding under |
911 | % editions. Database-driven encoding under \LaTeX{} then allows | 1038 | % \LaTeX{} then allows extraction of texts entered segment by |
912 | % extraction of texts entered segment by segment according to | 1039 | % segment according to various criteria: main edited text, variant |
913 | % various criteria: main edited text, variant readings, translations | 1040 | % readings, translations or annotated borrowings between texts. It |
914 | % or annotated borrowings between texts. It is published under the | 1041 | % is published under the terms of the OpenBSD license. |
915 | % terms of the GNU General Public License (GPL) version 3. | ||
916 | % \end{abstract} | 1042 | % \end{abstract} |
917 | % | 1043 | % |
918 | % \section*{License and Disclaimer} | 1044 | % \section*{License and Disclaimer} |
919 | % \addcontentsline{toc}{section}{License and disclamer} | 1045 | % \addcontentsline{toc}{section}{License and disclamer} |
920 | % \subsection*{License Applicable to this Document} | ||
921 | % \pdfbookmark[2]{Licence applicable to this document}{copyright-doc} | ||
922 | % \leavevmode\marginpar{\hfill\texttt{fdl1.3}} | ||
923 | % \metapick[print]{rightstext} (See below \vref{sec:fdl}.) | ||
924 | % | ||
925 | % \subsection*{License Applicable to the Software} | ||
926 | % \pdfbookmark[2]{Licence applicable to the software}{copyright-soft} | ||
927 | % \label{sec:license-software} | 1046 | % \label{sec:license-software} |
928 | % | 1047 | % |
929 | % \pkg{ekdosis} --- \metapick[print]{subtitle} | 1048 | % \pkg{ekdosis} --- \metapick[print]{subtitle} |
930 | % \metapick[print]{copyrightstatement} | 1049 | % \metapick[print]{copyrightstatement} |
1050 | % | ||
1051 | % \leavevmode\marginpar{\hfill\texttt{OpenBSD}} \pkg{ekdosis} is | ||
1052 | % licensed under the terms of the so-called OpenBSD license, as it is | ||
1053 | % modelled after the ISC copyright, which is functionally equivalent | ||
1054 | % to a two-term BSD copyright with language removed that is made | ||
1055 | % unnecessary by the Berne convention.\footnote{More information about | ||
1056 | % the OpenBSD policy to which \pkg{ekdosis} adheres: | ||
1057 | % \url{https://www.openbsd.org/policy.html}.} | ||
1058 | % | ||
1059 | % \iffalse | ||
1060 | %<*example> | ||
1061 | % \fi | ||
1062 | \begin{minted}[linenos=false]{text} | ||
1063 | ekdosis -- Typesetting TEI xml-Compliant Critical Editions | ||
1064 | ---------------------------------------------------------- | ||
1065 | |||
1066 | Copyright (c) 2020, 2021, 2022, 2023 Robert Alessi | ||
1067 | <alessi@robertalessi.net> | ||
1068 | |||
1069 | Permission to use, copy, modify, and distribute this software for any | ||
1070 | purpose with or without fee is hereby granted, provided that the above | ||
1071 | copyright notice and this permission notice appear in all copies. | ||
1072 | |||
1073 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
1074 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
1075 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
1076 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
1077 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
1078 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
1079 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
1080 | \end{minted} | ||
1081 | % \iffalse | ||
1082 | %</example> | ||
1083 | % \fi | ||
931 | % | 1084 | % |
932 | % Please send error reports and suggestions for improvements to Robert | 1085 | % Please send error reports and suggestions for improvements to Robert |
933 | % Alessi: | 1086 | % Alessi: |
934 | % \begin{itemize} | 1087 | % \begin{itemize} |
935 | % \item email: \mailto[ekdosis package]{Robert Alessi <alessi@roberalessi.net>} | 1088 | % \item email: |
936 | % \item website: \url{http://www.robertalessi.net/ekdosis} | 1089 | % \mailto[ekdosis package]{Robert Alessi <alessi@robertalessi.net>} |
937 | % \item development: \url{http://git.robertalessi.net/ekdosis} | 1090 | % \item website: \url{http://www.ekdosis.org} |
1091 | % \item development: \url{http://git.robertalessi.net/ekdosis} or\\ | ||
1092 | % \phantom{development:} \url{https://sr.ht/~ralessi/ekdosis} | ||
938 | % \item comments, feature requests, bug reports: | 1093 | % \item comments, feature requests, bug reports: |
939 | % \url{https://gitlab.com/ralessi/ekdosis/issues} | 1094 | % \url{http://www.ekdosis.org/issues.html} |
940 | % \end{itemize} | 1095 | % \end{itemize} |
941 | % | 1096 | % |
942 | % \leavevmode\marginpar{\hfill\texttt{gpl3+}} | ||
943 | % This program is free software: you can redistribute it and/or modify | ||
944 | % it under the terms of the GNU General Public License as published by | ||
945 | % the Free Software Foundation, either version 3 of the License, or | ||
946 | % (at your option) any later version. | ||
947 | % | ||
948 | % This program is distributed in the hope that it will be useful, but | ||
949 | % WITHOUT ANY WARRANTY; without even the implied warranty of | ||
950 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
951 | % General Public License for more details. | ||
952 | % | ||
953 | % You should have received a copy of the GNU General Public License | ||
954 | % along with this program. If not, see | ||
955 | % \href{http://www.gnu.org/licenses}% | ||
956 | % {\texttt{<http://www.gnu.org/licenses/>}}. | ||
957 | % | ||
958 | % This release of \pkg{ekdosis} consists of the following | 1097 | % This release of \pkg{ekdosis} consists of the following |
959 | % source files: | 1098 | % source files: |
960 | % \begin{itemize} | 1099 | % \begin{itemize} |
@@ -964,6 +1103,13 @@ along with this program. If not, see | |||
964 | % \item |Makefile| | 1103 | % \item |Makefile| |
965 | % \end{itemize} | 1104 | % \end{itemize} |
966 | % | 1105 | % |
1106 | % \DescribeMacro{\eKd} \newfeature[v1.5] The distinctive emblem of | ||
1107 | % \pkg{ekdosis} is made of the three Greek letters \sg{ε}, \sg{κ} and | ||
1108 | % \sg{δ}, like so: \eKd. Provided that the font used includes these | ||
1109 | % Unicode glyphs, it is produced by the command \cs{eKd} and best | ||
1110 | % printed with the \emph{Old Standard} Greek | ||
1111 | % font.\footcite{oldstandard} | ||
1112 | % | ||
967 | % \section{Introduction} | 1113 | % \section{Introduction} |
968 | % \label{sec:introduction} | 1114 | % \label{sec:introduction} |
969 | % \begin{comment} | 1115 | % \begin{comment} |
@@ -1003,7 +1149,7 @@ along with this program. If not, see | |||
1003 | % publication, treatise}. For us moderns, this term refers to a long | 1149 | % publication, treatise}. For us moderns, this term refers to a long |
1004 | % tradition of scholarly work consisting in establishing from | 1150 | % tradition of scholarly work consisting in establishing from |
1005 | % manuscript evidence the texts of Greek and Latin classics that were | 1151 | % manuscript evidence the texts of Greek and Latin classics that were |
1006 | % handled down through the Middle Ages to the time of the first | 1152 | % handed down through the Middle Ages to the time of the first |
1007 | % printed editions. Of course, this definition is extendible to other | 1153 | % printed editions. Of course, this definition is extendible to other |
1008 | % languages as well. The basic premise is that critical editions | 1154 | % languages as well. The basic premise is that critical editions |
1009 | % exhibit reconstructed texts from manuscript evidence either under | 1155 | % exhibit reconstructed texts from manuscript evidence either under |
@@ -1099,15 +1245,15 @@ along with this program. If not, see | |||
1099 | % \iffalse | 1245 | % \iffalse |
1100 | %<*example> | 1246 | %<*example> |
1101 | % \fi | 1247 | % \fi |
1102 | \begin{minted}{latex} | 1248 | \begin{minted}[escapeinside=++]{latex} |
1103 | \begin{ekdosis} | 1249 | \begin{ekdosis} +\label{ln:pj1:1}+ |
1104 | I | 1250 | I |
1105 | \app{ | 1251 | \app{ +\label{ln:pj1:3}+ |
1106 | \lem{saw} | 1252 | \lem{saw} |
1107 | \rdg{met} | 1253 | \rdg{met} +\label{ln:pj1:5}+ |
1108 | } | 1254 | } |
1109 | my friend \app{\lem{Peter}\rdg{John}} at the station yesterday. | 1255 | my friend \app{\lem{Peter}\rdg{John}} at the station yesterday. +\label{ln:pj1:7}+ |
1110 | \end{ekdosis} | 1256 | \end{ekdosis} +\label{ln:pj1:8}+ |
1111 | \end{minted} | 1257 | \end{minted} |
1112 | % \iffalse | 1258 | % \iffalse |
1113 | %</example> | 1259 | %</example> |
@@ -1153,14 +1299,16 @@ along with this program. If not, see | |||
1153 | % \fi | 1299 | % \fi |
1154 | % | 1300 | % |
1155 | % As can be seen from \vref{lst:pj1}, the edition text is inserted in | 1301 | % As can be seen from \vref{lst:pj1}, the edition text is inserted in |
1156 | % the \env{ekdosis} environment (l.~1 to 8). Then two | 1302 | % the \env{ekdosis} environment (ll.~\lnref{ln:pj1:1} to |
1157 | % \cs{app}\marg{apparatus entry} commands (ll.~3 and 7) contain the | 1303 | % \lnref{ln:pj1:8}). Then two \cs{app}\marg{apparatus entry} |
1158 | % lemma (\cs{lem}\marg{lemma}), namely the reading that is accepted by | 1304 | % commands (ll.~\lnref{ln:pj1:3} and \lnref{ln:pj1:7}) |
1159 | % the editor, and at least one variant reading | 1305 | % contain the lemma (\cs{lem}\marg{lemma}), namely the reading that is |
1160 | % (\cs{rdg}\marg{reading}, ll.~5 and 7). As the listing shows, the | 1306 | % accepted by the editor, and at least one variant reading |
1161 | % editor is free to lay out the code in a legible manner to the eye: | 1307 | % (\cs{rdg}\marg{reading}, ll.~\lnref{ln:pj1:5} and |
1162 | % the first lemma above spans several lines whereas the second one is | 1308 | % \lnref{ln:pj1:7}). As the listing shows, the editor is free |
1163 | % written in sequence without spaces. | 1309 | % to lay out the code in a legible manner to the eye: the first lemma |
1310 | % above spans several lines whereas the second one is written in | ||
1311 | % sequence without spaces. | ||
1164 | % | 1312 | % |
1165 | % In the PDF output, the edition text is printed in the upper part of | 1313 | % In the PDF output, the edition text is printed in the upper part of |
1166 | % the page, above the line, and naturally shows the accepted | 1314 | % the page, above the line, and naturally shows the accepted |
@@ -1245,12 +1393,14 @@ along with this program. If not, see | |||
1245 | % characters is reduced to allow for additional entries. As a | 1393 | % characters is reduced to allow for additional entries. As a |
1246 | % consequence of this rationale, the total number of entries on a | 1394 | % consequence of this rationale, the total number of entries on a |
1247 | % given page must not be too high. It is therefore advisable to use | 1395 | % given page must not be too high. It is therefore advisable to use |
1248 | % |layout=fitapp| conjointly with |maxentries| as described below | 1396 | % |layout=fitapp| conjointly with |maxlines| or |maxentries| as |
1249 | % \vpageref{ref:maxentries} and in \vref{sec:oscillating-problem}. % | 1397 | % described below on page~\pageref{ref:gmaxlines} (for |maxlines|), |
1250 | % \danger If used appropriately, this mechanism gives excellent | 1398 | % and on pages~\pageref{ref:glimit} and~\pageref{ref:maxentries} (for |
1251 | % typographical results, notably with complex edition texts of which | 1399 | % |maxentries|) and in \vref{sec:oscillating-problem}. \danger If |
1252 | % the entries in the associated apparatus can be quite abundant in | 1400 | % used appropriately, this mechanism gives excellent typographical |
1253 | % number. It may even put an end to the | 1401 | % results, notably with complex edition texts of which the entries |
1402 | % in the associated apparatus can be quite abundant in number. It | ||
1403 | % may even put an end to the | ||
1254 | % \enquote{\hyperref[sec:oscillating-problem]{oscillating problem}} | 1404 | % \enquote{\hyperref[sec:oscillating-problem]{oscillating problem}} |
1255 | % in most of the cases. However, as suitable it may be for high | 1405 | % in most of the cases. However, as suitable it may be for high |
1256 | % quality typeset texts and final, camera-ready copies, its benefit | 1406 | % quality typeset texts and final, camera-ready copies, its benefit |
@@ -1692,22 +1842,23 @@ along with this program. If not, see | |||
1692 | % \iffalse | 1842 | % \iffalse |
1693 | %<*example> | 1843 | %<*example> |
1694 | % \fi | 1844 | % \fi |
1695 | \begin{minted}{latex} | 1845 | \begin{minted}[escapeinside=++]{latex} |
1696 | \DeclareScholar{ego}{ego}[ | 1846 | \DeclareScholar{ego}{ego}[ |
1697 | forename=John, | 1847 | forename=John, |
1698 | surname=Smith, | 1848 | surname=Smith, |
1699 | note=Main editor of the text] | 1849 | note=Main editor of the text] |
1700 | \DeclareShorthand{egoscr}{\emph{scripsi}}{ego} | 1850 | \DeclareShorthand{egoscr}{\emph{scripsi}}{ego}+\label{ln:egoscr}+ |
1701 | \end{minted} | 1851 | \end{minted} |
1702 | % \iffalse | 1852 | % \iffalse |
1703 | %</example> | 1853 | %</example> |
1704 | % \fi | 1854 | % \fi |
1705 | % | 1855 | % |
1706 | % Then, the shorthand |egoscr| (l.~5) can be used to print in the | 1856 | % Then, the shorthand |egoscr| (l.~\lnref{ln:egoscr}) can be |
1707 | % apparatus criticus the technical term \emph{scripsi} and use at the | 1857 | % used to print in the apparatus criticus the technical term |
1708 | % same time the pointer |#ego| that is expected in the \texttt{TEI | 1858 | % \emph{scripsi} and use at the same time the pointer |#ego| that is |
1709 | % xml} output file. Detailed examples of this technique will be | 1859 | % expected in the \texttt{TEI xml} output file. Detailed examples of |
1710 | % provided below in \vref{sec:emendations-conjectures}. | 1860 | % this technique will be provided below in |
1861 | % \vref{sec:emendations-conjectures}. | ||
1711 | % | 1862 | % |
1712 | % \subsubsection{Printing Formatted Witnesses | 1863 | % \subsubsection{Printing Formatted Witnesses |
1713 | % --- Conspectus Siglorum} | 1864 | % --- Conspectus Siglorum} |
@@ -1836,18 +1987,27 @@ yesterday. | |||
1836 | % quoted or cited in the text of the edition (\emph{apparatus | 1987 | % quoted or cited in the text of the edition (\emph{apparatus |
1837 | % fontium}), references to testimonia, or quotations of the edited | 1988 | % fontium}), references to testimonia, or quotations of the edited |
1838 | % text by other authors (\emph{apparatus testium}), explanatory notes, | 1989 | % text by other authors (\emph{apparatus testium}), explanatory notes, |
1839 | % and so forth.\footnote{See below, \vref{ref:type-note}.} Once | 1990 | % and so forth.\footnote{See below, \vnref{ref:type-note} and |
1840 | % additional layers have been defined and assigned to new | 1991 | % \vnref{sec:footnotes} for details.} Once additional layers have been |
1841 | % \enquote*{types}, such as \enquote*{testium} and the like, these | 1992 | % defined and assigned to new \enquote*{types}, such as |
1842 | % types can be used as values appended to the |type| \enquote*{named | 1993 | % \enquote*{testium} and the like, these types can be used as values |
1843 | % option}. For more information about inserting notes in | 1994 | % appended to the |type| \enquote*{named option}. For more information |
1844 | % multiple-layer apparatus, see \vref{sec:notes-in-multilayer-app}. | 1995 | % about inserting notes in multiple-layer apparatus, see |
1845 | % | 1996 | % \vref{sec:notes-in-multilayer-app}. |
1846 | % \paragraph{Base text and variants} As can be seen in the example | 1997 | % |
1847 | % above, there are two kinds of individual readings: the \emph{lemma}, | 1998 | % \mansee \pkg{ekdosis} also provides a two-argument \cs{App} command |
1848 | % which contains the base text accepted by the editor, and the | 1999 | % which is strictly equivalent to \cs{app} but allows for much more |
1849 | % \emph{reading}, which contains deviant readings rejected by the | 2000 | % flexible code folding in the \textsf{emacs} text editor. Code |
1850 | % editor. | 2001 | % folding may be needed when readings and critical notes grow in |
2002 | % number to a point where the edition text becomes illegible. This | ||
2003 | % command is described below in \vnref{sec:using-emacs}. (See | ||
2004 | % \vpageref{ref:App-cmd}.) | ||
2005 | % | ||
2006 | % \paragraph{Base text and variants} As can be seen in \vref{lst:pj1} | ||
2007 | % and the examples provided above, there are two kinds of individual | ||
2008 | % readings: the \emph{lemma}, which contains the base text accepted by | ||
2009 | % the editor, and the \emph{reading}, which contains deviant readings | ||
2010 | % rejected by the editor. | ||
1851 | % | 2011 | % |
1852 | % \danger What follows refers to the notions of \enquote{witness}, | 2012 | % \danger What follows refers to the notions of \enquote{witness}, |
1853 | % \enquote{source} and \enquote{scholar} as defined above | 2013 | % \enquote{source} and \enquote{scholar} as defined above |
@@ -1904,8 +2064,29 @@ yesterday. | |||
1904 | % insert abbreviated lemmata in the apparatus criticus, or to | 2064 | % insert abbreviated lemmata in the apparatus criticus, or to |
1905 | % introduce an alternate way of writing entries with Latin technical | 2065 | % introduce an alternate way of writing entries with Latin technical |
1906 | % terms in the apparatus criticus as will be demonstrated below in the | 2066 | % terms in the apparatus criticus as will be demonstrated below in the |
1907 | % example | 2067 | % example provided by \vref{lst:pj2}.\\ |
1908 | % provided by \vref{lst:pj2}.\\ | 2068 | % \DescribeOption{ilabel}\phts\label{ref:ilabel-opt} |
2069 | % |ilabel|$=$\meta{indexed label}\\ | ||
2070 | % \newfeature[v1.5] If used, |ilabel| instructs \pkg{ekdosis} not to | ||
2071 | % set a label at the place where \meta{lemma text} ends. Instead, the | ||
2072 | % label is indexed as \meta{indexed label} and only used to compute | ||
2073 | % the ending line number at the place where the index is recalled by | ||
2074 | % \cs{ilabel}\marg{indexed label}.\footnote{See below | ||
2075 | % \vpageref{ref:ilabel-cmd}.} This allows for abbreviated lemmas | ||
2076 | % corresponding to spans of texts that cross verse, paragraph or | ||
2077 | % section boundaries as described below in \vnref{sec:lacunae}.\\ | ||
2078 | % \DescribeOption{delim} (no-value argument) \newfeature[v1.5]\\ | ||
2079 | % |delim| takes no value. If used, this argument instructs to forcibly | ||
2080 | % print the delimiter that \pkg{ekdosis} may have decided not to print | ||
2081 | % in the apparatus criticus before the lemma text.\\ | ||
2082 | % \DescribeOption{nodelim} (no-value argument)\\ | ||
2083 | % \newfeature[v1.5] |nodelim| takes no value. If used, this argument | ||
2084 | % removes the delimiter that is printed just before the entry in the | ||
2085 | % apparatus criticus. This option is typically used in rare occasions | ||
2086 | % in combination with |nolem| and |nonum| for entries that carry | ||
2087 | % information not to be printed in the apparatus but nevertheless to | ||
2088 | % be retained in the \texttt{TEI xml} | ||
2089 | % output file.\\ | ||
1909 | % \DescribeOption{sep} |sep|$=$\meta{separator}\\ | 2090 | % \DescribeOption{sep} |sep|$=$\meta{separator}\\ |
1910 | % |sep| allows to change the symbol used to separate the lemma text | 2091 | % |sep| allows to change the symbol used to separate the lemma text |
1911 | % from deviant readings, which is by default the closing square | 2092 | % from deviant readings, which is by default the closing square |
@@ -1915,16 +2096,23 @@ yesterday. | |||
1915 | % if used. |nosep| removes the separator mentioned above. Obviously, | 2096 | % if used. |nosep| removes the separator mentioned above. Obviously, |
1916 | % |nosep| must be used when for some reason no \cs{rdg} command | 2097 | % |nosep| must be used when for some reason no \cs{rdg} command |
1917 | % follows a \cs{lem} command that has just been used, as shown below | 2098 | % follows a \cs{lem} command that has just been used, as shown below |
1918 | % in \vref{lst:emend-coni-corr}, l.~7. \danger If |nosep| be used so | 2099 | % in \vref{lst:emend-coni-corr}, |
1919 | % as to insert an explanatory note after the lemma text with the | 2100 | % l.~\lnref{ln:emend:nosep}. \danger If |nosep| be used so as |
2101 | % to insert an explanatory note after the lemma text with the | ||
1920 | % \cs{note} command described below \vpageref{ref:editorial-notes}, | 2102 | % \cs{note} command described below \vpageref{ref:editorial-notes}, |
1921 | % then the |sep| optional argument of \cs{note} can be used to put | 2103 | % then the |sep| optional argument of \cs{note} can be used to put |
1922 | % back in the separator. This technique is demonstrated below in | 2104 | % back in the separator. This technique is demonstrated below in |
1923 | % \vref{lst:emend-coni-corr}, ll.~23--5.\\ | 2105 | % \vref{lst:emend-coni-corr}, |
2106 | % ll.~\ekdelide{\lnref{ln:emend:sep:b}%^^A | ||
2107 | % --\lnref{ln:emend:sep:e}}.\\ | ||
1924 | % \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\ | 2108 | % \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\ |
1925 | % This named argument does not need a value as it defaults to |true| | 2109 | % This named argument does not need a value as it defaults to |true| |
1926 | % if used. |nolem| completely removes the lemma text from the related | 2110 | % if used. |nolem| completely removes the lemma text from the related |
1927 | % entry in the apparatus criticus.\\ | 2111 | % entry in the apparatus criticus.\\ |
2112 | % \DescribeOption{Nolem} (no-value argument)\\ | ||
2113 | % \newfeature[v1.5] |Nolem| takes no value and is equivalent to | ||
2114 | % |nodelim,| |nolem,| |nonum|. For an example of its usage, see | ||
2115 | % \vnref{sec:lacunae} and \vref{lst:cic-att}.\\ | ||
1928 | % \DescribeOption{type} |type|$=$\meta{value}\\ | 2116 | % \DescribeOption{type} |type|$=$\meta{value}\\ |
1929 | % This named argument has no effect on the apparatus criticus of the | 2117 | % This named argument has no effect on the apparatus criticus of the |
1930 | % edition in print, but it is used in the \texttt{TEI xml} output to | 2118 | % edition in print, but it is used in the \texttt{TEI xml} output to |
@@ -2029,9 +2217,13 @@ yesterday. | |||
2029 | % \DescribeOption{post} |post|$=$\meta{words}\\ | 2217 | % \DescribeOption{post} |post|$=$\meta{words}\\ |
2030 | % |post| inserts \meta{words} immediately after the note.\\ | 2218 | % |post| inserts \meta{words} immediately after the note.\\ |
2031 | % \DescribeOption{sep} This argument-less option is equivalent to | 2219 | % \DescribeOption{sep} This argument-less option is equivalent to |
2032 | % |post=\ekdsep|.\seeekdsep\\ | 2220 | % |post=\ekdsep|.\footnote{See below |
2221 | % \vpageref{ref:ekdsep-subsep} for more information and | ||
2222 | % \vref{lst:emend-coni-corr}, ll.~%^^A | ||
2223 | % \ekdelide{\lnref{ln:emend:sep:b}--\lnref{ln:emend:sep:e}} | ||
2224 | % for an illustrative example.}\saveFN\fnEmend\\ | ||
2033 | % \DescribeOption{subsep} This argument-less option is equivalent to | 2225 | % \DescribeOption{subsep} This argument-less option is equivalent to |
2034 | % |pre=\ekdsubsep|.\seeekdsep\\ | 2226 | % |pre=\ekdsubsep|.\useFN\fnEmend\\ |
2035 | % | 2227 | % |
2036 | % \danger Under no circumstances is it permitted to insert this | 2228 | % \danger Under no circumstances is it permitted to insert this |
2037 | % command \cs{note} or \cs{note*} inside the argument of \cs{lem} or | 2229 | % command \cs{note} or \cs{note*} inside the argument of \cs{lem} or |
@@ -2051,7 +2243,7 @@ yesterday. | |||
2051 | % \iffalse | 2243 | % \iffalse |
2052 | %<*example> | 2244 | %<*example> |
2053 | % \fi | 2245 | % \fi |
2054 | \begin{minted}{latex} | 2246 | \begin{minted}[escapeinside=++]{latex} |
2055 | \begin{ekdosis} | 2247 | \begin{ekdosis} |
2056 | I | 2248 | I |
2057 | \app{ | 2249 | \app{ |
@@ -2068,16 +2260,16 @@ yesterday. | |||
2068 | \rdg[wit=B]{good}} | 2260 | \rdg[wit=B]{good}} |
2069 | mood. | 2261 | mood. |
2070 | \app{ | 2262 | \app{ |
2071 | \lem[wit=A, alt={How nice... said}]{\enquote{How nice to find | 2263 | \lem[wit=A, alt={How nice... said}]{\enquote{How nice to find+\label{ln:pj2:alt:b}+ |
2072 | you here!} he said.} | 2264 | you here!} he said.}+\label{ln:pj2:alt:e}+ |
2073 | \note*{There are no quotation marks in the mss.} | 2265 | \note*{There are no quotation marks in the mss.}+\label{ln:pj2:note1}+ |
2074 | \rdg[wit=B, alt=\emph{om.}]{}} | 2266 | \rdg[wit=B, alt=\emph{om.}]{}} |
2075 | I chuckled to myself, recalling the last time we | 2267 | I chuckled to myself, recalling the last time we |
2076 | \app{ | 2268 | \app{ |
2077 | \lem[wit=A,nolem]{met} | 2269 | \lem[wit=A,nolem]{met}+\label{ln:pj2:nolem}+ |
2078 | \rdg[wit=B, alt={\emph{post} met \emph{add.} there}]{met | 2270 | \rdg[wit=B, alt={\emph{post} met \emph{add.} there}]{met+\label{ln:pj2:alt2}+ |
2079 | there} | 2271 | there} |
2080 | \note*{Ms. \getsiglum{B} provides other additions of this kind.}}. | 2272 | \note*{Ms. \getsiglum{B} provides other additions of this kind.}}.+\label{ln:pj2:note2}+ |
2081 | \end{ekdosis} | 2273 | \end{ekdosis} |
2082 | \end{minted} | 2274 | \end{minted} |
2083 | % \iffalse | 2275 | % \iffalse |
@@ -2113,18 +2305,22 @@ yesterday. | |||
2113 | % \end{alignment} | 2305 | % \end{alignment} |
2114 | % | 2306 | % |
2115 | % \begin{remarks} | 2307 | % \begin{remarks} |
2116 | % \item Close examination of lines~17--8 from \vref{lst:pj2} shows how | 2308 | % \item Close examination of lines~\ekdelide{%^^A |
2117 | % |alt| has been used to insert an abridged lemma text in the | 2309 | % \lnref{ln:pj2:alt:b}--\lnref{ln:pj2:alt:e}} from |
2118 | % apparatus criticus in print while keeping safe what is to be found | 2310 | % \vref{lst:pj2} shows how |alt| has been used to insert an abridged |
2119 | % in the \texttt{TEI xml} output. | 2311 | % lemma text in the apparatus criticus in print while keeping safe |
2120 | % \item The same technique has been used at line~24 to insert | 2312 | % what is to be found in the \texttt{TEI xml} output. |
2121 | % alternate words, including Latin technical terms, in place of the | 2313 | % \item The same technique has been used at |
2122 | % variant reading. Hence the use of |nolem| at line~23 to remove the | 2314 | % line~\lnref{ln:pj2:alt2} to insert alternate words, |
2123 | % lemma text from the apparatus criticus in print. | 2315 | % including Latin technical terms, in place of the variant |
2316 | % reading. Hence the use of |nolem| at | ||
2317 | % line~\lnref{ln:pj2:nolem} to remove the lemma text from the | ||
2318 | % apparatus criticus in print. | ||
2124 | % \item \cs{note*} has been used to insert short annotations in two | 2319 | % \item \cs{note*} has been used to insert short annotations in two |
2125 | % places (ll.~19 and 26). | 2320 | % places (ll.~\lnref{ln:pj2:note1} and |
2321 | % \lnref{ln:pj2:note2}). | ||
2126 | % \item For an example of the use of |nordg|, see below | 2322 | % \item For an example of the use of |nordg|, see below |
2127 | % \vref{lst:caesar-bg}, l.~11. | 2323 | % \vref{lst:caesar-bg}, l.~\lnref{ln:caes:nordg}. |
2128 | % \end{remarks} | 2324 | % \end{remarks} |
2129 | % | 2325 | % |
2130 | % The corresponding \texttt{TEI xml} output produced by \pkg{ekdosis} | 2326 | % The corresponding \texttt{TEI xml} output produced by \pkg{ekdosis} |
@@ -2376,46 +2572,53 @@ friend | |||
2376 | % \iffalse | 2572 | % \iffalse |
2377 | %<*example> | 2573 | %<*example> |
2378 | % \fi | 2574 | % \fi |
2379 | \begin{minted}{latex} | 2575 | \begin{minted}[escapeinside=++]{latex} |
2380 | % Witnesses: | 2576 | % Witnesses: |
2381 | \DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276} | 2577 | \DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276}+\label{ln:wsc:wit1}+ |
2382 | \DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140} | 2578 | \DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140}+\label{ln:wsc:wit2}+ |
2383 | \DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem] | 2579 | \DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem] |
2384 | \DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem] | 2580 | \DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem] |
2385 | \DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277} | 2581 | \DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277}+\label{ln:wsc:wit3}+ |
2386 | \DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142} | 2582 | \DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142}+\label{ln:wsc:wit4}+ |
2387 | % Sources (the first arguments below must refer to biblatex labels and | 2583 | % Sources (the first arguments below must refer to biblatex labels and |
2388 | % an xml bibliographical database must be supplied): | 2584 | % an xml bibliographical database must be supplied): |
2389 | \DeclareSource{Lit}{Littré} | 2585 | \DeclareSource{Lit}{Littré}+\label{ln:wsc:src1}+ |
2390 | \DeclareSource{Erm}{Ermerins} | 2586 | \DeclareSource{Erm}{Ermerins} |
2391 | \DeclareSource{Sm}{Smith} | 2587 | \DeclareSource{Sm}{Smith}+\label{ln:wsc:src2}+ |
2392 | % Persons: | 2588 | % Persons: |
2393 | \DeclareScholar{ego}{ego}[ | 2589 | \DeclareScholar{ego}{ego}[ |
2394 | forename=Robert, | 2590 | forename=Robert, |
2395 | surname=Alessi] | 2591 | surname=Alessi] |
2396 | % Useful shorthands: | 2592 | % Useful shorthands: |
2397 | \DeclareShorthand{codd}{codd.}{V,I,R,H} | 2593 | \DeclareShorthand{codd}{codd.}{V,I,R,H}+\label{ln:wsc:short1}+ |
2398 | \DeclareShorthand{edd}{edd.}{Lit,Erm,Sm} | 2594 | \DeclareShorthand{edd}{edd.}{Lit,Erm,Sm} |
2399 | \DeclareShorthand{egoscr}{\emph{scripsi}}{ego} | 2595 | \DeclareShorthand{egoscr}{\emph{scripsi}}{ego}+\label{ln:wsc:short2}+ |
2400 | \end{minted} | 2596 | \end{minted} |
2401 | % \iffalse | 2597 | % \iffalse |
2402 | %</example> | 2598 | %</example> |
2403 | % \fi | 2599 | % \fi |
2404 | % | 2600 | % |
2405 | % As can be seen from lines~18--20, three useful shorthands have been | 2601 | % As can be seen from lines~\ekdelide{%^^A |
2406 | % defined: |codd| prints \enquote{codd.} for Latin pl.\ \emph{codices} | 2602 | % \lnref{ln:wsc:short1}--\lnref{ln:wsc:short2}}, |
2407 | % viz.\ \enquote{all manuscripts} and refers to the three \texttt{xml} | 2603 | % three useful shorthands have been defined: |codd| prints |
2408 | % identifiers |V|, |I|, |R| and |H| declared at ll.~2--3 and 6--7; | 2604 | % \enquote{codd.} for Latin pl.\ \emph{codices} viz.\ \enquote{all |
2605 | % manuscripts} and refers to the three \texttt{xml} identifiers |V|, | ||
2606 | % |I|, |R| and |H| declared at | ||
2607 | % ll.~\ekdelide{%^^A | ||
2608 | % \lnref{ln:wsc:wit1}--\lnref{ln:wsc:wit2}} and | ||
2609 | % \ekdelide{\lnref{ln:wsc:wit3}--\lnref{ln:wsc:wit4}}; | ||
2409 | % |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\ | 2610 | % |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\ |
2410 | % \enquote{all editors} and refers to the three \texttt{xml} | 2611 | % \enquote{all editors} and refers to the three \texttt{xml} |
2411 | % identifiers |Lit|, |Erm| and |Sm| declared at | 2612 | % identifiers |Lit|, |Erm| and |Sm| declared at |
2412 | % ll.~10--12;\footnote{For detailed information on how to use | 2613 | % ll.~\ekdelide{%^^A |
2413 | % \cs{DeclareSource} and insert references to cited works, the reader | 2614 | % \lnref{ln:wsc:src1}--\lnref{ln:wsc:src2}};%^^A |
2414 | % is invited to refer to \vref{sec:references-cited-works}.} finally, | 2615 | % \footnote{For detailed information on how to use \cs{DeclareSource} |
2415 | % |egoscr| (l.~20) is used to print the technical Latin term | 2616 | % and insert references to cited works, the reader is invited to refer |
2416 | % \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a personal | 2617 | % to \vref{sec:references-cited-works}.} finally, |egoscr| |
2417 | % conjecture. Then, the |.tex| source file can be structured as | 2618 | % (l.~\lnref{ln:wsc:short2}) is used to print the technical |
2418 | % follows:--- | 2619 | % Latin term \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a |
2620 | % personal conjecture. Then, the |.tex| source file can be structured | ||
2621 | % as follows:--- | ||
2419 | % | 2622 | % |
2420 | % \iffalse | 2623 | % \iffalse |
2421 | %<*example> | 2624 | %<*example> |
@@ -2642,22 +2845,22 @@ friend | |||
2642 | % |type=emendation| to indicate that the lacuna has been accepted by | 2845 | % |type=emendation| to indicate that the lacuna has been accepted by |
2643 | % the editor. | 2846 | % the editor. |
2644 | % | 2847 | % |
2645 | % Examples follow:\footnote{On the use of \texttt{egomute} (l.~2), see | 2848 | % Examples follow:\footnote{On the use of \texttt{egomute} |
2646 | % above \vref{it:egomute}.}--- | 2849 | % (l.~\lnref{ln:emend:egomute}), see above \vref{it:egomute}.}--- |
2647 | % | 2850 | % |
2648 | % \captof{Emendations, conjectures and | 2851 | % \captof{Emendations, conjectures and |
2649 | % corrections}[\label{lst:emend-coni-corr}] | 2852 | % corrections}[\label{lst:emend-coni-corr}] |
2650 | % \iffalse | 2853 | % \iffalse |
2651 | %<*example> | 2854 | %<*example> |
2652 | % \fi | 2855 | % \fi |
2653 | \begin{minted}{latex} | 2856 | \begin{minted}[escapeinside=++]{latex} |
2654 | % Preamble: | 2857 | % Preamble: |
2655 | \DeclareShorthand{egomute}{\unskip}{ego} | 2858 | \DeclareShorthand{egomute}{\unskip}{ego}+\label{ln:emend:egomute}+ |
2656 | 2859 | ||
2657 | % Document: | 2860 | % Document: |
2658 | \begin{ekdosis} | 2861 | \begin{ekdosis} |
2659 | σχεδὸν \app{ | 2862 | σχεδὸν \app{ |
2660 | \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba | 2863 | \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba+\label{ln:emend:nosep}+ |
2661 | excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost, | 2864 | excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost, |
2662 | unit=word, quantity=4}}} | 2865 | unit=word, quantity=4}}} |
2663 | } οὗτοι | 2866 | } οὗτοι |
@@ -2673,9 +2876,9 @@ friend | |||
2673 | } ὑπογίνονται | 2876 | } ὑπογίνονται |
2674 | 2877 | ||
2675 | Πάντων δὲ \app{ | 2878 | Πάντων δὲ \app{ |
2676 | \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}} | 2879 | \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}}+\label{ln:emend:sep:b}+ |
2677 | \note[sep]{addidi (\arb{^gamI`a 'l-.hummayAti} | 2880 | \note[sep]{addidi (\arb{^gamI`a 'l-.hummayAti} |
2678 | \getsiglum{Gal})} | 2881 | \getsiglum{Gal})}+\label{ln:emend:sep:e}+ |
2679 | \rdg[nordg, source=Gal]{\arb{al-.hummayAti}} | 2882 | \rdg[nordg, source=Gal]{\arb{al-.hummayAti}} |
2680 | \rdg[wit=codd, source=edd, alt=om.]{} | 2883 | \rdg[wit=codd, source=edd, alt=om.]{} |
2681 | }, | 2884 | }, |
@@ -2764,6 +2967,145 @@ friend | |||
2764 | %</example> | 2967 | %</example> |
2765 | % \fi | 2968 | % \fi |
2766 | % | 2969 | % |
2970 | % \section[Lacunae]{\newfeature[v1.5]Lacunae} | ||
2971 | % \label{sec:lacunae} | ||
2972 | % The term \enquote{lacuna} is used here to indicate a series of words | ||
2973 | % or phrases that are missing from one or more witnesses in the | ||
2974 | % manuscript tradition. When the lacuna is limited to just a few | ||
2975 | % words, it may fill an entire entry of the apparatus criticus, | ||
2976 | % especially when the other witnesses do not provide variants on this | ||
2977 | % span of text. | ||
2978 | % | ||
2979 | % On the other hand, when the lacuna is longer, or includes variants, | ||
2980 | % or crosses a verse, paragraph or section boundary, it is usually not | ||
2981 | % desirable to break it into pieces. The recommended method of | ||
2982 | % encoding is therefore to record explicitly where the lacuna begins | ||
2983 | % and where it ends. However, in well-written apparatus criticus, | ||
2984 | % these two items of information must be provided only in the first | ||
2985 | % entry. Moreover, the line numbering of this entry and the | ||
2986 | % abbreviated lemma must make clear where the lacuna ends. As a | ||
2987 | % consequence, the apparatus in print is silent at the place where the | ||
2988 | % lacuna ends, unlike the \texttt{TEI xml} code which must be explicit | ||
2989 | % at both places. | ||
2990 | % | ||
2991 | % \DescribeMacro{\lacunaStart}\DescribeMacro{\lacunaEnd} | ||
2992 | % \cs{lacunaStart}\oarg{opt} and \cs{lacunaEnd}\oarg{opt} are used in | ||
2993 | % the mandatory argument of the \cs{rdg} command to indicate the | ||
2994 | % beginning and the end of the lacuna. The optional argument of these | ||
2995 | % commands can be used to specify which witnesses are affected by the | ||
2996 | % lacuna, as follows:---\\ | ||
2997 | % \DescribeOption{wit} |wit|$=$\meta{csv list of witnesses}\\ | ||
2998 | % This option is described above \vpageref{ref:lem-wit}. Of course, it | ||
2999 | % is unnecessary to use it in the case where only one witness in | ||
3000 | % involved in the variant reading that supply the information on the | ||
3001 | % lacuna. | ||
3002 | % | ||
3003 | % \DescribeMacro{\ilabel} \phts\label{ref:ilabel-cmd} | ||
3004 | % \cs{ilabel}\marg{indexed label} is used to recall the indexed label | ||
3005 | % set by means of the |ilabel| optional argument of the \cs{lem} | ||
3006 | % command as described above \vpageref{ref:ilabel-opt}. This command | ||
3007 | % is used to compute the line number where the lacuna ends and must be | ||
3008 | % inserted precisely at this place, supposedly outside the group | ||
3009 | % formed by the \cs{app} command used to print the information on the | ||
3010 | % lacuna in the apparatus criticus. | ||
3011 | % | ||
3012 | % This technique is demonstrated by the following example taken from | ||
3013 | % Cicero's \emph{Letters to Atticus}, VII, | ||
3014 | % 9.4:\footnote{\cite[121.13--15]{CiceroAtt}. English translation: | ||
3015 | % \cite[51]{CiceroAttTr}.}--- | ||
3016 | % | ||
3017 | % \captof{Cicero, \emph{ad Atticum epistulae}, VII, | ||
3018 | % 9.4}[\label{lst:cic-att}] | ||
3019 | % \iffalse | ||
3020 | %<*example> | ||
3021 | % \fi | ||
3022 | \begin{minted}[linenos,escapeinside=++,highlightlines={4-5,7-8}]{latex} | ||
3023 | \begin{alignment} | ||
3024 | \begin{edition} | ||
3025 | Praeteriit tempus non legis, \app{ | ||
3026 | \lem[wit={C}, ilabel={sed7.9.4.14}, alt={sed\===legis}]{sed}+\label{ln:lac:ilabel:opt}+ | ||
3027 | \rdg[wit={Ω}, alt=\emph{om.}]{\lacunaStart}+\label{ln:lac:lstart}+ | ||
3028 | } libidinis tuae, fac tamen \app{ | ||
3029 | \lem[Nolem, wit={C}]{legis\ilabel{sed7.9.4.14}}+\label{ln:lac:ilabel:cmd}+ | ||
3030 | \rdg[nordg, wit={Ω}]{\lacunaEnd}}; ut succedatur+\label{ln:lac:lend}+ | ||
3031 | decernitur; impedis et ais: \enquote{habe meam rationem.} | ||
3032 | \end{edition} | ||
3033 | \begin{translation} | ||
3034 | This term, not a legal term, but a term of your own will and | ||
3035 | pleasure\===or say, this legal term\===comes to an end. The House | ||
3036 | passes a decree for the appointment of a successor. You object and | ||
3037 | cry, \enquote{Consider my candidature.} | ||
3038 | \end{translation} | ||
3039 | \end{alignment} | ||
3040 | \end{minted} | ||
3041 | % \iffalse | ||
3042 | %</example> | ||
3043 | % \fi | ||
3044 | % | ||
3045 | % \begin{remarks} | ||
3046 | % \item At line~\lnref{ln:lac:ilabel:opt}, from the |ilabel| optional | ||
3047 | % argument, \pkg{ekdosis} knows that the span of text affected by | ||
3048 | % the lacuna does not end after \emph{sed}, but after \emph{legis} | ||
3049 | % (l.~\lnref{ln:lac:ilabel:cmd}), at the place where the indexed label | ||
3050 | % is recalled by \cs{ilabel}. So line numbers are computed | ||
3051 | % accordingly in the apparatus criticus. | ||
3052 | % \item The starting and ending points of the lacuna from which the | ||
3053 | % \sg{Ω} family suffers have been marked by \cs{lacunaStart} and | ||
3054 | % \cs{lacunaEnd} respectively (ll.~\lnref{ln:lac:lstart} and | ||
3055 | % \lnref{ln:lac:lend}). | ||
3056 | % \item Line~\lnref{ln:lac:lend} shows that \emph{legis} | ||
3057 | % (l.~\lnref{ln:lac:ilabel:cmd}) does not appear in the \sg{Ω} | ||
3058 | % family. This is where the lacuna ends. Furthermore, as no other | ||
3059 | % witnesses are mentioned in the \cs{rdg} command | ||
3060 | % (l.~\lnref{ln:lac:lend}), using the |wit| optional argument of | ||
3061 | % \cs{lacunaEnd} would introduce an unnecessary redundancy. | ||
3062 | % \end{remarks} | ||
3063 | % | ||
3064 | % PDF output:---\nobreak\medskip | ||
3065 | % \resetlinenumber | ||
3066 | % \begin{alignment}[flush,lcols=2] | ||
3067 | % \begin{edition} | ||
3068 | % Praeteriit tempus non legis, \app{ | ||
3069 | % \lem[wit={cicC}, ilabel={sed7.9.4.14}, alt={sed\===legis}]{sed} | ||
3070 | % \rdg[wit={cicΩ}, alt=\emph{om.}]{\lacunaStart} | ||
3071 | % } libidinis tuae, fac tamen \app{ | ||
3072 | % \lem[Nolem, wit={cicC}]{legis\ilabel{sed7.9.4.14}} | ||
3073 | % \rdg[nordg, wit={cicΩ}]{\lacunaEnd}}; ut succedatur | ||
3074 | % decernitur; impedis et ais: \enquote{habe meam rationem.} | ||
3075 | % \end{edition} | ||
3076 | % \begin{translation} | ||
3077 | % This term, not a legal term, but a term of your own will and | ||
3078 | % pleasure\===or say, this legal term\===comes to an end. The | ||
3079 | % House passes a decree for the appointment of a successor. You | ||
3080 | % object and cry, \enquote{Consider my candidature.} | ||
3081 | % \end{translation} | ||
3082 | % \end{alignment} | ||
3083 | % | ||
3084 | % \medskip | ||
3085 | % \nobreak \texttt{TEI xml} output (Latin only):--- | ||
3086 | % \iffalse | ||
3087 | %<*example> | ||
3088 | % \fi | ||
3089 | \begin{minted}[linenos]{xml} | ||
3090 | <p>Praeteriit tempus non legis, | ||
3091 | <app> | ||
3092 | <lem wit="#C">sed</lem> | ||
3093 | <rdg wit="#Ω"> | ||
3094 | <lacunaStart /> | ||
3095 | </rdg> | ||
3096 | </app>libidinis tuae, fac tamen | ||
3097 | <app> | ||
3098 | <lem wit="#C">legis</lem> | ||
3099 | <rdg wit="#Ω"> | ||
3100 | <lacunaEnd /> | ||
3101 | </rdg> | ||
3102 | </app>; ut succedatur decernitur; impedis et ais: | ||
3103 | <quote>habe meam rationem.</quote></p> | ||
3104 | \end{minted} | ||
3105 | % \iffalse | ||
3106 | %</example> | ||
3107 | % \fi | ||
3108 | % | ||
2767 | % \section{Alignment of Parallel Texts} | 3109 | % \section{Alignment of Parallel Texts} |
2768 | % \label{sec:alignment-basic} | 3110 | % \label{sec:alignment-basic} |
2769 | % As already said above,\footnote{See point | 3111 | % As already said above,\footnote{See point |
@@ -2846,17 +3188,17 @@ friend | |||
2846 | % \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in | 3188 | % \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in |
2847 | % \vref{sec:caesar-gw-tei}. The corresponding PDF output is available | 3189 | % \vref{sec:caesar-gw-tei}. The corresponding PDF output is available |
2848 | % in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On | 3190 | % in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On |
2849 | % the use of \cs{ekddiv} (ll.~3 and 20), see below | 3191 | % the use of \cs{ekddiv} (ll.~\lnref{ln:caes:div1} and |
2850 | % \vref{sec:ekddiv}.}--- | 3192 | % \lnref{ln:caes:div2}), see below \vref{sec:ekddiv}.}--- |
2851 | % | 3193 | % |
2852 | % \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}] | 3194 | % \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}] |
2853 | % \iffalse | 3195 | % \iffalse |
2854 | %<*example> | 3196 | %<*example> |
2855 | % \fi | 3197 | % \fi |
2856 | \begin{minted}{latex} | 3198 | \begin{minted}[escapeinside=++]{latex} |
2857 | \begin{alignment} | 3199 | \begin{alignment} |
2858 | \begin{edition} | 3200 | \begin{edition} |
2859 | \ekddiv{head=XIII, depth=2, n=6.13, type=section} | 3201 | \ekddiv{head=XIII, depth=2, n=6.13, type=section}+\label{ln:caes:div1}+ |
2860 | In omni Gallia eorum hominum qui \app{ | 3202 | In omni Gallia eorum hominum qui \app{ |
2861 | \lem[wit=a]{aliquo} | 3203 | \lem[wit=a]{aliquo} |
2862 | \rdg[wit=b, alt=in al-]{in aliquo}} | 3204 | \rdg[wit=b, alt=in al-]{in aliquo}} |
@@ -2864,7 +3206,7 @@ friend | |||
2864 | seruorum habetur loco, quae \app{ | 3206 | seruorum habetur loco, quae \app{ |
2865 | \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1}) | 3207 | \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1}) |
2866 | per se}]{nihil audet per se} | 3208 | per se}]{nihil audet per se} |
2867 | \rdg[wit=A1,nordg]{nihil aut et per se} | 3209 | \rdg[wit=A1,nordg]{nihil aut et per se}+\label{ln:caes:nordg}+ |
2868 | \rdg[wit={R,S,L,N}]{nihil habet per se} | 3210 | \rdg[wit={R,S,L,N}]{nihil habet per se} |
2869 | \rdg[wit=b]{per se nihil audet}}, \app{ | 3211 | \rdg[wit=b]{per se nihil audet}}, \app{ |
2870 | \lem[wit=a]{nullo} | 3212 | \lem[wit=a]{nullo} |
@@ -2873,7 +3215,7 @@ friend | |||
2873 | \rdg[wit={T, U}, alt=conc-]{concilio}}. | 3215 | \rdg[wit={T, U}, alt=conc-]{concilio}}. |
2874 | \end{edition} | 3216 | \end{edition} |
2875 | \begin{translation} | 3217 | \begin{translation} |
2876 | \ekddiv{head=XIII, depth=2, n=6.13, type=section} | 3218 | \ekddiv{head=XIII, depth=2, n=6.13, type=section}+\label{ln:caes:div2}+ |
2877 | Throughout all Gaul there are two orders of those men who are of | 3219 | Throughout all Gaul there are two orders of those men who are of |
2878 | any rank and dignity: for the commonality is held almost in the | 3220 | any rank and dignity: for the commonality is held almost in the |
2879 | condition of slaves, and dares to undertake nothing of itself, | 3221 | condition of slaves, and dares to undertake nothing of itself, |
@@ -3072,19 +3414,25 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3072 | % \underLine{semicolon}-separated list of previously defined | 3414 | % \underLine{semicolon}-separated list of previously defined |
3073 | % environments that shall receive at least one layer of apparatus | 3415 | % environments that shall receive at least one layer of apparatus |
3074 | % criticus.\\ | 3416 | % criticus.\\ |
3075 | % \DescribeOption{paired} |paired|$=$\verb+true|false+% | 3417 | % \DescribeOption{paired} |paired|$=$\verb+true|false+%^^A |
3418 | % \phts\label{ref:paired-opt}%^^A | ||
3076 | % \hfill\tcboxverb{Default: true (initially not set)}\\ | 3419 | % \hfill\tcboxverb{Default: true (initially not set)}\\ |
3077 | % This named argument does not need a value as it defaults to |true| | 3420 | % This named argument does not need a value as it defaults to |true| |
3078 | % if used. By default, \pkg{ekdosis} follows the \LaTeX{} page | 3421 | % if used. By default, \pkg{ekdosis} follows the \LaTeX{} page |
3079 | % numbering scheme when multiple texts are arranged on facing | 3422 | % numbering scheme when multiple texts are arranged on facing |
3080 | % pages. The |paired| option leaves every right-hand page number | 3423 | % pages. The |paired| option leaves every right-hand page number |
3081 | % unchanged, so that both facing pages hold the same page number.\\ | 3424 | % unchanged, so that both facing pages hold the same page |
3082 | % \DescribeOption{lineation} |lineation|$=$\verb+page|document+ | 3425 | % number.\footnote{For setting headers and footers in this arrangement |
3426 | % of text, but also for the current limitations attached to this | ||
3427 | % option, see \vpageref{sec:header-paired-pages}.}\\ | ||
3428 | % \DescribeOption{lineation} |lineation|$=$\verb+page|document|none+ | ||
3083 | % \hfill\tcboxverb{Default: document}\\ | 3429 | % \hfill\tcboxverb{Default: document}\\ |
3084 | % This option applies to edition texts initially set to receive an | 3430 | % This option applies to edition texts initially set to receive an |
3085 | % apparatus criticus. By default, lines are continuously numbered | 3431 | % apparatus criticus. By default, lines are continuously numbered |
3086 | % throughout the document. |lineation=page| sets the numbering to | 3432 | % throughout the document. |lineation=page| sets the numbering to |
3087 | % start afresh at the top of each page.\\ | 3433 | % start afresh at the top of each page. |none| does the same as |page| |
3434 | % but prevents the numbers from being printed in | ||
3435 | % the margins while keeping them in use in the apparatus criticus.\\ | ||
3088 | % \DescribeOption{flush} |flush|$=$\verb+true|false+ | 3436 | % \DescribeOption{flush} |flush|$=$\verb+true|false+ |
3089 | % \hfill\tcboxverb{Default: false}\\ | 3437 | % \hfill\tcboxverb{Default: false}\\ |
3090 | % This named argument does not need a value as it defaults to |true| | 3438 | % This named argument does not need a value as it defaults to |true| |
@@ -3165,7 +3513,9 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3165 | % further adjust languages, hyphenation rules, and/or fonts to be | 3513 | % further adjust languages, hyphenation rules, and/or fonts to be |
3166 | % applied in each environment. To return to the example provided | 3514 | % applied in each environment. To return to the example provided |
3167 | % above, once \cs{SetAlignment} has been used, the languages can be | 3515 | % above, once \cs{SetAlignment} has been used, the languages can be |
3168 | % set as follows:--- | 3516 | % set as follows:\footnote{The \cs{setmaxlines} command provides a |
3517 | % further example of applying this technique. See below | ||
3518 | % \vpageref{ref:setmaxlines-hook}.}--- | ||
3169 | % | 3519 | % |
3170 | % \iffalse | 3520 | % \iffalse |
3171 | %<*example> | 3521 | %<*example> |
@@ -3288,26 +3638,6 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3288 | % \cs{marginparthreshold}\allowbreak\marg{n}\oarg{n'}, that can be | 3638 | % \cs{marginparthreshold}\allowbreak\marg{n}\oarg{n'}, that can be |
3289 | % used to set the threshold for columns printed in right-hand pages. | 3639 | % used to set the threshold for columns printed in right-hand pages. |
3290 | % | 3640 | % |
3291 | % \subsubsection{Regular Footnotes} | ||
3292 | % \label{sec:regular-footnotes} | ||
3293 | % \DescribeMacro{\footnotelayout} By default, regular footnotes are | ||
3294 | % printed at the bottom of the column on which they are | ||
3295 | % called. \cs{footnotelayout}\marg{key-letter} can be used to change | ||
3296 | % this setting. This command accepts as mandatory argument a | ||
3297 | % key-letter which can be either |c|, |p| or |m|. |c| means | ||
3298 | % \emph{column-wise} footnotes, which is the default value. |p| means | ||
3299 | % \emph{page-wise}: footnotes from all columns are gathered in a | ||
3300 | % single spanning block at the bottom of the page. Finally, |m| stands | ||
3301 | % for \emph{merge}, which means that all footnotes that are called on | ||
3302 | % a given page, including notes that are called outside the | ||
3303 | % \env{alignment} environment, are printed in a single spanning block | ||
3304 | % at the bottom of the page. | ||
3305 | % | ||
3306 | % \danger Regular footnotes are printed above the block of critical | ||
3307 | % notes. The respective places of these blocks can be interchanged by | ||
3308 | % just loading the \pkg{fnpos} package in the | ||
3309 | % preamble.\footcite{fnpos} | ||
3310 | % | ||
3311 | % \section{Laying Out the Apparatus Criticus} | 3641 | % \section{Laying Out the Apparatus Criticus} |
3312 | % \label{sec:apparatus-layout} | 3642 | % \label{sec:apparatus-layout} |
3313 | % | 3643 | % |
@@ -3381,7 +3711,35 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3381 | % | 3711 | % |
3382 | % An example of the way these hooks may be used is provided below in | 3712 | % An example of the way these hooks may be used is provided below in |
3383 | % \vref{lst:shak-sonnet1}. | 3713 | % \vref{lst:shak-sonnet1}. |
3714 | % | ||
3715 | % \medskip\noindent\textbf{Limiting the Number of Entries per Page} | ||
3716 | % \phts\label{ref:glimit}\\ | ||
3717 | % \DescribeOption{maxentries} |maxentries|=\meta{n} (where | ||
3718 | % $n \geq 10$) \hfill\tcboxverb{Default: not set}\\ | ||
3719 | % \newfeature[v1.5] This option may be used to set a limit to the | ||
3720 | % number of entries per page that \emph{all layers of critical notes | ||
3721 | % taken together} may accept, notably when entries are so abundant in | ||
3722 | % number that \pkg{ekdosis} may oscillate indefinitely between | ||
3723 | % different sets of page decisions without being able to settle down. | ||
3724 | % \danger It is also possible to restrict this option to a given layer | ||
3725 | % of the apparatus criticus as described below | ||
3726 | % \vpageref{ref:maxentries}. If |maxentries| be set both globally in | ||
3727 | % \cs{SetHooks} and in \cs{DeclareApparatus} for specific layers, then | ||
3728 | % the page will break when \emph{any} of the values defined as | ||
3729 | % |maxentries| has been reached. | ||
3384 | % | 3730 | % |
3731 | % If |maxentries|$=$\meta{n} be set, then \pkg{ekdosis} will issue | ||
3732 | % \cs{pagebreak} (namely \cs{penalty}|-10000|) just after the | ||
3733 | % \emph{n\textsuperscript{th}} entry has been inserted in whichever | ||
3734 | % layer of the apparatus criticus. As a result, the page will actually | ||
3735 | % break at the end of the current line. The particulars of this | ||
3736 | % technique will be discussed below in | ||
3737 | % \vref{sec:oscillating-problem}.\\ | ||
3738 | % \DescribeOption{nomaxentries}\hfill\tcboxverb{Default: not set}\\ | ||
3739 | % |nomaxentries| does not accept any value and is equivalent to | ||
3740 | % |maxentries=none|. | ||
3741 | % | ||
3742 | % \medskip | ||
3385 | % \noindent\textbf{Option Specific to the |layout=keyfloat| Global | 3743 | % \noindent\textbf{Option Specific to the |layout=keyfloat| Global |
3386 | % Setting}\footnote{See above \vref{ref:keyfloat-opt}.}\\ | 3744 | % Setting}\footnote{See above \vref{ref:keyfloat-opt}.}\\ |
3387 | % \DescribeOption{keyparopts}% | 3745 | % \DescribeOption{keyparopts}% |
@@ -3394,7 +3752,9 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3394 | % \allowbreak|lw=1.2}| will draw a tight frame around the apparatus | 3752 | % \allowbreak|lw=1.2}| will draw a tight frame around the apparatus |
3395 | % block, have the words \enquote{made with \pkg{ekdosis}} printed | 3753 | % block, have the words \enquote{made with \pkg{ekdosis}} printed |
3396 | % below this block on the | 3754 | % below this block on the |
3397 | % right and set its width to |1.2\linewidth|.\\ | 3755 | % right and set its width to |1.2\linewidth|. |
3756 | % | ||
3757 | % \medskip\noindent | ||
3398 | % \textbf{Options Specific to the |layout=fitapp| Global | 3758 | % \textbf{Options Specific to the |layout=fitapp| Global |
3399 | % Setting}\footnote{See above \vref{ref:fitapp-opt}.}\\ | 3759 | % Setting}\footnote{See above \vref{ref:fitapp-opt}.}\\ |
3400 | % \DescribeOption{appheight}% | 3760 | % \DescribeOption{appheight}% |
@@ -3404,7 +3764,9 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3404 | % up to which the apparatus block is allowed to grow before the size | 3764 | % up to which the apparatus block is allowed to grow before the size |
3405 | % of the characters is reduced to allow for more entries. The value | 3765 | % of the characters is reduced to allow for more entries. The value |
3406 | % must be a dimension, namely a number followed by a length unit, such | 3766 | % must be a dimension, namely a number followed by a length unit, such |
3407 | % as |0.65\textheight|, |18cm| or |6in|.\\ | 3767 | % as |0.65\textheight|, |18cm| or |6in|. \mansee To learn how this |
3768 | % value can be adjusted on given pages, see below | ||
3769 | % \vpageref{ref:fitapp-trick}.\\ | ||
3408 | % \DescribeOption{fitalgorithm}% | 3770 | % \DescribeOption{fitalgorithm}% |
3409 | % \phts\label{ref:fitalgorithm} | 3771 | % \phts\label{ref:fitalgorithm} |
3410 | % \unskip|fitalgorithm|$=$\verb+fontsize|hybrid|areasize|squeeze+ | 3772 | % \unskip|fitalgorithm|$=$\verb+fontsize|hybrid|areasize|squeeze+ |
@@ -3684,7 +4046,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3684 | % \iffalse | 4046 | % \iffalse |
3685 | %<*example> | 4047 | %<*example> |
3686 | % \fi | 4048 | % \fi |
3687 | \begin{minted}[numbersep=6pt]{latex} | 4049 | \begin{minted}[numbersep=-.5\linewidth]{latex} |
3688 | \SetHooks{ | 4050 | \SetHooks{ |
3689 | refnumstyle=\normalfont, | 4051 | refnumstyle=\normalfont, |
3690 | initialrule=\rule{0.7in}{0.4pt} | 4052 | initialrule=\rule{0.7in}{0.4pt} |
@@ -3717,13 +4079,20 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
3717 | % | 4079 | % |
3718 | % \paragraph{Limiting the Number of Entries per Page} | 4080 | % \paragraph{Limiting the Number of Entries per Page} |
3719 | % \phts\label{ref:maxentries} | 4081 | % \phts\label{ref:maxentries} |
3720 | % In some instances, it can be useful to set a limit to the number of | 4082 | % In some instances, it may be useful to set a limit to the number of |
3721 | % entries per page that a given layer of critical notes may accept, | 4083 | % entries per page that a given layer of critical notes may accept, |
3722 | % notably when entries are so abundant in number that \pkg{ekdosis} | 4084 | % notably when entries are so abundant in number that \pkg{ekdosis} |
3723 | % may oscillate indefinitely between different sets of page decisions | 4085 | % may oscillate indefinitely between different sets of page decisions |
3724 | % without being able to settle down.\\ | 4086 | % without being able to settle down.\\ |
3725 | % \DescribeOption{maxentries} |maxentries|=\meta{n} (where $n \geq | 4087 | % \DescribeOption{maxentries} |maxentries|=\meta{n} (where $n \geq |
3726 | % 10$) \hfill\tcboxverb{Default: not set}\\ | 4088 | % 10$) \hfill\tcboxverb{Default: not set} |
4089 | % \danger It is also possible to set a maximum number of entries for | ||
4090 | % all layers of critical notes taken together as described above | ||
4091 | % \vpageref{ref:glimit}. If |maxentries| be set both globally in | ||
4092 | % \cs{SetHooks} and in \cs{DeclareApparatus} for specific layers, then | ||
4093 | % the page will break when \emph{any} of the values defined as | ||
4094 | % |maxentries| has been reached. | ||
4095 | % | ||
3727 | % If |maxentries|$=$\meta{n} be set, then \pkg{ekdosis} will issue | 4096 | % If |maxentries|$=$\meta{n} be set, then \pkg{ekdosis} will issue |
3728 | % \cs{pagebreak} (namely \cs{penalty}|-10000|) just after the | 4097 | % \cs{pagebreak} (namely \cs{penalty}|-10000|) just after the |
3729 | % \emph{n\textsuperscript{th}} entry has been inserted in the layer of | 4098 | % \emph{n\textsuperscript{th}} entry has been inserted in the layer of |
@@ -3848,6 +4217,10 @@ Some \app[type=rec2]{ | |||
3848 | % |type| is used to specify the name of the layer where the note is to | 4217 | % |type| is used to specify the name of the layer where the note is to |
3849 | % be printed.\footnote{See \vref{sec:declaring-layers} to learn how to | 4218 | % be printed.\footnote{See \vref{sec:declaring-layers} to learn how to |
3850 | % declare and lay out new layers of notes.}\\ | 4219 | % declare and lay out new layers of notes.}\\ |
4220 | % \DescribeOption{nodelim} |nodelim|$=$\verb+true|false+\\ | ||
4221 | % \newfeature[v1.5] This named argument does not need a value as it | ||
4222 | % defaults to |true| if used. This option removes the delimiter that | ||
4223 | % is printed just before the note in the apparatus criticus.\\ | ||
3851 | % \DescribeOption{sep} |sep|$=$\meta{command \textbar\ chars}\\ | 4224 | % \DescribeOption{sep} |sep|$=$\meta{command \textbar\ chars}\\ |
3852 | % The separator between the lemma text and the contents of the note.\\ | 4225 | % The separator between the lemma text and the contents of the note.\\ |
3853 | % \DescribeOption{nosep} |nosep|$=$\verb+true|false+\\ | 4226 | % \DescribeOption{nosep} |nosep|$=$\verb+true|false+\\ |
@@ -4039,6 +4412,282 @@ argument of the | |||
4039 | % element (ll.~5--7). Otherwise, the \texttt{TEI} output would not be | 4412 | % element (ll.~5--7). Otherwise, the \texttt{TEI} output would not be |
4040 | % valid. | 4413 | % valid. |
4041 | % | 4414 | % |
4415 | % \section{Footnotes} | ||
4416 | % \label{sec:footnotes} | ||
4417 | % | ||
4418 | % \subsection{Regular Footnotes} | ||
4419 | % \label{sec:regular-footnotes} | ||
4420 | % | ||
4421 | % Regular footnotes are inserted by the standard \cs{footnote} | ||
4422 | % command. When the texts are arranged in parallel columns or on | ||
4423 | % facing pages as described in \vref{sec:alignment-basic}, further | ||
4424 | % options are available to specify how the notes should be printed on | ||
4425 | % the pages. | ||
4426 | % | ||
4427 | % \danger Regular footnotes are printed above the block of critical | ||
4428 | % notes. The respective places of these blocks can be interchanged by | ||
4429 | % just loading the \pkg{fnpos} package in the | ||
4430 | % preamble.\footcite{fnpos} | ||
4431 | % | ||
4432 | % \danger \phts\label{ref:footmisc} The \pkg{footmisc} | ||
4433 | % package\footcite{footmisc} is not compatible with | ||
4434 | % \pkg{ekdosis}. More precisely, \pkg{footmisc} defines a command | ||
4435 | % \cs{footnotelayout} that is also defined by the \pkg{paracol} | ||
4436 | % package, which \pkg{ekdosis} uses. A simple way around this problem | ||
4437 | % would be to replace \cs{footnotelayout} in a patched | ||
4438 | % |footmisc-patched.sty| with another name. | ||
4439 | % | ||
4440 | % \DescribeMacro{\SetFootnotes} \newfeature[v1.5] | ||
4441 | % \cs{SetFootnotes}\marg{csv list of footnote settings} can be used | ||
4442 | % either in the preamble or at any point of the document. However, the | ||
4443 | % options for regular footnotes must be set outside the | ||
4444 | % \env{alignment} environment. This command accepts the following list | ||
4445 | % of |key-value| optional | ||
4446 | % arguments:---\\ | ||
4447 | % \DescribeOption{arrangement} | ||
4448 | % \phts\label{ref:setfootnotes-arrangement} | ||
4449 | % |arrangement|$=$\verb+column|page|merge+ | ||
4450 | % \hfill\tcboxverb{Default: not set} | ||
4451 | % \begin{enumerate} | ||
4452 | % \item |arrangement=column| has regular footnotes printed at the | ||
4453 | % bottom of the column in which they are called. | ||
4454 | % \item |arrangement=page| brings all footnotes together from all | ||
4455 | % columns in a single spanning block at the bottom of all columns on | ||
4456 | % the page. | ||
4457 | % \item |arrangement=merge| \emph{merge} means that all footnotes that | ||
4458 | % are called on a given page, including notes that are called | ||
4459 | % outside the \env{alignment} environment, are printed in a single | ||
4460 | % spanning block at the bottom of the page. | ||
4461 | % \end{enumerate} | ||
4462 | % \DescribeOption{reset} (no-value argument)\\ | ||
4463 | % If used, this option reverts the footnotes to the default | ||
4464 | % arrangement which is to have them printed as regular footnotes at | ||
4465 | % the bottom of each column of text. |reset| also reverts footnotes | ||
4466 | % combined into a single paragraph\===as described below\===to regular | ||
4467 | % footnotes. | ||
4468 | % | ||
4469 | % \subsection{Footnotes Combined Into a Single Paragraph} | ||
4470 | % \label{sec:footn-comb-into} | ||
4471 | % | ||
4472 | % As already said \vpageref[above]{ref:footmisc}, the \pkg{footmisc} | ||
4473 | % package is not compatible with \pkg{ekdosis}. Therefore, it cannot | ||
4474 | % be used to reformat short footnotes so as to combine them all into a | ||
4475 | % single paragraph. This is why \pkg{ekdosis} provides a mechanism of | ||
4476 | % its own to insert such footnotes in a specific layer of the | ||
4477 | % apparatus criticus. | ||
4478 | % | ||
4479 | % \danger Unlike the three possible values that can be passed to | ||
4480 | % |arrangement| just described, which apply only to regular footnotes | ||
4481 | % inserted in the \env{alignment} environment, the following options | ||
4482 | % apply to both the \env{alignment} and \env{ekdosis} environments and | ||
4483 | % can be set at any point of the document. | ||
4484 | % \danger It is however not recommended to use \cs{SetFoonotes} in | ||
4485 | % environments to be transcribed into \texttt{TEI xml}. The way to | ||
4486 | % restrict the effect of this command to one of the defined | ||
4487 | % environments is to use \cs{AtBeginEnvironment} as described in | ||
4488 | % \vref{sec:alignment-hooks}. | ||
4489 | % | ||
4490 | % \noindent | ||
4491 | % \DescribeMacro{\SetFootnotes} (\emph{Continued from above.})\\ | ||
4492 | % \DescribeOption{paragraph}\verb+paragraph=true|false+ | ||
4493 | % \hfill\tcboxverb{Default: true, initially false}\\ | ||
4494 | % This named argument does not need a value as it defaults to |true| | ||
4495 | % if used. |paragraph| instructs \pkg{ekdosis} to reformat the notes | ||
4496 | % into a single paragraph, itself inserted as a layer in the apparatus | ||
4497 | % block. (See \textoiquote|type|\textciquote\ below.)\\ | ||
4498 | % \DescribeOption{type}|type|$=$\meta{type} | ||
4499 | % \hfill\tcboxverb{Initially set as 'default'}\\ | ||
4500 | % The keyword |type| is used here in the exact same meaning as | ||
4501 | % described above \vpageref{ref:app-type}. | ||
4502 | % \textoiquote|type|\textciquote\ refers to | ||
4503 | % any layer of critical notes defined by means of | ||
4504 | % \cs{DeclareApparatus}\footnote{See above | ||
4505 | % \vref{sec:declaring-layers}.} as fit to receive the footnotes shaped | ||
4506 | % as a single paragraph.\\ | ||
4507 | % \DescribeOption{textfnmark}|textfnmark|$=$\marg{code} | ||
4508 | % \hfill\tcboxverb{Default: \textsuperscript{#1}}\\ | ||
4509 | % |textfnmark| takes as value the code used to format the footnote | ||
4510 | % mark that is inserted in the main text. |#1| is the placeholder for | ||
4511 | % the figure that refers to the footnote. For instance, | ||
4512 | % |textfnmark=\textsuperscript{#1}| prints the footnote mark | ||
4513 | % superscripted.\\ | ||
4514 | % \DescribeOption{appfnmark}|appfmark|$=$\marg{code} | ||
4515 | % \hfill\tcboxverb{Default: \textsuperscript{#1}}\\ | ||
4516 | % |appfnmark| operates on the mark that is inserted in the footnote | ||
4517 | % block the same way as |textfnmark| does on the footnote mark in the | ||
4518 | % main text. As an example, |appfnmark=\hskip 1em\textsuperscript{#1}| | ||
4519 | % first inserts a generous spacing between the items then prints the | ||
4520 | % mark superscripted. | ||
4521 | % | ||
4522 | % \DescribeMacro{\footnote} \cs{footnote}\oarg{options}\marg{text} | ||
4523 | % When the mechanism described in this section is set in motion, the | ||
4524 | % \cs{footnote} command is redefined so as to accept the following | ||
4525 | % list of optional arguments:---\\ | ||
4526 | % \DescribeOption{type}|type|$=$\meta{type} | ||
4527 | % \hfill\tcboxverb{Default: as defined in \SetFoonotes}\\ | ||
4528 | % |type| allows to specify any layer of critical notes in which the | ||
4529 | % contents of the footnote is to be printed.\\ | ||
4530 | % \DescribeOption{mark}|mark|=\meta{mark} | ||
4531 | % \hfill\tcboxverb{Default: \thefootnote}\\ | ||
4532 | % |mark| allows to print any other mark in place of the standard | ||
4533 | % footnote number. When this option is used, the |footnote| counter is | ||
4534 | % not incremented. | ||
4535 | % | ||
4536 | % \DescribeMacro{\footnotemark}\DescribeMacro{\footnotetext} | ||
4537 | % \cs{footnotemark}\oarg{mark} and | ||
4538 | % \cs{footnotetext}\oarg{options}\marg{text} are the companions of | ||
4539 | % \cs{footnote}. The former replaces the definition of and behaves as | ||
4540 | % its standard counterpart while the latter does the same as the | ||
4541 | % \cs{footnote} command described above and accepts the same optional | ||
4542 | % arguments except that it does not print any mark in the main text. | ||
4543 | % | ||
4544 | % \danger It is however not advisable to use \cs{footnotemark} and | ||
4545 | % \cs{footnotetext} for these commands are not suitable for | ||
4546 | % \texttt{TEI xml} export. | ||
4547 | % | ||
4548 | % The following example illustrates how short footnotes can be | ||
4549 | % combined into one single layer of critical notes:--- | ||
4550 | % | ||
4551 | % \iffalse | ||
4552 | %<*example> | ||
4553 | % \fi | ||
4554 | \begin{minted}[linenos=false]{latex} | ||
4555 | % Preamble: | ||
4556 | \DeclareApparatus{default} | ||
4557 | \DeclareApparatus{notes}[bhook=\textbf{Notes:}] | ||
4558 | \SetFootnotes{ | ||
4559 | paragraph, | ||
4560 | type = notes, | ||
4561 | textfnmark = \textsuperscript{#1}, | ||
4562 | appfnmark = \unskip\hskip 1em\textsuperscript{#1} | ||
4563 | } | ||
4564 | |||
4565 | % Document: | ||
4566 | \begin{ekdosis} | ||
4567 | (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And now | ||
4568 | for our next trick,\footnote{First footnote.} let's consider an | ||
4569 | application to short footnotes.\footnote{Second footnote. (Every | ||
4570 | once in a while, a long footnote might occur, just to make things | ||
4571 | difficult.)} The footnotes\footnote{Third footnote.} at the bottom | ||
4572 | of this page \app{\lem{look}\rdg{should look}} | ||
4573 | funny,\footnote{Fourth footnote.} because most of | ||
4574 | them\footnote[mark=*, type=default]{This note \emph{doesn't count}, | ||
4575 | literally. And for some reason, I decided it should sneak into the | ||
4576 | default layer of critical notes.} are quite short.\footnote{Fifth | ||
4577 | footnote. (This is incredibly boring, but it's just an example.)} | ||
4578 | When a document has lots of footnotes,\footnote{Another.} and when | ||
4579 | most of them\footnote{And another.} take only a small part of a | ||
4580 | line,\footnote{Ho hum.} the output routine\footnote{Umpteenth | ||
4581 | footnote.} ought to reformat them in some more appropriate | ||
4582 | way.\footnote{Oodles of them.} | ||
4583 | \end{ekdosis} | ||
4584 | \end{minted} | ||
4585 | % \iffalse | ||
4586 | %</example> | ||
4587 | % \fi | ||
4588 | % | ||
4589 | % \needspace{7\baselineskip} | ||
4590 | % PDF output:--- | ||
4591 | % \medskip | ||
4592 | % \SetFootnotes{ | ||
4593 | % paragraph, | ||
4594 | % type = notes, | ||
4595 | % textfnmark = \textsuperscript{#1}, | ||
4596 | % appfnmark = \unskip\hskip 1em\textsuperscript{#1} | ||
4597 | % } | ||
4598 | % \resetlinenumber | ||
4599 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] | ||
4600 | % \setcounter{footnote}{0} | ||
4601 | % \begin{specimen} | ||
4602 | % (From \cite[\enquote{Dirty Tricks}, \pno~395]{KnuthTeXBook}) And | ||
4603 | % now for our next trick,\footnote{First footnote.} let's consider | ||
4604 | % an application to short footnotes.\footnote{Second | ||
4605 | % footnote. (Every once in a while, a long footnote might occur, | ||
4606 | % just to make things difficult.)} The footnotes\footnote{Third | ||
4607 | % footnote.} at the bottom of this page \app{\lem{look}\rdg{should | ||
4608 | % look}} funny,\footnote{Fourth footnote.} because most of | ||
4609 | % them\footnote[mark=*, type=default]{This note \emph{doesn't | ||
4610 | % count}, literally. And for some reason, I decided it should | ||
4611 | % sneak into the default layer of critical notes.} are quite | ||
4612 | % short.\footnote{Fifth footnote. (This is incredibly boring, but | ||
4613 | % it's just an example.)} When a document has lots of | ||
4614 | % footnotes,\footnote{Another.} and when most of them\footnote{And | ||
4615 | % another.} take only a small part of a line,\footnote{Ho hum.} | ||
4616 | % the output routine\footnote{Umpteenth footnote.} ought to | ||
4617 | % reformat them in some more appropriate way.\footnote{Oodles of | ||
4618 | % them.} | ||
4619 | % \end{specimen} | ||
4620 | % \end{alignment} | ||
4621 | % \SetFootnotes{arrangement=merge} | ||
4622 | % | ||
4623 | % \texttt{TEI xml} output:--- | ||
4624 | % | ||
4625 | % \iffalse | ||
4626 | %<*example> | ||
4627 | % \fi | ||
4628 | \begin{minted}[linenos=false]{xml} | ||
4629 | <p>(From | ||
4630 | <bibl corresp="#KnuthTeXBook"> | ||
4631 | <biblScope> | ||
4632 | <quote>Dirty Tricks</quote>, p. 395</biblScope> | ||
4633 | </bibl>) And now for our next trick, | ||
4634 | <note place="bottom">First footnote.</note>let's consider | ||
4635 | an application to short footnotes. | ||
4636 | <note place="bottom">Second footnote. (Every once in a | ||
4637 | while, a long footnote might occur, just to make things | ||
4638 | difficult.)</note>The footnotes | ||
4639 | <note place="bottom">Third footnote.</note>at the bottom of | ||
4640 | this page | ||
4641 | <app> | ||
4642 | <lem>look</lem> | ||
4643 | <rdg>should look</rdg> | ||
4644 | </app>funny, | ||
4645 | <note place="bottom">Fourth footnote.</note>because most of | ||
4646 | them | ||
4647 | <note type="default" place="bottom">This note | ||
4648 | <emph>doesn't count</emph>, literally. And for some reason, | ||
4649 | I decided it should sneak into the default layer of | ||
4650 | critical notes.</note>are quite short. | ||
4651 | <note place="bottom">Fifth footnote. (This is incredibly | ||
4652 | boring, but it's just an example.)</note>When a document | ||
4653 | has lots of footnotes, | ||
4654 | <note place="bottom">Another.</note>and when most of them | ||
4655 | <note place="bottom">And another.</note>take only a small | ||
4656 | part of a line, | ||
4657 | <note place="bottom">Ho hum.</note>the output routine | ||
4658 | <note place="bottom">Umpteenth footnote.</note>ought to | ||
4659 | reformat them in some more appropriate way. | ||
4660 | <note place="bottom">Oodles of them.</note></p> | ||
4661 | \end{minted} | ||
4662 | % \iffalse | ||
4663 | %</example> | ||
4664 | % \fi | ||
4665 | % | ||
4666 | % \mansee Obviously, the mechanism just described only operates on | ||
4667 | % texts equipped with an apparatus criticus. A way to have footnotes | ||
4668 | % shaped as a single paragraph attached to a text that includes no | ||
4669 | % variants, such as a translation arranged on the facing page, is | ||
4670 | % therefore to format this translation environment as if it were to | ||
4671 | % receive an apparatus criticus, then remove the line numbering from | ||
4672 | % it, like so:--- | ||
4673 | % | ||
4674 | % \iffalse | ||
4675 | %<*example> | ||
4676 | % \fi | ||
4677 | \begin{minted}[linenos=false]{latex} | ||
4678 | % Preamble: | ||
4679 | \SetAlignment{ | ||
4680 | texts=edition;translation, | ||
4681 | apparatus=edition;translation | ||
4682 | } | ||
4683 | \AtBeginEnvironment{translation}{ | ||
4684 | \SetLineation{lineation=none} | ||
4685 | } | ||
4686 | \end{minted} | ||
4687 | % \iffalse | ||
4688 | %</example> | ||
4689 | % \fi | ||
4690 | % | ||
4042 | % \needspace{4\baselineskip} | 4691 | % \needspace{4\baselineskip} |
4043 | % \section{Poetry} | 4692 | % \section{Poetry} |
4044 | % \label{sec:poetry} | 4693 | % \label{sec:poetry} |
@@ -4442,7 +5091,8 @@ argument of the | |||
4442 | refnumstyle=\normalfont, | 5091 | refnumstyle=\normalfont, |
4443 | postrefnum=.~, | 5092 | postrefnum=.~, |
4444 | lemmastyle=\bfseries, | 5093 | lemmastyle=\bfseries, |
4445 | readingstyle=\itshape | 5094 | readingstyle=\itshape, |
5095 | familysep={, } | ||
4446 | } | 5096 | } |
4447 | % The lines are to be centered horizontally: | 5097 | % The lines are to be centered horizontally: |
4448 | \settowidth{\versewidth}{Feed'st thy lights flame with selfe | 5098 | \settowidth{\versewidth}{Feed'st thy lights flame with selfe |
@@ -4556,6 +5206,7 @@ substantiall fewell,} | |||
4556 | % \fi | 5206 | % \fi |
4557 | % \end{remarks} | 5207 | % \end{remarks} |
4558 | % | 5208 | % |
5209 | % \needspace{14\baselineskip} | ||
4559 | % PDF output:--- | 5210 | % PDF output:--- |
4560 | % \medskip | 5211 | % \medskip |
4561 | % | 5212 | % |
@@ -4565,13 +5216,13 @@ substantiall fewell,} | |||
4565 | % refnumstyle=\normalfont, | 5216 | % refnumstyle=\normalfont, |
4566 | % postrefnum=.~, | 5217 | % postrefnum=.~, |
4567 | % lemmastyle=\bfseries, | 5218 | % lemmastyle=\bfseries, |
4568 | % readingstyle=\itshape | 5219 | % readingstyle=\itshape, |
5220 | % familysep={, } | ||
4569 | % } | 5221 | % } |
4570 | % \renewcommand\thelinenumber{} | 5222 | % \renewcommand\thelinenumber{} |
4571 | % \settowidth{\versewidth}{Feed'st thy lights flame with selfe | 5223 | % \settowidth{\versewidth}{Feed'st thy lights flame with selfe |
4572 | % substantiall fewell,} | 5224 | % substantiall fewell,} |
4573 | % \FormatDiv{1}{\begin{ekdcenter}}{\end{ekdcenter}} | 5225 | % \FormatDiv{1}{\begin{ekdcenter}}{\end{ekdcenter}} |
4574 | % \needspace{7\baselineskip} | ||
4575 | % \resetlinenumber\resetvlinenumber | 5226 | % \resetlinenumber\resetvlinenumber |
4576 | % \begin{alignment}[flush, | 5227 | % \begin{alignment}[flush, |
4577 | % tcols=1, | 5228 | % tcols=1, |
@@ -4648,6 +5299,7 @@ substantiall fewell,} | |||
4648 | % \end{ekdverse} | 5299 | % \end{ekdverse} |
4649 | % \end{shakespeare} | 5300 | % \end{shakespeare} |
4650 | % \end{alignment} | 5301 | % \end{alignment} |
5302 | % \SetHooks{familysep=reset} | ||
4651 | % \endgroup | 5303 | % \endgroup |
4652 | % | 5304 | % |
4653 | % \texttt{TEI xml} output:--- | 5305 | % \texttt{TEI xml} output:--- |
@@ -4734,6 +5386,203 @@ substantiall fewell,} | |||
4734 | % \iffalse | 5386 | % \iffalse |
4735 | %</example> | 5387 | %</example> |
4736 | % \fi | 5388 | % \fi |
5389 | % | ||
5390 | % \subsection{Arabic Poetry} | ||
5391 | % \label{sec:arabic-poetry} | ||
5392 | % \newfeature[1.5] A short introduction to editing Arabic texts with | ||
5393 | % \pkg{ekdosis} and \pkg{arabluatex} is provided below, | ||
5394 | % \vnref{sec:using-arabluatex}. With regard to the technique of | ||
5395 | % typesetting Arabic poetry, the reader is invited to refer to the | ||
5396 | % relevant section of the documentation of | ||
5397 | % \pkg{arabluatex}.\footcite[\nopp see \enquote{Arabic | ||
5398 | % Poetry}]{arabluatex} | ||
5399 | % | ||
5400 | % \danger \pkg{ekdosis} \emph{must be loaded} with the |poetry=verse| | ||
5401 | % option as described \vpageref{ref:poetry-opt}. Then, the |arabverse| | ||
5402 | % environment is to be used instead of |ekdverse| to typeset the lines | ||
5403 | % of Arabic poetry. | ||
5404 | % | ||
5405 | % \DescribeMacro{\bayt+} | ||
5406 | % As of v1.21 of \pkg{arabluatex}, the | ||
5407 | % \cs{bayt}\marg{\arb[trans]{.sadr}}\oarg{\arb[trans]{tadwIr}}%^^A | ||
5408 | % \marg{\arb[trans]{`a^guz}} | ||
5409 | % command it provides accepts a |+| optional argument that is to be | ||
5410 | % used to let critical notes be inserted in lines of poetry, like | ||
5411 | % so:--- | ||
5412 | % | ||
5413 | % \iffalse | ||
5414 | %<*example> | ||
5415 | % \fi | ||
5416 | \begin{minted}[linenos=false]{latex} | ||
5417 | % Preamble: | ||
5418 | \usepackage[poetry=verse]{ekdosis} | ||
5419 | |||
5420 | % Document: | ||
5421 | \begin{ekdosis} | ||
5422 | \begin{arabverse}[<options>] | ||
5423 | \bayt{<ṣadr>}[<tadwīr>]{<ʿaǧuz>}\\ % no critical notes | ||
5424 | [...] | ||
5425 | \bayt+{\app{ % example of \bayt+ with critical notes | ||
5426 | \lem{Sample} | ||
5427 | \rdg{Example} | ||
5428 | } Arabic text}{Sample Arabic text}\\ | ||
5429 | [...] | ||
5430 | \bayt{<ṣadr>}[<tadwīr>]{<ʿaǧuz>}\\! % last line (no critical notes) | ||
5431 | \end{arabverse} | ||
5432 | \end{ekdosis} | ||
5433 | \end{minted} | ||
5434 | % \iffalse | ||
5435 | %</example> | ||
5436 | % \fi | ||
5437 | % | ||
5438 | % An example of how one could insert variant readings in \prname{imru' | ||
5439 | % al-qays}' \arb[trans]{\uc{mu`allaqaT}} (ll.~26--30) follows:--- | ||
5440 | % | ||
5441 | % \captof{Poetry: \prname{imru' al-qays}' | ||
5442 | % \arb[trans]{\uc{m}u`allaqaT}}[\label{lst:al-qays-muallaqah}] | ||
5443 | % \iffalse | ||
5444 | %<*example> | ||
5445 | % \fi | ||
5446 | \begin{minted}[escapeinside=||]{latex} | ||
5447 | \begin{alignment}[tcols=1, | ||
5448 | texts=specimen, | ||
5449 | apparatus=specimen] | ||
5450 | \resetlinenumber\resetvlinenumber[26] | ||
5451 | \begin{specimen} | ||
5452 | \begin{arabverse}[mode=fullvoc, width=0.25\columnwidth] | ||
5453 | \bayt+{\app{|\label{ln:arb:poetry:plusone}| | ||
5454 | \lem{ta^gAwaztu 'a.hrAsaN} | ||
5455 | \rdg{ta_ha.t.taytu 'abwAbaN} | ||
5456 | \rdg[subsep={:~}]{ta_ha.t.taytu 'ahwAlaN} | ||
5457 | } 'ilay-hA wa-ma`^saraN}{`alayya | ||
5458 | .hirA.saN law \app{ | ||
5459 | \lem[nonum]{yusirrUna}|\label{ln:arb:poetry:nonum}| | ||
5460 | \rdg{yu^sirrUna} | ||
5461 | } maqtalI}\\|\label{ln:arb:poetry:plusone:e}| | ||
5462 | \bayt{'i_dA mA 'l-_turayyA fI 'l-samA'i ta`arra.dat}{ta`arru.da | ||
5463 | 'a_tnA'i 'l-wi^sA.hi 'l-mufa.s.sali}\\ | ||
5464 | \bayt{fa-^gi'tu wa-qad na.d.dat li-nawmiN _tayAna-hA}{lad_A | ||
5465 | 'l-sitri 'illA libsaTa 'l-mutafa.d.dili}\\ | ||
5466 | \bayt{fa-qAlat yamInau 'l-l_ahi mA la-ka .hIlaTuN}{wa-mA 'in | ||
5467 | 'ar_A `an-ka 'l-.gawAyaTa tan^galI}\\ | ||
5468 | \bayt+{_hara^gtu bi-hA \app{|\label{ln:arb:poetry:plustwo}| | ||
5469 | \lem{tam^sI} | ||
5470 | \rdg{'am^sI} | ||
5471 | } ta^gurru wa-rA'a-nA}{`al_A 'a_trinA | ||
5472 | 'a_dyAla mir.tiN mura.h.hali}\\! | ||
5473 | \end{arabverse} | ||
5474 | \end{specimen} | ||
5475 | \end{alignment} | ||
5476 | \end{minted} | ||
5477 | % \iffalse | ||
5478 | %</example> | ||
5479 | % \fi | ||
5480 | % | ||
5481 | % \begin{remarks} | ||
5482 | % \item[\textsc{Rem.}] |\bayt+| has been applied twice, at | ||
5483 | % lines~\lnref{ln:arb:poetry:plusone} | ||
5484 | % and~\lnref{ln:arb:poetry:plustwo}. In the first instance | ||
5485 | % (ll.~\lnref{ln:arb:poetry:plusone}--\lnref{ln:arb:poetry:plusone:e}), | ||
5486 | % variant readings have been inserted in both hemistichs. As the | ||
5487 | % hemistichs are technically enclosed in separate \TeX\ groups, | ||
5488 | % \pkg{ekdosis} naturally recalls in the apparatus criticus the line | ||
5489 | % number corresponding to the first entry of each one of the two | ||
5490 | % groups. An easy way to get around this is to apply the |nonum| | ||
5491 | % optional argument to the first \cs{lem} command used in the second | ||
5492 | % hemistich, as has been done here on | ||
5493 | % line~\lnref{ln:arb:poetry:nonum}. | ||
5494 | % \end{remarks} | ||
5495 | % | ||
5496 | % PDF output:--- | ||
5497 | % \medskip | ||
5498 | % | ||
5499 | % \begingroup | ||
5500 | % \SetHooks{refnumstyle=\bfseries} | ||
5501 | % \begin{alignment}[flush, tcols=1, texts=specimen, | ||
5502 | % apparatus=specimen] | ||
5503 | % \resetlinenumber\resetvlinenumber[26] | ||
5504 | % \setlength{\vrightskip}{-0.75in} | ||
5505 | % \begin{specimen} | ||
5506 | % \begin{arabverse}[mode=fullvoc, width=0.25\columnwidth] | ||
5507 | % \bayt+{\app[type=rtl]{ | ||
5508 | % \lem{ta^gAwaztu 'a.hrAsaN} | ||
5509 | % \rdg{ta_ha.t.taytu 'abwAbaN} | ||
5510 | % \rdg[subsep={:~}]{ta_ha.t.taytu 'ahwAlaN} | ||
5511 | % } 'ilay-hA wa-ma`^saraN}{`alayya | ||
5512 | % .hirA.saN law \app[type=rtl]{ | ||
5513 | % \lem[nonum]{yusirrUna} | ||
5514 | % \rdg{yu^sirrUna} | ||
5515 | % } maqtalI}\\ | ||
5516 | % \bayt{'i_dA mA 'l-_turayyA fI 'l-samA'i ta`arra.dat}{ta`arru.da | ||
5517 | % 'a_tnA'i 'l-wi^sA.hi 'l-mufa.s.sali}\\ | ||
5518 | % \bayt{fa-^gi'tu wa-qad na.d.dat li-nawmiN _tayAna-hA}{lad_A | ||
5519 | % 'l-sitri 'illA libsaTa 'l-mutafa.d.dili}\\ | ||
5520 | % \bayt{fa-qAlat yamInau 'l-l_ahi mA la-ka .hIlaTuN}{wa-mA 'in | ||
5521 | % 'ar_A `an-ka 'l-.gawAyaTa tan^galI}\\ | ||
5522 | % \bayt+{_hara^gtu bi-hA \app[type=rtl]{ | ||
5523 | % \lem{tam^sI} | ||
5524 | % \rdg{'am^sI} | ||
5525 | % } ta^gurru wa-rA'a-nA}{`al_A 'a_trinA | ||
5526 | % 'a_dyAla mir.tiN mura.h.hali}\\! | ||
5527 | % \end{arabverse} | ||
5528 | % \end{specimen} | ||
5529 | % \end{alignment} | ||
5530 | % \endgroup | ||
5531 | % | ||
5532 | % \texttt{TEI xml} output:--- | ||
5533 | % \medskip | ||
5534 | % | ||
5535 | % \iffalse | ||
5536 | %<*example> | ||
5537 | % \fi | ||
5538 | \begin{minted}[linenos=false]{xml} | ||
5539 | <lg xml:lang="ar-Latn" type="transliterated" | ||
5540 | subtype="arabtex"> | ||
5541 | <l> | ||
5542 | <seg type="hemistich"> | ||
5543 | <app> | ||
5544 | <lem>ta^gAwaztu 'a.hrAsaN</lem> | ||
5545 | <rdg>ta_ha.t.taytu 'abwAbaN</rdg> | ||
5546 | <rdg>ta_ha.t.taytu 'ahwAlaN</rdg> | ||
5547 | </app>'ilay-hA wa-ma`^saraN</seg> | ||
5548 | <seg type="hemistich">`alayya .hirA.saN law | ||
5549 | <app> | ||
5550 | <lem>yusirrUna</lem> | ||
5551 | <rdg>yu^sirrUna</rdg> | ||
5552 | </app>maqtalI</seg> | ||
5553 | </l> | ||
5554 | <l> | ||
5555 | <seg type="hemistich">'i_dA mA 'l-_turayyA fI 'l-samA'i | ||
5556 | ta`arra.dat</seg> | ||
5557 | <seg type="hemistich">ta`arru.da 'a_tnA'i 'l-wi^sA.hi | ||
5558 | 'l-mufa.s.sali</seg> | ||
5559 | </l> | ||
5560 | <l> | ||
5561 | <seg type="hemistich">fa-^gi'tu wa-qad na.d.dat | ||
5562 | li-nawmiN _tayAna-hA</seg> | ||
5563 | <seg type="hemistich">lad_A 'l-sitri 'illA libsaTa | ||
5564 | 'l-mutafa.d.dili</seg> | ||
5565 | </l> | ||
5566 | <l> | ||
5567 | <seg type="hemistich">fa-qAlat yamInau 'l-l_ahi mA | ||
5568 | la-ka .hIlaTuN</seg> | ||
5569 | <seg type="hemistich">wa-mA 'in 'ar_A `an-ka | ||
5570 | 'l-.gawAyaTa tan^galI</seg> | ||
5571 | </l> | ||
5572 | <l> | ||
5573 | <seg type="hemistich">_hara^gtu bi-hA | ||
5574 | <app> | ||
5575 | <lem>tam^sI</lem> | ||
5576 | <rdg>'am^sI</rdg> | ||
5577 | </app>ta^gurru wa-rA'a-nA</seg> | ||
5578 | <seg type="hemistich">`al_A 'a_trinA 'a_dyAla mir.tiN | ||
5579 | mura.h.hali</seg> | ||
5580 | </l> | ||
5581 | </lg> | ||
5582 | \end{minted} | ||
5583 | % \iffalse | ||
5584 | %</example> | ||
5585 | % \fi | ||
4737 | % | 5586 | % |
4738 | % \section{Lineation Settings} | 5587 | % \section{Lineation Settings} |
4739 | % \label{sec:lineation} | 5588 | % \label{sec:lineation} |
@@ -4787,9 +5636,59 @@ substantiall fewell,} | |||
4787 | % \cs{SetLineation}|{numb|\allowbreak|ers=outer}| and | 5636 | % \cs{SetLineation}|{numb|\allowbreak|ers=outer}| and |
4788 | % \cs{SetLineation}|{numbers=inner}| respectively. Both commands are | 5637 | % \cs{SetLineation}|{numbers=inner}| respectively. Both commands are |
4789 | % complementary to \cs{rightlinenumbers} and \cs{leftlinenumbers} | 5638 | % complementary to \cs{rightlinenumbers} and \cs{leftlinenumbers} |
4790 | % already provided by the \pkg{lineno} package.\\ | 5639 | % already provided by the \pkg{lineno} package. |
4791 | % \textbf{Options Specific to the |poetry=verse| Global | 5640 | % |
4792 | % Setting}\footnote{See above | 5641 | % \medskip\noindent\textbf{Limiting the Number of Lines per Page} |
5642 | % \phts\label{ref:gmaxlines}\\ | ||
5643 | % \DescribeOption{maxlines} |maxlines|$=$\emph{n} (where \emph{n} is | ||
5644 | % an integer $\geq 1$)\newfeature[v1.5] | ||
5645 | % \hfill\tcboxverb{Default: not set}\\ | ||
5646 | % |maxlines|$=$\emph{n} instructs \pkg{ekdosis} to break the pages of | ||
5647 | % numbered text every \emph{n} lines. This option is very useful for | ||
5648 | % building editions equipped with long and complex apparatus | ||
5649 | % criticus. The rationale is to start with a number of lines that will | ||
5650 | % allow all pages to pass just after a few runs of \LuaLaTeX, even at | ||
5651 | % the cost of showing blanks between the edition text and the | ||
5652 | % apparatus criticus. Adjusting further the number of lines will then | ||
5653 | % leave fewer blanks on display. Combined with the |fitapp| global | ||
5654 | % option\footnote{See above \vpageref{ref:fitapp-opt}.} or with | ||
5655 | % |maxentries|,\footnote{See above \vpageref{ref:maxentries}.} | ||
5656 | % |maxlines| can achieve excellent results. For more details on this | ||
5657 | % technique, see below \ref{sec:oscillating-problem}, | ||
5658 | % \enquote{\nameref{sec:oscillating-problem}} | ||
5659 | % \vpageref{ref:maxlines-trick}.\\ | ||
5660 | % \DescribeOption{nomaxlines} \newfeature[v1.5] | ||
5661 | % \hfill\tcboxverb{Default: not set}\\ | ||
5662 | % This no-value option unsets any limit previously set by |maxlines| | ||
5663 | % or \cs{setmaxlines}\\ | ||
5664 | % \DescribeMacro{\setmaxlines} \cs{setmaxlines}\marg{n} (where | ||
5665 | % \meta{n} $\geq 1$) has the same effect as the |maxlines| option just | ||
5666 | % described. This command can be used either in the preamble or at any | ||
5667 | % point of the document. \mansee \phts\label{ref:setmaxlines-hook} The | ||
5668 | % |maxlines| option operates globally, on any pages or columns of text | ||
5669 | % that are set to receive at least one layer of apparatus | ||
5670 | % criticus. The way of applying the limit to only one out of several | ||
5671 | % edition texts is therefore to append \cs{setmaxlines} as a hook to | ||
5672 | % the environment corresponding to this edition text as described | ||
5673 | % above \vpageref{sec:alignment-hooks}, like so:--- | ||
5674 | % | ||
5675 | % \iffalse | ||
5676 | %<*example> | ||
5677 | % \fi | ||
5678 | \begin{minted}[linenos=false]{latex} | ||
5679 | \AtBeginEnvironment{latin}{\setmaxlines{<n>}} | ||
5680 | \end{minted} | ||
5681 | % \iffalse | ||
5682 | %</example> | ||
5683 | % \fi | ||
5684 | % | ||
5685 | % \DescribeMacro{\nomaxlines} \noindent\cs{nomaxlines} is an | ||
5686 | % argument-less command that operates as the |nomaxlines| option just | ||
5687 | % described. This command can be used either in the preamble or at any | ||
5688 | % point of the document. | ||
5689 | % | ||
5690 | % \medskip\noindent\textbf{Options Specific to the |poetry=verse| | ||
5691 | % Global Setting}\footnote{See above | ||
4793 | % \vref{sec:verse-package}.}\phts\label{ref:verse-lineation}\\ | 5692 | % \vref{sec:verse-package}.}\phts\label{ref:verse-lineation}\\ |
4794 | % \DescribeOption{vlineation} |vlineation|$=$\verb+page|document+ | 5693 | % \DescribeOption{vlineation} |vlineation|$=$\verb+page|document+ |
4795 | % \hfill\tcboxverb{Default: document}\\ | 5694 | % \hfill\tcboxverb{Default: document}\\ |
@@ -5092,8 +5991,7 @@ substantiall fewell,} | |||
5092 | % \end{alignment} | 5991 | % \end{alignment} |
5093 | % | 5992 | % |
5094 | % \needspace{5\baselineskip} | 5993 | % \needspace{5\baselineskip} |
5095 | % And here follows the PDF output with right-to-left apparatus | 5994 | % The PDF output with right-to-left apparatus criticus follows:--- |
5096 | % criticus:--- | ||
5097 | % \medskip | 5995 | % \medskip |
5098 | % | 5996 | % |
5099 | % \needspace{7\baselineskip} | 5997 | % \needspace{7\baselineskip} |
@@ -5648,6 +6546,149 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5648 | %</example> | 6546 | %</example> |
5649 | % \fi | 6547 | % \fi |
5650 | % | 6548 | % |
6549 | % \paragraph{\enquote{Paired} facing pages} | ||
6550 | % \phts\label{sec:header-paired-pages} | ||
6551 | % As already described \vpageref{ref:paired-opt}\===the | ||
6552 | % \textooquote|paired|\textcoquote\ option\===\pkg{ekdosis} can | ||
6553 | % arrange texts on facing pages with every right-hand page number | ||
6554 | % unchanged, so that both facing pages hold the same number, as in the | ||
6555 | % \enquote{Budé} series. As a result of this layout, the distinction | ||
6556 | % between left- and right-hand pages does not apply and headers and | ||
6557 | % footers have to be set as if the whole edition text and the | ||
6558 | % translation were intended for single-sided printing. To return to | ||
6559 | % the example just given, the three optional arguments of \cs{sethead} | ||
6560 | % are inoperative, as are the symbolic letters |E| and |O| of | ||
6561 | % \cs{ekdprintmark}. Both letters must be omitted, which boils down to | ||
6562 | % using the following six selectors, instead of twelve: |HL|, |HC|, | ||
6563 | % |HR|, |FL|, |FC| and |FR|. | ||
6564 | % | ||
6565 | % \DescribeMacro{\ekdEOprint}\newfeature[v1.5] Finally, to make up for | ||
6566 | % commands and arguments designed to set headers and footers on | ||
6567 | % left-hand pages, \pkg{ekdosis} provides \cs{ekdEOprint}. This | ||
6568 | % command accepts two mandatory, self-evident arguments, like so: | ||
6569 | % \cs{ekdEOprint}\marg{left-hand mark}\marg{right-hand mark}. | ||
6570 | % | ||
6571 | % As an illustration, the example provided above would read as follows | ||
6572 | % for editions laid out on \enquote{paired} facing pages:--- | ||
6573 | % | ||
6574 | % \iffalse | ||
6575 | %<*example> | ||
6576 | % \fi | ||
6577 | \begin{minted}[linenos=false]{latex} | ||
6578 | % Preamble: | ||
6579 | \usepackage{titleps} | ||
6580 | \newpagestyle{edition}{ | ||
6581 | \sethead{\ekdprintmark{HL}{\ekdEOprint{\thepage}{}}} | ||
6582 | {\ekdprintmark{HC}{\ekdEOprint{Hippocratis}{% | ||
6583 | Epidemiarum liber II, \ekdmark}}} | ||
6584 | {\ekdprintmark{HR}{\ekdEOprint{}{\thepage}}} | ||
6585 | } | ||
6586 | % Apply the page style: | ||
6587 | \pagestyle{edition} | ||
6588 | \end{minted} | ||
6589 | % \iffalse | ||
6590 | %</example> | ||
6591 | % \fi | ||
6592 | % | ||
6593 | % \paragraph{\enquote{Mirrored} paired facing pages} | ||
6594 | % \newfeature[v1.5] The \textooquote|paired|\textcoquote\ option just | ||
6595 | % described can give surprising results at first sight, in which | ||
6596 | % facing pages are arranged by succeeding pairs of left- or right-hand | ||
6597 | % pages. This is certainly not the desired layout for duplex | ||
6598 | % printing. However, this is not a redhibitory inconvenience for | ||
6599 | % professional printers can easily carry out the necessary corrections | ||
6600 | % by applying offsets to the horizontal margins. That being said, one | ||
6601 | % may also wish to have these horizontal offsets applied from the | ||
6602 | % outset in the PDF output that is produced by \LaTeX. | ||
6603 | % | ||
6604 | % \danger What follows assumes that the critical edition is printed on | ||
6605 | % facing pages and starts on a left-hand page. Furthermore, it must be | ||
6606 | % noted that the |paired| option must be either unset or set to | ||
6607 | % |false|. | ||
6608 | % | ||
6609 | % \DescribeMacro{\setpairedpage} \cs{setpairedpage} is provided to set | ||
6610 | % mirrored paired facing pages. This command takes no argument and is | ||
6611 | % meant to be issued in commands used to set headers and footers on | ||
6612 | % both sides, \emph{before any call} of the commands \cs{thepage} or | ||
6613 | % \cs{ekdmark}, like so:--- | ||
6614 | % | ||
6615 | % \iffalse | ||
6616 | %<*example> | ||
6617 | % \fi | ||
6618 | \begin{minted}[linenos,highlightlines={4,8-10}, escapeinside=++]{latex} | ||
6619 | % Preamble: | ||
6620 | \usepackage{titleps} | ||
6621 | \newpagestyle{edition}{ | ||
6622 | \sethead[\setpairedpage\ekdprintmark{HEL}{\thepage}]+\label{ln:ekdpp:i}+ | ||
6623 | [\ekdprintmark{HEC}{Hippocratis}] | ||
6624 | [] | ||
6625 | {} | ||
6626 | {\setpairedpage\ekdprintmark{HOC}{Epidemiarum liber II,\+\label{ln:ekdpp:ii}+ | ||
6627 | \ekdmark}} | ||
6628 | {\ekdprintmark{HOR}{\thepage}}\+\label{ln:ekdpp:iii}+ | ||
6629 | } | ||
6630 | % Apply the page style: | ||
6631 | \pagestyle{edition} | ||
6632 | \end{minted} | ||
6633 | % \iffalse | ||
6634 | %</example> | ||
6635 | % \fi | ||
6636 | % | ||
6637 | % \begin{remarks} | ||
6638 | % \item As can be seen from ll.~\lnref{ln:ekdpp:i} and | ||
6639 | % \lnref{ln:ekdpp:ii}, \cs{setpairedpage} must be issued | ||
6640 | % \emph{before} \cs{ekdprintmark} so that it can be processed on | ||
6641 | % pages where headers and footers are removed by \cs{ekdnohfmarks} | ||
6642 | % described below. | ||
6643 | % \item Additionally, ll.~\lnref{ln:ekdpp:ii}--\lnref{ln:ekdpp:iii} | ||
6644 | % show that \cs{setpairedpage} precedes both \cs{ekdmark} and | ||
6645 | % \cs{thepage}. | ||
6646 | % \item If there be no \cs{thepage} in headers or footers, | ||
6647 | % \cs{setpairedpage} must still be issued once on each side. | ||
6648 | % \end{remarks} | ||
6649 | % | ||
6650 | % \DescribeMacro{\setpairedpagenum} \cs{setpairedpagenum}\marg{number} | ||
6651 | % can be used just ahead of the alignment environment to set the | ||
6652 | % number of the first left-hand paired page to follow. The first | ||
6653 | % paired page number is initially set to |1|. | ||
6654 | % | ||
6655 | % \DescribeMacro{\resetpagenumber} Finally, \cs{resetpagenumber} | ||
6656 | % \emph{must} be used right out of the alignment environment so that | ||
6657 | % any numbering error on the page that follows the edition text can be | ||
6658 | % corrected. See below \vref{lst:mirrored-fp}, | ||
6659 | % l.~\lnref{ln:mirrored:fp:resetpn}. | ||
6660 | % | ||
6661 | % A schematic illustration of this technique follows:--- | ||
6662 | % | ||
6663 | % \captof{\enquote{Mirrored} paired facing | ||
6664 | % pages}[\label{lst:mirrored-fp}] | ||
6665 | % \iffalse | ||
6666 | %<*example> | ||
6667 | % \fi | ||
6668 | \begin{minted}[escapeinside=++,highlightlines={16}]{latex} | ||
6669 | \mainmatter | ||
6670 | \part{Edition text} | ||
6671 | \cleartoevenpage % this needs the 'nextpage' package. | ||
6672 | \pagestyle{edition} % apply the style where 'mirrored' paired facing | ||
6673 | % pages are defined as illustrated above. | ||
6674 | \begin{alignment} | ||
6675 | \begin{edition} | ||
6676 | ... | ||
6677 | \end{edition} | ||
6678 | \begin{translation} | ||
6679 | ... | ||
6680 | \end{translation} | ||
6681 | \end{alignment} | ||
6682 | \backmatter % or \cleartooddpage provided by the 'nextpage' | ||
6683 | % package. | ||
6684 | \resetpagenumber % this command is always required.+\label{ln:mirrored:fp:resetpn}+ | ||
6685 | \pagestyle{back} % apply a new page style. | ||
6686 | \end{minted} | ||
6687 | % \iffalse | ||
6688 | %</example> | ||
6689 | % \fi | ||
6690 | % | ||
6691 | % \paragraph{Removing or Resetting Headers and Footers} | ||
5651 | % \DescribeMacro{\ekdnohfmarks} Once all signposts are marked with | 6692 | % \DescribeMacro{\ekdnohfmarks} Once all signposts are marked with |
5652 | % \cs{ekdprintmark}, \cs{ekdnohfmarks} can be used at any point of the | 6693 | % \cs{ekdprintmark}, \cs{ekdnohfmarks} can be used at any point of the |
5653 | % document with the same effect as the \LaTeX\ standard command | 6694 | % document with the same effect as the \LaTeX\ standard command |
@@ -5696,45 +6737,102 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5696 | % entries with right line numbers cannot come on pages that follow a | 6737 | % entries with right line numbers cannot come on pages that follow a |
5697 | % wrong page either. | 6738 | % wrong page either. |
5698 | % | 6739 | % |
5699 | % An alert reader may have guessed that inserting a \cs{pagebreak} is | 6740 | % The alert reader may have guessed that inserting a \cs{pagebreak} is |
5700 | % a good way to get out of the vicious circle. And surely, if only a | 6741 | % a good way to get out of the vicious circle. And surely, if only a |
5701 | % few pages be at stake, this is the way to go. However, | 6742 | % few pages be at stake, this is the way to go. However, |
5702 | % \cs{pagebreak} commands should only be inserted when the whole | 6743 | % \cs{pagebreak} commands should only be inserted when the whole |
5703 | % edition text is ready for any substantial change in the preceding | 6744 | % edition text is ready for any substantial change in the preceding |
5704 | % pages may result in pages that break just after they begin. | 6745 | % pages may result in pages that break just after they begin. |
5705 | % | 6746 | % |
6747 | % \paragraph{Limiting the Number of Lines per Page} | ||
6748 | % \phts\label{ref:maxlines-trick} One way to avoid this inconvenience | ||
6749 | % is to use the |maxlines| option of \cs{SetLineation} as described | ||
6750 | % above \vpageref{ref:gmaxlines}. Depending on the abundance of | ||
6751 | % critical footnotes to be printed, the editor may start with a number | ||
6752 | % that will allow most, if not all, pages to pass. | ||
6753 | % | ||
6754 | % Furthermore, this technique can be combined with the |fitapp| global | ||
6755 | % option described below \vpageref{ref:fitapp-trick}. Once |maxlines| | ||
6756 | % has been applied, the \pkg{fgruler} package\footcite{fgruler} can be | ||
6757 | % used to gauge the respective heights of the edition text and the | ||
6758 | % apparatus criticus like so:--- | ||
6759 | % | ||
6760 | % \iffalse | ||
6761 | %<*example> | ||
6762 | % \fi | ||
6763 | \begin{minted}[linenos=false]{latex} | ||
6764 | % Preamble | ||
6765 | \usepackage[type=lowerleftT]{fgruler} | ||
6766 | \end{minted} | ||
6767 | % \iffalse | ||
6768 | %</example> | ||
6769 | % \fi | ||
6770 | % | ||
6771 | % Based on the height corresponding to the last line of the edition | ||
6772 | % text limited by the value of |maxlines|, the height from which the | ||
6773 | % apparatus criticus block should stop growing and the characters | ||
6774 | % should be scaled down to allow for more entries can be | ||
6775 | % estimated.\footnote{To learn how the maximum height of the apparatus | ||
6776 | % criticus can be set, see \vpageref{ref:appheight}. The |fitapp| | ||
6777 | % global option is described \vpageref{ref:fitapp-opt}.} This ensures | ||
6778 | % that any contentious entries are included in the apparatus criticus | ||
6779 | % when the last line of text has been reached. | ||
6780 | % | ||
6781 | % In addition to the |maxlines| option of \cs{SetLineation} and the | ||
6782 | % \cs{setmaxlines} command,\footnote{See above | ||
6783 | % \vpageref{ref:gmaxlines}.} the following commands are provided:--- | ||
6784 | % | ||
6785 | % \DescribeMacro{\localmaxlines} \cs{localmaxlines}\marg{n}, where | ||
6786 | % \meta{n} $\geq 1$, can be used in the edition text to adjust the | ||
6787 | % number of lines on a given page. Of course, this command must be | ||
6788 | % issued before the line number corresponding to |maxlines| is | ||
6789 | % reached. \mansee \cs{localmaxlines}|{0}| can therefore be used to | ||
6790 | % remove the limit set by |maxlines| or \cs{setmaxlines} on a given | ||
6791 | % page. | ||
6792 | % | ||
6793 | % \DescribeMacro{\addtomaxlines} Unlike \cs{localmaxlines}, | ||
6794 | % \cs{addtomaxlines}\marg{n} takes as argument the number of lines one | ||
6795 | % wishes to add or substract from the number that has been set by | ||
6796 | % |maxlines| or \cs{setmaxlines}. As a result, \meta{n} can be a | ||
6797 | % positive or negative integer. | ||
6798 | % | ||
6799 | % \DescribeMacro{\nomaxlines} \cs{nomaxlines} is an argument-less | ||
6800 | % command that unsets any limit previously set by |maxlines| or | ||
6801 | % \cs{setmaxlines}. | ||
6802 | % | ||
5706 | % \paragraph{Conditional page breaks} | 6803 | % \paragraph{Conditional page breaks} |
5707 | % \phts\label{ref:ekdpb} \DescribeMacro{\ekdpb}\DescribeMacro{\ekdpb*} | 6804 | % \phts\label{ref:ekdpb} \DescribeMacro{\ekdpb}\DescribeMacro{\ekdpb*} |
5708 | % \cs{ekdpb}\oarg{page no}\marg{line no} | 6805 | % \cs{ekdpb}\oarg{page no}\marg{line no} \cs{ekdpb*}|{}| \cs{ekdpb*} |
5709 | % \cs{ekdpb*}|{}| \cs{ekdpb*}|\| | ||
5710 | % \newfeature[v1.2]\\ | 6806 | % \newfeature[v1.2]\\ |
5711 | % One way to avoid this inconvenience is to use \cs{ekdpb} instead of | 6807 | % One other way is to use \cs{ekdpb} instead of the standard |
5712 | % the standard \cs{pagebreak} command provided by \LaTeX\ to insert | 6808 | % \cs{pagebreak} command provided by \LaTeX\ to insert conditional |
5713 | % conditional page breaks. \cs{ekdpb} takes as mandatory argument the | 6809 | % page breaks. \cs{ekdpb} takes as mandatory argument the line number, |
5714 | % line number, as it is printed in the margin, where the page break | 6810 | % as it is printed in the margin, where the page break should take |
5715 | % should take place. An optional argument allows to further specify | 6811 | % place. An optional argument allows to further specify the page |
5716 | % the page number where the page break should occur. The value that is | 6812 | % number where the page break should occur. The value that is expected |
5717 | % expected is the page number as it is printed\===e.g.\ an Arabic, | 6813 | % is the page number as it is printed\===e.g.\ an Arabic, Roman or |
5718 | % Roman or alphanumeric number. If the specified conditions be not | 6814 | % alphanumeric number. If the specified conditions be not met, then |
5719 | % met, then the page break is not triggered. Finally, the | 6815 | % the page break is not triggered. Finally, the \enquote{starred} |
5720 | % \enquote{starred} version of this command forces the page break, | 6816 | % version of this command forces the page break, irrespective of the |
5721 | % irrespective of the values specified as page or line numbers. Unlike | 6817 | % values specified as page or line numbers. Unlike \cs{ekdpb}, which |
5722 | % \cs{ekdpb}, which requires the lines to be numbered, \cs{ekdpb*} is | 6818 | % requires the lines to be numbered, \cs{ekdpb*} is allowed at any |
5723 | % allowed at any point of the document: as \cs{ekdpb*} disregards the | 6819 | % point of the document: as \cs{ekdpb*} disregards the number given as |
5724 | % number given as argument, it is equivalent to the standard \LaTeX\ | 6820 | % argument, it is equivalent to the standard \LaTeX\ \cs{pagebreak} |
5725 | % \cs{pagebreak} command. Yet it can be used instead of the latter to | 6821 | % command. Yet it can be used instead of the latter to have marks |
5726 | % have marks further printed in the margins so as to spot with a | 6822 | % further printed in the margins so as to spot with a fleeting glance |
5727 | % fleeting glance the locations where induced page breaks | 6823 | % the locations where induced page breaks occur.\footnote{This |
5728 | % occur.\footnote{This requires the |showpagebreaks| option to be set | 6824 | % requires the |showpagebreaks| option to be set to |true| as |
5729 | % to |true| as described above \vpageref{ref:showpagebreaks-opt}.} | 6825 | % described above \vpageref{ref:showpagebreaks-opt}.} |
5730 | % | 6826 | % |
5731 | % \paragraph{Using \texttt{maxentries}} | 6827 | % \paragraph{Using \texttt{maxentries}} |
5732 | % Another way\---should the edition text fall into the vicious circle | 6828 | % Another way\---should the edition text fall into the vicious circle |
5733 | % too often\---is to limit the number of entries per page that a given | 6829 | % too often\---is to limit the number of entries per page that all |
5734 | % layer of apparatus criticus may accept as described above | 6830 | % layers of critical notes taken together or a given layer of |
5735 | % \vpageref{ref:maxentries}. As a result, \pkg{ekdosis} will take care | 6831 | % apparatus criticus may accept as described above on |
5736 | % of inserting automatic breakpoints between pages whenever the number | 6832 | % pages~\pageref{ref:glimit} and~\pageref{ref:maxentries}. As a result, |
5737 | % of entries on a given page reaches the value set as |maxentries|. | 6833 | % \pkg{ekdosis} will take care of inserting automatic breakpoints |
6834 | % between pages whenever the number of entries on a given page reaches | ||
6835 | % the value set as |maxentries|. | ||
5738 | % | 6836 | % |
5739 | % |maxentries| must not be too small: otherwise offensive to look at | 6837 | % |maxentries| must not be too small: otherwise offensive to look at |
5740 | % vertical spaces may come between the edition text and the apparatus | 6838 | % vertical spaces may come between the edition text and the apparatus |
@@ -5775,16 +6873,160 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5775 | % sets of page decisions. | 6873 | % sets of page decisions. |
5776 | % | 6874 | % |
5777 | % \paragraph{The \texttt{fitapp} Global Option} | 6875 | % \paragraph{The \texttt{fitapp} Global Option} |
5778 | % \newfeature[v1.3] The rationale of this option is discussed above | 6876 | % \phts\label{ref:fitapp-trick} \newfeature[v1.3] The rationale of |
5779 | % (see \vref{ref:fitapp-opt}). As this mechanism has the characters of | 6877 | % this option is discussed above (see \vref{ref:fitapp-opt}). As this |
5780 | % the apparatus block scaled down to allow for more entries once a | 6878 | % mechanism has the characters of the apparatus block scaled down to |
5781 | % predefined height has been reached, \pkg{ekdosis} should settle down | 6879 | % allow for more entries once a predefined height has been reached, |
5782 | % in most of the contentious cases.\footnote{That is, cases that arise | 6880 | % \pkg{ekdosis} should settle down in most of the contentious |
5783 | % \emph{after} the predefined height has been reached.} However, it is | 6881 | % cases.\footnote{That is, cases that arise \emph{after} the |
5784 | % advisable to use |fitapp| conjointly with |maxentries| to prevent | 6882 | % predefined height has been reached.} However, it is advisable to use |
5785 | % the number of allowed entries from being too high, which would | 6883 | % |fitapp| conjointly with |maxlines| or |maxentries| to prevent the |
5786 | % result in the characters being too small or even illegible. | 6884 | % number of allowed entries from being too high, which would result in |
6885 | % the characters being too small or even illegible. | ||
6886 | % | ||
6887 | % \newfeature[v1.5] As already seen \vpageref{ref:appheight}, once the | ||
6888 | % global option |layout=fitapp| has been set,\footnote{See above | ||
6889 | % \vpageref{ref:fitapp-opt}.} the default maximum height of the | ||
6890 | % apparatus criticus block is |0.5\textheight|, which can be changed | ||
6891 | % by assigning a new length to the |appheight| option of | ||
6892 | % \cs{SetHooks}. To more finely adjust this height on given pages, | ||
6893 | % \pkg{ekdosis} provides additional commands to be used in the edition | ||
6894 | % text:--- | ||
6895 | % | ||
6896 | % \DescribeMacro{\localappheight} | ||
6897 | % \cs{localappheight}\marg{dimen} can be used to change locally the | ||
6898 | % height up to which the apparatus block is allowed to | ||
6899 | % grow. \meta{dimen} must be a number followed by a unit | ||
6900 | % length. \danger This command operates only on the apparatus block | ||
6901 | % that follows it. Therefore, it must be issued \emph{before} the | ||
6902 | % first entry of the apparatus block on which it is intended to | ||
6903 | % operate, either on the current page or in the last lines of the | ||
6904 | % preceding page. | ||
6905 | % | ||
6906 | % \DescribeMacro{\addtoappheight} | ||
6907 | % As the name suggests, in contrast to \cs{localappheight}, | ||
6908 | % \cs{addtoappheight}\marg{dimen} is used to increase or decrease | ||
6909 | % locally the height of the apparatus typeblock. \meta{dimen} must be | ||
6910 | % a number followed by a unit length. Just as \cs{localappheight}, | ||
6911 | % this command operates only on the apparatus block that follows it. | ||
6912 | % | ||
6913 | % \subsection{Using \textsf{emacs}} | ||
6914 | % \label{sec:using-emacs} | ||
6915 | % \pkg{ekdosis} includes an AUC\TeX\ style file that can be used to | ||
6916 | % facilitate the insertion of the many commands it provides. | ||
6917 | % | ||
6918 | % \paragraph{Installation} | ||
6919 | % In what follows, it is assumed that both the \textsf{emacs} text | ||
6920 | % editor\footnote{\url{https://www.gnu.org/software/emacs}} and | ||
6921 | % AUC\TeX%^^A | ||
6922 | % \footnote{\url{https://www.gnu.org/software/auctex/download.html}} | ||
6923 | % have already been installed. | ||
6924 | % \begin{description} | ||
6925 | % \item[\pkg{ekdosis} Stable] | ||
6926 | % \begin{enumerate} | ||
6927 | % \item Download |ekdosis.el| from | ||
6928 | % CTAN: | ||
6929 | % \url{https://ctan.org/tex-archive/macros/luatex/latex/ekdosis} | ||
6930 | % \item Copy this file to | ||
6931 | % |$HOME/.emacs.d/auctex/style/|\footnote{This directory must be | ||
6932 | % created if need be.}\saveFN\fnAUCTeX\ where |$HOME| stands | ||
6933 | % for the directory of the current user. | ||
6934 | % \end{enumerate} | ||
6935 | % \item[\pkg{ekdosis} Development Version] | ||
6936 | % \begin{enumerate} | ||
6937 | % \item Download |ekdosis.el| from either | ||
6938 | % |git.robertaless|\allowbreak|i.net| | ||
6939 | % (\url{http://git.robertalessi.net/ekdosis/plain/ekdosis.el}) | ||
6940 | % or the |sourcehut| git | ||
6941 | % repository | ||
6942 | % (\url{https://git.sr.ht/~ralessi/ekdosis/blob/master/ekdosis.el}). | ||
6943 | % \item Copy this file to | ||
6944 | % |$HOME/.emacs.d/auctex/style/|\useFN\fnAUCTeX\ where |$HOME| | ||
6945 | % stands for the directory of the current user. | ||
6946 | % \end{enumerate} | ||
6947 | % \end{description} | ||
6948 | % | ||
6949 | % If desired, |ekdosis.el| can be compiled like so:--- | ||
6950 | % | ||
6951 | % \iffalse | ||
6952 | %<*example> | ||
6953 | % \fi | ||
6954 | \begin{minted}[linenos=false]{bash} | ||
6955 | emacs --batch -f batch-byte-compile ekdosis.el &>/dev/null | ||
6956 | \end{minted} | ||
6957 | % \iffalse | ||
6958 | %</example> | ||
6959 | % \fi | ||
6960 | % | ||
6961 | % This will produce |ekdosis.elc| which can be copied to the same | ||
6962 | % directory as |ekdosis.el|. | ||
6963 | % | ||
6964 | % \paragraph{Code Folding} | ||
6965 | % \phts\label{ref:code-folding} | ||
6966 | % The variant readings and the critical notes can grow in number to a | ||
6967 | % point where they may clutter the source text. As a result, the | ||
6968 | % edition text can become illegible. One way around this difficulty is | ||
6969 | % to use the \textsf{emacs} editor with |ekdosis.el|, the AUC\TeX\ | ||
6970 | % style file that is provided with \pkg{ekdosis}, to fold the code so | ||
6971 | % that only the edition text, exclusive of variants and notes, is | ||
6972 | % displayed on the screen. | ||
6973 | % | ||
6974 | % In order to hide all foldable items, |TeX-fold-mode| must first be | ||
6975 | % activated, like so: |C-c| |C-o| |C-f|.\footnote{Menu sequence: | ||
6976 | % \menu{LaTeX>Show/Hide>Fold Mode}} Then |C-c| |C-o| |C-b| can be used | ||
6977 | % to fold the code.\footnote{Menu sequence: \menu{LaTeX>Show/Hide>Hide | ||
6978 | % All in Current Buffer}} | ||
5787 | % | 6979 | % |
6980 | % \DescribeMacro{\App} | ||
6981 | % \newfeature[v1.5]\cs{App}|[type=|\meta{type}|]|\marg{lemma | ||
6982 | % text}\marg{readings and notes}\phts\label{ref:App-cmd}\\ | ||
6983 | % \cs{App} allows for much more flexible code folding where notes and | ||
6984 | % variants are hidden to let only the base text appear on the screen. | ||
6985 | % \cs{App} is strictly equivalent to \cs{app}, except that the | ||
6986 | % apparatus entries are meant to be distributed in two different | ||
6987 | % arguments, like so:--- | ||
6988 | % | ||
6989 | % \iffalse | ||
6990 | %<*example> | ||
6991 | % \fi | ||
6992 | \begin{minted}[escapeinside=++]{latex} | ||
6993 | I saw my friend \App{\lem{Peter}}{\rdg{John}} yesterday. | ||
6994 | or: | ||
6995 | I saw my friend \App{\lem{Peter}}{+\label{ln:App:1}+ | ||
6996 | \rdg{John} | ||
6997 | } yesterday.+\label{ln:App:2}+ | ||
6998 | \end{minted} | ||
6999 | % \iffalse | ||
7000 | %</example> | ||
7001 | % \fi | ||
7002 | % | ||
7003 | % \begin{remarks} | ||
7004 | % \item As can be seen, the first argument of \cs{App} is meant to | ||
7005 | % receive the lemma text while \cs{rdg}, \cs{note} and the like are | ||
7006 | % inserted in the second one. | ||
7007 | % \item As the second argument of \cs{App} is the foldable item, a | ||
7008 | % good practice is to keep the lemma text on the same line as the | ||
7009 | % opening brace (l.~\lnref{ln:App:1}) and to write the continuation | ||
7010 | % of the text just after the closing brace (l.~\lnref{ln:App:2}). | ||
7011 | % \end{remarks} | ||
7012 | % | ||
7013 | % Code folding, once applied, results in a clean source text with no | ||
7014 | % clutter as follows:--- | ||
7015 | % | ||
7016 | % \iffalse | ||
7017 | %<*example> | ||
7018 | % \fi | ||
7019 | \begin{minted}[escapeinside=++]{latex} | ||
7020 | I saw my friend +\textcolor{lavender}{Peter}+ yesterday. | ||
7021 | \end{minted} | ||
7022 | % \iffalse | ||
7023 | %</example> | ||
7024 | % \fi | ||
7025 | % | ||
7026 | % \danger As there is no point in using this command for anything | ||
7027 | % other than this specific purpose, \cs{app} is used in the examples | ||
7028 | % throughout this document. | ||
7029 | % | ||
5788 | % \subsection{Variae Quaestiones} | 7030 | % \subsection{Variae Quaestiones} |
5789 | % \label{sec:variae-quaestiones} | 7031 | % \label{sec:variae-quaestiones} |
5790 | % This section is about issues that are not strictly speaking part of | 7032 | % This section is about issues that are not strictly speaking part of |
@@ -5817,7 +7059,7 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5817 | 7059 | ||
5818 | \makeatletter | 7060 | \makeatletter |
5819 | \newcommand{\ekddot}{% | 7061 | \newcommand{\ekddot}{% |
5820 | \ltx@ifnextchar{.}{\xspace}{.\xspace}} | 7062 | \ltx@ifnextchar@nospace{.}{\xspace}{.\xspace}} |
5821 | \makeatother | 7063 | \makeatother |
5822 | 7064 | ||
5823 | \DeclareApparatus{default}[ehook=.] | 7065 | \DeclareApparatus{default}[ehook=.] |
@@ -5830,12 +7072,12 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5830 | % \begin{remarks} | 7072 | % \begin{remarks} |
5831 | % \item Line~2: The \pkg{xspace} package is needed for \cs{xspace} is | 7073 | % \item Line~2: The \pkg{xspace} package is needed for \cs{xspace} is |
5832 | % used by the \cs{ekddot} command that is defined at l.~6. | 7074 | % used by the \cs{ekddot} command that is defined at l.~6. |
5833 | % \item Line~7: \cs{ltx@ifnextchar} is part of the \pkg{ltxcmds} | 7075 | % \item Line~7: \cs{ltx@ifnextchar@nospace} is part of the |
5834 | % package which is loaded by \pkg{ekdosis}. As this command uses a | 7076 | % \pkg{ltxcmds} package which is loaded by \pkg{ekdosis}. As this |
5835 | % private control sequence, it must be found within | 7077 | % command uses a private control sequence, it must be found within |
5836 | % \cs{makeatletter} \dots\ \cs{makeatother}. | 7078 | % \cs{makeatletter} \dots\ \cs{makeatother}. |
5837 | % \item Line~10: \cs{ekddot} will only work with multiple-layer | 7079 | % \item Line~10: \cs{ekddot} will only work with multiple-layer |
5838 | % apparatus criticus. Therefore, \cs{DeclareAppa{\allowbreak}ratus} | 7080 | % apparatus criticus. Therefore, |\DeclareAppa|\allowbreak|ratus| |
5839 | % must be used even if only one layer of critical notes be needed. | 7081 | % must be used even if only one layer of critical notes be needed. |
5840 | % \end{remarks} | 7082 | % \end{remarks} |
5841 | % | 7083 | % |
@@ -6109,6 +7351,10 @@ subtype="arabtex">'inna 'abI kAna mina | |||
6109 | % \cs{pagebreak}\meta{\oarg{1-4}} & no output \\ | 7351 | % \cs{pagebreak}\meta{\oarg{1-4}} & no output \\ |
6110 | % \cs{mbox}\marg{text} & \meta{text} \\ | 7352 | % \cs{mbox}\marg{text} & \meta{text} \\ |
6111 | % \midrule | 7353 | % \midrule |
7354 | % \multicolumn{2}{c}{From the \pkg{marginnote}\footcite{marginnote} | ||
7355 | % package:}\\ | ||
7356 | % \cs{marginnote}|{}| & |<note place="margin"></note>| \\ | ||
7357 | % \midrule | ||
6112 | % \multicolumn{2}{c}{From the \pkg{extdash}\footcite{extdash} | 7358 | % \multicolumn{2}{c}{From the \pkg{extdash}\footcite{extdash} |
6113 | % package:}\\ | 7359 | % package:}\\ |
6114 | % \cs{---} or \cs{===} & --- \\ | 7360 | % \cs{---} or \cs{===} & --- \\ |
@@ -6414,6 +7660,45 @@ Sample text with a \textcolor{red}{word} in red. | |||
6414 | %</example> | 7660 | %</example> |
6415 | % \fi | 7661 | % \fi |
6416 | % | 7662 | % |
7663 | % \paragraph{Inserting \texttt{xml:id}\emph{s} in \texttt{TEI} Patterns} | ||
7664 | % \DescribeMacro{\getTEIxmlid} \newfeature[v1.5] In some instances, it | ||
7665 | % may be useful to retrieve the |xml| formatted pointers corresponding | ||
7666 | % to unique identifiers declared in commands such as | ||
7667 | % \cs{DeclareWitness}\footnote{See above | ||
7668 | % \vpageref{ref:declarewitness}.} and the like so as to insert them in | ||
7669 | % the second argument\===\meta{TEI pattern}\===of \cs{TeXtoTEIPat}. As | ||
7670 | % an illustration, what follows creates a new \LaTeX\ command | ||
7671 | % \cs{witStart} which prints nothing in the PDF ouput but inserts | ||
7672 | % |<witStart/>| elements in the \texttt{TEI xml} file. This commands | ||
7673 | % accepts an optional argument to make clear which are the fragmentary | ||
7674 | % witnesses involved:--- | ||
7675 | % | ||
7676 | % \iffalse | ||
7677 | %<*example> | ||
7678 | % \fi | ||
7679 | \begin{minted}[escapeinside=++]{latex} | ||
7680 | \NewDocumentCommand{\witStart}{O{}}{\ignorespaces} | ||
7681 | \TeXtoTEIPat{\witStart [wit=@b1]}{<witStart wit="\getTEIxmlid{@b1}"/>}+\label{ln:getxml:a}+ | ||
7682 | \TeXtoTEI{witStart}{witStart} | ||
7683 | \end{minted} | ||
7684 | % \iffalse | ||
7685 | %</example> | ||
7686 | % \fi | ||
7687 | % | ||
7688 | % \begin{remarks} | ||
7689 | % \item On the use of \cs{NewDocumentCommand} to create new commands, | ||
7690 | % the reader is invited to refer to the documentation of the | ||
7691 | % \pkg{xparse} package.\footcite{xparse} | ||
7692 | % \item As can be seen from l.~\lnref{ln:getxml:a}, \cs{getTEIxmlid} | ||
7693 | % is used to process the csv-list of unique identifiers that matches | ||
7694 | % the string captured between the braces after |wit=|, as implied by | ||
7695 | % |@b1|. As a consequence, \cs{witStart}|[]| is expected as follows: | ||
7696 | % \mintinline{latex}|\witStart[wit={X,Y}]|. Braces must exist for | ||
7697 | % pattern matching. | ||
7698 | % \item Finally, |\TeXtoTEI{witStart}{witStart}| is used so that the | ||
7699 | % argument-less form of the command can be processed as well. | ||
7700 | % \end{remarks} | ||
7701 | % | ||
6417 | % \subsection{Inserting Code in the \texttt{TEI xml} Ouput File} | 7702 | % \subsection{Inserting Code in the \texttt{TEI xml} Ouput File} |
6418 | % \label{sec:inserting-code-tei} | 7703 | % \label{sec:inserting-code-tei} |
6419 | % It may be needed to insert code in the \texttt{TEI xml} output file | 7704 | % It may be needed to insert code in the \texttt{TEI xml} output file |
@@ -6429,8 +7714,17 @@ Sample text with a \textcolor{red}{word} in red. | |||
6429 | % \texttt{TEI xml} element followed by the contents to be found in the | 7714 | % \texttt{TEI xml} element followed by the contents to be found in the |
6430 | % ouput file between the opening and closing tags. Additionally, | 7715 | % ouput file between the opening and closing tags. Additionally, |
6431 | % attribute-value pairs to be found inside the start-tag of the | 7716 | % attribute-value pairs to be found inside the start-tag of the |
6432 | % element can be specified in the optional argument of the command. An | 7717 | % element can be specified in the optional argument of the command. |
6433 | % example follows: | 7718 | % |
7719 | % \DescribeMacro{\teidirectE} \newfeature[v1.5] | ||
7720 | % \cs{teidirectE}\oarg{xml attributes}\marg{xml element}\\ | ||
7721 | % \cs{teidirectE}\===where |E| stands for \enquote{\underLine{e}mpty | ||
7722 | % element}\===is strictly equivalent to | ||
7723 | % \cs{teidirect}\allowbreak\oarg{xml attributes}\marg{xml | ||
7724 | % element}|{}|. Compared to the latter command, it only eliminates the | ||
7725 | % need to insert the ending pair of empty braces. | ||
7726 | % | ||
7727 | % An example follows: | ||
6434 | % | 7728 | % |
6435 | % \iffalse | 7729 | % \iffalse |
6436 | %<*example> | 7730 | %<*example> |
@@ -6491,7 +7785,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
6491 | <p xml:lang="grc">ἐν | 7785 | <p xml:lang="grc">ἐν |
6492 | <app> | 7786 | <app> |
6493 | <lem wit="#V #I #R #H">καύμασιν</lem> | 7787 | <lem wit="#V #I #R #H">καύμασιν</lem> |
6494 | <rdg wit="#GalE1.#M #GalE1.Q">καύματι</rdg> | 7788 | <rdg wit="#GalE1.M #GalE1.Q">καύματι</rdg> |
6495 | <note>p. 23, l. 16 Wenkebach</note> | 7789 | <note>p. 23, l. 16 Wenkebach</note> |
6496 | </app></p> | 7790 | </app></p> |
6497 | \end{minted} | 7791 | \end{minted} |
@@ -7007,10 +8301,8 @@ Sample text with a \textcolor{red}{word} in red. | |||
7007 | % \begin{enumerate} | 8301 | % \begin{enumerate} |
7008 | % \item Poetry: \pkg{ekdosis} is now able to load and use the | 8302 | % \item Poetry: \pkg{ekdosis} is now able to load and use the |
7009 | % facilities provided by the \pkg{verse} package. Refined options | 8303 | % facilities provided by the \pkg{verse} package. Refined options |
7010 | % will be added, such as metrical analysis. Arabic poetry through | 8304 | % will be added, such as metrical analysis. Other packages will |
7011 | % the environments and commands provided by the \pkg{arabluatex} | 8305 | % also be considered for inclusion, such as \pkg{poetry} or |
7012 | % package will also be supported. Other packages will also be | ||
7013 | % considered for inclusion, such as \pkg{poetry} or | ||
7014 | % \pkg{teubner}. In the end, \pkg{ekdosis} will provide a way for | 8306 | % \pkg{teubner}. In the end, \pkg{ekdosis} will provide a way for |
7015 | % the typesetting of poetry which will allow for more flexibility | 8307 | % the typesetting of poetry which will allow for more flexibility |
7016 | % and compatibility with \texttt{TEI xml}. | 8308 | % and compatibility with \texttt{TEI xml}. |
@@ -7028,549 +8320,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
7028 | % \label{sec:correspondence-alignment} | 8320 | % \label{sec:correspondence-alignment} |
7029 | % | 8321 | % |
7030 | % \label{ref:segmentation} | 8322 | % \label{ref:segmentation} |
7031 | % | ||
7032 | % \section{GNU Free Documentation License} | ||
7033 | % \label{sec:fdl} | ||
7034 | % \textbf{Version 1.3, 3 November 2008} | ||
7035 | % | ||
7036 | % \begin{center} | ||
7037 | % Version 1.3, 3 November 2008 | ||
7038 | % | ||
7039 | % Copyright \copyright{} 2000, 2001, 2002, 2007, 2008 Free | ||
7040 | % Software Foundation, Inc. | ||
7041 | % | ||
7042 | % \bigskip | ||
7043 | % | ||
7044 | % \url{https://fsf.org/} | ||
7045 | % | ||
7046 | % \bigskip | ||
7047 | % | ||
7048 | % Everyone is permitted to copy and distribute verbatim copies | ||
7049 | % of this license document, but changing it is not allowed. | ||
7050 | % \end{center} | ||
7051 | % | ||
7052 | % \needspace{3\baselineskip} | ||
7053 | % \begin{center} | ||
7054 | % {\bf\large Preamble} | ||
7055 | % \end{center} | ||
7056 | % | ||
7057 | % The purpose of this License is to make a manual, textbook, or other | ||
7058 | % functional and useful document \enquote{free} in the sense of | ||
7059 | % freedom: to assure everyone the effective freedom to copy and | ||
7060 | % redistribute it, with or without modifying it, either commercially | ||
7061 | % or noncommercially. Secondarily, this License preserves for the | ||
7062 | % author and publisher a way to get credit for their work, while not | ||
7063 | % being considered responsible for modifications made by others. | ||
7064 | % | ||
7065 | % This License is a kind of \enquote{copyleft}, which means that | ||
7066 | % derivative works of the document must themselves be free in the same | ||
7067 | % sense. It complements the GNU General Public License, which is a | ||
7068 | % copyleft license designed for free software. | ||
7069 | % | ||
7070 | % We have designed this License in order to use it for manuals for | ||
7071 | % free software, because free software needs free documentation: a | ||
7072 | % free program should come with manuals providing the same freedoms | ||
7073 | % that the software does. But this License is not limited to software | ||
7074 | % manuals; it can be used for any textual work, regardless of subject | ||
7075 | % matter or whether it is published as a printed book. We recommend | ||
7076 | % this License principally for works whose purpose is instruction or | ||
7077 | % reference. | ||
7078 | % | ||
7079 | % \needspace{3\baselineskip} | ||
7080 | % \begin{center} | ||
7081 | % {\large\bf 1. APPLICABILITY AND DEFINITIONS\par} | ||
7082 | % \end{center} | ||
7083 | % | ||
7084 | % This License applies to any manual or other work, in any medium, | ||
7085 | % that contains a notice placed by the copyright holder saying it can | ||
7086 | % be distributed under the terms of this License. Such a notice | ||
7087 | % grants a world-wide, royalty-free license, unlimited in duration, to | ||
7088 | % use that work under the conditions stated herein. The | ||
7089 | % \enquote{\textbf{Document}}, below, refers to any such manual or | ||
7090 | % work. Any member of the public is a licensee, and is addressed as | ||
7091 | % \enquote{\textbf{you}}. You accept the license if you copy, modify | ||
7092 | % or distribute the work in a way requiring permission under copyright | ||
7093 | % law. | ||
7094 | % | ||
7095 | % A \enquote{\textbf{Modified Version}} of the Document means any work | ||
7096 | % containing the Document or a portion of it, either copied verbatim, | ||
7097 | % or with modifications and/or translated into another language. | ||
7098 | % | ||
7099 | % A \enquote{\textbf{Secondary Section}} is a named appendix or a | ||
7100 | % front-matter section of the Document that deals exclusively with the | ||
7101 | % relationship of the publishers or authors of the Document to the | ||
7102 | % Document's overall subject (or to related matters) and contains | ||
7103 | % nothing that could fall directly within that overall subject. | ||
7104 | % (Thus, if the Document is in part a textbook of mathematics, a | ||
7105 | % Secondary Section may not explain any mathematics.) The | ||
7106 | % relationship could be a matter of historical connection with the | ||
7107 | % subject or with related matters, or of legal, commercial, | ||
7108 | % philosophical, ethical or political position regarding them. | ||
7109 | % | ||
7110 | % The \enquote{\textbf{Invariant Sections}} are certain Secondary | ||
7111 | % Sections whose titles are designated, as being those of Invariant | ||
7112 | % Sections, in the notice that says that the Document is released | ||
7113 | % under this License. If a section does not fit the above definition | ||
7114 | % of Secondary then it is not allowed to be designated as Invariant. | ||
7115 | % The Document may contain zero Invariant Sections. If the Document | ||
7116 | % does not identify any Invariant Sections then there are none. | ||
7117 | % | ||
7118 | % The \enquote{\textbf{Cover Texts}} are certain short passages of | ||
7119 | % text that are listed, as Front-Cover Texts or Back-Cover Texts, in | ||
7120 | % the notice that says that the Document is released under this | ||
7121 | % License. A Front-Cover Text may be at most 5 words, and a | ||
7122 | % Back-Cover Text may be at most 25 words. | ||
7123 | % | ||
7124 | % A \enquote{\textbf{Transparent}} copy of the Document means a | ||
7125 | % machine-readable copy, represented in a format whose specification | ||
7126 | % is available to the general public, that is suitable for revising | ||
7127 | % the document straightforwardly with generic text editors or (for | ||
7128 | % images composed of pixels) generic paint programs or (for drawings) | ||
7129 | % some widely available drawing editor, and that is suitable for input | ||
7130 | % to text formatters or for automatic translation to a variety of | ||
7131 | % formats suitable for input to text formatters. A copy made in an | ||
7132 | % otherwise Transparent file format whose markup, or absence of | ||
7133 | % markup, has been arranged to thwart or discourage subsequent | ||
7134 | % modification by readers is not Transparent. An image format is not | ||
7135 | % Transparent if used for any substantial amount of text. A copy that | ||
7136 | % is not \enquote{Transparent} is called \enquote{\textbf{Opaque}}. | ||
7137 | % | ||
7138 | % Examples of suitable formats for Transparent copies include plain | ||
7139 | % ASCII without markup, Texinfo input format, LaTeX input format, SGML | ||
7140 | % or XML using a publicly available DTD, and standard-conforming | ||
7141 | % simple HTML, PostScript or PDF designed for human modification. | ||
7142 | % Examples of transparent image formats include PNG, XCF and JPG. | ||
7143 | % Opaque formats include proprietary formats that can be read and | ||
7144 | % edited only by proprietary word processors, SGML or XML for which | ||
7145 | % the DTD and/or processing tools are not generally available, and the | ||
7146 | % machine-generated HTML, PostScript or PDF produced by some word | ||
7147 | % processors for output purposes only. | ||
7148 | % | ||
7149 | % The \enquote{\textbf{Title Page}} means, for a printed book, the | ||
7150 | % title page itself, plus such following pages as are needed to hold, | ||
7151 | % legibly, the material this License requires to appear in the title | ||
7152 | % page. For works in formats which do not have any title page as | ||
7153 | % such, \enquote{Title Page} means the text near the most prominent | ||
7154 | % appearance of the work's title, preceding the beginning of the body | ||
7155 | % of the text. | ||
7156 | % | ||
7157 | % The \enquote{\textbf{publisher}} means any person or entity that | ||
7158 | % distributes copies of the Document to the public. | ||
7159 | % | ||
7160 | % A section \enquote{\textbf{Entitled XYZ}} means a named subunit of | ||
7161 | % the Document whose title either is precisely XYZ or contains XYZ in | ||
7162 | % parentheses following text that translates XYZ in another language. | ||
7163 | % (Here XYZ stands for a specific section name mentioned below, such | ||
7164 | % as \enquote{\textbf{Acknowledgements}}, | ||
7165 | % \enquote{\textbf{Dedications}}, \enquote{\textbf{Endorsements}}, or | ||
7166 | % \enquote{\textbf{History}}.) To \enquote{\textbf{Preserve the | ||
7167 | % Title}} of such a section when you modify the Document means that it | ||
7168 | % remains a section \enquote{Entitled XYZ} according to this | ||
7169 | % definition. | ||
7170 | % | ||
7171 | % The Document may include Warranty Disclaimers next to the notice | ||
7172 | % which states that this License applies to the Document. These | ||
7173 | % Warranty Disclaimers are considered to be included by reference in | ||
7174 | % this License, but only as regards disclaiming warranties: any other | ||
7175 | % implication that these Warranty Disclaimers may have is void and has | ||
7176 | % no effect on the meaning of this License. | ||
7177 | % | ||
7178 | % \needspace{3\baselineskip} | ||
7179 | % \begin{center} | ||
7180 | % {\large\bf 2. VERBATIM COPYING\par} | ||
7181 | % \end{center} | ||
7182 | % | ||
7183 | % You may copy and distribute the Document in any medium, either | ||
7184 | % commercially or noncommercially, provided that this License, the | ||
7185 | % copyright notices, and the license notice saying this License | ||
7186 | % applies to the Document are reproduced in all copies, and that you | ||
7187 | % add no other conditions whatsoever to those of this License. You | ||
7188 | % may not use technical measures to obstruct or control the reading or | ||
7189 | % further copying of the copies you make or distribute. However, you | ||
7190 | % may accept compensation in exchange for copies. If you distribute a | ||
7191 | % large enough number of copies you must also follow the conditions in | ||
7192 | % section~3. | ||
7193 | % | ||
7194 | % You may also lend copies, under the same conditions stated above, | ||
7195 | % and you may publicly display copies. | ||
7196 | % | ||
7197 | % \needspace{3\baselineskip} | ||
7198 | % \begin{center} | ||
7199 | % {\large\bf 3. COPYING IN QUANTITY\par} | ||
7200 | % \end{center} | ||
7201 | % | ||
7202 | % If you publish printed copies (or copies in media that commonly have | ||
7203 | % printed covers) of the Document, numbering more than 100, and the | ||
7204 | % Document's license notice requires Cover Texts, you must enclose the | ||
7205 | % copies in covers that carry, clearly and legibly, all these Cover | ||
7206 | % Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on | ||
7207 | % the back cover. Both covers must also clearly and legibly identify | ||
7208 | % you as the publisher of these copies. The front cover must present | ||
7209 | % the full title with all words of the title equally prominent and | ||
7210 | % visible. You may add other material on the covers in addition. | ||
7211 | % Copying with changes limited to the covers, as long as they preserve | ||
7212 | % the title of the Document and satisfy these conditions, can be | ||
7213 | % treated as verbatim copying in other respects. | ||
7214 | % | ||
7215 | % If the required texts for either cover are too voluminous to fit | ||
7216 | % legibly, you should put the first ones listed (as many as fit | ||
7217 | % reasonably) on the actual cover, and continue the rest onto adjacent | ||
7218 | % pages. | ||
7219 | % | ||
7220 | % If you publish or distribute Opaque copies of the Document numbering | ||
7221 | % more than 100, you must either include a machine-readable | ||
7222 | % Transparent copy along with each Opaque copy, or state in or with | ||
7223 | % each Opaque copy a computer-network location from which the general | ||
7224 | % network-using public has access to download using public-standard | ||
7225 | % network protocols a complete Transparent copy of the Document, free | ||
7226 | % of added material. If you use the latter option, you must take | ||
7227 | % reasonably prudent steps, when you begin distribution of Opaque | ||
7228 | % copies in quantity, to ensure that this Transparent copy will remain | ||
7229 | % thus accessible at the stated location until at least one year after | ||
7230 | % the last time you distribute an Opaque copy (directly or through | ||
7231 | % your agents or retailers) of that edition to the public. | ||
7232 | % | ||
7233 | % It is requested, but not required, that you contact the authors of | ||
7234 | % the Document well before redistributing any large number of copies, | ||
7235 | % to give them a chance to provide you with an updated version of the | ||
7236 | % Document. | ||
7237 | % | ||
7238 | % \needspace{3\baselineskip} | ||
7239 | % \begin{center} | ||
7240 | % {\large\bf 4. MODIFICATIONS\par} | ||
7241 | % \end{center} | ||
7242 | % | ||
7243 | % You may copy and distribute a Modified Version of the Document under | ||
7244 | % the conditions of sections 2 and 3 above, provided that you release | ||
7245 | % the Modified Version under precisely this License, with the Modified | ||
7246 | % Version filling the role of the Document, thus licensing | ||
7247 | % distribution and modification of the Modified Version to whoever | ||
7248 | % possesses a copy of it. In addition, you must do these things in | ||
7249 | % the Modified Version: | ||
7250 | % | ||
7251 | % \begin{itemize} | ||
7252 | % \item[A.] Use in the Title Page (and on the covers, if any) a title | ||
7253 | % distinct from that of the Document, and from those of previous | ||
7254 | % versions (which should, if there were any, be listed in the | ||
7255 | % History section of the Document). You may use the same title as a | ||
7256 | % previous version if the original publisher of that version gives | ||
7257 | % permission. | ||
7258 | % | ||
7259 | % \item[B.] List on the Title Page, as authors, one or more persons | ||
7260 | % or entities responsible for authorship of the modifications in | ||
7261 | % the Modified Version, together with at least five of the | ||
7262 | % principal authors of the Document (all of its principal authors, | ||
7263 | % if it has fewer than five), unless they release you from this | ||
7264 | % requirement. | ||
7265 | % | ||
7266 | % \item[C.] State on the Title page the name of the publisher of the | ||
7267 | % Modified Version, as the publisher. | ||
7268 | % | ||
7269 | % \item[D.] Preserve all the copyright notices of the Document. | ||
7270 | % | ||
7271 | % \item[E.] Add an appropriate copyright notice for your | ||
7272 | % modifications adjacent to the other copyright notices. | ||
7273 | % | ||
7274 | % \item[F.] Include, immediately after the copyright notices, a | ||
7275 | % license notice giving the public permission to use the Modified | ||
7276 | % Version under the terms of this License, in the form shown in the | ||
7277 | % Addendum below. | ||
7278 | % | ||
7279 | % \item[G.] Preserve in that license notice the full lists of | ||
7280 | % Invariant Sections and required Cover Texts given in the | ||
7281 | % Document's license notice. | ||
7282 | % | ||
7283 | % \item[H.] Include an unaltered copy of this License. | ||
7284 | % | ||
7285 | % \item[I.] Preserve the section Entitled \enquote{History}, | ||
7286 | % Preserve its Title, and add to it an item stating at least the | ||
7287 | % title, year, new authors, and publisher of the Modified Version | ||
7288 | % as given on the Title Page. If there is no section Entitled | ||
7289 | % \enquote{History} in the Document, create one stating the title, | ||
7290 | % year, authors, and publisher of the Document as given on its | ||
7291 | % Title Page, then add an item describing the Modified Version as | ||
7292 | % stated in the previous sentence. | ||
7293 | % | ||
7294 | % \item[J.] Preserve the network location, if any, given in the | ||
7295 | % Document for public access to a Transparent copy of the Document, | ||
7296 | % and likewise the network locations given in the Document for | ||
7297 | % previous versions it was based on. These may be placed in the | ||
7298 | % \enquote{History} section. You may omit a network location for a | ||
7299 | % work that was published at least four years before the Document | ||
7300 | % itself, or if the original publisher of the version it refers to | ||
7301 | % gives permission. | ||
7302 | % | ||
7303 | % \item[K.] For any section Entitled \enquote{Acknowledgements} or | ||
7304 | % \enquote{Dedications}, Preserve the Title of the section, and | ||
7305 | % preserve in the section all the substance and tone of each of the | ||
7306 | % contributor acknowledgements and/or dedications given therein. | ||
7307 | % | ||
7308 | % \item[L.] Preserve all the Invariant Sections of the Document, | ||
7309 | % unaltered in their text and in their titles. Section numbers or | ||
7310 | % the equivalent are not considered part of the section titles. | ||
7311 | % | ||
7312 | % \item[M.] Delete any section Entitled \enquote{Endorsements}. | ||
7313 | % Such a section may not be included in the Modified Version. | ||
7314 | % | ||
7315 | % \item[N.] Do not retitle any existing section to be Entitled | ||
7316 | % \enquote{Endorsements} or to conflict in title with any Invariant | ||
7317 | % Section. | ||
7318 | % | ||
7319 | % \item[O.] Preserve any Warranty Disclaimers. | ||
7320 | % \end{itemize} | ||
7321 | % | ||
7322 | % If the Modified Version includes new front-matter sections or | ||
7323 | % appendices that qualify as Secondary Sections and contain no | ||
7324 | % material copied from the Document, you may at your option designate | ||
7325 | % some or all of these sections as invariant. To do this, add their | ||
7326 | % titles to the list of Invariant Sections in the Modified Version's | ||
7327 | % license notice. These titles must be distinct from any other | ||
7328 | % section titles. | ||
7329 | % | ||
7330 | % You may add a section Entitled \enquote{Endorsements}, provided it | ||
7331 | % contains nothing but endorsements of your Modified Version by | ||
7332 | % various parties---for example, statements of peer review or that the | ||
7333 | % text has been approved by an organization as the authoritative | ||
7334 | % definition of a standard. | ||
7335 | % | ||
7336 | % You may add a passage of up to five words as a Front-Cover Text, and | ||
7337 | % a passage of up to 25 words as a Back-Cover Text, to the end of the | ||
7338 | % list of Cover Texts in the Modified Version. Only one passage of | ||
7339 | % Front-Cover Text and one of Back-Cover Text may be added by (or | ||
7340 | % through arrangements made by) any one entity. If the Document | ||
7341 | % already includes a cover text for the same cover, previously added | ||
7342 | % by you or by arrangement made by the same entity you are acting on | ||
7343 | % behalf of, you may not add another; but you may replace the old one, | ||
7344 | % on explicit permission from the previous publisher that added the | ||
7345 | % old one. | ||
7346 | % | ||
7347 | % The author(s) and publisher(s) of the Document do not by this | ||
7348 | % License give permission to use their names for publicity for or to | ||
7349 | % assert or imply endorsement of any Modified Version. | ||
7350 | % | ||
7351 | % \needspace{3\baselineskip} | ||
7352 | % \begin{center} | ||
7353 | % {\large\bf 5. COMBINING DOCUMENTS\par} | ||
7354 | % \end{center} | ||
7355 | % | ||
7356 | % You may combine the Document with other documents released under | ||
7357 | % this License, under the terms defined in section~4 above for | ||
7358 | % modified versions, provided that you include in the combination all | ||
7359 | % of the Invariant Sections of all of the original documents, | ||
7360 | % unmodified, and list them all as Invariant Sections of your combined | ||
7361 | % work in its license notice, and that you preserve all their Warranty | ||
7362 | % Disclaimers. | ||
7363 | % | ||
7364 | % The combined work need only contain one copy of this License, and | ||
7365 | % multiple identical Invariant Sections may be replaced with a single | ||
7366 | % copy. If there are multiple Invariant Sections with the same name | ||
7367 | % but different contents, make the title of each such section unique | ||
7368 | % by adding at the end of it, in parentheses, the name of the original | ||
7369 | % author or publisher of that section if known, or else a unique | ||
7370 | % number. Make the same adjustment to the section titles in the list | ||
7371 | % of Invariant Sections in the license notice of the combined work. | ||
7372 | % | ||
7373 | % In the combination, you must combine any sections Entitled | ||
7374 | % \enquote{History} in the various original documents, forming one | ||
7375 | % section Entitled \enquote{History}; likewise combine any sections | ||
7376 | % Entitled \enquote{Acknowledgements}, and any sections Entitled | ||
7377 | % \enquote{Dedications}. You must delete all sections Entitled | ||
7378 | % \enquote{Endorsements}. | ||
7379 | % | ||
7380 | % \needspace{3\baselineskip} | ||
7381 | % \begin{center} | ||
7382 | % {\large\bf 6. COLLECTIONS OF DOCUMENTS\par} | ||
7383 | % \end{center} | ||
7384 | % | ||
7385 | % You may make a collection consisting of the Document and other | ||
7386 | % documents released under this License, and replace the individual | ||
7387 | % copies of this License in the various documents with a single copy | ||
7388 | % that is included in the collection, provided that you follow the | ||
7389 | % rules of this License for verbatim copying of each of the documents | ||
7390 | % in all other respects. | ||
7391 | % | ||
7392 | % You may extract a single document from such a collection, and | ||
7393 | % distribute it individually under this License, provided you insert a | ||
7394 | % copy of this License into the extracted document, and follow this | ||
7395 | % License in all other respects regarding verbatim copying of that | ||
7396 | % document. | ||
7397 | % | ||
7398 | % \needspace{3\baselineskip} | ||
7399 | % \begin{center} | ||
7400 | % {\large\bf 7. AGGREGATION WITH INDEPENDENT WORKS\par} | ||
7401 | % \end{center} | ||
7402 | % | ||
7403 | % A compilation of the Document or its derivatives with other separate | ||
7404 | % and independent documents or works, in or on a volume of a storage | ||
7405 | % or distribution medium, is called an \enquote{aggregate} if the | ||
7406 | % copyright resulting from the compilation is not used to limit the | ||
7407 | % legal rights of the compilation's users beyond what the individual | ||
7408 | % works permit. When the Document is included in an aggregate, this | ||
7409 | % License does not apply to the other works in the aggregate which are | ||
7410 | % not themselves derivative works of the Document. | ||
7411 | % | ||
7412 | % If the Cover Text requirement of section~3 is applicable to these | ||
7413 | % copies of the Document, then if the Document is less than one half | ||
7414 | % of the entire aggregate, the Document's Cover Texts may be placed on | ||
7415 | % covers that bracket the Document within the aggregate, or the | ||
7416 | % electronic equivalent of covers if the Document is in electronic | ||
7417 | % form. Otherwise they must appear on printed covers that bracket the | ||
7418 | % whole aggregate. | ||
7419 | % | ||
7420 | % \needspace{3\baselineskip} | ||
7421 | % \begin{center} | ||
7422 | % {\large\bf 8. TRANSLATION\par} | ||
7423 | % \end{center} | ||
7424 | % | ||
7425 | % Translation is considered a kind of modification, so you may | ||
7426 | % distribute translations of the Document under the terms of | ||
7427 | % section~4. Replacing Invariant Sections with translations requires | ||
7428 | % special permission from their copyright holders, but you may include | ||
7429 | % translations of some or all Invariant Sections in addition to the | ||
7430 | % original versions of these Invariant Sections. You may include a | ||
7431 | % translation of this License, and all the license notices in the | ||
7432 | % Document, and any Warranty Disclaimers, provided that you also | ||
7433 | % include the original English version of this License and the | ||
7434 | % original versions of those notices and disclaimers. In case of a | ||
7435 | % disagreement between the translation and the original version of | ||
7436 | % this License or a notice or disclaimer, the original version will | ||
7437 | % prevail. | ||
7438 | % | ||
7439 | % If a section in the Document is Entitled \enquote{Acknowledgements}, | ||
7440 | % \enquote{Dedications}, or \enquote{History}, the requirement | ||
7441 | % (section~4) to Preserve its Title (section~1) will typically require | ||
7442 | % changing the actual title. | ||
7443 | % | ||
7444 | % \needspace{3\baselineskip} | ||
7445 | % \begin{center} | ||
7446 | % {\large\bf 9. TERMINATION\par} | ||
7447 | % \end{center} | ||
7448 | % | ||
7449 | % You may not copy, modify, sublicense, or distribute the Document | ||
7450 | % except as expressly provided under this License. Any attempt | ||
7451 | % otherwise to copy, modify, sublicense, or distribute it is void, and | ||
7452 | % will automatically terminate your rights under this License. | ||
7453 | % | ||
7454 | % However, if you cease all violation of this License, then your | ||
7455 | % license from a particular copyright holder is reinstated (a) | ||
7456 | % provisionally, unless and until the copyright holder explicitly and | ||
7457 | % finally terminates your license, and (b) permanently, if the | ||
7458 | % copyright holder fails to notify you of the violation by some | ||
7459 | % reasonable means prior to 60 days after the cessation. | ||
7460 | % | ||
7461 | % Moreover, your license from a particular copyright holder is | ||
7462 | % reinstated permanently if the copyright holder notifies you of the | ||
7463 | % violation by some reasonable means, this is the first time you have | ||
7464 | % received notice of violation of this License (for any work) from | ||
7465 | % that copyright holder, and you cure the violation prior to 30 days | ||
7466 | % after your receipt of the notice. | ||
7467 | % | ||
7468 | % Termination of your rights under this section does not terminate the | ||
7469 | % licenses of parties who have received copies or rights from you | ||
7470 | % under this License. If your rights have been terminated and not | ||
7471 | % permanently reinstated, receipt of a copy of some or all of the same | ||
7472 | % material does not give you any rights to use it. | ||
7473 | % | ||
7474 | % \needspace{3\baselineskip} | ||
7475 | % \begin{center} | ||
7476 | % {\large\bf 10. FUTURE REVISIONS OF THIS LICENSE\par} | ||
7477 | % \end{center} | ||
7478 | % | ||
7479 | % The Free Software Foundation may publish new, revised versions of | ||
7480 | % the GNU Free Documentation License from time to time. Such new | ||
7481 | % versions will be similar in spirit to the present version, but may | ||
7482 | % differ in detail to address new problems or concerns. See | ||
7483 | % \url{https://www.gnu.org/licenses/}. | ||
7484 | % | ||
7485 | % Each version of the License is given a distinguishing version | ||
7486 | % number. If the Document specifies that a particular numbered | ||
7487 | % version of this License \enquote{or any later version} applies to | ||
7488 | % it, you have the option of following the terms and conditions either | ||
7489 | % of that specified version or of any later version that has been | ||
7490 | % published (not as a draft) by the Free Software Foundation. If the | ||
7491 | % Document does not specify a version number of this License, you may | ||
7492 | % choose any version ever published (not as a draft) by the Free | ||
7493 | % Software Foundation. If the Document specifies that a proxy can | ||
7494 | % decide which future versions of this License can be used, that | ||
7495 | % proxy's public statement of acceptance of a version permanently | ||
7496 | % authorizes you to choose that version for the Document. | ||
7497 | % | ||
7498 | % \needspace{3\baselineskip} | ||
7499 | % \begin{center} | ||
7500 | % {\large\bf 11. RELICENSING\par} | ||
7501 | % \end{center} | ||
7502 | % | ||
7503 | % \enquote{Massive Multiauthor Collaboration Site} (or \enquote{MMC | ||
7504 | % Site}) means any World Wide Web server that publishes copyrightable | ||
7505 | % works and also provides prominent facilities for anybody to edit | ||
7506 | % those works. A public wiki that anybody can edit is an example of | ||
7507 | % such a server. A \enquote{Massive Multiauthor Collaboration} (or | ||
7508 | % \enquote{MMC}) contained in the site means any set of copyrightable | ||
7509 | % works thus published on the MMC site. | ||
7510 | % | ||
7511 | % \enquote{CC-BY-SA} means the Creative Commons Attribution-Share | ||
7512 | % Alike 3.0 license published by Creative Commons Corporation, a | ||
7513 | % not-for-profit corporation with a principal place of business in San | ||
7514 | % Francisco, California, as well as future copyleft versions of that | ||
7515 | % license published by that same organization. | ||
7516 | % | ||
7517 | % \enquote{Incorporate} means to publish or republish a Document, in | ||
7518 | % whole or in part, as part of another Document. | ||
7519 | % | ||
7520 | % An MMC is \enquote{eligible for relicensing} if it is licensed under | ||
7521 | % this License, and if all works that were first published under this | ||
7522 | % License somewhere other than this MMC, and subsequently incorporated | ||
7523 | % in whole or in part into the MMC, (1) had no cover texts or | ||
7524 | % invariant sections, and (2) were thus incorporated prior to November | ||
7525 | % 1, 2008. | ||
7526 | % | ||
7527 | % The operator of an MMC Site may republish an MMC contained in the | ||
7528 | % site under CC-BY-SA on the same site at any time before August 1, | ||
7529 | % 2009, provided the MMC is eligible for relicensing. | ||
7530 | % | ||
7531 | % \needspace{3\baselineskip} | ||
7532 | % \begin{center} | ||
7533 | % {\large\bf ADDENDUM: How to use this License for your documents\par} | ||
7534 | % \end{center} | ||
7535 | % | ||
7536 | % To use this License in a document you have written, include a copy | ||
7537 | % of the License in the document and put the following copyright and | ||
7538 | % license notices just after the title page: | ||
7539 | % | ||
7540 | % \bigskip | ||
7541 | % \begin{quote} | ||
7542 | % Copyright \copyright{} YEAR YOUR NAME. Permission is granted to | ||
7543 | % copy, distribute and/or modify this document under the terms of | ||
7544 | % the GNU Free Documentation License, Version 1.3 or any later | ||
7545 | % version published by the Free Software Foundation; with no | ||
7546 | % Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. | ||
7547 | % A copy of the license is included in the section entitled | ||
7548 | % \enquote{GNU Free Documentation License}. | ||
7549 | % \end{quote} | ||
7550 | % \bigskip | ||
7551 | % | ||
7552 | % If you have Invariant Sections, Front-Cover Texts and Back-Cover | ||
7553 | % Texts, replace the \enquote{with \dots\ Texts.}\ line with this: | ||
7554 | % | ||
7555 | % \bigskip | ||
7556 | % \begin{quote} | ||
7557 | % with the Invariant Sections being LIST THEIR TITLES, with the | ||
7558 | % Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. | ||
7559 | % \end{quote} | ||
7560 | % \bigskip | ||
7561 | % | ||
7562 | % If you have Invariant Sections without Cover Texts, or some other | ||
7563 | % combination of the three, merge those two alternatives to suit the | ||
7564 | % situation. | ||
7565 | % | ||
7566 | % If your document contains nontrivial examples of program code, we | ||
7567 | % recommend releasing these examples in parallel under your choice of | ||
7568 | % free software license, such as the GNU General Public License, | ||
7569 | % to permit their use in free software. | ||
7570 | % | 8323 | % |
7571 | % \section{References} | 8324 | % \section{References} |
7572 | % \label{sec:references} | 8325 | % \label{sec:references} |
7573 | % \printbibliography[heading=none] | 8326 | % \subsection*{Texts Used} |
8327 | % \printbibliography[heading=none, subtype=primary] | ||
8328 | % \subsection*{References} | ||
8329 | % \printbibliography[heading=none, notsubtype=primary] | ||
7574 | % | 8330 | % |
7575 | % \section{Sample: C. J. Caesar, \emph{Gallic War}, | 8331 | % \section{Sample: C. J. Caesar, \emph{Gallic War}, |
7576 | % VI, XIII.1} | 8332 | % VI, XIII.1} |
@@ -7636,11 +8392,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
7636 | % | 8392 | % |
7637 | % \section{Implementation} | 8393 | % \section{Implementation} |
7638 | % \label{sec:implementation} | 8394 | % \label{sec:implementation} |
7639 | % | 8395 | % |
7640 | % \iffalse | 8396 | % \iffalse |
7641 | %<*package> | 8397 | %<*package> |
7642 | % \fi | 8398 | % \fi |
7643 | % | 8399 | % |
7644 | % \pkg{ekdosis} relies on Lua functions and tables. Read the | 8400 | % \pkg{ekdosis} relies on Lua functions and tables. Read the |
7645 | % |.lua| files that accompany \pkg{ekdosis} for more | 8401 | % |.lua| files that accompany \pkg{ekdosis} for more |
7646 | % information. | 8402 | % information. |
@@ -7659,7 +8415,8 @@ Sample text with a \textcolor{red}{word} in red. | |||
7659 | \newif\if@pkg@float | 8415 | \newif\if@pkg@float |
7660 | \newif\if@pkg@footins | 8416 | \newif\if@pkg@footins |
7661 | \newif\if@pkg@keyfloat | 8417 | \newif\if@pkg@keyfloat |
7662 | \newif\if@pkg@fitfloat | 8418 | \newif\if@pkg@fitapp |
8419 | \newif\if@pkg@breakable | ||
7663 | \newif\if@pkg@ekddivs | 8420 | \newif\if@pkg@ekddivs |
7664 | \newif\if@parnotesroman | 8421 | \newif\if@parnotesroman |
7665 | \newif\if@pkg@parnotes | 8422 | \newif\if@pkg@parnotes |
@@ -7669,10 +8426,12 @@ Sample text with a \textcolor{red}{word} in red. | |||
7669 | choice layout = {float = {\@pkg@floattrue}, | 8426 | choice layout = {float = {\@pkg@floattrue}, |
7670 | footins = {\@pkg@floatfalse\@pkg@footinstrue}, | 8427 | footins = {\@pkg@floatfalse\@pkg@footinstrue}, |
7671 | keyfloat = {\@pkg@floatfalse\@pkg@keyfloattrue}, | 8428 | keyfloat = {\@pkg@floatfalse\@pkg@keyfloattrue}, |
7672 | fitfloat = {\@pkg@floatfalse\@pkg@fitfloattrue}}, | 8429 | fitapp = {\@pkg@floatfalse\@pkg@fitapptrue}, |
8430 | breakable = {\@pkg@floatfalse\@pkg@fitapptrue\@pkg@breakabletrue}}, | ||
7673 | initial layout = float, | 8431 | initial layout = float, |
7674 | unknown-choice layout = \PackageError{ekdosis}{unknown | 8432 | unknown-choice layout = \PackageError{ekdosis}{unknown |
7675 | layout=#1}{`layout' must be either `float' or `footins'.}, | 8433 | layout=#1}{`layout' must be either `float', `footins', `keyfloat', |
8434 | `fitapp' or `breakable'.}, | ||
7676 | choice divs = {ekdosis = {\@pkg@ekddivstrue}, | 8435 | choice divs = {ekdosis = {\@pkg@ekddivstrue}, |
7677 | latex = {\@pkg@ekddivsfalse | 8436 | latex = {\@pkg@ekddivsfalse |
7678 | \AtBeginDocument{\luadirect{ekdosis.setekddivsfalse()}}}}, | 8437 | \AtBeginDocument{\luadirect{ekdosis.setekddivsfalse()}}}}, |
@@ -7728,10 +8487,14 @@ Sample text with a \textcolor{red}{word} in red. | |||
7728 | \keyparbox[!b]{#1}{\ekd@insert@apparatus}}} | 8487 | \keyparbox[!b]{#1}{\ekd@insert@apparatus}}} |
7729 | \ekd@keyparopts{} | 8488 | \ekd@keyparopts{} |
7730 | \fi | 8489 | \fi |
7731 | \if@pkg@fitfloat | 8490 | \if@pkg@fitapp |
7732 | \RequirePackage{tcolorbox} | 8491 | \RequirePackage{tcolorbox} |
7733 | \tcbuselibrary{fitting,skins} | 8492 | \tcbuselibrary{fitting,skins} |
7734 | \fi | 8493 | \fi |
8494 | \if@pkg@breakable | ||
8495 | \RequirePackage{tcolorbox} | ||
8496 | \tcbuselibrary{fitting,skins,breakable} | ||
8497 | \fi | ||
7735 | \RequirePackage{refcount} | 8498 | \RequirePackage{refcount} |
7736 | \RequirePackage{zref-user} | 8499 | \RequirePackage{zref-user} |
7737 | \RequirePackage{zref-abspage} | 8500 | \RequirePackage{zref-abspage} |
@@ -7754,6 +8517,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
7754 | \luadirect{ekdosis.closestream()} | 8517 | \luadirect{ekdosis.closestream()} |
7755 | } | 8518 | } |
7756 | % \end{macrocode} | 8519 | % \end{macrocode} |
8520 | % \paragraph{\textsf{ekdosis} Symbol} | ||
8521 | % \begin{macro}{\eKd} | ||
8522 | % \changes{v1.5}{2023/07/29}{Prints \textsf{ekdosis} indentifying | ||
8523 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying | ||
8524 | % symbol. It is produced by \cs{eKd} and best printed with the Old | ||
8525 | % Standard Greek font. | ||
8526 | % \begin{macrocode} | ||
8527 | \def\eKd{% | ||
8528 | ε\kern -.4em\raise 1.15ex\hbox{κ}\kern -.105emδ% | ||
8529 | \ifdefined\xspace\xspace\fi | ||
8530 | } | ||
8531 | % \end{macrocode} | ||
8532 | % \end{macro} | ||
7757 | % \paragraph{Setup} | 8533 | % \paragraph{Setup} |
7758 | % \begin{macro}{\ekdsetup} | 8534 | % \begin{macro}{\ekdsetup} |
7759 | % \changes{v1.3}{2021/08/18}{new command for global options} | 8535 | % \changes{v1.3}{2021/08/18}{new command for global options} |
@@ -7765,7 +8541,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
7765 | store spbmk = \ekd@spbmk, | 8541 | store spbmk = \ekd@spbmk, |
7766 | initial spbmk = spb, | 8542 | initial spbmk = spb, |
7767 | store hpbmk = \ekd@hpbmk, | 8543 | store hpbmk = \ekd@hpbmk, |
7768 | initial hpbmk = hpb, | 8544 | initial hpbmk = hpb |
7769 | } | 8545 | } |
7770 | \NewDocumentCommand{\ekdsetup}{m}{\ekvset{ekd@setup}{#1}} | 8546 | \NewDocumentCommand{\ekdsetup}{m}{\ekvset{ekd@setup}{#1}} |
7771 | \@onlypreamble\ekdsetup | 8547 | \@onlypreamble\ekdsetup |
@@ -7789,6 +8565,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
7789 | code familysep = \luadirect{ekdosis.setfamilysep(\luastringN{#1})}, | 8565 | code familysep = \luadirect{ekdosis.setfamilysep(\luastringN{#1})}, |
7790 | store lemmastyle = \ekd@lemmastyle, | 8566 | store lemmastyle = \ekd@lemmastyle, |
7791 | store readingstyle = \ekd@readingstyle, | 8567 | store readingstyle = \ekd@readingstyle, |
8568 | code initialrule = \def\ekd@initial@rule{#1\NLS}, | ||
8569 | default initialrule = \rule{0.4\columnwidth}{0.4pt}, | ||
8570 | noval noinitialrule = \undef\ekd@initial@rule, | ||
8571 | code maxentries = \luadirect{ekdosis.setglimit(\luastringN{#1})}, | ||
8572 | nmeta nomaxentries = {maxentries=none}, | ||
7792 | code keyparopts = \if@pkg@keyfloat\ekd@keyparopts{#1}\fi, | 8573 | code keyparopts = \if@pkg@keyfloat\ekd@keyparopts{#1}\fi, |
7793 | dimen appheight = \ekd@app@height, | 8574 | dimen appheight = \ekd@app@height, |
7794 | initial appheight = .5\textheight, | 8575 | initial appheight = .5\textheight, |
@@ -7800,9 +8581,6 @@ Sample text with a \textcolor{red}{word} in red. | |||
7800 | unknown-choice fitalgorithm = \PackageError{ekdosis}{unknown | 8581 | unknown-choice fitalgorithm = \PackageError{ekdosis}{unknown |
7801 | fitalgorithm=#1}{`fitalgorithm' must be either `fontsize', | 8582 | fitalgorithm=#1}{`fitalgorithm' must be either `fontsize', |
7802 | `hybrid', `areasize' or `squeeze'.}, | 8583 | `hybrid', `areasize' or `squeeze'.}, |
7803 | code initialrule = \def\ekd@initial@rule{#1\NLS}, | ||
7804 | default initialrule = \rule{0.4\columnwidth}{0.4pt}, | ||
7805 | noval noinitialrule = \undef\ekd@initial@rule, | ||
7806 | initial appfontsize = \footnotesize, | 8584 | initial appfontsize = \footnotesize, |
7807 | initial refnumstyle = \bfseries, | 8585 | initial refnumstyle = \bfseries, |
7808 | initial postrefnum = ~, | 8586 | initial postrefnum = ~, |
@@ -8001,13 +8779,33 @@ Sample text with a \textcolor{red}{word} in red. | |||
8001 | % \end{macrocode} | 8779 | % \end{macrocode} |
8002 | % \end{macro} | 8780 | % \end{macro} |
8003 | % \begin{macro}{\teidirect} | 8781 | % \begin{macro}{\teidirect} |
8782 | % \begin{macro}{\teidirectE} | ||
8004 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the | 8783 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the |
8005 | % \texttt{TEI xml} file} | 8784 | % \texttt{TEI xml} file} |
8785 | % \changes{v1.5}{2023/07/29}{direct insertion of empty elements in the | ||
8786 | % \texttt{TEI xml} file} | ||
8006 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} | 8787 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} |
8007 | % does nothing in \LaTeX. Its only use is to insert elements in the | 8788 | % does nothing in \LaTeX. It is only used to insert elements in the |
8008 | % \texttt{TEI xml} output file. | 8789 | % \texttt{TEI xml} output file. \cs{teidirectE}\oarg{xml |
8790 | % attributes}\marg{xml element} is strictly equivalent to | ||
8791 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}|{}| and can be | ||
8792 | % used to insert empty \texttt{TEI} elements. | ||
8793 | % \begin{macrocode} | ||
8794 | \NewDocumentCommand{\teidirect}{O{} m m}{\ignorespaces} | ||
8795 | \NewDocumentCommand{\teidirectE}{O{} m}{\ignorespaces} | ||
8796 | % \end{macrocode} | ||
8797 | % \end{macro} | ||
8798 | % \end{macro} | ||
8799 | % \begin{macro}{\getTEIxmlid} | ||
8800 | % \changes{v1.5}{2023/07/29}{returns \texttt{TEI xml:ids} from a | ||
8801 | % csv-list of ids} This command returns from a csv-list of unique | ||
8802 | % identifiers declared in commands such as \cs{DeclareWitness} and the | ||
8803 | % like a space-separated list of their corresponding |xml:id|s, each | ||
8804 | % preceded by the octothorpe (the |#| sign). | ||
8009 | % \begin{macrocode} | 8805 | % \begin{macrocode} |
8010 | \NewDocumentCommand{\teidirect}{O{}mm}{\ignorespaces} | 8806 | \NewDocumentCommand{\getTEIxmlid}{m}{% |
8807 | \luadirect{tex.sprint(ekdosis.getsiglum(\luastringN{#1}, "TEI"))}% | ||
8808 | } | ||
8011 | % \end{macrocode} | 8809 | % \end{macrocode} |
8012 | % \end{macro} | 8810 | % \end{macro} |
8013 | % \begin{macro}{\EnvtoTEI} | 8811 | % \begin{macro}{\EnvtoTEI} |
@@ -8171,7 +8969,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8171 | % \end{macro} | 8969 | % \end{macro} |
8172 | % \begin{macro}{\ekdpb} | 8970 | % \begin{macro}{\ekdpb} |
8173 | % \changes{v1.2}{2021/04/02}{conditional page breaks} | 8971 | % \changes{v1.2}{2021/04/02}{conditional page breaks} |
8174 | % \cs{ekdpk}\oarg{page no}\marg{line no} is used to insert conditional | 8972 | % \cs{ekdpb}\oarg{page no}\marg{line no} is used to insert conditional |
8175 | % page breaks by specifying that the page break should occur only on a | 8973 | % page breaks by specifying that the page break should occur only on a |
8176 | % given line and optionally a given page. If the specified conditions | 8974 | % given line and optionally a given page. If the specified conditions |
8177 | % be met then this command triggers \cs{pagebreak}. | 8975 | % be met then this command triggers \cs{pagebreak}. |
@@ -8181,7 +8979,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
8181 | \NewDocumentCommand{\ekdpb}{s o m}{% | 8979 | \NewDocumentCommand{\ekdpb}{s o m}{% |
8182 | \IfBooleanTF{#1} | 8980 | \IfBooleanTF{#1} |
8183 | {\ifekd@showpb\marginpar{\ekd@hpbmk}\fi | 8981 | {\ifekd@showpb\marginpar{\ekd@hpbmk}\fi |
8184 | \pagebreak} | 8982 | \pagebreak |
8983 | \@ifnextchar\bgroup{}{#3}% | ||
8984 | } | ||
8185 | {% | 8985 | {% |
8186 | \def\@tmpoarg{#2}% | 8986 | \def\@tmpoarg{#2}% |
8187 | \def\@tmpmarg{#3}% | 8987 | \def\@tmpmarg{#3}% |
@@ -8234,7 +9034,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8234 | } | 9034 | } |
8235 | \protected\def\LRnum#1{\bgroup\textdir TLT#1\egroup} | 9035 | \protected\def\LRnum#1{\bgroup\textdir TLT#1\egroup} |
8236 | % \end{macrocode} | 9036 | % \end{macrocode} |
8237 | % Set counter referring to line numbers and make it global. | 9037 | % Set a counter referring to line numbers and make it global. |
8238 | % \begin{macrocode} | 9038 | % \begin{macrocode} |
8239 | \newcounter{ekd@lab} | 9039 | \newcounter{ekd@lab} |
8240 | \globalcounter{ekd@lab} | 9040 | \globalcounter{ekd@lab} |
@@ -8279,15 +9079,15 @@ Sample text with a \textcolor{red}{word} in red. | |||
8279 | % point of the document. The keys to be used follow:--- | 9079 | % point of the document. The keys to be used follow:--- |
8280 | % \begin{macrocode} | 9080 | % \begin{macrocode} |
8281 | \newif\ifrtl@app | 9081 | \newif\ifrtl@app |
8282 | \edef\ekdsep{] } | 9082 | \def\ekdsep{] } |
8283 | \edef\ekdsubsep{} | 9083 | \def\ekdsubsep{} |
8284 | \ekvdefinekeys{default@app}{ | 9084 | \ekvdefinekeys{default@app}{ |
8285 | choice direction = {LR = \rtl@appfalse, | 9085 | choice direction = {LR = \rtl@appfalse, |
8286 | RL = \rtl@apptrue}, | 9086 | RL = \rtl@apptrue}, |
8287 | unknown-choice direction = \PackageError{ekdosis}{unknown | 9087 | unknown-choice direction = \PackageError{ekdosis}{unknown |
8288 | direction=#1}{`direction' must be either `LR' or `RL'.}, | 9088 | direction=#1}{`direction' must be either `LR' or `RL'.}, |
8289 | code sep = \edef\ekdsep{#1}, | 9089 | code sep = \def\ekdsep{#1}, |
8290 | code subsep = \edef\ekdsubsep{#1}, | 9090 | code subsep = \def\ekdsubsep{#1}, |
8291 | store bhook = \ekd@begin@apparatus, | 9091 | store bhook = \ekd@begin@apparatus, |
8292 | initial bhook = {}, | 9092 | initial bhook = {}, |
8293 | store ehook = \ekd@end@apparatus, | 9093 | store ehook = \ekd@end@apparatus, |
@@ -8330,16 +9130,16 @@ Sample text with a \textcolor{red}{word} in red. | |||
8330 | % between lemma texts and variant readings, which is by default | 9130 | % between lemma texts and variant readings, which is by default |
8331 | % a closing square bracket followed by a space (\verb*+] +):--- | 9131 | % a closing square bracket followed by a space (\verb*+] +):--- |
8332 | % \begin{macrocode} | 9132 | % \begin{macrocode} |
8333 | \NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}} | 9133 | \NewDocumentCommand{\SetSeparator}{m}{\def\ekdsep{#1}} |
8334 | % \end{macrocode} | 9134 | % \end{macrocode} |
8335 | % \end{macro} | 9135 | % \end{macro} |
8336 | % \begin{macro}{\SetSubseparator} | 9136 | % \begin{macro}{\SetSubseparator} |
8337 | % \changes{v1.4}{2021/09/06}{New command for subseparators} | 9137 | % \changes{v1.4}{2021/11/21}{New command for subseparators} |
8338 | % \cs{SetSubseparator}\marg{sub-separator} allows to change the | 9138 | % \cs{SetSubseparator}\marg{sub-separator} allows to change the |
8339 | % \enquote{subseparator} between variant readings. By default, | 9139 | % \enquote{subseparator} between variant readings. By default, |
8340 | % no subseparator is set:--- | 9140 | % no subseparator is set:--- |
8341 | % \begin{macrocode} | 9141 | % \begin{macrocode} |
8342 | \NewDocumentCommand{\SetSubseparator}{m}{\edef\ekdsubsep{#1}} | 9142 | \NewDocumentCommand{\SetSubseparator}{m}{\def\ekdsubsep{#1}} |
8343 | % \end{macrocode} | 9143 | % \end{macrocode} |
8344 | % \end{macro} | 9144 | % \end{macro} |
8345 | % \begin{macro}{\SetBeginApparatus} | 9145 | % \begin{macro}{\SetBeginApparatus} |
@@ -8347,7 +9147,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8347 | % characters at the beginning of the apparatus block. By default, | 9147 | % characters at the beginning of the apparatus block. By default, |
8348 | % nothing is appended:--- | 9148 | % nothing is appended:--- |
8349 | % \begin{macrocode} | 9149 | % \begin{macrocode} |
8350 | \NewDocumentCommand{\SetBeginApparatus}{m}{\edef\ekd@begin@apparatus{#1}} | 9150 | \NewDocumentCommand{\SetBeginApparatus}{m}{\def\ekd@begin@apparatus{#1}} |
8351 | % \end{macrocode} | 9151 | % \end{macrocode} |
8352 | % \end{macro} | 9152 | % \end{macro} |
8353 | % \begin{macro}{\SetEndApparatus} | 9153 | % \begin{macro}{\SetEndApparatus} |
@@ -8356,7 +9156,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8356 | % as it is customary in some editions. By default, nothing is | 9156 | % as it is customary in some editions. By default, nothing is |
8357 | % appended:--- | 9157 | % appended:--- |
8358 | % \begin{macrocode} | 9158 | % \begin{macrocode} |
8359 | \NewDocumentCommand{\SetEndApparatus}{m}{\edef\ekd@end@apparatus{#1}} | 9159 | \NewDocumentCommand{\SetEndApparatus}{m}{\def\ekd@end@apparatus{#1}} |
8360 | % \end{macrocode} | 9160 | % \end{macrocode} |
8361 | % \end{macro} | 9161 | % \end{macro} |
8362 | % \begin{macro}{\SetUnitDelimiter} | 9162 | % \begin{macro}{\SetUnitDelimiter} |
@@ -8467,11 +9267,55 @@ Sample text with a \textcolor{red}{word} in red. | |||
8467 | \newif\ifekd@inside@app | 9267 | \newif\ifekd@inside@app |
8468 | \newif\ifekd@keepinapp | 9268 | \newif\ifekd@keepinapp |
8469 | % \end{macrocode} | 9269 | % \end{macrocode} |
9270 | % \cs{ekd@app@localheight} is used to set the maximum height of the | ||
9271 | % apparatus block locally:--- | ||
9272 | % \begin{macrocode} | ||
9273 | \newlength{\ekd@app@localheight} | ||
9274 | % \end{macrocode} | ||
9275 | % \begin{macro}{\localappheight} | ||
9276 | % \changes{v1.5}{2023/07/29}{changes the height of the apparatus | ||
9277 | % criticus} | ||
9278 | % \cs{localappheight}\marg{dimen} can be used to change locally the | ||
9279 | % length of \cs{ekd@app@height} set by the |appheight| option of | ||
9280 | % \cs{SetHooks}, namely the height up to which the apparatus block is | ||
9281 | % allowed to grow. \meta{dimen} must be a number followed by a unit | ||
9282 | % length. This command operates only on the apparatus block that | ||
9283 | % follows it. | ||
9284 | % \begin{macrocode} | ||
9285 | \def\localappheight#1{% | ||
9286 | \if@pkg@fitapp | ||
9287 | \luadirect{ekdosis.changeappheight()}% | ||
9288 | \setlength{\ekd@app@localheight}{#1}% | ||
9289 | \fi | ||
9290 | \ignorespaces | ||
9291 | } | ||
9292 | % \end{macrocode} | ||
9293 | % \end{macro} | ||
9294 | % \begin{macro}{\addtoappheight} | ||
9295 | % \changes{v1.5}{2023/07/29}{increases or decreases the height of the | ||
9296 | % apparatus criticus} | ||
9297 | % As the name suggests, in contrast to \cs{localappheight}, | ||
9298 | % \cs{addtoappheight}\marg{dimen} is used to increase or decrease | ||
9299 | % locally the length of \cs{ekd@app@height}. \meta{dimen} must be a | ||
9300 | % number followed by a unit length. This command operates only on the | ||
9301 | % apparatus block that follows it. | ||
9302 | % \begin{macrocode} | ||
9303 | \def\addtoappheight#1{% | ||
9304 | \if@pkg@fitapp | ||
9305 | \luadirect{ekdosis.changeappheight()}% | ||
9306 | \setlength{\ekd@app@localheight}{\ekd@app@height}% | ||
9307 | \addtolength{\ekd@app@localheight}{#1}% | ||
9308 | \fi | ||
9309 | \ignorespaces | ||
9310 | } | ||
9311 | % \end{macrocode} | ||
9312 | % \end{macro} | ||
8470 | % Then \cs{ekd@fitapp} is defined for |layout=fitapp|:--- | 9313 | % Then \cs{ekd@fitapp} is defined for |layout=fitapp|:--- |
8471 | % \begin{macrocode} | 9314 | % \begin{macrocode} |
8472 | \if@pkg@fitfloat | 9315 | \if@pkg@fitapp |
8473 | \newtcboxfit{\ekd@fitapp}{% | 9316 | \newtcboxfit{\ekd@fitapp}{% |
8474 | blankest, | 9317 | blankest, |
9318 | \if@pkg@breakable breakable\fi, | ||
8475 | fit basedim = \f@size pt, | 9319 | fit basedim = \f@size pt, |
8476 | fit fontsize macros, | 9320 | fit fontsize macros, |
8477 | fit height from=0pt to \ekd@app@height, | 9321 | fit height from=0pt to \ekd@app@height, |
@@ -8479,6 +9323,15 @@ Sample text with a \textcolor{red}{word} in red. | |||
8479 | float=!b} | 9323 | float=!b} |
8480 | \fi | 9324 | \fi |
8481 | % \end{macrocode} | 9325 | % \end{macrocode} |
9326 | % Then \cs{ekd@breakable} for |layout=breakable|:--- | ||
9327 | % \begin{macrocode} | ||
9328 | % \if@pkg@breakable | ||
9329 | % \newtcboxfit{\ekd@breakable}{% | ||
9330 | % blankest, | ||
9331 | % breakable, | ||
9332 | % float=!b} | ||
9333 | % \fi | ||
9334 | % \end{macrocode} | ||
8482 | % Finally two commands are used to actually insert the apparatus | 9335 | % Finally two commands are used to actually insert the apparatus |
8483 | % depending on the value set in the |layout| global option. | 9336 | % depending on the value set in the |layout| global option. |
8484 | % \begin{macrocode} | 9337 | % \begin{macrocode} |
@@ -8501,7 +9354,21 @@ Sample text with a \textcolor{red}{word} in red. | |||
8501 | \apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi | 9354 | \apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi |
8502 | \ekd@inside@appfalse | 9355 | \ekd@inside@appfalse |
8503 | \if@pkg@parnotes\parnotes\parnotereset\fi | 9356 | \if@pkg@parnotes\parnotes\parnotereset\fi |
8504 | }% | 9357 | } |
9358 | % \end{macrocode} | ||
9359 | % Depending on what is instructed, either of the following two | ||
9360 | % commands is inserted by the Lua function | ||
9361 | % |ekdosis.setheightandprintapparatus()| that is used in | ||
9362 | % \cs{add@apparatus} below:--- | ||
9363 | % \begin{macrocode} | ||
9364 | \def\ekd@insert@fitapparatus@tmpheight{% | ||
9365 | \let\ekd@app@savedheight\ekd@app@height | ||
9366 | \let\ekd@app@height\ekd@app@localheight | ||
9367 | \ekd@fitapp{\ekd@insert@apparatus}% | ||
9368 | \let\ekd@app@height\ekd@app@savedheight} | ||
9369 | \def\ekd@insert@fitapparatus{% | ||
9370 | \ekd@fitapp{\ekd@insert@apparatus}% | ||
9371 | } | ||
8505 | \def\add@@apparatus{% | 9372 | \def\add@@apparatus{% |
8506 | \if@pkg@parnotes\parnotes\else\fi | 9373 | \if@pkg@parnotes\parnotes\else\fi |
8507 | \if@pkg@footins | 9374 | \if@pkg@footins |
@@ -8536,9 +9403,12 @@ Sample text with a \textcolor{red}{word} in red. | |||
8536 | \if@pkg@keyfloat | 9403 | \if@pkg@keyfloat |
8537 | \ekd@insert@keyparapp | 9404 | \ekd@insert@keyparapp |
8538 | \fi | 9405 | \fi |
8539 | \if@pkg@fitfloat | 9406 | \if@pkg@fitapp |
8540 | \ekd@fitapp{\ekd@insert@apparatus}% | 9407 | \luadirect{tex.sprint(ekdosis.setheightandprintapparatus())}% |
8541 | \fi | 9408 | \fi |
9409 | % \if@pkg@breakable | ||
9410 | % \ekd@breakable{\ekd@insert@apparatus}% | ||
9411 | % \fi | ||
8542 | } | 9412 | } |
8543 | % \end{macrocode} | 9413 | % \end{macrocode} |
8544 | % Before inserting any new entry, \cs{add@apparatus} calls | 9414 | % Before inserting any new entry, \cs{add@apparatus} calls |
@@ -8564,11 +9434,21 @@ Sample text with a \textcolor{red}{word} in red. | |||
8564 | % while \cs{append@ln@app} inserts a (sub)entry possibly preceded by a | 9434 | % while \cs{append@ln@app} inserts a (sub)entry possibly preceded by a |
8565 | % line number. | 9435 | % line number. |
8566 | % \begin{macrocode} | 9436 | % \begin{macrocode} |
8567 | \NewDocumentCommand{\append@ln@app}{o +m}{% | 9437 | \NewDocumentCommand{\append@ln@app}{o o +m}{% |
8568 | \IfNoValueTF{#1} | 9438 | \IfNoValueTF{#2} |
8569 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2}))}} | 9439 | {\IfNoValueTF{#1} |
8570 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#2}, | 9440 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}))}} |
8571 | \luastringO{#1}))}}} | 9441 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}, |
9442 | \luastringO{#1}))}}% | ||
9443 | } | ||
9444 | {\IfNoValueTF{#1} | ||
9445 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}, nil, | ||
9446 | \luastringO{#2}))}} | ||
9447 | {\luadirect{tex.sprint(ekdosis.mdvappend(\luastringO{#3}, | ||
9448 | \luastringO{#1}, | ||
9449 | \luastringO{#2}))}}% | ||
9450 | }% | ||
9451 | } | ||
8572 | % \end{macrocode} | 9452 | % \end{macrocode} |
8573 | % \paragraph{Lineation Settings} | 9453 | % \paragraph{Lineation Settings} |
8574 | % \begin{macro}{\outerlinenumbers} | 9454 | % \begin{macro}{\outerlinenumbers} |
@@ -8576,7 +9456,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8576 | % \pkg{ekdosis} does not use the \enquote{pagewise} numbering mode | 9456 | % \pkg{ekdosis} does not use the \enquote{pagewise} numbering mode |
8577 | % that is provided by \pkg{lineno}. Therefore, | 9457 | % that is provided by \pkg{lineno}. Therefore, |
8578 | % \cs{outerlinenumbers} and \cs{innerlinenumbers} are defined in | 9458 | % \cs{outerlinenumbers} and \cs{innerlinenumbers} are defined in |
8579 | % addition to \cs{rightlinenum{\allowbreak}bers} and | 9459 | % addition to |\rightlinenum|\allowbreak|bers| and |
8580 | % \cs{leftlinenumbers}. | 9460 | % \cs{leftlinenumbers}. |
8581 | % \begin{macrocode} | 9461 | % \begin{macrocode} |
8582 | \def\outerlinenumbers{% | 9462 | \def\outerlinenumbers{% |
@@ -8609,9 +9489,18 @@ Sample text with a \textcolor{red}{word} in red. | |||
8609 | % numbering should start afresh at the top of each page. | 9489 | % numbering should start afresh at the top of each page. |
8610 | % \begin{macrocode} | 9490 | % \begin{macrocode} |
8611 | \newif\ifekd@pagelineation | 9491 | \newif\ifekd@pagelineation |
9492 | \newif\ifekd@hidelinenumbers | ||
8612 | \newif\ifekd@pagevlineation | 9493 | \newif\ifekd@pagevlineation |
9494 | % \end{macrocode} | ||
9495 | % Two counters (|ekd@lnperpage| and |ekd@locallnperpage|) are defined | ||
9496 | % here and will be used below to allow \pkg{ekdosis} to have control | ||
9497 | % over the maximum number of lines to be printed per page. | ||
9498 | % \begin{macrocode} | ||
9499 | \newcounter{ekd@lnperpage} | ||
9500 | \newcounter{ekd@locallnperpage} | ||
8613 | \NewDocumentCommand{\ekdatbegshihook}{}{% | 9501 | \NewDocumentCommand{\ekdatbegshihook}{}{% |
8614 | \ifekd@pagelineation\resetlinenumber\fi | 9502 | \ifekd@pagelineation\resetlinenumber\fi |
9503 | \setcounter{ekd@lnperpage}{0}% | ||
8615 | } | 9504 | } |
8616 | \AddToHook{shipout/before}{\ekdatbegshihook} | 9505 | \AddToHook{shipout/before}{\ekdatbegshihook} |
8617 | \newif\ifekd@elidednumbers | 9506 | \newif\ifekd@elidednumbers |
@@ -8619,7 +9508,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8619 | choice lineation = {page = \ekd@pagelineationtrue, | 9508 | choice lineation = {page = \ekd@pagelineationtrue, |
8620 | document = \ekd@pagelineationfalse, | 9509 | document = \ekd@pagelineationfalse, |
8621 | none = \ekd@pagelineationtrue | 9510 | none = \ekd@pagelineationtrue |
8622 | \renewcommand\thelinenumber{}}, | 9511 | \ekd@hidelinenumberstrue}, |
8623 | unknown-choice lineation = \PackageError{ekdosis}{unknown | 9512 | unknown-choice lineation = \PackageError{ekdosis}{unknown |
8624 | lineation=#1}{`lineation' must be either `page' or `document'.}, | 9513 | lineation=#1}{`lineation' must be either `page' or `document'.}, |
8625 | choice vlineation = {page = \ekd@pagevlineationtrue, | 9514 | choice vlineation = {page = \ekd@pagevlineationtrue, |
@@ -8650,7 +9539,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
8650 | right = \if@pkg@poetry@verse\verselinenumbersright\fi, | 9539 | right = \if@pkg@poetry@verse\verselinenumbersright\fi, |
8651 | left = \if@pkg@poetry@verse\verselinenumbersleft\fi}, | 9540 | left = \if@pkg@poetry@verse\verselinenumbersleft\fi}, |
8652 | unknown-choice vmargin = \PackageError{ekdosis}{unknown | 9541 | unknown-choice vmargin = \PackageError{ekdosis}{unknown |
8653 | vmargin=#1}{`margin' must be either `left' ot `right'} | 9542 | vmargin=#1}{`margin' must be either `left' ot `right'}, |
9543 | code maxlines = \def\maxlines@value{#1}, | ||
9544 | code nomaxlines = \undef\maxlines@value | ||
8654 | } | 9545 | } |
8655 | % \end{macrocode} | 9546 | % \end{macrocode} |
8656 | % \begin{macro}{\SetLineation} | 9547 | % \begin{macro}{\SetLineation} |
@@ -8665,7 +9556,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8665 | % \end{macrocode} | 9556 | % \end{macrocode} |
8666 | % \end{macro} | 9557 | % \end{macro} |
8667 | % \begin{macro}{\vmodulolinenumbers} | 9558 | % \begin{macro}{\vmodulolinenumbers} |
8668 | % \changes{v1.4}{2021/09/06}{New command to adjust modulo verse line | 9559 | % \changes{v1.4}{2021/11/21}{New command to adjust modulo verse line |
8669 | % numbering} | 9560 | % numbering} |
8670 | % \begin{macrocode} | 9561 | % \begin{macrocode} |
8671 | \NewDocumentCommand{\vmodulolinenumbers}{O{5}}{% | 9562 | \NewDocumentCommand{\vmodulolinenumbers}{O{5}}{% |
@@ -8684,6 +9575,73 @@ Sample text with a \textcolor{red}{word} in red. | |||
8684 | % \begin{macrocode} | 9575 | % \begin{macrocode} |
8685 | \renewcommand\linenumberfont{\normalfont\footnotesize} | 9576 | \renewcommand\linenumberfont{\normalfont\footnotesize} |
8686 | % \end{macrocode} | 9577 | % \end{macrocode} |
9578 | % \paragraph{Limiting the Number of Lines per Page} | ||
9579 | % The following commands are provided to set and control the maximum | ||
9580 | % number of lines printed on each page. | ||
9581 | % \begin{macro}{\setmaxlines} | ||
9582 | % \changes{v1.5}{2023/07/29}{limits the number of lines per page} | ||
9583 | % \cs{setmaxlines}\marg{n}, where \meta{n} is a positive integer | ||
9584 | % $\geq 1$, can be used either in the preamble or at any point of the | ||
9585 | % document to set the maximum number of lines to be printed on each | ||
9586 | % page. This command has the same effect as the |maxlines| option | ||
9587 | % of \cs{SetLineation}. | ||
9588 | % \begin{macrocode} | ||
9589 | \def\setmaxlines#1{\def\maxlines@value{#1}} | ||
9590 | % \end{macrocode} | ||
9591 | % \end{macro} | ||
9592 | % \begin{macro}{\localmaxlines} | ||
9593 | % \changes{v1.5}{2023/07/29}{changes the maximum number of lines | ||
9594 | % locally} | ||
9595 | % Once a maximum number of lines per page has been set, | ||
9596 | % \cs{localmaxlines}\marg{n} can be used to adjust this number on a | ||
9597 | % given page. As for \cs{setmaxlines}, \meta{n} must be a positive | ||
9598 | % integer $\geq 1$. | ||
9599 | % \begin{macrocode} | ||
9600 | \def\localmaxlines#1{% | ||
9601 | \luadirect{tex.sprint(ekdosis.setlocalmaxlines(\luastringN{#1}))}% | ||
9602 | \ignorespaces} | ||
9603 | % \end{macrocode} | ||
9604 | % \end{macro} | ||
9605 | % \begin{macro}{\addtomaxlines} | ||
9606 | % \changes{v1.5}{2023/07/29}{adds or subtracts lines from a given page} | ||
9607 | % Unlike \cs{localmaxlines}, \cs{addtomaxlines}\meta{n} takes as | ||
9608 | % argument the number of lines one wishes to add or substract from the | ||
9609 | % number that has been set by \cs{setmaxlines}. As a result, \meta{n} | ||
9610 | % can be a positive or negative integer. | ||
9611 | % \begin{macrocode} | ||
9612 | \def\addtomaxlines#1{% | ||
9613 | \luadirect{tex.sprint(ekdosis.addtomaxlines( | ||
9614 | \luastringO{\maxlines@value}, \luastringN{#1}))}% | ||
9615 | \ignorespaces} | ||
9616 | % \end{macrocode} | ||
9617 | % \end{macro} | ||
9618 | % \begin{macro}{\nomaxlines} | ||
9619 | % \changes{v1.5}{2023/07/29}{unsets \cs{setmaxlines}} | ||
9620 | % \cs{nomaxlines} unsets any limit previously set by \cs{setmaxlines}. | ||
9621 | % \begin{macrocode} | ||
9622 | \def\nomaxlines{\luadirect{tex.sprint(ekdosis.resetlocalmaxlines())}} | ||
9623 | % \end{macrocode} | ||
9624 | % \end{macro} | ||
9625 | % Finally, the \cs{MakeLineNo} command provided by the \pkg{lineno} | ||
9626 | % package is patched so as to trigger the insertion of \cs{pagebreak} | ||
9627 | % when the number of lines set by \cs{setmaxlines} has been | ||
9628 | % reached:--- | ||
9629 | % \begin{macrocode} | ||
9630 | \AddToHook{cmd/MakeLineNo/after}{% | ||
9631 | \ifdefined\maxlines@value | ||
9632 | \stepcounter{ekd@lnperpage}% | ||
9633 | \ifnum\value{ekd@locallnperpage} = 1 | ||
9634 | \ifnumcomp{\theekd@lnperpage}{=}{% | ||
9635 | \luadirect{tex.sprint(ekdosis.getlocalmaxlines())}}{% | ||
9636 | \setcounter{ekd@locallnperpage}{0}% | ||
9637 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
9638 | \else | ||
9639 | \ifnumcomp{\theekd@lnperpage}{=}{\maxlines@value}{% | ||
9640 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
9641 | \fi | ||
9642 | \fi | ||
9643 | } | ||
9644 | % \end{macrocode} | ||
8687 | % \begin{macro}{\SetDefaultApparatus} | 9645 | % \begin{macro}{\SetDefaultApparatus} |
8688 | % By default, \pkg{ekdosis} defines one layer of critical notes which | 9646 | % By default, \pkg{ekdosis} defines one layer of critical notes which |
8689 | % is called |default|. This name can be changed at any point of the | 9647 | % is called |default|. This name can be changed at any point of the |
@@ -8701,8 +9659,8 @@ Sample text with a \textcolor{red}{word} in red. | |||
8701 | % \cs{app}|[type=|\meta{type}|]|\marg{apparatus entries} takes one | 9659 | % \cs{app}|[type=|\meta{type}|]|\marg{apparatus entries} takes one |
8702 | % mandatory argument and accepts one optional argument. |type=| refers | 9660 | % mandatory argument and accepts one optional argument. |type=| refers |
8703 | % to the layer the note must go into and \meta{apparatus entries} | 9661 | % to the layer the note must go into and \meta{apparatus entries} |
8704 | % contains command used to insert the entries, either \cs{lem}, | 9662 | % contains commands used to insert the entries, either \cs{lem}, |
8705 | % \cs{rdg} or \cs{note}\meta{*}:--- | 9663 | % \cs{rdg} or \cs{note}:--- |
8706 | % \begin{macrocode} | 9664 | % \begin{macrocode} |
8707 | \NewDocumentCommand{\app}{O{} > { \TrimSpaces } +m}{% | 9665 | \NewDocumentCommand{\app}{O{} > { \TrimSpaces } +m}{% |
8708 | \leavevmode | 9666 | \leavevmode |
@@ -8721,74 +9679,115 @@ Sample text with a \textcolor{red}{word} in red. | |||
8721 | \endgroup} | 9679 | \endgroup} |
8722 | % \end{macrocode} | 9680 | % \end{macrocode} |
8723 | % \end{macro} | 9681 | % \end{macro} |
9682 | % \begin{macro}{\App} | ||
9683 | % \changes{v1.5}{2023/07/29}{To be used conjointly with | ||
9684 | % \texttt{ekdosis.el}} | ||
9685 | % In contrast to \cs{app}, \cs{App} takes two mandatory arguments and | ||
9686 | % accepts one optional argument like so: | ||
9687 | % \cs{App}|[type=|\meta{type}|]|\marg{lemma text}\marg{variants and | ||
9688 | % notes}. As just described above, |type=| refers to the layer the | ||
9689 | % note must go into. \cs{App} is strictly equivalent to \cs{app}, | ||
9690 | % except that lemmas, variants and notes are split into two different | ||
9691 | % arguments, which allows for more flexible code folding. \meta{lemma | ||
9692 | % text} is meant to receive \cs{lem}, while \cs{rdg} and \cs{note} go | ||
9693 | % into \meta{variants and notes}. | ||
9694 | % \begin{macrocode} | ||
9695 | \NewDocumentCommand{\App}{omm}{% | ||
9696 | \IfNoValueTF{#1} | ||
9697 | {\app{#2#3}} | ||
9698 | {\app[#1]{#2#3}}% | ||
9699 | } | ||
9700 | % \end{macrocode} | ||
9701 | % \end{macro} | ||
9702 | % \begin{macro}{\ekdpage} | ||
9703 | % \changes{v1.4}{2021/11/21}{prints page marks used internally by | ||
9704 | % \textsf{ekdosis} to generate the apparatus blocks on pages} | ||
9705 | % Instead of absolute page numbers, \pkg{ekdosis} now marks the | ||
9706 | % entries of the apparatus with its own page numbering | ||
9707 | % scheme. \cs{ekdpage} can be used at any point of the document to | ||
9708 | % retrieve and print the current number. | ||
9709 | % \begin{macrocode} | ||
9710 | \NewDocumentCommand{\ekdpage}{}{% | ||
9711 | \luadirect{tex.sprint(ekdosis.getekdabspg())}% | ||
9712 | } | ||
9713 | % \end{macrocode} | ||
9714 | % \end{macro} | ||
8724 | % \cs{current@ref@arg} is used outside \cs{app} by \cs{note}. It takes | 9715 | % \cs{current@ref@arg} is used outside \cs{app} by \cs{note}. It takes |
8725 | % two mandatory arguments: the beginning line label and the ending | 9716 | % two mandatory arguments: the beginning line label and the ending |
8726 | % line label\---which are manually inserted---and returns the formatted | 9717 | % line label\---which are manually inserted---and returns the formatted |
8727 | % reference to be inserted in the apparatus criticus. | 9718 | % reference to be inserted in the apparatus criticus. |
8728 | % \begin{macrocode} | 9719 | % \begin{macrocode} |
8729 | \def\current@ref@arg#1#2{{%\textdir TLT% | 9720 | \def\current@ref@arg#1#2{{%\textdir TLT% |
8730 | \unexpanded\expandafter{\ekd@refnumstyle}% | 9721 | \unexpanded\expandafter{\ekd@refnumstyle}% |
8731 | \ifnum% | 9722 | \ifnum |
8732 | \pdf@strcmp{\getpagerefnumber{#1}}{\getpagerefnumber{#2}} | 9723 | \pdf@strcmp{\getpagerefnumber{#1}}{\getpagerefnumber{#2}} |
8733 | = | 9724 | = |
8734 | 0 | 9725 | 0 |
8735 | \ifnum% | 9726 | \ifnum |
8736 | \pdf@strcmp{\getrefnumber{#1}}{\getrefnumber{#2}} | 9727 | \pdf@strcmp{\getrefnumber{#1}}{\getrefnumber{#2}} |
8737 | = | ||
8738 | 0 | ||
8739 | % | ||
8740 | \ifekd@mapps% | ||
8741 | \ifbool{subsq@unit@\ekdan@type}{% | ||
8742 | \ifnum% | ||
8743 | \pdf@strcmp{\getrefnumber{#1}}{% | ||
8744 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getprevnotelab())}}} | ||
8745 | = | 9728 | = |
8746 | 0 | 9729 | 0 |
9730 | % | ||
9731 | \ifekd@mapps | ||
9732 | \ifbool{subsq@unit@\ekdan@type}{% | ||
9733 | \ifnum | ||
9734 | \pdf@strcmp{\getrefnumber{#1}}{% | ||
9735 | \getrefnumber{\luadirect{tex.sprint( | ||
9736 | ekdosis.getprevnotelab())}}} | ||
9737 | = | ||
9738 | 0 | ||
9739 | \else | ||
9740 | \LRnum{\getrefnumber{#1}}% | ||
9741 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9742 | \fi | ||
9743 | }% | ||
9744 | {\LRnum{\getrefnumber{#1}}% | ||
9745 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | ||
8747 | \else | 9746 | \else |
8748 | \LRnum{\getrefnumber{#1}}\unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9747 | \ifsubsq@unit |
8749 | \fi% | 9748 | % |
8750 | }% | 9749 | \ifnum |
8751 | {\LRnum{\getrefnumber{#1}}\unexpanded\expandafter{\ekd@postrefnum}}% issue the no | 9750 | \pdf@strcmp{\getrefnumber{#1}}{% |
8752 | \else | 9751 | \getrefnumber{\luadirect{tex.sprint( |
8753 | \ifsubsq@unit% | 9752 | ekdosis.getprevnotelab())}}} |
8754 | % | 9753 | = |
8755 | \ifnum% | 9754 | 0 |
8756 | \pdf@strcmp{\getrefnumber{#1}}{% | 9755 | \else |
8757 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getprevnotelab())}}} | 9756 | \LRnum{\getrefnumber{#1}}% |
8758 | = | 9757 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
8759 | 0 | 9758 | \fi |
8760 | \else | 9759 | % |
8761 | \LRnum{\getrefnumber{#1}}\unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9760 | \else |
8762 | \fi | 9761 | \LRnum{\getrefnumber{#1}}% |
8763 | % | 9762 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no |
8764 | \else | 9763 | \fi |
8765 | \LRnum{\getrefnumber{#1}}\unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9764 | \fi |
8766 | \fi | 9765 | % |
8767 | \fi | ||
8768 | % | ||
8769 | \else | 9766 | \else |
8770 | \ifekd@elidednumbers | 9767 | \ifekd@elidednumbers |
8771 | \luadirect{tex.sprint(ekdosis.numrange(\luastring{\getrefnumber{#1}}, | 9768 | \luadirect{tex.sprint( |
8772 | \luastring{\getrefnumber{#2}}))}% | 9769 | ekdosis.numrange(\luastring{\getrefnumber{#1}}, |
9770 | \luastring{\getrefnumber{#2}}))}% | ||
8773 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9771 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
8774 | \else | 9772 | \else |
8775 | \LRnum{\getrefnumber{#1}}--% | 9773 | \LRnum{\getrefnumber{#1}}--\LRnum{\getrefnumber{#2}}% |
8776 | \LRnum{\getrefnumber{#2}}\unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9774 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
9775 | \fi | ||
8777 | \fi | 9776 | \fi |
8778 | \fi% | 9777 | \else |
8779 | \else | ||
8780 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} | 9778 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} |
8781 | {\LRnum{\getrefnumber{#1}}--% | 9779 | {\LRnum{\getrefnumber{#1}}--% |
8782 | \LRnum{\getpagerefnumber{#2}}.% | 9780 | \LRnum{\getpagerefnumber{#2}}.% |
8783 | \LRnum{\getrefnumber{#2}}\unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos | 9781 | \LRnum{\getrefnumber{#2}}% |
8784 | {\LRnum{\getrefnumber{#1}}--% | 9782 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos |
8785 | \LRnum{\getrefnumber{#2}}\unexpanded\expandafter{\ekd@postrefnum}}% issue the nos | 9783 | {\LRnum{\getrefnumber{#1}}--\LRnum{\getrefnumber{#2}}% |
8786 | \fi% | 9784 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos |
8787 | \ifekdn@forcenum | 9785 | \fi |
8788 | \LRnum{\getrefnumber{#1}}\unexpanded\expandafter{\ekd@postrefnum}% force the no | 9786 | \ifekdn@forcenum |
8789 | \fi | 9787 | \LRnum{\getrefnumber{#1}}% |
8790 | }% | 9788 | \unexpanded\expandafter{\ekd@postrefnum}% force the no |
8791 | } | 9789 | \fi |
9790 | }} | ||
8792 | % \end{macrocode} | 9791 | % \end{macrocode} |
8793 | % \cs{current@ref} is pretty much the same as \cs{current@reg@arg}, | 9792 | % \cs{current@ref} is pretty much the same as \cs{current@reg@arg}, |
8794 | % but takes no argument. It is used by commands such as \cs{lem} when | 9793 | % but takes no argument. It is used by commands such as \cs{lem} when |
@@ -8796,119 +9795,219 @@ Sample text with a \textcolor{red}{word} in red. | |||
8796 | % \begin{macrocode} | 9795 | % \begin{macrocode} |
8797 | \def\current@ref{{%\textdir TLT% | 9796 | \def\current@ref{{%\textdir TLT% |
8798 | \unexpanded\expandafter{\ekd@refnumstyle}% | 9797 | \unexpanded\expandafter{\ekd@refnumstyle}% |
8799 | \ifnum% | 9798 | % \end{macrocode} |
8800 | \pdf@strcmp{% | 9799 | % If the whole lemma falls on the same page... |
8801 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9800 | % \begin{macrocode} |
9801 | \ifnum | ||
9802 | \pdf@strcmp{% | ||
9803 | \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8802 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | 9804 | {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} |
8803 | = | ||
8804 | 0 | ||
8805 | \ifnum% | ||
8806 | \pdf@strcmp{% | ||
8807 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8808 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} | ||
8809 | = | ||
8810 | 0 | ||
8811 | % | ||
8812 | \ifekd@mapps% | ||
8813 | \ifbool{subsq@unit@\ekdan@type}{% | ||
8814 | \ifnum% | ||
8815 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8816 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-b}} | ||
8817 | = | 9805 | = |
8818 | 0 | 9806 | 0 |
8819 | %%%begin | 9807 | % \end{macrocode} |
8820 | \ifnum% | 9808 | % ... and on the same line, |
8821 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}% | 9809 | % \begin{macrocode} |
8822 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-e}} | 9810 | \ifnum |
8823 | = | 9811 | \pdf@strcmp{% |
8824 | 0 | 9812 | \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% |
8825 | \ifekd@appinapp | 9813 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}} |
8826 | \ifnum% | 9814 | = |
8827 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9815 | 0 |
8828 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevprevlnlab())}-b}} | 9816 | % \end{macrocode} |
8829 | = | 9817 | % then, if multiple layers have been defined, |
8830 | 0 | 9818 | % \begin{macrocode} |
8831 | \else | 9819 | \ifekd@mapps |
8832 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9820 | % \end{macrocode} |
8833 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9821 | % and the entry is a subsequent one, when it begins on the same line |
8834 | \fi | 9822 | % as the previous one... |
8835 | \fi | 9823 | % \begin{macrocode} |
8836 | \else | 9824 | \ifbool{subsq@unit@\ekdan@type}{% |
8837 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9825 | \ifnum |
8838 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9826 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( |
8839 | \fi | 9827 | ekdosis.getlnlab())}-b}}% |
8840 | %%% end | 9828 | {\getrefnumber{\luadirect{tex.sprint( |
9829 | ekdosis.getprevlnlab())}-b}} | ||
9830 | = | ||
9831 | 0 | ||
9832 | % \end{macrocode} | ||
9833 | % and ends likewise, then do nothing:--- | ||
9834 | % \begin{macrocode} | ||
9835 | \ifnum | ||
9836 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9837 | ekdosis.getlnlab())}-e}}% | ||
9838 | {\getrefnumber{\luadirect{tex.sprint( | ||
9839 | ekdosis.getprevlnlab())}-e}} | ||
9840 | = | ||
9841 | 0 | ||
9842 | % \end{macrocode} | ||
9843 | % (What follows is for nested \cs{app} entries.) | ||
9844 | % \begin{macrocode} | ||
9845 | \ifekd@appinapp | ||
9846 | \ifnum | ||
9847 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9848 | ekdosis.getlnlab())}-b}}% | ||
9849 | {\getrefnumber{\luadirect{tex.sprint( | ||
9850 | ekdosis.getprevprevlnlab())}-b}} | ||
9851 | = | ||
9852 | 0 | ||
9853 | \else | ||
9854 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9855 | ekdosis.getlnlab())}-b}}% | ||
9856 | \unexpanded\expandafter{\ekd@postrefnum}% issue | ||
9857 | % the no | ||
9858 | \fi | ||
9859 | \fi | ||
9860 | % \end{macrocode} | ||
9861 | % Otherwise, print the line number:--- | ||
9862 | % \begin{macrocode} | ||
9863 | \else | ||
9864 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9865 | ekdosis.getlnlab())}-b}}% | ||
9866 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9867 | \fi | ||
9868 | % \end{macrocode} | ||
9869 | % If the entry begins on a new line, print the number:--- | ||
9870 | % \begin{macrocode} | ||
9871 | \else | ||
9872 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9873 | ekdosis.getlnlab())}-b}}% | ||
9874 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9875 | \fi | ||
9876 | % \end{macrocode} | ||
9877 | % And always print the line number ahead of first entries:--- | ||
9878 | % \begin{macrocode} | ||
9879 | }{\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9880 | ekdosis.getlnlab())}-b}}% | ||
9881 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | ||
9882 | % \end{macrocode} | ||
9883 | % Now if there is only one default layer:--- | ||
9884 | % \begin{macrocode} | ||
9885 | \else | ||
9886 | % \end{macrocode} | ||
9887 | % On subsequent entries... | ||
9888 | % \begin{macrocode} | ||
9889 | \ifsubsq@unit | ||
9890 | % \end{macrocode} | ||
9891 | % ... if the whole lemma text begins on the same line as the preceding | ||
9892 | % one... | ||
9893 | % \begin{macrocode} | ||
9894 | \ifnum | ||
9895 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9896 | ekdosis.getlnlab())}-b}}% | ||
9897 | {\getrefnumber{\luadirect{tex.sprint( | ||
9898 | ekdosis.getprevlnlab())}-b}} | ||
9899 | = | ||
9900 | 0 | ||
9901 | % \end{macrocode} | ||
9902 | % ... and ends likewise... | ||
9903 | % \begin{macrocode} | ||
9904 | \ifnum | ||
9905 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9906 | ekdosis.getlnlab())}-e}}% | ||
9907 | {\getrefnumber{\luadirect{tex.sprint( | ||
9908 | ekdosis.getprevlnlab())}-e}} | ||
9909 | = | ||
9910 | 0 | ||
9911 | % \end{macrocode} | ||
9912 | % (What follows is for nested \cs{app} entries.) | ||
9913 | % \begin{macrocode} | ||
9914 | \ifekd@appinapp | ||
9915 | \ifnum | ||
9916 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint( | ||
9917 | ekdosis.getlnlab())}-b}}% | ||
9918 | {\getrefnumber{\luadirect{tex.sprint( | ||
9919 | ekdosis.getprevprevlnlab())}-b}} | ||
9920 | = | ||
9921 | 0 | ||
9922 | \else | ||
9923 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9924 | ekdosis.getlnlab())}-b}}% | ||
9925 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9926 | \fi | ||
9927 | \fi | ||
9928 | % \end{macrocode} | ||
9929 | % ... then do nothing. Otherwise, print the line number:--- | ||
9930 | % \begin{macrocode} | ||
9931 | \else | ||
9932 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9933 | ekdosis.getlnlab())}-b}}% | ||
9934 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9935 | \fi | ||
9936 | % \end{macrocode} | ||
9937 | % If the entry begins on a new line, print the number as well:--- | ||
9938 | % \begin{macrocode} | ||
9939 | \else | ||
9940 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9941 | ekdosis.getlnlab())}-b}}% | ||
9942 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9943 | \fi | ||
9944 | % \end{macrocode} | ||
9945 | % And always print the line number ahead of first entries:--- | ||
9946 | % \begin{macrocode} | ||
9947 | \else | ||
9948 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9949 | ekdosis.getlnlab())}-b}}% | ||
9950 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
9951 | \fi | ||
9952 | \fi | ||
9953 | % \end{macrocode} | ||
9954 | % Now if the lemma text breaks across lines ... | ||
9955 | % \begin{macrocode} | ||
8841 | \else | 9956 | \else |
8842 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9957 | % \end{macrocode} |
8843 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | 9958 | % ... then, depending on what has been instructed, either print the |
8844 | \fi% | 9959 | % last number of a range elided:--- |
8845 | }{\LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9960 | % \begin{macrocode} |
8846 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the no | 9961 | \ifekd@elidednumbers |
8847 | \else | 9962 | \luadirect{tex.sprint(ekdosis.numrange( |
8848 | \ifsubsq@unit% | 9963 | \luastring{\getrefnumber{\luadirect{tex.sprint( |
8849 | % | 9964 | ekdosis.getlnlab())}-b}}, |
8850 | \ifnum% | 9965 | \luastring{\getrefnumber{\luadirect{tex.sprint( |
8851 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9966 | ekdosis.getlnlab())}-e}}))}% |
8852 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-b}} | 9967 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
8853 | = | 9968 | % \end{macrocode} |
8854 | 0 | 9969 | % ... or in full:--- |
8855 | %%%begin | 9970 | % \begin{macrocode} |
8856 | \ifnum% | 9971 | \else |
8857 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}% | 9972 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
8858 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevlnlab())}-e}} | 9973 | ekdosis.getlnlab())}-b}}--% |
8859 | = | 9974 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
8860 | 0 | 9975 | ekdosis.getlnlab())}-e}}% |
8861 | \ifekd@appinapp | 9976 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos |
8862 | \ifnum% | 9977 | \fi |
8863 | \pdf@strcmp{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 9978 | \fi |
8864 | {\getrefnumber{\luadirect{tex.sprint(ekdosis.getprevprevlnlab())}-b}} | 9979 | % \end{macrocode} |
8865 | = | 9980 | % When the lemma breaks across pages:--- |
8866 | 0 | 9981 | % \begin{macrocode} |
8867 | \else | ||
8868 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8869 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
8870 | \fi | ||
8871 | \fi | ||
8872 | \else | ||
8873 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8874 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
8875 | \fi | ||
8876 | %%% end | ||
8877 | \else | ||
8878 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8879 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
8880 | \fi | ||
8881 | % | ||
8882 | \else | ||
8883 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | ||
8884 | \unexpanded\expandafter{\ekd@postrefnum}% issue the no | ||
8885 | \fi | ||
8886 | \fi | ||
8887 | % | ||
8888 | \else | ||
8889 | \ifekd@elidednumbers | ||
8890 | \luadirect{tex.sprint(ekdosis.numrange( | ||
8891 | \luastring{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}, | ||
8892 | \luastring{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}))}% | ||
8893 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | ||
8894 | \else | 9982 | \else |
8895 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}--% | 9983 | % \end{macrocode} |
8896 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}% | 9984 | % Print the page number and the line number when the numbering starts |
8897 | \unexpanded\expandafter{\ekd@postrefnum}% issue the nos | 9985 | % afresh at the top of each page:--- |
9986 | % \begin{macrocode} | ||
9987 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} | ||
9988 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9989 | ekdosis.getlnlab())}-b}}--% | ||
9990 | \LRnum{\getpagerefnumber{\luadirect{tex.sprint( | ||
9991 | ekdosis.getlnlab())}-e}}.% | ||
9992 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
9993 | ekdosis.getlnlab())}-e}}% | ||
9994 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos | ||
9995 | % \end{macrocode} | ||
9996 | % Or just the line number if the lines are continuously numbered | ||
9997 | % throughout the book:--- | ||
9998 | % \begin{macrocode} | ||
9999 | {\LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
10000 | ekdosis.getlnlab())}-b}}--% | ||
10001 | \LRnum{\getrefnumber{\luadirect{tex.sprint( | ||
10002 | ekdosis.getlnlab())}-e}}% | ||
10003 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos | ||
8898 | \fi | 10004 | \fi |
8899 | \fi% | 10005 | % \end{macrocode} |
8900 | \else | 10006 | % Finally, print the number when instructed to do so:--- |
8901 | \ifboolexpr{bool {ekd@pagelineation} or bool {ekd@pagevlineation}} | 10007 | % \begin{macrocode} |
8902 | {\LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}--% | ||
8903 | \LRnum{\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}.% | ||
8904 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}% | ||
8905 | \unexpanded\expandafter{\ekd@postrefnum}}% issue pg and ln nos | ||
8906 | {\LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}--% | ||
8907 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}% | ||
8908 | \unexpanded\expandafter{\ekd@postrefnum}}% issue the nos | ||
8909 | \fi% | ||
8910 | \ifekdl@forcenum | 10008 | \ifekdl@forcenum |
8911 | \LRnum{\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}% | 10009 | \LRnum{\getrefnumber{\luadirect{tex.sprint( |
10010 | ekdosis.getlnlab())}-b}}% | ||
8912 | \unexpanded\expandafter{\ekd@postrefnum}% force the no | 10011 | \unexpanded\expandafter{\ekd@postrefnum}% force the no |
8913 | \fi | 10012 | \fi |
8914 | }% | 10013 | }% |
@@ -8919,6 +10018,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
8919 | % \begin{macrocode} | 10018 | % \begin{macrocode} |
8920 | \newif\ifekdl@forcenum | 10019 | \newif\ifekdl@forcenum |
8921 | \newif\ifekdl@nonum | 10020 | \newif\ifekdl@nonum |
10021 | \newif\ifekdl@nodelim | ||
10022 | \newif\ifekdl@forcedelim | ||
10023 | \newif\ifekdl@ilabel | ||
8922 | \ekvdefinekeys{lem}{ | 10024 | \ekvdefinekeys{lem}{ |
8923 | code wit = \def\ekdlr@wit{#1}, | 10025 | code wit = \def\ekdlr@wit{#1}, |
8924 | code source = \def\ekdlr@source{#1}, | 10026 | code source = \def\ekdlr@source{#1}, |
@@ -8928,11 +10030,15 @@ Sample text with a \textcolor{red}{word} in red. | |||
8928 | code post = \def\ekdlr@post{#1}, | 10030 | code post = \def\ekdlr@post{#1}, |
8929 | code prewit = \def\ekdlr@prewit{#1}, | 10031 | code prewit = \def\ekdlr@prewit{#1}, |
8930 | code postwit = \def\ekdlr@postwit{#1}, | 10032 | code postwit = \def\ekdlr@postwit{#1}, |
10033 | code ilabel = \ekdl@ilabeltrue\def\ilabel@val{#1}, | ||
8931 | store type = \ekdlr@type, | 10034 | store type = \ekdlr@type, |
8932 | store sep = \ekdl@sep, | 10035 | store sep = \ekdl@sep, |
8933 | noval nonum = \ekdl@nonumtrue, | 10036 | noval nonum = \ekdl@nonumtrue, |
8934 | noval num = \ekdl@forcenumtrue, | 10037 | noval num = \ekdl@forcenumtrue, |
10038 | noval nodelim = \ekdl@nodelimtrue, | ||
10039 | noval delim = \ekdl@forcedelimtrue, | ||
8935 | bool nolem = \ifekdl@nolem, | 10040 | bool nolem = \ifekdl@nolem, |
10041 | nmeta Nolem = {nodelim, nonum, nolem}, | ||
8936 | bool nosep = \ifekdl@nosep, | 10042 | bool nosep = \ifekdl@nosep, |
8937 | initial sep = \ekdsep | 10043 | initial sep = \ekdsep |
8938 | } | 10044 | } |
@@ -8996,13 +10102,29 @@ Sample text with a \textcolor{red}{word} in red. | |||
8996 | % the optional key-value arguments just defined above. | 10102 | % the optional key-value arguments just defined above. |
8997 | % \begin{macrocode} | 10103 | % \begin{macrocode} |
8998 | \NewDocumentCommand{\lem}{O{} m}{% | 10104 | \NewDocumentCommand{\lem}{O{} m}{% |
8999 | \ekd@isinlemtrue% | 10105 | \ifekd@appinapp |
9000 | \luadirect{ekdosis.dolnlab(\luastringN{#2})}% | 10106 | \let\ekdlr@wit\@undefined |
9001 | \null | 10107 | \let\ekdlr@source\@undefined |
9002 | \bgroup% | 10108 | \let\ekdlr@resp\@undefined |
10109 | \let\ekdlr@alt\@undefined | ||
10110 | \let\ekdlr@pre\@undefined | ||
10111 | \let\ekdlr@post\@undefined | ||
10112 | \let\ekdlr@prewit\@undefined | ||
10113 | \let\ekdlr@postwit\@undefined | ||
10114 | \fi | ||
10115 | \ekd@isinlemtrue | ||
10116 | \bgroup | ||
9003 | \ekdl@forcenumfalse | 10117 | \ekdl@forcenumfalse |
9004 | \ekdl@nonumfalse | 10118 | \ekdl@nonumfalse |
10119 | \ekdl@ilabelfalse | ||
9005 | \ekvset{lem}{#1}% | 10120 | \ekvset{lem}{#1}% |
10121 | \ifekdl@ilabel | ||
10122 | \luadirect{ekdosis.dolnlab(\luastringN{#2}, | ||
10123 | \luastringO{\ilabel@val})}% | ||
10124 | \else | ||
10125 | \luadirect{ekdosis.dolnlab(\luastringN{#2})}% | ||
10126 | \fi | ||
10127 | \null | ||
9006 | \ekd@test@lang | 10128 | \ekd@test@lang |
9007 | \ifekd@mapps% | 10129 | \ifekd@mapps% |
9008 | \ifnum% | 10130 | \ifnum% |
@@ -9015,24 +10137,43 @@ Sample text with a \textcolor{red}{word} in red. | |||
9015 | \luadirect{tex.sprint(ekdosis.getappdelim(\luastringO{\ekdan@type}))}}% | 10137 | \luadirect{tex.sprint(ekdosis.getappdelim(\luastringO{\ekdan@type}))}}% |
9016 | \luadirect{tex.sprint(ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}% | 10138 | \luadirect{tex.sprint(ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}% |
9017 | \fi% | 10139 | \fi% |
9018 | \ifekdl@nolem\edef\lem@app{% | 10140 | \ifekdl@nolem |
9019 | % \hskip .75em | 10141 | \edef\lem@app{% |
9020 | \ifekd@mapps | 10142 | % \hskip .75em |
9021 | \ifbool{subsq@unit@\ekdan@type}% | 10143 | \ifekd@mapps |
9022 | {\ekd@munit@delim}{}% | 10144 | \unless\ifekdl@nodelim |
9023 | \else% | 10145 | \ifbool{subsq@unit@\ekdan@type}% |
9024 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi% | 10146 | {\ekd@munit@delim}{\ifekdl@forcedelim\ekd@munit@delim\fi}% |
9025 | \fi% | 10147 | \fi |
9026 | \unless\ifekdl@nonum\current@ref\fi}%\hskip .25em}% | 10148 | \else |
10149 | \unless\ifekdl@nodelim | ||
10150 | \ifsubsq@unit | ||
10151 | \unexpanded\expandafter{\ekd@unit@delim}% | ||
10152 | \else | ||
10153 | \ifekdl@forcedelim\unexpanded\expandafter{\ekd@unit@delim}\fi | ||
10154 | \fi | ||
10155 | \fi | ||
10156 | \fi% | ||
10157 | \unless\ifekdl@nonum\current@ref\fi | ||
10158 | \relax | ||
10159 | }%\hskip .25em}% | ||
9027 | \else% | 10160 | \else% |
9028 | \ifbool{al@rlmode}{% | 10161 | \ifbool{al@rlmode}{% |
9029 | \edef\lem@app{% | 10162 | \edef\lem@app{% |
9030 | % \hskip .75em | 10163 | % \hskip .75em |
9031 | \ifekd@mapps | 10164 | \ifekd@mapps |
9032 | \ifbool{subsq@unit@\ekdan@type}% | 10165 | \unless\ifekdl@nodelim |
9033 | {\ekd@munit@delim}{}% | 10166 | \ifbool{subsq@unit@\ekdan@type}% |
9034 | \else% | 10167 | {\ekd@munit@delim}{\ifekdl@forcedelim\ekd@munit@delim\fi}% |
9035 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi% | 10168 | \fi |
10169 | \else | ||
10170 | \unless\ifekdl@nodelim | ||
10171 | \ifsubsq@unit | ||
10172 | \unexpanded\expandafter{\ekd@unit@delim}% | ||
10173 | \else | ||
10174 | \ifekdl@forcedelim\unexpanded\expandafter{\ekd@unit@delim}\fi | ||
10175 | \fi | ||
10176 | \fi | ||
9036 | \fi% | 10177 | \fi% |
9037 | \unless\ifekdl@nonum\current@ref\fi%\hskip .25em | 10178 | \unless\ifekdl@nonum\current@ref\fi%\hskip .25em |
9038 | \ifdefined\ekdlr@alt% | 10179 | \ifdefined\ekdlr@alt% |
@@ -9064,10 +10205,18 @@ Sample text with a \textcolor{red}{word} in red. | |||
9064 | \edef\lem@app{% | 10205 | \edef\lem@app{% |
9065 | % \hskip .75em | 10206 | % \hskip .75em |
9066 | \ifekd@mapps | 10207 | \ifekd@mapps |
9067 | \ifbool{subsq@unit@\ekdan@type}% | 10208 | \unless\ifekdl@nodelim |
9068 | {\ekd@munit@delim}{}% | 10209 | \ifbool{subsq@unit@\ekdan@type}% |
9069 | \else% | 10210 | {\ekd@munit@delim}{\ifekdl@forcedelim\ekd@munit@delim\fi}% |
9070 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi% | 10211 | \fi |
10212 | \else | ||
10213 | \unless\ifekdl@nodelim | ||
10214 | \ifsubsq@unit | ||
10215 | \unexpanded\expandafter{\ekd@unit@delim}% | ||
10216 | \else | ||
10217 | \ifekdl@forcedelim\unexpanded\expandafter{\ekd@unit@delim}\fi | ||
10218 | \fi | ||
10219 | \fi | ||
9071 | \fi% | 10220 | \fi% |
9072 | \unless\ifekdl@nonum\current@ref\fi%\hskip .25em | 10221 | \unless\ifekdl@nonum\current@ref\fi%\hskip .25em |
9073 | \ifdefined\ekdlr@alt% | 10222 | \ifdefined\ekdlr@alt% |
@@ -9102,11 +10251,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
9102 | \ifekdl@nosep\else\unexpanded\expandafter{\ekdl@sep}\fi | 10251 | \ifekdl@nosep\else\unexpanded\expandafter{\ekdl@sep}\fi |
9103 | }% | 10252 | }% |
9104 | }% | 10253 | }% |
9105 | \fi% | 10254 | \fi |
9106 | \ifekd@mapps% | 10255 | \ifekd@mapps |
9107 | \append@ln@app[\ekdan@type]{\lem@app}% | 10256 | \ifekdl@ilabel |
9108 | \else% | 10257 | \append@ln@app[\ekdan@type][\ilabel@val]{\lem@app}% |
9109 | \append@ln@app{\lem@app}% | 10258 | \else |
10259 | \append@ln@app[\ekdan@type]{\lem@app}% | ||
10260 | \fi | ||
10261 | \else | ||
10262 | \ifekdl@ilabel | ||
10263 | \append@ln@app[][\ilabel@val]{\lem@app} | ||
10264 | \else | ||
10265 | \append@ln@app{\lem@app}% | ||
10266 | \fi | ||
9110 | \fi% | 10267 | \fi% |
9111 | \egroup% | 10268 | \egroup% |
9112 | \ekd@isinlemfalse% | 10269 | \ekd@isinlemfalse% |
@@ -9130,13 +10287,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9130 | % \ifekdr@nordg\append@app{}\else% do we need \append@app{} here? If | 10287 | % \ifekdr@nordg\append@app{}\else% do we need \append@app{} here? If |
9131 | % % so, keep in mind \ifekd@mapps, | 10288 | % % so, keep in mind \ifekd@mapps, |
9132 | % like so: | 10289 | % like so: |
9133 | \ifekdr@nordg% | 10290 | \unless\ifekdr@nordg |
9134 | \ifekd@mapps% | ||
9135 | \append@app[\ekdan@type]{}% | ||
9136 | \else% | ||
9137 | \append@app{}% | ||
9138 | \fi% | ||
9139 | \else% | ||
9140 | \ifbool{al@rlmode}{% | 10291 | \ifbool{al@rlmode}{% |
9141 | \edef\rdg@app{% | 10292 | \edef\rdg@app{% |
9142 | \ifekd@subsq@rdg | 10293 | \ifekd@subsq@rdg |
@@ -9202,13 +10353,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
9202 | }% | 10353 | }% |
9203 | }% | 10354 | }% |
9204 | \ifekd@mapps | 10355 | \ifekd@mapps |
9205 | \append@app[\ekdan@type]{\rdg@app}% | 10356 | \append@app[\ekdan@type]{\rdg@app}% |
9206 | \else | 10357 | \else |
9207 | \append@app{\rdg@app}% | 10358 | \append@app{\rdg@app}% |
9208 | \fi | ||
9209 | \fi | 10359 | \fi |
9210 | \egroup | 10360 | \fi |
9211 | \ekd@subsq@rdgtrue | 10361 | \egroup |
10362 | \ekd@subsq@rdgtrue | ||
9212 | } | 10363 | } |
9213 | % \end{macrocode} | 10364 | % \end{macrocode} |
9214 | % \end{macro} | 10365 | % \end{macro} |
@@ -9221,6 +10372,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9221 | store lem = \ekdn@lem, | 10372 | store lem = \ekdn@lem, |
9222 | code labelb = \def\ekdn@labelb{#1}, | 10373 | code labelb = \def\ekdn@labelb{#1}, |
9223 | code labele = \def\ekdn@labele{#1}, | 10374 | code labele = \def\ekdn@labele{#1}, |
10375 | bool nodelim = \ifekdn@nodelim, | ||
9224 | store sep = \ekdn@sep, | 10376 | store sep = \ekdn@sep, |
9225 | bool nosep = \ifekdn@nosep, | 10377 | bool nosep = \ifekdn@nosep, |
9226 | initial type = default, | 10378 | initial type = default, |
@@ -9267,10 +10419,14 @@ Sample text with a \textcolor{red}{word} in red. | |||
9267 | {\edef\note@contents{% | 10419 | {\edef\note@contents{% |
9268 | % \hskip .75em | 10420 | % \hskip .75em |
9269 | \ifekd@mapps | 10421 | \ifekd@mapps |
10422 | \unless\ifekdn@nodelim | ||
9270 | \ifbool{subsq@unit@\ekdan@type}% | 10423 | \ifbool{subsq@unit@\ekdan@type}% |
9271 | {\ekd@munit@delim}{}% | 10424 | {\ekd@munit@delim}{}% |
9272 | \else% | 10425 | \fi |
9273 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi% | 10426 | \else |
10427 | \unless\ifekdn@nodelim | ||
10428 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi | ||
10429 | \fi | ||
9274 | \fi% | 10430 | \fi% |
9275 | \unless\ifekdn@nonum\current@ref@arg{\ekdn@labelb}{\ekdn@labele}\fi%\hskip .25em | 10431 | \unless\ifekdn@nonum\current@ref@arg{\ekdn@labelb}{\ekdn@labele}\fi%\hskip .25em |
9276 | \ifdefined\ekdn@lem% | 10432 | \ifdefined\ekdn@lem% |
@@ -9283,10 +10439,14 @@ Sample text with a \textcolor{red}{word} in red. | |||
9283 | {\edef\note@contents{% | 10439 | {\edef\note@contents{% |
9284 | % \hskip .75em | 10440 | % \hskip .75em |
9285 | \ifekd@mapps | 10441 | \ifekd@mapps |
9286 | \ifbool{subsq@unit@\ekdan@type}% | 10442 | \unless\ifekdn@nodelim |
9287 | {\ekd@munit@delim}{}% | 10443 | \ifbool{subsq@unit@\ekdan@type}% |
9288 | \else% | 10444 | {\ekd@munit@delim}{}% |
9289 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi% | 10445 | \fi |
10446 | \else | ||
10447 | \unless\ifekdn@nodelim | ||
10448 | \ifsubsq@unit\unexpanded\expandafter{\ekd@unit@delim}\fi | ||
10449 | \fi | ||
9290 | \fi% | 10450 | \fi% |
9291 | \unless\ifekdn@nonum\current@ref@arg{\ekdn@labelb}{\ekdn@labele}\fi%\hskip .25em | 10451 | \unless\ifekdn@nonum\current@ref@arg{\ekdn@labelb}{\ekdn@labele}\fi%\hskip .25em |
9292 | \ifdefined\ekdn@lem | 10452 | \ifdefined\ekdn@lem |
@@ -9302,11 +10462,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
9302 | \ifbool{ekd@lang@pkg}% | 10462 | \ifbool{ekd@lang@pkg}% |
9303 | {{\noexpand\selectlanguage{\app@note@lang}\unexpanded{#2}}}{% | 10463 | {{\noexpand\selectlanguage{\app@note@lang}\unexpanded{#2}}}{% |
9304 | {\unexpanded{#2}}}}}% | 10464 | {\unexpanded{#2}}}}}% |
9305 | \ifekd@mapps% | 10465 | \ifekd@mapps |
9306 | \unconditional@appin[\ekdan@type]{\note@contents}% | 10466 | \unconditional@appin[\ekdan@type]{\note@contents}% |
9307 | \else% | 10467 | \else |
9308 | \unconditional@appin{\note@contents}% | 10468 | \unconditional@appin{\note@contents}% |
9309 | \fi% | 10469 | \fi |
9310 | \luadirect{ekdosis.setprevnotelab(\luastringO{\ekdn@labelb})}% | 10470 | \luadirect{ekdosis.setprevnotelab(\luastringO{\ekdn@labelb})}% |
9311 | \egroup | 10471 | \egroup |
9312 | \subsq@unittrue | 10472 | \subsq@unittrue |
@@ -9332,12 +10492,12 @@ Sample text with a \textcolor{red}{word} in red. | |||
9332 | % defined above. | 10492 | % defined above. |
9333 | % \begin{macrocode} | 10493 | % \begin{macrocode} |
9334 | \NewDocumentCommand{\ekd@note}{O{} m}{% | 10494 | \NewDocumentCommand{\ekd@note}{O{} m}{% |
9335 | \bgroup% | 10495 | \bgroup |
9336 | \ekvset{ekd@note}{#1}% | 10496 | \ekvset{ekd@note}{#1}% |
9337 | \edef\note@contents{% | 10497 | \edef\note@contents{% |
9338 | \ekvifdefinedNoVal{ekd@note}{pre}{}{% | 10498 | \ekvifdefinedNoVal{ekd@note}{pre}{}{% |
9339 | \unexpanded\expandafter{\pre@value}}% | 10499 | \unexpanded\expandafter{\pre@value}}% |
9340 | {\unexpanded{#2}}% | 10500 | \unexpanded{#2}% |
9341 | \ekvifdefinedNoVal{ekd@note}{post}{}{% | 10501 | \ekvifdefinedNoVal{ekd@note}{post}{}{% |
9342 | \unexpanded\expandafter{\post@value}}% | 10502 | \unexpanded\expandafter{\post@value}}% |
9343 | }% | 10503 | }% |
@@ -9346,7 +10506,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9346 | \else% | 10506 | \else% |
9347 | \append@app{\note@contents}% | 10507 | \append@app{\note@contents}% |
9348 | \fi% | 10508 | \fi% |
9349 | \egroup% | 10509 | \egroup |
9350 | } | 10510 | } |
9351 | \NewDocumentCommand{\ekd@note@star}{O{} m}{% | 10511 | \NewDocumentCommand{\ekd@note@star}{O{} m}{% |
9352 | \bgroup | 10512 | \bgroup |
@@ -9401,6 +10561,173 @@ Sample text with a \textcolor{red}{word} in red. | |||
9401 | } | 10561 | } |
9402 | % \end{macrocode} | 10562 | % \end{macrocode} |
9403 | % \end{macro} | 10563 | % \end{macro} |
10564 | % \paragraph{Combining Footnotes Into a Single Paragraph} | ||
10565 | % Footnotes combined as one paragraph are inserted with the standard | ||
10566 | % \cs{footnote} command which is redirected to | ||
10567 | % \cs{unconditional@appin} when |ekd@parafootnotes| is set to | ||
10568 | % |true|:--- | ||
10569 | % \begin{macrocode} | ||
10570 | \newif\ifekd@parafootnotes | ||
10571 | % \end{macrocode} | ||
10572 | % The keys to be used by \cs{SetFootnotes} are defined below:--- | ||
10573 | % \begin{macrocode} | ||
10574 | \ekvdefinekeys{ekd@footnotes}{ | ||
10575 | choice arrangement = { | ||
10576 | column = \unless\ifekd@alignmentstarted | ||
10577 | \pcol@fnlayout@c\fi, | ||
10578 | page = \unless\ifekd@alignmentstarted | ||
10579 | \pcol@fnlayout@p\fi, | ||
10580 | merge = \unless\ifekd@alignmentstarted | ||
10581 | \pcol@fnlayout@m\fi}, | ||
10582 | unknown-choice arrangement = \PackageError{ekdosis}{unknown | ||
10583 | arrangement=#1}{`arrangement' must be either `column', | ||
10584 | `page' or `merge'.}, | ||
10585 | noval reset = \ekd@parafootnotesfalse | ||
10586 | \unless\ifekd@alignmentstarted | ||
10587 | \pcol@fnlayout@c\fi, | ||
10588 | bool paragraph = \ifekd@parafootnotes, | ||
10589 | store type = \ekdfn@type, | ||
10590 | initial type = default, | ||
10591 | code textfnmark = \protected\def\ekd@around@fnmark##1{#1}, | ||
10592 | initial textfnmark = \textsuperscript{#1}, | ||
10593 | code appfnmark = \protected\def\ekdappfnmark##1{#1}, | ||
10594 | initial appfnmark = \textsuperscript{#1} | ||
10595 | } | ||
10596 | % \end{macrocode} | ||
10597 | % A conditional \cs{ifekd@chfnmark} is defined so that \pkg{ekdosis} | ||
10598 | % may know whether the footnote number has to be replaced with some | ||
10599 | % other mark. | ||
10600 | % \begin{macrocode} | ||
10601 | \newif\ifekd@chfnmark | ||
10602 | % \end{macrocode} | ||
10603 | % These are the keys to be used by \cs{ekd@parafootnote}:--- | ||
10604 | % \begin{macrocode} | ||
10605 | \ekvdefinekeys{ekd@infootnotes}{ | ||
10606 | store type = \ekdfn@type, | ||
10607 | code mark = \ekd@chfnmarktrue | ||
10608 | \protected\def\ekd@fnmark@value{#1} | ||
10609 | } | ||
10610 | % \end{macrocode} | ||
10611 | % \begin{macro}{\SetFootnotes} | ||
10612 | % \changes{v1.5}{2023/07/29}{footnotes combined into a single | ||
10613 | % paragraph} \cs{SetFootnotes}\marg{options} can be used in the | ||
10614 | % preamble or at any point of the document. |layout=paragraph| | ||
10615 | % instructs \pkg{ekdosis} to combine all footnotes into a single | ||
10616 | % paragraph. Then the other |key-value| options that are defined | ||
10617 | % just above allow to format the marks and specify the layer where | ||
10618 | % the notes are to be printed. | ||
10619 | % \begin{macrocode} | ||
10620 | \ekvsetdef\SetFootnotes{ekd@footnotes} | ||
10621 | % \end{macrocode} | ||
10622 | % \end{macro} | ||
10623 | % \begin{macro}{\ekd@parafootnote} | ||
10624 | % \cs{ekd@parafootnote}\oarg{options}\marg{contents} holds the new | ||
10625 | % definition of \cs{footnote}. This command accepts an optional | ||
10626 | % argument that can be used to specify the layer in which the | ||
10627 | % contents of the footnote is to be printed or any other mark to be | ||
10628 | % printed in place of the footnote number. | ||
10629 | % \begin{macrocode} | ||
10630 | \NewDocumentCommand{\ekd@parafootnote}{O{} m}{% | ||
10631 | \ifekd@state | ||
10632 | \bgroup | ||
10633 | \ekvset{ekd@infootnotes}{#1}% | ||
10634 | \ifekd@chfnmark | ||
10635 | \edef\ekd@parafn@mark{% | ||
10636 | \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}% | ||
10637 | \edef\ekd@inparafn@mark{% | ||
10638 | \ekdappfnmark{% | ||
10639 | \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}% | ||
10640 | \else | ||
10641 | \refstepcounter{footnote}% | ||
10642 | \edef\ekd@parafn@mark{\LRnum{\thefootnote}}% | ||
10643 | \edef\ekd@inparafn@mark{\ekdappfnmark{\LRnum{\thefootnote}}}% | ||
10644 | \fi | ||
10645 | \leavevmode | ||
10646 | \stepcounter{ekd@lab}% | ||
10647 | \zlabel{ekd:\theekd@lab}% | ||
10648 | \luadirect{ekdosis.storeabspg( | ||
10649 | \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% | ||
10650 | \add@apparatus | ||
10651 | \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}% | ||
10652 | \luadirect{tex.sprint( | ||
10653 | ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}% | ||
10654 | \ekd@around@fnmark{\ekd@parafn@mark}% | ||
10655 | \ifekd@mapps | ||
10656 | \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}% | ||
10657 | \else | ||
10658 | \unconditional@appin{\ekd@inparafn@mark #2}% | ||
10659 | \fi | ||
10660 | \egroup | ||
10661 | \else | ||
10662 | \footnote{#2}% | ||
10663 | \fi | ||
10664 | } | ||
10665 | % \end{macrocode} | ||
10666 | % \end{macro} | ||
10667 | % \begin{macro}{\ekd@parafootnotemark} | ||
10668 | % \cs{ekd@parafootnotemark}\oarg{mark} replaces the definition of the | ||
10669 | % standard \cs{footnotemark} command. | ||
10670 | % \begin{macrocode} | ||
10671 | \NewDocumentCommand{\ekd@parafootnotemark}{o}{% | ||
10672 | \ifekd@state | ||
10673 | \bgroup | ||
10674 | \IfNoValueTF{#1}{% | ||
10675 | \refstepcounter{footnote}% | ||
10676 | \edef\ekd@parafn@mark{\LRnum{\thefootnote}}% | ||
10677 | }{% | ||
10678 | \edef\ekd@parafn@mark{% | ||
10679 | \LRnum{\unexpanded\expandafter{#1}}}% | ||
10680 | }% | ||
10681 | \leavevmode | ||
10682 | \ekd@around@fnmark{\ekd@parafn@mark}% | ||
10683 | \egroup | ||
10684 | \else | ||
10685 | \IfNoValueTF{#1}{\footnotemark}{\footnotemark[#1]}% | ||
10686 | \fi | ||
10687 | } | ||
10688 | % \end{macrocode} | ||
10689 | % \end{macro} | ||
10690 | % \begin{macro}{\ekd@parafootnotetext} | ||
10691 | % \cs{ekd@parafootnotetext}\oarg{options}\marg{text} replaces the | ||
10692 | % definition of the standard \cs{footnotetext} command. It does the | ||
10693 | % same as \cs{ekd@parafootnote} except that it does not print any | ||
10694 | % mark in the main text. | ||
10695 | % \begin{macrocode} | ||
10696 | \NewDocumentCommand{\ekd@parafootnotetext}{O{} m}{% | ||
10697 | \ifekd@state | ||
10698 | \bgroup | ||
10699 | \ekvset{ekd@infootnotes}{#1}% | ||
10700 | \ifekd@chfnmark | ||
10701 | \edef\ekd@parafn@mark{% | ||
10702 | \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}% | ||
10703 | \edef\ekd@inparafn@mark{% | ||
10704 | \ekdappfnmark{% | ||
10705 | \LRnum{\unexpanded\expandafter{\ekd@fnmark@value}}}}% | ||
10706 | \else | ||
10707 | \edef\ekd@parafn@mark{\LRnum{\thefootnote}}% | ||
10708 | \edef\ekd@inparafn@mark{\ekdappfnmark{\LRnum{\thefootnote}}}% | ||
10709 | \fi | ||
10710 | \leavevmode | ||
10711 | \stepcounter{ekd@lab}% | ||
10712 | \zlabel{ekd:\theekd@lab}% | ||
10713 | \luadirect{ekdosis.storeabspg( | ||
10714 | \luastring{\zref@extract{ekd:\theekd@lab}{abspage}})}% | ||
10715 | \add@apparatus | ||
10716 | \luadirect{ekdosis.increment_bagunits(\luastringO{\ekdfn@type})}% | ||
10717 | \luadirect{tex.sprint( | ||
10718 | ekdosis.limit_bagunits(\luastringO{\ekdan@type}))}% | ||
10719 | \ifekd@mapps | ||
10720 | \unconditional@appin[\ekdfn@type]{\ekd@inparafn@mark #2}% | ||
10721 | \else | ||
10722 | \unconditional@appin{\ekd@inparafn@mark #2}% | ||
10723 | \fi | ||
10724 | \egroup | ||
10725 | \else | ||
10726 | \footnotetext[#1]{#2}% | ||
10727 | \fi | ||
10728 | } | ||
10729 | % \end{macrocode} | ||
10730 | % \end{macro} | ||
9404 | % \paragraph{Emendations and Conjectures} | 10731 | % \paragraph{Emendations and Conjectures} |
9405 | % Here follows the |key-value| options to be used by | 10732 | % Here follows the |key-value| options to be used by |
9406 | % \cs{SetCritSymbols} below:--- | 10733 | % \cs{SetCritSymbols} below:--- |
@@ -9511,6 +10838,30 @@ Sample text with a \textcolor{red}{word} in red. | |||
9511 | } | 10838 | } |
9512 | % \end{macrocode} | 10839 | % \end{macrocode} |
9513 | % \end{macro} | 10840 | % \end{macro} |
10841 | % \paragraph{Lacunae} | ||
10842 | % \begin{macro}{\ilabel} | ||
10843 | % \changes{v1.5}{2023/07/29}{recalls and sets the ending label of | ||
10844 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been | ||
10845 | % used with the optional argument |ilabel=<label>|, | ||
10846 | % \cs{ilabel}\marg{label} must be used to mark the point where the | ||
10847 | % span of text corresponding to the abbreviated lemma ends. This | ||
10848 | % command is used to set the ending line number of physical lacunae in | ||
10849 | % the apparatus criticus. | ||
10850 | % \begin{macrocode} | ||
10851 | \NewDocumentCommand{\ilabel}{m}{% | ||
10852 | \luadirect{tex.sprint(ekdosis.getindexedlab(\luastringN{#1}))}% | ||
10853 | } | ||
10854 | % \end{macrocode} | ||
10855 | % \end{macro} | ||
10856 | % \begin{macro}{\lacunaStart} | ||
10857 | % \begin{macro}{\lacunaEnd} | ||
10858 | % \begin{macrocode} | ||
10859 | \NewDocumentCommand{\lacunaStart}{O{}}{\ignorespaces} | ||
10860 | \NewDocumentCommand{\lacunaEnd}{O{}}{\ignorespaces} | ||
10861 | % \end{macrocode} | ||
10862 | % \end{macro} | ||
10863 | % \end{macro} | ||
10864 | % \paragraph{Apparatus Criticus} | ||
9514 | % \cs{apparatus} is used internally by \pkg{ekdosis} to print the | 10865 | % \cs{apparatus} is used internally by \pkg{ekdosis} to print the |
9515 | % apparatus at the bottom of pages. Therefore, it is not documented, | 10866 | % apparatus at the bottom of pages. Therefore, it is not documented, |
9516 | % but this may change in the future for it will be possible to have | 10867 | % but this may change in the future for it will be possible to have |
@@ -9532,7 +10883,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
9532 | % Start and stop |ekdosis|: | 10883 | % Start and stop |ekdosis|: |
9533 | % \begin{macrocode} | 10884 | % \begin{macrocode} |
9534 | \NewDocumentCommand{\EkdosisOn}{}{% | 10885 | \NewDocumentCommand{\EkdosisOn}{}{% |
9535 | \ekd@statetrue} | 10886 | \ekd@statetrue |
10887 | \ifekd@parafootnotes | ||
10888 | \RenewCommandCopy\footnote\ekd@parafootnote | ||
10889 | \RenewCommandCopy\footnotemark\ekd@parafootnotemark | ||
10890 | \RenewCommandCopy\footnotetext\ekd@parafootnotetext | ||
10891 | \fi | ||
10892 | } | ||
9536 | \NewDocumentCommand{\EkdosisOff}{}{% | 10893 | \NewDocumentCommand{\EkdosisOff}{}{% |
9537 | \ekd@statefalse% | 10894 | \ekd@statefalse% |
9538 | } | 10895 | } |
@@ -9576,9 +10933,12 @@ Sample text with a \textcolor{red}{word} in red. | |||
9576 | store apparatus = \apparatus@value, | 10933 | store apparatus = \apparatus@value, |
9577 | bool paired = \ifekd@paired, | 10934 | bool paired = \ifekd@paired, |
9578 | choice lineation = {page = \ekd@pagelineationtrue, | 10935 | choice lineation = {page = \ekd@pagelineationtrue, |
9579 | document = \ekd@pagelineationfalse}, | 10936 | document = \ekd@pagelineationfalse, |
10937 | none = \ekd@pagelineationtrue | ||
10938 | \ekd@hidelinenumberstrue}, | ||
9580 | unknown-choice lineation = \PackageError{ekdosis}{unknown | 10939 | unknown-choice lineation = \PackageError{ekdosis}{unknown |
9581 | lineation=#1}{`lineation' must be either `page' or `document'.}, | 10940 | lineation=#1}{`lineation' must be either `page', `document' or |
10941 | `none'.}, | ||
9582 | choice segmentation = {auto = \def\segmentation@val{auto}, | 10942 | choice segmentation = {auto = \def\segmentation@val{auto}, |
9583 | noauto = \def\segmentation@val{noauto}}, | 10943 | noauto = \def\segmentation@val{noauto}}, |
9584 | unknown-choice segmentation = \PackageError{ekdosis}{unknown | 10944 | unknown-choice segmentation = \PackageError{ekdosis}{unknown |
@@ -9615,9 +10975,9 @@ Sample text with a \textcolor{red}{word} in red. | |||
9615 | % by \pkg{ekdosis}. | 10975 | % by \pkg{ekdosis}. |
9616 | % \begin{macrocode} | 10976 | % \begin{macrocode} |
9617 | \NewDocumentCommand{\EkdosisColStart}{}{% | 10977 | \NewDocumentCommand{\EkdosisColStart}{}{% |
9618 | \ekd@setlineno% | 10978 | \ekd@setlineno |
9619 | \runninglinenumbers | 10979 | \runninglinenumbers |
9620 | \ekd@storecol% | 10980 | \ekd@storecol |
9621 | \stepcounter{ekd@lab}% | 10981 | \stepcounter{ekd@lab}% |
9622 | \zlabel{ekd:\theekd@lab}% | 10982 | \zlabel{ekd:\theekd@lab}% |
9623 | \luadirect{% | 10983 | \luadirect{% |
@@ -9626,6 +10986,14 @@ Sample text with a \textcolor{red}{word} in red. | |||
9626 | \ifekd@pagelineation | 10986 | \ifekd@pagelineation |
9627 | \luadirect{tex.sprint(ekdosis.checkresetlineno())} | 10987 | \luadirect{tex.sprint(ekdosis.checkresetlineno())} |
9628 | \fi | 10988 | \fi |
10989 | \ifekd@hidelinenumbers | ||
10990 | \def\thelinenumber{}% | ||
10991 | \fi | ||
10992 | \ifekd@parafootnotes | ||
10993 | \RenewCommandCopy\footnote\ekd@parafootnote | ||
10994 | \RenewCommandCopy\footnotemark\ekd@parafootnotemark | ||
10995 | \RenewCommandCopy\footnotetext\ekd@parafootnotetext | ||
10996 | \fi | ||
9629 | } | 10997 | } |
9630 | \NewDocumentCommand{\EkdosisColStop}{}{% | 10998 | \NewDocumentCommand{\EkdosisColStop}{}{% |
9631 | \stepcounter{ekd@lab}% | 10999 | \stepcounter{ekd@lab}% |
@@ -9633,7 +11001,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9633 | \luadirect{% | 11001 | \luadirect{% |
9634 | ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, | 11002 | ekdosis.storeabspg(\luastring{\zref@extract{ekd:\theekd@lab}{abspage}}, |
9635 | "pg_ii")}% | 11003 | "pg_ii")}% |
9636 | \endrunninglinenumbers% | 11004 | \endrunninglinenumbers |
9637 | } | 11005 | } |
9638 | % \end{macrocode} | 11006 | % \end{macrocode} |
9639 | % \begin{environment}{alignment} | 11007 | % \begin{environment}{alignment} |
@@ -9648,8 +11016,10 @@ Sample text with a \textcolor{red}{word} in red. | |||
9648 | % described above. One may contrast these options with those accepted | 11016 | % described above. One may contrast these options with those accepted |
9649 | % by \cs{SetAlignment} as \enquote{local settings}. | 11017 | % by \cs{SetAlignment} as \enquote{local settings}. |
9650 | % \begin{macrocode} | 11018 | % \begin{macrocode} |
11019 | \newif\ifekd@alignmentstarted | ||
9651 | \NewDocumentEnvironment{alignment}{O{}} | 11020 | \NewDocumentEnvironment{alignment}{O{}} |
9652 | {% | 11021 | {% |
11022 | \ekd@alignmentstartedtrue | ||
9653 | \ekvset{ekd@align}{#1}% | 11023 | \ekvset{ekd@align}{#1}% |
9654 | \luadirect{ekdosis.mkenvdata( | 11024 | \luadirect{ekdosis.mkenvdata( |
9655 | \luastring{\texts@value}, | 11025 | \luastring{\texts@value}, |
@@ -9664,12 +11034,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
9664 | \setrunninglinenumbers | 11034 | \setrunninglinenumbers |
9665 | \luadirect{tex.sprint(ekdosis.mkenv())} | 11035 | \luadirect{tex.sprint(ekdosis.mkenv())} |
9666 | \ifekd@paired | 11036 | \ifekd@paired |
9667 | \begin{paracol}[\lcols@num]{\tcols@num} | 11037 | \begin{paracol}[\lcols@num]{\tcols@num} |
9668 | \else | 11038 | \else |
9669 | \begin{paracol}[\lcols@num]*{\tcols@num} | 11039 | \begin{paracol}[\lcols@num]*{\tcols@num} |
9670 | \fi | 11040 | \fi |
9671 | } | 11041 | } |
9672 | {\end{paracol} | 11042 | {\if@pkg@breakable\flushpage\fi |
11043 | \end{paracol} | ||
9673 | \iftei@export\luadirect{ekdosis.export_coldata_totei()}\fi | 11044 | \iftei@export\luadirect{ekdosis.export_coldata_totei()}\fi |
9674 | \ifekd@flushapp | 11045 | \ifekd@flushapp |
9675 | \luadirect{ekdosis.newalignment("reset")} | 11046 | \luadirect{ekdosis.newalignment("reset")} |
@@ -9733,14 +11104,18 @@ Sample text with a \textcolor{red}{word} in red. | |||
9733 | % \begin{macro}{\ekdprintmark} | 11104 | % \begin{macro}{\ekdprintmark} |
9734 | % \changes{v1.3}{2021/08/18}{prints or removes the marks in headers | 11105 | % \changes{v1.3}{2021/08/18}{prints or removes the marks in headers |
9735 | % and footers} \cs{ekdprintmark}\marg{selector}\marg{signpost} The | 11106 | % and footers} \cs{ekdprintmark}\marg{selector}\marg{signpost} The |
9736 | % signposts printed in headers and footers must be | 11107 | % signposts printed in headers and footers must be passed as second |
9737 | % passed as second argument of \cs{ekdprintmark} so that \pkg{ekdosis} | 11108 | % argument of \cs{ekdprintmark} so that \pkg{ekdosis} can remove |
9738 | % can remove them on pages where printing them is not | 11109 | % them on pages where printing them is not desirable. \meta{selector} |
9739 | % desirable. \meta{selector} refers to three symbolic letters where | 11110 | % refers to three possible symbolic letters where the first can be |
9740 | % the first can be either |H| or |F|\===for \underLine{h}eader or | 11111 | % either |H| or |F|\===for \underLine{h}eader or |
9741 | % \underLine{f}ooter\===, the second |E| or |O|\===for \underLine{o}dd | 11112 | % \underLine{f}ooter\===, the second |E| or |O|\===for \underLine{o}dd |
9742 | % or \underLine{e}ven\===and the third |L|, |C| or |R|\===for | 11113 | % or \underLine{e}ven\===and the third |L|, |C| or |R|\===for |
9743 | % \underLine{l}eft, \underLine{c}enter or \underLine{r}ight:--- | 11114 | % \underLine{l}eft, \underLine{c}enter or \underLine{r}ight. When |
11115 | % critical editions are layed out on \enquote{paired} facing pages as | ||
11116 | % described above \vpageref{ref:paired-opt}, the second letter, |E| or | ||
11117 | % |O|, must obviously be omitted for headers and footers are the same | ||
11118 | % on every facing page:--- | ||
9744 | % \begin{macrocode} | 11119 | % \begin{macrocode} |
9745 | \ekvdefinekeys{ekd@marks}{ | 11120 | \ekvdefinekeys{ekd@marks}{ |
9746 | choice mark = {HEL = \def\ekd@mk{HEL}, | 11121 | choice mark = {HEL = \def\ekd@mk{HEL}, |
@@ -9759,13 +11134,59 @@ Sample text with a \textcolor{red}{word} in red. | |||
9759 | must be either `HEL', `HEC', `HER', `HOL', `HOC', `HOR', `FEL', | 11134 | must be either `HEL', `HEC', `HER', `HOL', `HOC', `HOR', `FEL', |
9760 | \MessageBreak `FEC', `FER', `FOL', `FOC' or `FOR'.} | 11135 | \MessageBreak `FEC', `FER', `FOL', `FOC' or `FOR'.} |
9761 | } | 11136 | } |
9762 | \NewDocumentCommand{\ekdprintmark}{m m}{% | 11137 | \NewDocumentCommand{\ekd@printmark}{m m}{% |
9763 | \bgroup | 11138 | \bgroup |
9764 | \ekvset{ekd@marks}{mark = #1}% | 11139 | \ekvset{ekd@marks}{mark = #1}% |
9765 | \luadirect{tex.sprint(ekdosis.printmark(\luastringN{#2}, | 11140 | \luadirect{tex.sprint(ekdosis.printmark(\luastringN{#2}, |
9766 | \luastringO{\ekd@mk}))}% | 11141 | \luastringO{\ekd@mk}))}% |
9767 | \egroup | 11142 | \egroup |
9768 | } | 11143 | } |
11144 | \NewDocumentCommand{\ekdprintmark}{m m}{% | ||
11145 | \def\@tempa{#1}% | ||
11146 | \def\mk@HL{HL}\def\mk@HC{HC}\def\mk@HR{HR}% | ||
11147 | \def\mk@FL{FL}\def\mk@FC{FC}\def\mk@FR{FR}% | ||
11148 | \ifx\@tempa\mk@HL | ||
11149 | \csname ekd@printmark\endcsname{HEL}{\csname | ||
11150 | ekd@printmark\endcsname{HOL}{#2}}% | ||
11151 | \else | ||
11152 | \ifx\@tempa\mk@HC | ||
11153 | \csname ekd@printmark\endcsname{HEC}{\csname | ||
11154 | ekd@printmark\endcsname{HOC}{#2}}% | ||
11155 | \else | ||
11156 | \ifx\@tempa\mk@HR | ||
11157 | \csname ekd@printmark\endcsname{HER}{\csname | ||
11158 | ekd@printmark\endcsname{HOR}{#2}}% | ||
11159 | \else | ||
11160 | \ifx\@tempa\mk@FL | ||
11161 | \csname ekd@printmark\endcsname{FEL}{\csname | ||
11162 | ekd@printmark\endcsname{FOL}{#2}}% | ||
11163 | \else | ||
11164 | \ifx\@tempa\mk@FC | ||
11165 | \csname ekd@printmark\endcsname{FEC}{\csname | ||
11166 | ekd@printmark\endcsname{FOC}{#2}}% | ||
11167 | \else | ||
11168 | \ifx\@tempa\mk@FR | ||
11169 | \csname ekd@printmark\endcsname{FER}{\csname | ||
11170 | ekd@printmark\endcsname{FOR}{#2}}% | ||
11171 | \else | ||
11172 | \csname ekd@printmark\endcsname{#1}{#2}% | ||
11173 | \fi\fi\fi\fi\fi\fi | ||
11174 | } | ||
11175 | % \end{macrocode} | ||
11176 | % \end{macro} | ||
11177 | % \begin{macro}{\ekdEOprint} | ||
11178 | % \changes{v1.5}{2023/07/29}{Sets headers and footers on | ||
11179 | % \enquote{paired} facing pages} | ||
11180 | % To set headers and footers on \enquote{paired} facing pages, | ||
11181 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like | ||
11182 | % so: \cs{ekdEOprint}\marg{left-hand mark}\marg{right-hand mark}. This | ||
11183 | % command uses the zero-based |abspage| counter provided by | ||
11184 | % \pkg{zref-abspage}. So if the number returned by this counter is | ||
11185 | % odd, it falls on a left-hand page:--- | ||
11186 | % \begin{macrocode} | ||
11187 | \NewDocumentCommand{\ekdEOprint}{m m}{% | ||
11188 | \ifnumodd{\theabspage}{#1}{#2}% | ||
11189 | } | ||
9769 | % \end{macrocode} | 11190 | % \end{macrocode} |
9770 | % \end{macro} | 11191 | % \end{macro} |
9771 | % \begin{macro}{\ekdnofhmarks} | 11192 | % \begin{macro}{\ekdnofhmarks} |
@@ -9774,7 +11195,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9774 | % \cs{ekdnohfmarks} has the same effect as the \LaTeX\ standard | 11195 | % \cs{ekdnohfmarks} has the same effect as the \LaTeX\ standard |
9775 | % command \cs{thispagestyle}|{empty}|. | 11196 | % command \cs{thispagestyle}|{empty}|. |
9776 | % \begin{macrocode} | 11197 | % \begin{macrocode} |
9777 | \NewDocumentCommand{\ekdnohfmark}{}{% | 11198 | \NewDocumentCommand{\ekdnohfmarks}{}{% |
9778 | \luadirect{ekdosis.nohfmark()}% | 11199 | \luadirect{ekdosis.nohfmark()}% |
9779 | } | 11200 | } |
9780 | % \end{macrocode} | 11201 | % \end{macrocode} |
@@ -9789,9 +11210,54 @@ Sample text with a \textcolor{red}{word} in red. | |||
9789 | } | 11210 | } |
9790 | % \end{macrocode} | 11211 | % \end{macrocode} |
9791 | % \end{macro} | 11212 | % \end{macro} |
11213 | % \paragraph{\enquote{Mirrored} paired pages} | ||
11214 | % An easy way to have mirrored paired pages is to use a dedicaded | ||
11215 | % counter to set the value of the page numbers. This counter should be | ||
11216 | % incremented every two pages. | ||
11217 | % \begin{counter}{pairedpage} | ||
11218 | % \changes{v1.5}{2023/07/29}{A counter incremented every two pages} | ||
11219 | % |pairedpage| is first set as a global counter:--- | ||
11220 | % \begin{macrocode} | ||
11221 | \newcounter{pairedpage} | ||
11222 | \globalcounter{pairedpage} | ||
11223 | % \end{macrocode} | ||
11224 | % \end{counter} | ||
11225 | % \begin{macro}{\setpairedpagenum} | ||
11226 | % \changes{v1.5}{2023/07/29}{sets the same page number on paired | ||
11227 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of | ||
11228 | % the alignment environment to set the number of the first left-hand | ||
11229 | % paired page. | ||
11230 | % \begin{macro}{\setpairedpage} | ||
11231 | % \changes{v1.5}{2023/07/29}{sets the page number of the first paired | ||
11232 | % page} \cs{setpairedpage} is an argument-less command meant to be | ||
11233 | % issued in commands used to set headers or footers before | ||
11234 | % \cs{thepage}. This command has the counter |pairedpage| | ||
11235 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ | ||
11236 | % |pairedpage| on every page. | ||
11237 | % \begin{macro}{\resetpagenumber} | ||
11238 | % \changes{v1.5}{2023/07/29}{resets normal running page numbers} | ||
11239 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} | ||
11240 | % paired pages alignment environments. This argument-less command | ||
11241 | % corrects any numbering error on the page following the edition | ||
11242 | % text and resumes normal page numbering. | ||
11243 | % \begin{macrocode} | ||
11244 | \NewDocumentCommand{\setpairedpagenum}{m}{% | ||
11245 | \setcounter{pairedpage}{\number\numexpr#1-1}% | ||
11246 | } | ||
11247 | \NewDocumentCommand{\setpairedpage}{}{% | ||
11248 | \ifnumodd{\thepage}{\setcounter{page}{\thepairedpage}} | ||
11249 | {\stepcounter{pairedpage}\setcounter{page}{\thepairedpage}}% | ||
11250 | } | ||
11251 | \def\resetpagenumber{% | ||
11252 | \ifnumodd{\thepairedpage}{}{\addtocounter{page}{-1}} | ||
11253 | } | ||
11254 | % \end{macrocode} | ||
11255 | % \end{macro} | ||
11256 | % \end{macro} | ||
11257 | % \end{macro} | ||
9792 | % \paragraph{Divisions of the Body} | 11258 | % \paragraph{Divisions of the Body} |
9793 | % \pkg{ekdosis} can convert \cs{book}, \cs{part}, \cs{chapter}, | 11259 | % \pkg{ekdosis} can convert \cs{book}, \cs{part}, \cs{chapter}, |
9794 | % \cs{section}, \cs{subsec{\allowbreak}tion} and \cs{subsubsection} | 11260 | % \cs{section}, |\subsec|\allowbreak|tion| and \cs{subsubsection} |
9795 | % into corresponding \texttt{TEI} \enquote*{numbered} | 11261 | % into corresponding \texttt{TEI} \enquote*{numbered} |
9796 | % |<div|\textsubscript{\emph{n}}|>| elements, where $1\leq n\leq 6$. | 11262 | % |<div|\textsubscript{\emph{n}}|>| elements, where $1\leq n\leq 6$. |
9797 | % \begin{macro}{\MkBodyDivs} | 11263 | % \begin{macro}{\MkBodyDivs} |
@@ -9926,12 +11392,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
9926 | % \end{macrocode} | 11392 | % \end{macrocode} |
9927 | % \end{macro} | 11393 | % \end{macro} |
9928 | % \begin{macro}{\\+} | 11394 | % \begin{macro}{\\+} |
9929 | % \changes{v1.4}{2021/09/06}{New macro for poetry} | 11395 | % \changes{v1.4}{2021/11/21}{New macro for poetry} |
9930 | % |\\+| comes in addition to the verse commands that are provided by | 11396 | % |\\+| comes in addition to the verse commands that are provided by |
9931 | % the \pkg{verse} package. |\\+| causes a linebreak within a verse | 11397 | % the \pkg{verse} package. |\\+| causes a linebreak within a verse |
9932 | % line. In contrast to |\\>|, the subsequent line is not indented and | 11398 | % line. In contrast to |\\>|, the subsequent line is not indented and |
9933 | % complies to any already defined indent pattern. \cs{@vscentercr} | 11399 | % complies to any already defined indent pattern. \cs{@vscentercr} |
9934 | % must be redefined accordingly. | 11400 | % must be redefined accordingly. (Additionally, this command will be |
11401 | % patched below to allow for |maxlines| definition.) | ||
9935 | % \begin{macrocode} | 11402 | % \begin{macrocode} |
9936 | \ifboolexpr{bool {@pkg@poetry@verse} or bool {ekd@memoir@loaded}} | 11403 | \ifboolexpr{bool {@pkg@poetry@verse} or bool {ekd@memoir@loaded}} |
9937 | {\newcommand{\@vsifplus}[1]{\@ifnextchar +{\@firstoftwo{#1}}} | 11404 | {\newcommand{\@vsifplus}[1]{\@ifnextchar +{\@firstoftwo{#1}}} |
@@ -9954,10 +11421,26 @@ Sample text with a \textcolor{red}{word} in red. | |||
9954 | }{} | 11421 | }{} |
9955 | % \end{macrocode} | 11422 | % \end{macrocode} |
9956 | % \end{macro} | 11423 | % \end{macro} |
9957 | % A small patch is applied to the \pkg{verse} package, then | 11424 | % Two small patches are applied to the \pkg{verse} package, then |
9958 | % \env{ekdverse} is defined:--- | 11425 | % \env{ekdverse} is defined:--- |
9959 | % \begin{macrocode} | 11426 | % \begin{macrocode} |
9960 | \if@pkg@poetry@verse | 11427 | \if@pkg@poetry@verse |
11428 | % \end{macrocode} | ||
11429 | % This patch allows for |maxlines| to be used in verse environments: | ||
11430 | % \begin{macrocode} | ||
11431 | \AddToHook{cmd/@vscentercr/before}{% | ||
11432 | \ifdefined\maxlines@value | ||
11433 | \stepcounter{ekd@lnperpage}% | ||
11434 | \ifnum\value{ekd@locallnperpage} = 1 | ||
11435 | \ifnumcomp{\theekd@lnperpage}{=}{% | ||
11436 | \luadirect{tex.sprint(ekdosis.getlocalmaxlines())}}{% | ||
11437 | \setcounter{ekd@locallnperpage}{0}% | ||
11438 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
11439 | \else | ||
11440 | \ifnumcomp{\theekd@lnperpage}{=}{\maxlines@value}{% | ||
11441 | \setcounter{ekd@lnperpage}{0}\pagebreak}{}% | ||
11442 | \fi | ||
11443 | \fi} | ||
9961 | \patchcmd{\start@vsline}{% | 11444 | \patchcmd{\start@vsline}{% |
9962 | \ifaltindent}{% | 11445 | \ifaltindent}{% |
9963 | \ifekd@pagevlineation\test@vpnum\fi | 11446 | \ifekd@pagevlineation\test@vpnum\fi |
@@ -9968,10 +11451,10 @@ Sample text with a \textcolor{red}{word} in red. | |||
9968 | code type = \def\type@value{#1}, | 11451 | code type = \def\type@value{#1}, |
9969 | } | 11452 | } |
9970 | \ifekd@memoir@loaded | 11453 | \ifekd@memoir@loaded |
9971 | \def\vlvnumfont{\normalfont\footnotesize} | 11454 | \def\vlvnumfont{\textdir TLT\normalfont\footnotesize} |
9972 | \def\verselinenumfont#1{\def\vlvnumfont{#1}} | 11455 | \def\verselinenumfont#1{\def\vlvnumfont{#1}} |
9973 | \else | 11456 | \else |
9974 | \verselinenumfont{\normalfont\footnotesize} | 11457 | \verselinenumfont{\textdir TLT\normalfont\footnotesize} |
9975 | \fi | 11458 | \fi |
9976 | \setcounter{poemline}{1} | 11459 | \setcounter{poemline}{1} |
9977 | \NewDocumentEnvironment{ekdverse}{!O{}}{% | 11460 | \NewDocumentEnvironment{ekdverse}{!O{}}{% |
@@ -9988,22 +11471,23 @@ Sample text with a \textcolor{red}{word} in red. | |||
9988 | \setcounter{vslineno}{1}% | 11471 | \setcounter{vslineno}{1}% |
9989 | \let\\=\@vscentercr | 11472 | \let\\=\@vscentercr |
9990 | \list{}{\itemsep \z@ | 11473 | \list{}{\itemsep \z@ |
9991 | \itemindent -\vindent% | 11474 | \itemindent -\vindent% |
9992 | \listparindent\itemindent | 11475 | \listparindent\itemindent |
9993 | \parsep \stanzaskip | 11476 | \parsep \stanzaskip |
9994 | \setlength{\itemsep}{0pt}% | 11477 | \setlength{\itemsep}{0pt}% |
9995 | \setlength{\topsep}{0pt}% | 11478 | \setlength{\topsep}{0pt}% |
9996 | \setlength{\partopsep}{0pt}% | 11479 | \setlength{\partopsep}{0pt}% |
9997 | \ifdim\vwidth@val < \linewidth | 11480 | \ifdim\vwidth@val < \linewidth |
9998 | \rightmargin \z@ | 11481 | \rightmargin \z@ |
9999 | \setlength{\leftmargin}{\linewidth}% | 11482 | \setlength{\leftmargin}{\linewidth}% |
10000 | \addtolength{\leftmargin}{-\vwidth@val}% | 11483 | \addtolength{\leftmargin}{-\vwidth@val}% |
10001 | \addtolength{\leftmargin}{-0.5\leftmargin}% | 11484 | \addtolength{\leftmargin}{-0.5\leftmargin}% |
10002 | \else | 11485 | \else |
10003 | \rightmargin \leftmargin | 11486 | \rightmargin \leftmargin |
10004 | \fi | 11487 | \fi |
10005 | \addtolength{\leftmargin}{\vindent}}% | 11488 | \addtolength{\leftmargin}{\vindent}% |
10006 | \item[]\ifekd@pagevlineation\test@vpnum\fi% | 11489 | }% |
11490 | \item[]\ifekd@pagevlineation\test@vpnum\fi% | ||
10007 | } | 11491 | } |
10008 | {\endlist | 11492 | {\endlist |
10009 | \if@continuous@vnum\resetlinenumber[\thepoemline]\fi} | 11493 | \if@continuous@vnum\resetlinenumber[\thepoemline]\fi} |
@@ -10048,6 +11532,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10048 | code type = \def\type@value{#1} | 11532 | code type = \def\type@value{#1} |
10049 | } | 11533 | } |
10050 | \NewDocumentEnvironment{ekdstanza}{!O{}}{% | 11534 | \NewDocumentEnvironment{ekdstanza}{!O{}}{% |
11535 | \resetvlinenumber[\thepoemline]% | ||
10051 | \leavevmode\unskip | 11536 | \leavevmode\unskip |
10052 | \ekvset{ekd@stanza}{#1}% | 11537 | \ekvset{ekd@stanza}{#1}% |
10053 | \ignorespaces | 11538 | \ignorespaces |
@@ -10063,6 +11548,25 @@ Sample text with a \textcolor{red}{word} in red. | |||
10063 | \NewDocumentEnvironment{ekdpar}{}{\par}{\par} | 11548 | \NewDocumentEnvironment{ekdpar}{}{\par}{\par} |
10064 | % \end{macrocode} | 11549 | % \end{macrocode} |
10065 | % \end{environment} | 11550 | % \end{environment} |
11551 | % \begin{macro}{\ekdunspace} | ||
11552 | % Provisionally, this very simple command is used by \pkg{ekdosis} to | ||
11553 | % remove undesirable spaces, notably around empty lemmas in the | ||
11554 | % apparatus. As it is used internally, \cs{ekdunspace} is not | ||
11555 | % documented. | ||
11556 | % \begin{macrocode} | ||
11557 | \newlength{\ekdspace} | ||
11558 | \settowidth{\ekdspace}{ } | ||
11559 | \def\ekdunspace{\hskip-\ekdspace} | ||
11560 | % \end{macrocode} | ||
11561 | % \end{macro} | ||
11562 | % \subsection*{Errors and Warnings} | ||
11563 | % \begin{macrocode} | ||
11564 | \def\ekd@wrong@ilabel{ | ||
11565 | \PackageError{ekdosis}% | ||
11566 | {Unknown ``ilabel'' in \string\ilabel{}}% | ||
11567 | {Please check for an ``ilabel'' that exists.} | ||
11568 | } | ||
11569 | % \end{macrocode} | ||
10066 | % \paragraph{Configuration File} Finally, if a configuration file | 11570 | % \paragraph{Configuration File} Finally, if a configuration file |
10067 | % named |\jobname-ekd.cfg| can be found, this file is read and its | 11571 | % named |\jobname-ekd.cfg| can be found, this file is read and its |
10068 | % contents loaded into the document preamble. This provides a | 11572 | % contents loaded into the document preamble. This provides a |
@@ -10071,6 +11575,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10071 | % \begin{macrocode} | 11575 | % \begin{macrocode} |
10072 | \IfFileExists{\jobname-ekd.cfg}{\input{\jobname-ekd.cfg}}{} | 11576 | \IfFileExists{\jobname-ekd.cfg}{\input{\jobname-ekd.cfg}}{} |
10073 | % \end{macrocode} | 11577 | % \end{macrocode} |
11578 | % | ||
10074 | % \iffalse | 11579 | % \iffalse |
10075 | %</package> | 11580 | %</package> |
10076 | % \fi | 11581 | % \fi |
@@ -10109,7 +11614,8 @@ local aftercmd = lpeg.Cs(lpeg.S("*[{,.?;:'`\"") + dblbkslash) | |||
10109 | local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) | 11614 | local cmdargs = lpeg.Cs(spce^-1 * bsqbracketsii * bcbracesii * bsqbrackets^-1) |
10110 | local app = lpeg.Cs("app") | 11615 | local app = lpeg.Cs("app") |
10111 | local lemrdg = lpeg.Cs(lpeg.Cs("lem") + lpeg.Cs("rdg")) | 11616 | local lemrdg = lpeg.Cs(lpeg.Cs("lem") + lpeg.Cs("rdg")) |
10112 | local note = lpeg.Cs("note") | 11617 | local footnote = lpeg.Cs(lpeg.P("footnote")) |
11618 | local note = lpeg.Cs(lpeg.P("note")) | ||
10113 | local inlem = lpeg.Cs{ "<lem" * ((1 - (lpeg.P"<lem" + lpeg.P"</lem>")) + lpeg.V(1))^0 * "</lem>" } | 11619 | local inlem = lpeg.Cs{ "<lem" * ((1 - (lpeg.P"<lem" + lpeg.P"</lem>")) + lpeg.V(1))^0 * "</lem>" } |
10114 | local inanchor = lpeg.Cs{ "<anchor" * ((1 - (lpeg.P"<" + lpeg.P">")) + lpeg.V(1))^0 * ">" } | 11620 | local inanchor = lpeg.Cs{ "<anchor" * ((1 - (lpeg.P"<" + lpeg.P">")) + lpeg.V(1))^0 * ">" } |
10115 | local inopeningnote = lpeg.Cs{ "<note" * ((1 - (lpeg.P"<" + lpeg.P">")) + lpeg.V(1))^0 * ">" } | 11621 | local inopeningnote = lpeg.Cs{ "<note" * ((1 - (lpeg.P"<" + lpeg.P">")) + lpeg.V(1))^0 * ">" } |
@@ -10148,10 +11654,11 @@ local citecmds = lpeg.Cs(lpeg.P("icite") | |||
10148 | + lpeg.P("autocite") | 11654 | + lpeg.P("autocite") |
10149 | + lpeg.P("Autocite") | 11655 | + lpeg.P("Autocite") |
10150 | + lpeg.P("autocite *") | 11656 | + lpeg.P("autocite *") |
10151 | + lpeg.P("Autocite *") | 11657 | + lpeg.P("Autocite *")) |
10152 | ) | 11658 | |
10153 | -- | 11659 | -- |
10154 | -- Bind to local variables | 11660 | -- Bind to local variables |
11661 | -- | ||
10155 | local next = next | 11662 | local next = next |
10156 | 11663 | ||
10157 | -- General | 11664 | -- General |
@@ -10431,6 +11938,7 @@ function ekdosis.getsiglum(str, opt) | |||
10431 | str = str.."," | 11938 | str = str.."," |
10432 | str = string.gsub(str, "%s-(%,)", "%1") | 11939 | str = string.gsub(str, "%s-(%,)", "%1") |
10433 | ctrl = str | 11940 | ctrl = str |
11941 | str = ","..str | ||
10434 | if opt == "tei" then | 11942 | if opt == "tei" then |
10435 | for i = 1,#shorthands do | 11943 | for i = 1,#shorthands do |
10436 | local tempa = string.gsub(shorthands[i].a, "([%-%.%_])", "%%%1") | 11944 | local tempa = string.gsub(shorthands[i].a, "([%-%.%_])", "%%%1") |
@@ -10438,22 +11946,28 @@ function ekdosis.getsiglum(str, opt) | |||
10438 | end | 11946 | end |
10439 | for i = 1,#idsRend do | 11947 | for i = 1,#idsRend do |
10440 | local tempb = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") | 11948 | local tempb = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") |
10441 | str = string.gsub(str, "(%f[%w%-%.%_])"..tempb.."(%,)", | 11949 | str = string.gsub(str, "(%,%s?)"..tempb.."(%,)", |
10442 | "%1#"..idsRend[i].xmlid.."%2") | 11950 | "%1#"..idsRend[i].xmlid.."%2") |
10443 | ctrl = string.gsub(ctrl, tempb.."%,", "") | 11951 | ctrl = string.gsub(ctrl, tempb.."%,", "") |
10444 | end | 11952 | end |
11953 | str = string.gsub(str, "^%,", "") | ||
10445 | str = string.gsub(str, "%,(%s-)([%#])", " %2") | 11954 | str = string.gsub(str, "%,(%s-)([%#])", " %2") |
10446 | str = string.gsub(str, "%,$", "") | 11955 | str = string.gsub(str, "%,$", "") |
10447 | else | 11956 | else |
10448 | for i = 1,#idsRend do | 11957 | for i = 1,#idsRend do |
10449 | local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") | 11958 | local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") |
10450 | str = string.gsub(str, tempc.."%,", idsRend[i].abbr) | 11959 | local tempd = string.gsub(idsRend[i].abbr, "%,", "ekd@comma") |
11960 | tempd = string.gsub(tempd, "%s+", "ekd@space") | ||
11961 | str = string.gsub(str, tempc.."%,", tempd) | ||
10451 | ctrl = string.gsub(ctrl, tempc.."%,", "") | 11962 | ctrl = string.gsub(ctrl, tempc.."%,", "") |
10452 | end | 11963 | end |
11964 | str = string.gsub(str, "^%,", "") | ||
10453 | if familysep ~= nil | 11965 | if familysep ~= nil |
10454 | then | 11966 | then |
10455 | str = string.gsub(str, "%s+", familysep) | 11967 | str = string.gsub(str, "%s+", familysep) |
10456 | end | 11968 | end |
11969 | str = string.gsub(str, "ekd@comma", ",") | ||
11970 | str = string.gsub(str, "ekd@space", " ") | ||
10457 | end | 11971 | end |
10458 | -- if string.find(ctrl, "[A-Za-z0-9]") | 11972 | -- if string.find(ctrl, "[A-Za-z0-9]") |
10459 | if string.find(ctrl, "%S") | 11973 | if string.find(ctrl, "%S") |
@@ -10473,7 +11987,7 @@ local cmdtotags = { | |||
10473 | {a="RLfootnote", b="note", c=" place=\"bottom\""}, | 11987 | {a="RLfootnote", b="note", c=" place=\"bottom\""}, |
10474 | {a="enquote *", b="quote", c=""}, | 11988 | {a="enquote *", b="quote", c=""}, |
10475 | {a="marginpar", b="note", c=" place=\"margin\""}, | 11989 | {a="marginpar", b="note", c=" place=\"margin\""}, |
10476 | {a="footnote", b="note", c=" place=\"bottom\""}, | 11990 | -- {a="footnote", b="note", c=" place=\"bottom\""}, |
10477 | {a="enquote", b="quote", c=""}, | 11991 | {a="enquote", b="quote", c=""}, |
10478 | {a="prname *", b="span", | 11992 | {a="prname *", b="span", |
10479 | c=" xml:lang=\"ar-Latn\" type=\"transliterated\""}, | 11993 | c=" xml:lang=\"ar-Latn\" type=\"transliterated\""}, |
@@ -10504,8 +12018,19 @@ local texpatttotags = { | |||
10504 | {a="\\resetlinenumber%s+", b=""}, | 12018 | {a="\\resetlinenumber%s+", b=""}, |
10505 | {a="\\ekdresethfmarks%s+", b=""}, | 12019 | {a="\\ekdresethfmarks%s+", b=""}, |
10506 | {a="\\indentpattern%s+{(.-)}", b=""}, | 12020 | {a="\\indentpattern%s+{(.-)}", b=""}, |
10507 | {a="\\ekdnohfmark%s+", b=""}, | 12021 | {a="\\localmaxlines%s+{(.-)}", b=""}, |
12022 | {a="\\addtomaxlines%s+{(.-)}", b=""}, | ||
12023 | {a="\\ekdnohfmarks%s+", b=""}, | ||
12024 | {a="\\setmaxlines%s+{(.-)}", b=""}, | ||
12025 | {a="\\nomaxlines%s+", b=""}, | ||
12026 | {a="\\marginnote%s+(%b[])(%b{})(%b[])", b="<note place=\"margin\">ekd@ob%2ekd@cb</note>"}, | ||
12027 | {a="\\marginnote%s+(%b{})(%b[])", b="<note place=\"margin\">ekd@ob%1ekd@cb</note>"}, | ||
12028 | {a="\\marginnote%s+(%b[])(%b{})", b="<note place=\"margin\">ekd@ob%2ekd@cb</note>"}, | ||
12029 | {a="\\marginnote%s+(%b{})", b="<note place=\"margin\">ekd@ob%1ekd@cb</note>"}, | ||
10508 | {a="\\settowidth%s+{(.-)}{(.-)}", b=""}, | 12030 | {a="\\settowidth%s+{(.-)}{(.-)}", b=""}, |
12031 | {a="\\teidirectE%s+(%b[]){(.-)}", b="<%2 ekd@os%1ekd@cs/>"}, | ||
12032 | {a="\\teidirectE%s+{(.-)}", b="<%1/>"}, | ||
12033 | {a="\\marginpar%s+(%b[])(%b{})", b="<note place=\"margin\">ekd@ob%2ekd@cb</note>"}, | ||
10509 | {a="\\poemlines%s+{(.-)}", b=""}, | 12034 | {a="\\poemlines%s+{(.-)}", b=""}, |
10510 | {a="\\pagebreak%s+%[[1-4]%]", b=""}, | 12035 | {a="\\pagebreak%s+%[[1-4]%]", b=""}, |
10511 | {a="\\pagebreak%s+", b=""}, | 12036 | {a="\\pagebreak%s+", b=""}, |
@@ -10513,10 +12038,20 @@ local texpatttotags = { | |||
10513 | {a="\\teidirect%s+{(.-)}(%b{})", b="<%1>ekd@ob%2ekd@cb</%1>"}, | 12038 | {a="\\teidirect%s+{(.-)}(%b{})", b="<%1>ekd@ob%2ekd@cb</%1>"}, |
10514 | {a="\\altrfont%s+", b=""}, | 12039 | {a="\\altrfont%s+", b=""}, |
10515 | {a="\\endmark%s+", b=""}, | 12040 | {a="\\endmark%s+", b=""}, |
12041 | {a="\\parnote%s+(%b[])(%b{})", b="<note>ekd@ob%2ekd@cb</note>"}, | ||
12042 | {a="\\parnote%s+(%b{})", b="<note>ekd@ob%1ekd@cb</note>"}, | ||
12043 | {a="\\ilabel%s+(%b{})", b=""}, | ||
12044 | {a="\\unskip%s+", b=""}, | ||
10516 | {a="\\ekdpb%s+%*?%[(.-)%]{(.-)}", b=""}, | 12045 | {a="\\ekdpb%s+%*?%[(.-)%]{(.-)}", b=""}, |
10517 | {a="\\ekdpb%s+%*?{(.-)}", b=""}, | 12046 | {a="\\ekdpb%s+%*?{(.-)}", b=""}, |
10518 | {a="\\ekdpb%s+%*\\?", b=""}, | 12047 | {a="\\ekdpb%s+%*\\?", b=""}, |
10519 | {a="\\mbox%s+(%b{})", b="ekd@ob%1ekd@cb"}, | 12048 | {a="\\mbox%s+(%b{})", b="ekd@ob%1ekd@cb"}, |
12049 | {a="\\App%s+(%b[])(%b{})(%b{})", b="\\app[ekd@os%1ekd@cs]{ekd@ob%2ekd@cbekd@ob%3ekd@cb}"}, | ||
12050 | {a="\\App%s+(%b{})(%b{})", b="\\app{ekd@ob%1ekd@cbekd@ob%2ekd@cb}"}, | ||
12051 | {a="\\bayt%s+%+?%*?(%b{})(%b[])(%b{})", | ||
12052 | b="<l><seg type=\"hemistich\">ekd@ob%1ekd@cb</seg><seg type=\"tadwir\">ekd@os%2ekd@cs</seg><seg type=\"hemistich\">ekd@ob%3ekd@cb</seg></l>"}, | ||
12053 | {a="\\bayt%s+%+?%*?(%b{})(%b{})", | ||
12054 | b="<l><seg type=\"hemistich\">ekd@ob%1ekd@cb</seg><seg type=\"hemistich\">ekd@ob%2ekd@cb</seg></l>"}, | ||
10520 | {a="\\LR%s+(%b{})", b="ekd@ob%1ekd@cb"}, | 12055 | {a="\\LR%s+(%b{})", b="ekd@ob%1ekd@cb"}, |
10521 | {a="\\RL%s+(%b{})", b="ekd@ob%1ekd@cb"}, | 12056 | {a="\\RL%s+(%b{})", b="ekd@ob%1ekd@cb"}, |
10522 | {a="\\%=%=%=%s?", b="—"}, | 12057 | {a="\\%=%=%=%s?", b="—"}, |
@@ -10633,6 +12168,26 @@ local function xml_entities(str) | |||
10633 | return str | 12168 | return str |
10634 | end | 12169 | end |
10635 | 12170 | ||
12171 | local function footnote_totei(str) | ||
12172 | str = gsub(str, dblbkslash * footnote * spce^-1 * bcbraces, "%1%2%3[]%4") | ||
12173 | str = gsub(str, | ||
12174 | dblbkslash * | ||
12175 | footnote * | ||
12176 | spcenc^-1 * | ||
12177 | bsqbrackets * | ||
12178 | bcbraces * | ||
12179 | spcenc^-1, | ||
12180 | function(bkslash, cmd, opt, arg) | ||
12181 | opt = string.sub(opt, 2, -2) | ||
12182 | arg = string.sub(arg, 2, -2) | ||
12183 | teitype = get_attr_value(opt, "type") | ||
12184 | cmd = "note" | ||
12185 | if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end | ||
12186 | return string.format("<%s%s place=\"bottom\">%s</%s>", cmd, teitype, arg, cmd) | ||
12187 | end) | ||
12188 | return str | ||
12189 | end | ||
12190 | |||
10636 | local function note_totei(str) | 12191 | local function note_totei(str) |
10637 | str = gsub(str, | 12192 | str = gsub(str, |
10638 | dblbkslash * | 12193 | dblbkslash * |
@@ -10671,9 +12226,9 @@ end | |||
10671 | local function remove_extra_anchors(str) | 12226 | local function remove_extra_anchors(str) |
10672 | str = gsub(str, lpeg.Cs("</note>") * inanchor * inopeningnote, function(enote, anchor, bnote) | 12227 | str = gsub(str, lpeg.Cs("</note>") * inanchor * inopeningnote, function(enote, anchor, bnote) |
10673 | local id_one = string.gsub(anchor, "(%<anchor )(.-)(/%>)", "%2") | 12228 | local id_one = string.gsub(anchor, "(%<anchor )(.-)(/%>)", "%2") |
10674 | id_one = string.sub(get_attr_value(id_one, "xml:id"), 2, -2) | 12229 | id_one = string.sub(get_attr_value(tostring(id_one), "xml:id"), 2, -2) |
10675 | local id_two = string.match(bnote, "target%=.-right%((.-)%)") | 12230 | local id_two = string.match(bnote, "target%=.-right%((.-)%)") |
10676 | id_two = string.gsub(id_two, ".-right%((.-)%)", "%1") | 12231 | id_two = string.gsub(tostring(id_two), ".-right%((.-)%)", "%1") |
10677 | if id_one == id_two | 12232 | if id_one == id_two |
10678 | then | 12233 | then |
10679 | return string.format("%s%s", enote, bnote) | 12234 | return string.format("%s%s", enote, bnote) |
@@ -10821,6 +12376,22 @@ end | |||
10821 | 12376 | ||
10822 | -- better use lpeg: look into this later | 12377 | -- better use lpeg: look into this later |
10823 | local function versetotei(str) | 12378 | local function versetotei(str) |
12379 | str = string.gsub(str, "\\begin%s?%{arabverse%}(%b[])(.-)\\end%s?%{arabverse%}", function(opt, arg) | ||
12380 | arg = string.gsub(arg, "\\par%s?", "") | ||
12381 | arg = gsub(arg, poemline, "") | ||
12382 | opt = string.sub(opt, 2, -2) | ||
12383 | if string.find(opt, "utf") | ||
12384 | then | ||
12385 | return "\\p@rb "..string.format("<lg>%s</lg>", arg).."\\p@ra " | ||
12386 | else | ||
12387 | return "\\p@rb "..string.format("<lg xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\">%s</lg>", arg).."\\p@ra " | ||
12388 | end | ||
12389 | end) | ||
12390 | str = string.gsub(str, "\\begin%s?%{arabverse%}(.-)\\end%s?%{arabverse%}", function(arg) | ||
12391 | arg = string.gsub(arg, "\\par%s?", "") | ||
12392 | arg = gsub(arg, poemline, "") | ||
12393 | return "\\p@rb "..string.format("<lg xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\">%s</lg>", arg).."\\p@ra " | ||
12394 | end) | ||
10824 | str = string.gsub(str, "\\begin%s?%{ekdverse%}(%b[])(.-)\\end%s?%{ekdverse%}", function(opt, arg) | 12395 | str = string.gsub(str, "\\begin%s?%{ekdverse%}(%b[])(.-)\\end%s?%{ekdverse%}", function(opt, arg) |
10825 | arg = string.gsub(arg, "\\par%s?", "") | 12396 | arg = string.gsub(arg, "\\par%s?", "") |
10826 | arg = string.gsub(arg, "\\begin%s?%{patverse%*?%}", "") | 12397 | arg = string.gsub(arg, "\\begin%s?%{patverse%*?%}", "") |
@@ -10900,12 +12471,15 @@ end | |||
10900 | 12471 | ||
10901 | local function texpatttotei(str) | 12472 | local function texpatttotei(str) |
10902 | for i = 1,#texpatttotags do | 12473 | for i = 1,#texpatttotags do |
10903 | str = string.gsub(str, texpatttotags[i].a, texpatttotags[i].b) | 12474 | while string.find(str, texpatttotags[i].a) |
10904 | str = string.gsub(str, "ekd@ob%{", "") | 12475 | do |
10905 | str = string.gsub(str, "%}ekd@cb", "") | 12476 | str = string.gsub(str, texpatttotags[i].a, texpatttotags[i].b) |
10906 | str = string.gsub(str, "ekd@os%[", "") | 12477 | end |
10907 | str = string.gsub(str, "%]ekd@cs", "") | ||
10908 | end | 12478 | end |
12479 | str = string.gsub(str, "ekd@ob%{", "") | ||
12480 | str = string.gsub(str, "%}ekd@cb", "") | ||
12481 | str = string.gsub(str, "ekd@os%[", "") | ||
12482 | str = string.gsub(str, "%]ekd@cs", "") | ||
10909 | return str | 12483 | return str |
10910 | end | 12484 | end |
10911 | 12485 | ||
@@ -11000,11 +12574,45 @@ local function cmdtotei(str) | |||
11000 | end) | 12574 | end) |
11001 | end | 12575 | end |
11002 | -- temporarily: | 12576 | -- temporarily: |
12577 | -- lacunae | ||
12578 | str = gsub(str, | ||
12579 | spcenc^-1 * | ||
12580 | dblbkslash * | ||
12581 | lpeg.Cs(lpeg.P("lacunaStart") + lpeg.P("lacunaEnd")) * | ||
12582 | spcenc^-1 * | ||
12583 | bsqbrackets^-1 * | ||
12584 | spcenc^-1, | ||
12585 | function(bkslash, cmd, opt) | ||
12586 | if opt == nil | ||
12587 | then | ||
12588 | return string.format("<%s/>", cmd) | ||
12589 | else | ||
12590 | opt = string.sub(opt, 2, -2) | ||
12591 | teiwit = get_attr_value(opt, "wit") | ||
12592 | if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end | ||
12593 | teisource = get_attr_value(opt, "source") | ||
12594 | if teisource ~= "" then teisource = " source=\""..ekdosis.getsiglum(teisource, "tei").."\"" else end | ||
12595 | if opt == "" | ||
12596 | then | ||
12597 | return string.format("<%s></%s>", cmd, cmd) | ||
12598 | else | ||
12599 | return string.format("<%s%s%s></%s>", | ||
12600 | cmd, teiwit, teisource, cmd) | ||
12601 | end | ||
12602 | end | ||
12603 | end) | ||
12604 | str = string.gsub(str, "\\(getTEIxmlid)%s?(%b{})", | ||
12605 | function(cmd, body) | ||
12606 | body = string.sub(body, 2, -2) | ||
12607 | teisiglum = ekdosis.getsiglum(body, "tei") | ||
12608 | -- body = cmdtotei(body) | ||
12609 | return string.format("%s", teisiglum) | ||
12610 | end) | ||
11003 | str = string.gsub(str, "\\(getsiglum)%s?(%b{})", | 12611 | str = string.gsub(str, "\\(getsiglum)%s?(%b{})", |
11004 | function(cmd, body) | 12612 | function(cmd, body) |
11005 | body = string.sub(body, 2, -2) | 12613 | body = string.sub(body, 2, -2) |
11006 | teisiglum = ekdosis.getsiglum(body, "tei") | 12614 | teisiglum = ekdosis.getsiglum(body, "tei") |
11007 | printsiglum = ekdosis.getsiglum(body) | 12615 | printsiglum = cmdtotei(ekdosis.getsiglum(body)) |
11008 | -- body = cmdtotei(body) | 12616 | -- body = cmdtotei(body) |
11009 | return string.format("<ref target=\"%s\">%s</ref>", | 12617 | return string.format("<ref target=\"%s\">%s</ref>", |
11010 | teisiglum, printsiglum) | 12618 | teisiglum, printsiglum) |
@@ -11053,6 +12661,29 @@ local function cmdtotei(str) | |||
11053 | body = cmdtotei(body) | 12661 | body = cmdtotei(body) |
11054 | return string.format("<%s>%s</%s>", cmd, body, cmd) | 12662 | return string.format("<%s>%s</%s>", cmd, body, cmd) |
11055 | end) | 12663 | end) |
12664 | str = string.gsub(str, "\\([%{%}])", function(brace) | ||
12665 | if brace == "{" | ||
12666 | then | ||
12667 | brace = "ekd@ob" | ||
12668 | else | ||
12669 | brace = "ekd@cb" | ||
12670 | end | ||
12671 | return brace | ||
12672 | end) | ||
12673 | str = gsub(str, bcbraces, function(inbraces) | ||
12674 | inbraces = string.sub(inbraces, 2, -2) | ||
12675 | inbraces = cmdtotei(inbraces) | ||
12676 | return inbraces | ||
12677 | end) | ||
12678 | str = string.gsub(str, "ekd@([oc])b", function(oc) | ||
12679 | if oc == "o" | ||
12680 | then | ||
12681 | oc = "{" | ||
12682 | else | ||
12683 | oc = "}" | ||
12684 | end | ||
12685 | return oc | ||
12686 | end) | ||
11056 | str = string.gsub(str, "(%s)(%>)", "%2") | 12687 | str = string.gsub(str, "(%s)(%>)", "%2") |
11057 | return str | 12688 | return str |
11058 | end | 12689 | end |
@@ -11182,7 +12813,20 @@ function ekdosis.gethfmark(page) | |||
11182 | then | 12813 | then |
11183 | return hfmarks[indexpage].mark | 12814 | return hfmarks[indexpage].mark |
11184 | else | 12815 | else |
11185 | return hfmarks[#hfmarks-1].mark or "" | 12816 | if page > hfmarks[#hfmarks].a |
12817 | then | ||
12818 | return hfmarks[#hfmarks].mark | ||
12819 | else | ||
12820 | for i=1,#hfmarks | ||
12821 | do | ||
12822 | if hfmarks[i].a > page | ||
12823 | then | ||
12824 | idfound = i | ||
12825 | break | ||
12826 | end | ||
12827 | end | ||
12828 | return hfmarks[idfound-1].mark or "" | ||
12829 | end | ||
11186 | end | 12830 | end |
11187 | end | 12831 | end |
11188 | 12832 | ||
@@ -11475,6 +13119,7 @@ end | |||
11475 | local function textotei(str) | 13119 | local function textotei(str) |
11476 | str = xml_entities(str) | 13120 | str = xml_entities(str) |
11477 | str = texpatttotei(str) | 13121 | str = texpatttotei(str) |
13122 | str = footnote_totei(str) | ||
11478 | str = note_totei(str) | 13123 | str = note_totei(str) |
11479 | str = remove_extra_anchors(str) | 13124 | str = remove_extra_anchors(str) |
11480 | str = app_totei(str) | 13125 | str = app_totei(str) |
@@ -11488,6 +13133,7 @@ local function textotei(str) | |||
11488 | str = section_totei(str) | 13133 | str = section_totei(str) |
11489 | str = icitetotei(str) | 13134 | str = icitetotei(str) |
11490 | str = cmdtotei(str) | 13135 | str = cmdtotei(str) |
13136 | str = texpatttotei(str) | ||
11491 | str = self_close_tags(str) | 13137 | str = self_close_tags(str) |
11492 | str = partotei(str) | 13138 | str = partotei(str) |
11493 | if ekddivs | 13139 | if ekddivs |
@@ -11757,6 +13403,7 @@ function ekdosis.closestream() | |||
11757 | end | 13403 | end |
11758 | 13404 | ||
11759 | local cur_abs_pg = 0 | 13405 | local cur_abs_pg = 0 |
13406 | local ekd_abs_pg = 0 | ||
11760 | local pg_i = nil | 13407 | local pg_i = nil |
11761 | local pg_ii = nil | 13408 | local pg_ii = nil |
11762 | local prevcol = nil | 13409 | local prevcol = nil |
@@ -11770,16 +13417,25 @@ function ekdosis.update_abspg(n) -- not used | |||
11770 | end | 13417 | end |
11771 | 13418 | ||
11772 | function ekdosis.storeabspg(n, pg) | 13419 | function ekdosis.storeabspg(n, pg) |
13420 | if tonumber(n) > tonumber(cur_abs_pg) | ||
13421 | then | ||
13422 | ekd_abs_pg = ekd_abs_pg + 1 | ||
13423 | end | ||
13424 | cur_abs_pg = n | ||
13425 | n = ekd_abs_pg | ||
11773 | if pg == "pg_i" then | 13426 | if pg == "pg_i" then |
11774 | pg_i = n | 13427 | pg_i = n |
11775 | elseif pg == "pg_ii" then | 13428 | elseif pg == "pg_ii" then |
11776 | pg_ii = n | 13429 | pg_ii = n |
11777 | table.insert(check_resetlineno, curcol.."-"..pg_ii) | 13430 | table.insert(check_resetlineno, curcol.."-"..pg_ii) |
11778 | end | 13431 | end |
11779 | cur_abs_pg = n | ||
11780 | return true | 13432 | return true |
11781 | end | 13433 | end |
11782 | 13434 | ||
13435 | function ekdosis.getekdabspg() | ||
13436 | return ekd_abs_pg | ||
13437 | end | ||
13438 | |||
11783 | function ekdosis.checkresetlineno() | 13439 | function ekdosis.checkresetlineno() |
11784 | if isfound(check_resetlineno, curcol.."-"..pg_i) | 13440 | if isfound(check_resetlineno, curcol.."-"..pg_i) |
11785 | then | 13441 | then |
@@ -11934,49 +13590,50 @@ function ekdosis.mkenv() | |||
11934 | if isfound(texts_w_apparatus, aligned_texts[i].text) | 13590 | if isfound(texts_w_apparatus, aligned_texts[i].text) |
11935 | then | 13591 | then |
11936 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{+b}" | 13592 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{+b}" |
11937 | .."{\\begin{nthcolumn}{".. aligned_texts[i].column.."}" | 13593 | .."{\\begin{nthcolumn}{".. aligned_texts[i].column.."}" |
11938 | .."\\par" | 13594 | .."\\csname if@pkg@breakable\\endcsname\\raggedbottom\\fi" |
11939 | .."\\EkdosisColStart" | 13595 | .."\\par" |
11940 | .."\\EkdosisOn#1" | 13596 | .."\\EkdosisColStart" |
11941 | .."}{\\EkdosisOff" | 13597 | .."\\EkdosisOn#1" |
11942 | .."\\EkdosisColStop" | 13598 | .."}{\\EkdosisOff" |
11943 | .."\\end{nthcolumn}" | 13599 | .."\\EkdosisColStop" |
11944 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" | 13600 | .."\\end{nthcolumn}" |
11945 | .. aligned_texts[i].column | 13601 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" |
11946 | ..", \\luastringN{\\par#1\\par})}\\fi" | 13602 | .. aligned_texts[i].column |
11947 | .."}") | 13603 | ..", \\luastringN{\\par#1\\par})}\\fi" |
13604 | .."}") | ||
11948 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{+b}" | 13605 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{+b}" |
11949 | .."{\\begin{nthcolumn*}{".. aligned_texts[i].column.."}[]" | 13606 | .."{\\begin{nthcolumn*}{".. aligned_texts[i].column.."}[]" |
11950 | .."\\par" | 13607 | .."\\par" |
11951 | .."\\EkdosisColStart" | 13608 | .."\\EkdosisColStart" |
11952 | .."\\EkdosisOn#1" | 13609 | .."\\EkdosisOn#1" |
11953 | .."}{\\EkdosisOff" | 13610 | .."}{\\EkdosisOff" |
11954 | .."\\EkdosisColStop" | 13611 | .."\\EkdosisColStop" |
11955 | .."\\end{nthcolumn*}" | 13612 | .."\\end{nthcolumn*}" |
11956 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" | 13613 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" |
11957 | .. aligned_texts[i].column | 13614 | .. aligned_texts[i].column |
11958 | ..", \\luastringN{\\par#1\\par})}\\fi" | 13615 | ..", \\luastringN{\\par#1\\par})}\\fi" |
11959 | .."}") | 13616 | .."}") |
11960 | else | 13617 | else |
11961 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{+b}" | 13618 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."}{+b}" |
11962 | .."{\\begin{nthcolumn}{".. aligned_texts[i].column.."}" | 13619 | .."{\\begin{nthcolumn}{".. aligned_texts[i].column.."}" |
11963 | .."\\par" | 13620 | .."\\par" |
11964 | .."#1" | 13621 | .."#1" |
11965 | .."}{\\end{nthcolumn}" | 13622 | .."}{\\end{nthcolumn}" |
11966 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" | 13623 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" |
11967 | .. aligned_texts[i].column | 13624 | .. aligned_texts[i].column |
11968 | ..", \\luastringN{\\par#1\\par})}\\fi" | 13625 | ..", \\luastringN{\\par#1\\par})}\\fi" |
11969 | .."}") | 13626 | .."}") |
11970 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{+b}" | 13627 | table.insert(environments, "\\NewDocumentEnvironment{".. aligned_texts[i].text.."*}{+b}" |
11971 | .."{\\begin{nthcolumn*}{"..aligned_texts[i].column.."}[]" | 13628 | .."{\\begin{nthcolumn*}{"..aligned_texts[i].column.."}[]" |
11972 | .."\\par" | 13629 | .."\\par" |
11973 | .."#1" | 13630 | .."#1" |
11974 | .."}{" | 13631 | .."}{" |
11975 | .."\\end{nthcolumn*}" | 13632 | .."\\end{nthcolumn*}" |
11976 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" | 13633 | .."\\csname iftei@export\\endcsname\\luadirect{ekdosis.storecoldata(" |
11977 | .. aligned_texts[i].column | 13634 | .. aligned_texts[i].column |
11978 | ..", \\luastringN{\\par#1\\par})}\\fi" | 13635 | ..", \\luastringN{\\par#1\\par})}\\fi" |
11979 | .."}") | 13636 | .."}") |
11980 | end | 13637 | end |
11981 | forbid_xmlid = false | 13638 | forbid_xmlid = false |
11982 | if aligned_texts[i].attribute ~= "" | 13639 | if aligned_texts[i].attribute ~= "" |
@@ -12007,10 +13664,66 @@ function ekdosis.export_coldata_totei() | |||
12007 | end | 13664 | end |
12008 | end | 13665 | end |
12009 | 13666 | ||
13667 | -- maxlines | ||
13668 | -- | ||
13669 | |||
13670 | local localmaxlines = nil | ||
13671 | |||
13672 | function ekdosis.resetlocalmaxlines() | ||
13673 | localmaxlines = nil | ||
13674 | return "\\setcounter{ekd@locallnperpage}{0}" | ||
13675 | end | ||
13676 | |||
13677 | function ekdosis.setlocalmaxlines(n) | ||
13678 | n = tonumber(n) | ||
13679 | if math.type(n) == "integer" | ||
13680 | then | ||
13681 | localmaxlines = n | ||
13682 | end | ||
13683 | return "\\setcounter{ekd@locallnperpage}{1}" | ||
13684 | end | ||
13685 | |||
13686 | function ekdosis.addtomaxlines(ni, nii) | ||
13687 | ni = tonumber(ni) | ||
13688 | nii = tonumber(nii) | ||
13689 | if math.type(ni) == "integer" and math.type(nii) == "integer" | ||
13690 | then | ||
13691 | localmaxlines = ni + nii | ||
13692 | end | ||
13693 | return "\\setcounter{ekd@locallnperpage}{1}" | ||
13694 | end | ||
13695 | |||
13696 | function ekdosis.getlocalmaxlines() | ||
13697 | if localmaxlines | ||
13698 | then | ||
13699 | return localmaxlines | ||
13700 | end | ||
13701 | end | ||
13702 | |||
13703 | -- apparatus height | ||
13704 | -- | ||
13705 | local appheightchanged = false | ||
13706 | |||
13707 | function ekdosis.changeappheight() | ||
13708 | appheightchanged = true | ||
13709 | end | ||
13710 | |||
13711 | function ekdosis.setheightandprintapparatus() | ||
13712 | if appheightchanged == true | ||
13713 | then | ||
13714 | appheightchanged = false | ||
13715 | return "\\csname ekd@insert@fitapparatus@tmpheight\\endcsname" | ||
13716 | else | ||
13717 | return "\\csname ekd@insert@fitapparatus\\endcsname" | ||
13718 | end | ||
13719 | end | ||
13720 | |||
12010 | -- handle multiple layers in apparatuses | 13721 | -- handle multiple layers in apparatuses |
12011 | -- | 13722 | -- |
12012 | local apparatuses = {} | 13723 | local apparatuses = {} |
12013 | local bagunits = {} | 13724 | local bagunits = {} |
13725 | local glimit = nil | ||
13726 | local gunits = 0 | ||
12014 | 13727 | ||
12015 | function ekdosis.newapparatus(teitype, | 13728 | function ekdosis.newapparatus(teitype, |
12016 | appdir, | 13729 | appdir, |
@@ -12103,28 +13816,61 @@ end | |||
12103 | 13816 | ||
12104 | function ekdosis.limit_bagunits(teitype) | 13817 | function ekdosis.limit_bagunits(teitype) |
12105 | local limit = tonumber(getapplimit(teitype)) | 13818 | local limit = tonumber(getapplimit(teitype)) |
12106 | if limit >= 10 and bagunits[teitype] >= limit | 13819 | if glimit then |
12107 | then | 13820 | glimit = tonumber(glimit) |
12108 | bagunits[teitype] = 2 | 13821 | gunits = tonumber(gunits) |
12109 | return "\\pagebreak" | 13822 | if glimit >= 10 and gunits >= glimit |
13823 | then | ||
13824 | bagunits[teitype] = 2 | ||
13825 | gunits = 0 | ||
13826 | return "\\pagebreak" | ||
13827 | else | ||
13828 | if limit >= 10 and bagunits[teitype] >= limit | ||
13829 | then | ||
13830 | bagunits[teitype] = 2 | ||
13831 | gunits = 0 | ||
13832 | return "\\pagebreak" | ||
13833 | else | ||
13834 | return "" | ||
13835 | end | ||
13836 | end | ||
12110 | else | 13837 | else |
12111 | return "" | 13838 | if limit >= 10 and bagunits[teitype] >= limit |
13839 | then | ||
13840 | bagunits[teitype] = 2 | ||
13841 | gunits = 1 | ||
13842 | return "\\pagebreak" | ||
13843 | else | ||
13844 | return "" | ||
13845 | end | ||
12112 | end | 13846 | end |
12113 | end | 13847 | end |
12114 | 13848 | ||
12115 | function ekdosis.addto_bagunits(teitype, n) | 13849 | function ekdosis.addto_bagunits(teitype, n) |
13850 | n = tonumber(n) | ||
13851 | if glimit then gunits = gunits - n end | ||
12116 | if tonumber(getapplimit(teitype)) ~= 0 | 13852 | if tonumber(getapplimit(teitype)) ~= 0 |
12117 | then | 13853 | then |
12118 | n = tonumber(n) | ||
12119 | bagunits[teitype] = bagunits[teitype] - n | 13854 | bagunits[teitype] = bagunits[teitype] - n |
12120 | end | 13855 | end |
12121 | end | 13856 | end |
12122 | 13857 | ||
12123 | function ekdosis.increment_bagunits(teitype) | 13858 | function ekdosis.increment_bagunits(teitype) |
13859 | if glimit then gunits = gunits + 1 end | ||
12124 | bagunits[teitype] = (bagunits[teitype] or 0) + 1 | 13860 | bagunits[teitype] = (bagunits[teitype] or 0) + 1 |
12125 | end | 13861 | end |
12126 | 13862 | ||
13863 | function ekdosis.setglimit(n) | ||
13864 | if math.tointeger(n) | ||
13865 | then | ||
13866 | glimit = math.tointeger(math.abs(n)) | ||
13867 | else | ||
13868 | glimit = nil | ||
13869 | end | ||
13870 | end | ||
13871 | |||
12127 | local function reset_bagunits() | 13872 | local function reset_bagunits() |
13873 | if glimit then gunits = 0 end | ||
12128 | for i = 1,#apparatuses | 13874 | for i = 1,#apparatuses |
12129 | do | 13875 | do |
12130 | bagunits[apparatuses[i].a] = 1 | 13876 | bagunits[apparatuses[i].a] = 1 |
@@ -12135,8 +13881,8 @@ function ekdosis.appin(str, teitype) | |||
12135 | local f = io.open(tex.jobname.."_tmp.ekd", "a+") | 13881 | local f = io.open(tex.jobname.."_tmp.ekd", "a+") |
12136 | if next(apparatuses) == nil | 13882 | if next(apparatuses) == nil |
12137 | then | 13883 | then |
12138 | f:write("<", cur_abs_pg, cur_alignment, curcol, "-0>", str, "</", | 13884 | f:write("<", ekd_abs_pg, cur_alignment, curcol, "-0>", str, "</", |
12139 | cur_abs_pg, cur_alignment, curcol, "-0>\n") | 13885 | ekd_abs_pg, cur_alignment, curcol, "-0>\n") |
12140 | else | 13886 | else |
12141 | for i = 1,#apparatuses | 13887 | for i = 1,#apparatuses |
12142 | do | 13888 | do |
@@ -12145,8 +13891,8 @@ function ekdosis.appin(str, teitype) | |||
12145 | break | 13891 | break |
12146 | end | 13892 | end |
12147 | end | 13893 | end |
12148 | f:write("<", cur_abs_pg, cur_alignment, curcol, "-", | 13894 | f:write("<", ekd_abs_pg, cur_alignment, curcol, "-", |
12149 | appno, ">", str, "</", cur_abs_pg, cur_alignment, curcol, "-", appno, ">\n") | 13895 | appno, ">", str, "</", ekd_abs_pg, cur_alignment, curcol, "-", appno, ">\n") |
12150 | end | 13896 | end |
12151 | f:close() | 13897 | f:close() |
12152 | return true | 13898 | return true |
@@ -12164,10 +13910,10 @@ function ekdosis.appout() | |||
12164 | table.insert(output, "\\csname ekd@begin@apparatus\\endcsname\\ignorespaces") | 13910 | table.insert(output, "\\csname ekd@begin@apparatus\\endcsname\\ignorespaces") |
12165 | -- table.insert(output, "\\noindent ") | 13911 | -- table.insert(output, "\\noindent ") |
12166 | for i in string.gmatch(t, | 13912 | for i in string.gmatch(t, |
12167 | "<"..cur_abs_pg | 13913 | "<"..ekd_abs_pg |
12168 | ..cur_alignment_patt | 13914 | ..cur_alignment_patt |
12169 | ..curcol.."%-0>.-</" | 13915 | ..curcol.."%-0>.-</" |
12170 | ..cur_abs_pg | 13916 | ..ekd_abs_pg |
12171 | ..cur_alignment_patt | 13917 | ..cur_alignment_patt |
12172 | ..curcol.."%-0>") | 13918 | ..curcol.."%-0>") |
12173 | do | 13919 | do |
@@ -12179,10 +13925,10 @@ function ekdosis.appout() | |||
12179 | local n = 1 | 13925 | local n = 1 |
12180 | while apparatuses[n] | 13926 | while apparatuses[n] |
12181 | do | 13927 | do |
12182 | if string.match(t, "<"..cur_abs_pg | 13928 | if string.match(t, "<"..ekd_abs_pg |
12183 | ..cur_alignment_patt | 13929 | ..cur_alignment_patt |
12184 | ..curcol.."%-"..n..">.-</" | 13930 | ..curcol.."%-"..n..">.-</" |
12185 | ..cur_abs_pg | 13931 | ..ekd_abs_pg |
12186 | ..cur_alignment_patt | 13932 | ..cur_alignment_patt |
12187 | ..curcol.."%-"..n..">") | 13933 | ..curcol.."%-"..n..">") |
12188 | then | 13934 | then |
@@ -12236,12 +13982,12 @@ function ekdosis.appout() | |||
12236 | end | 13982 | end |
12237 | if apparatuses[n].sep ~= "" | 13983 | if apparatuses[n].sep ~= "" |
12238 | then | 13984 | then |
12239 | table.insert(output, "\\edef\\ekdsep{" .. apparatuses[n].sep .. "}") | 13985 | table.insert(output, "\\def\\ekdsep{" .. apparatuses[n].sep .. "}") |
12240 | else | 13986 | else |
12241 | end | 13987 | end |
12242 | if apparatuses[n].subsep ~= "" | 13988 | if apparatuses[n].subsep ~= "" |
12243 | then | 13989 | then |
12244 | table.insert(output, "\\edef\\ekdsubsep{" .. apparatuses[n].subsep .. "}") | 13990 | table.insert(output, "\\def\\ekdsubsep{" .. apparatuses[n].subsep .. "}") |
12245 | end | 13991 | end |
12246 | if apparatuses[n].bhook ~= "" | 13992 | if apparatuses[n].bhook ~= "" |
12247 | then | 13993 | then |
@@ -12250,10 +13996,10 @@ function ekdosis.appout() | |||
12250 | table.insert(output, "\\relax") | 13996 | table.insert(output, "\\relax") |
12251 | end | 13997 | end |
12252 | for i in string.gmatch(t, | 13998 | for i in string.gmatch(t, |
12253 | "<"..cur_abs_pg | 13999 | "<"..ekd_abs_pg |
12254 | ..cur_alignment_patt | 14000 | ..cur_alignment_patt |
12255 | ..curcol.."%-"..n..">.-</" | 14001 | ..curcol.."%-"..n..">.-</" |
12256 | ..cur_abs_pg | 14002 | ..ekd_abs_pg |
12257 | ..cur_alignment_patt | 14003 | ..cur_alignment_patt |
12258 | ..curcol.."%-"..n..">") | 14004 | ..curcol.."%-"..n..">") |
12259 | do | 14005 | do |
@@ -12273,8 +14019,8 @@ function ekdosis.appout() | |||
12273 | end | 14019 | end |
12274 | f:close() | 14020 | f:close() |
12275 | str = table.concat(output) | 14021 | str = table.concat(output) |
12276 | str = string.gsub(str, "</"..cur_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", "") | 14022 | str = string.gsub(str, "</"..ekd_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", "") |
12277 | str = string.gsub(str, "<"..cur_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", " ") | 14023 | str = string.gsub(str, "<"..ekd_abs_pg..cur_alignment_patt..curcol.."%-[0-9]>", " ") |
12278 | return str | 14024 | return str |
12279 | else | 14025 | else |
12280 | end | 14026 | end |
@@ -12294,7 +14040,7 @@ end | |||
12294 | local curcol_curabspg = {} | 14040 | local curcol_curabspg = {} |
12295 | 14041 | ||
12296 | function ekdosis.testapparatus() | 14042 | function ekdosis.testapparatus() |
12297 | if isfound(curcol_curabspg, curcol.."-"..cur_abs_pg) | 14043 | if isfound(curcol_curabspg, curcol.."-"..ekd_abs_pg) |
12298 | then | 14044 | then |
12299 | if newalignment | 14045 | if newalignment |
12300 | then | 14046 | then |
@@ -12307,7 +14053,7 @@ function ekdosis.testapparatus() | |||
12307 | return "\\boolfalse{do@app}" | 14053 | return "\\boolfalse{do@app}" |
12308 | end | 14054 | end |
12309 | else | 14055 | else |
12310 | table.insert(curcol_curabspg, curcol.."-"..cur_abs_pg) | 14056 | table.insert(curcol_curabspg, curcol.."-"..ekd_abs_pg) |
12311 | if next(apparatuses) ~= nil then | 14057 | if next(apparatuses) ~= nil then |
12312 | reset_bagunits() | 14058 | reset_bagunits() |
12313 | end | 14059 | end |
@@ -12364,6 +14110,7 @@ local lnlab_salt = 0 | |||
12364 | local current_lnlab = nil | 14110 | local current_lnlab = nil |
12365 | local prev_lnlab = nil | 14111 | local prev_lnlab = nil |
12366 | local prev_prev_lnlab = nil | 14112 | local prev_prev_lnlab = nil |
14113 | local indexed_labs = {} | ||
12367 | local notelabs = {} | 14114 | local notelabs = {} |
12368 | local current_notelab = nil | 14115 | local current_notelab = nil |
12369 | local prev_notelab = nil | 14116 | local prev_notelab = nil |
@@ -12377,16 +14124,24 @@ local function mdvisintable(table, value) | |||
12377 | return false | 14124 | return false |
12378 | end | 14125 | end |
12379 | 14126 | ||
12380 | function ekdosis.dolnlab(str) | 14127 | function ekdosis.dolnlab(str, indexlab) |
12381 | if prev_lnlab ~= nil then prev_prev_lnlab = prev_lnlab end | 14128 | if prev_lnlab ~= nil then prev_prev_lnlab = prev_lnlab end |
12382 | prev_lnlab = current_lnlab | 14129 | prev_lnlab = current_lnlab |
12383 | current_lemma = str | 14130 | current_lemma = str |
12384 | i = md5.sumhexa(str) | 14131 | i = md5.sumhexa(str) |
12385 | if not mdvisintable(lnlabs, i) then | 14132 | if not mdvisintable(lnlabs, i) then |
12386 | table.insert(lnlabs, i) | 14133 | table.insert(lnlabs, i) |
14134 | if indexlab ~= nil | ||
14135 | then | ||
14136 | indexed_labs[indexlab] = i | ||
14137 | end | ||
12387 | else | 14138 | else |
12388 | i = i..salt | 14139 | i = i..salt |
12389 | table.insert(lnlabs, i) | 14140 | table.insert(lnlabs, i) |
14141 | if indexlab ~= nil | ||
14142 | then | ||
14143 | indexed_labs[indexlab] = i | ||
14144 | end | ||
12390 | salt = salt + 1 | 14145 | salt = salt + 1 |
12391 | end | 14146 | end |
12392 | current_lnlab = i | 14147 | current_lnlab = i |
@@ -12405,6 +14160,14 @@ function ekdosis.getprevprevlnlab() | |||
12405 | return prev_prev_lnlab | 14160 | return prev_prev_lnlab |
12406 | end | 14161 | end |
12407 | 14162 | ||
14163 | function ekdosis.getindexedlab(str) | ||
14164 | if indexed_labs[str] == nil | ||
14165 | then return "\\csname ekd@wrong@ilabel\\endcsname" | ||
14166 | else | ||
14167 | return "\\linelabel{" .. indexed_labs[str] .. "-e}" | ||
14168 | end | ||
14169 | end | ||
14170 | |||
12408 | function ekdosis.setnotelab(str) | 14171 | function ekdosis.setnotelab(str) |
12409 | current_notelab = str | 14172 | current_notelab = str |
12410 | if isfound(notelabs, current_notelab) | 14173 | if isfound(notelabs, current_notelab) |
@@ -12430,34 +14193,46 @@ function ekdosis.getprevnotelab() | |||
12430 | end | 14193 | end |
12431 | 14194 | ||
12432 | local cmdstorm = lpeg.P(lpeg.P("note") | 14195 | local cmdstorm = lpeg.P(lpeg.P("note") |
12433 | + lpeg.P("linelabel") | 14196 | + lpeg.P("milestone") |
12434 | + lpeg.P("index")) | 14197 | + lpeg.P("linelabel") |
14198 | + lpeg.P("ilabel") | ||
14199 | + lpeg.P("index")) | ||
12435 | 14200 | ||
12436 | local function remove_from_app(str) | 14201 | local function remove_from_app(str) |
12437 | str = gsub(str, dblbkslash * cmdstorm * cmdargs, "") | 14202 | str = gsub(str, dblbkslash * cmdstorm * cmdargs, "") |
12438 | return str | 14203 | return str |
12439 | end | 14204 | end |
12440 | 14205 | ||
12441 | function ekdosis.mdvappend(str, teitype) | 14206 | function ekdosis.mdvappend(str, teitype, ilabel) |
14207 | if current_lemma == "" | ||
14208 | then | ||
14209 | current_lemma = "\\ekdunspace" | ||
14210 | end | ||
14211 | local labelbegin = "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}" | ||
14212 | local labelend = "\\linelabel{" .. current_lnlab .. "-e}" | ||
14213 | if ilabel ~= nil | ||
14214 | then | ||
14215 | labelend = "" | ||
14216 | end | ||
12442 | if teitype == nil | 14217 | if teitype == nil |
12443 | then | 14218 | then |
12444 | return "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}" | 14219 | return labelbegin |
12445 | .. | 14220 | .. |
12446 | current_lemma | 14221 | current_lemma |
12447 | .. | 14222 | .. |
12448 | "\\linelabel{" .. current_lnlab .. "-e}" | 14223 | labelend |
12449 | .. | 14224 | .. |
12450 | "\\csname append@app\\endcsname{" | 14225 | "\\csname append@app\\endcsname{" |
12451 | .. remove_from_app(str) .. "}" | 14226 | .. remove_from_app(str) .. "}" |
12452 | else | 14227 | else |
12453 | return "\\linelabel{" .. current_lnlab .. "-b}\\wordboundary{}" | 14228 | return labelbegin |
12454 | .. | 14229 | .. |
12455 | current_lemma | 14230 | current_lemma |
12456 | .. | 14231 | .. |
12457 | "\\linelabel{" .. current_lnlab .. "-e}" | 14232 | labelend |
12458 | .. | 14233 | .. |
12459 | "\\csname append@app\\endcsname" .. "[" .. teitype .. "]{" | 14234 | "\\csname append@app\\endcsname" .. "[" .. teitype .. "]{" |
12460 | .. remove_from_app(str) .. "}" | 14235 | .. remove_from_app(str) .. "}" |
12461 | end | 14236 | end |
12462 | end | 14237 | end |
12463 | 14238 | ||