diff options
-rw-r--r-- | ekdosis.dtx | 69 |
1 files changed, 50 insertions, 19 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 2ab754a..0fc51ae 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -2202,10 +2202,12 @@ yesterday. | |||
2202 | % manuscripts and manuscript families above | 2202 | % manuscripts and manuscript families above |
2203 | % \vpageref{ref:caesar-bg-sigla}. As this document is not set for | 2203 | % \vpageref{ref:caesar-bg-sigla}. As this document is not set for |
2204 | % duplex printing, both texts have been put together on the same | 2204 | % duplex printing, both texts have been put together on the same |
2205 | % page. However, the reader will find the full |.tex| source file | 2205 | % page. However, the reader will find the full |.tex| source file in |
2206 | % in \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in | 2206 | % \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in |
2207 | % \vref{sec:caesar-gw-tei}. The corresponding PDF output is available | 2207 | % \vref{sec:caesar-gw-tei}. The corresponding PDF output is available |
2208 | % in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:--- | 2208 | % in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On |
2209 | % the use of \cs{ekddiv} (ll.~3 and 20), see below | ||
2210 | % \vref{sec:ekddiv}.}--- | ||
2209 | % | 2211 | % |
2210 | % \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}] | 2212 | % \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}] |
2211 | % \iffalse | 2213 | % \iffalse |
@@ -2701,8 +2703,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ | |||
2701 | % preamble, this |default| layer must be included in the list of | 2703 | % preamble, this |default| layer must be included in the list of |
2702 | % declared layers.\\ | 2704 | % declared layers.\\ |
2703 | % \DescribeMacro{\SetDefaultApparatus}\label{ref:ekd-default-app} | 2705 | % \DescribeMacro{\SetDefaultApparatus}\label{ref:ekd-default-app} |
2704 | % \cs{SetDefaultApparatus}\marg{name} can be used at any point of | 2706 | % \cs{SetDefaultApparatus}\marg{name} can be used at any point of the |
2705 | % the document to change the default name that is used by | 2707 | % document to change the name to be used as the default one by |
2706 | % \pkg{ekdosis}. | 2708 | % \pkg{ekdosis}. |
2707 | % | 2709 | % |
2708 | % \subsubsection{Declaring Additional Layers} | 2710 | % \subsubsection{Declaring Additional Layers} |
@@ -2878,9 +2880,9 @@ Some \app[type=rec2]{ | |||
2878 | %</example> | 2880 | %</example> |
2879 | % \fi | 2881 | % \fi |
2880 | % | 2882 | % |
2881 | % At any rate, |type=default| or |type=rec1|, depending on what has | 2883 | % \danger At any rate, |type=default| or |type=rec1|, depending on |
2882 | % been chosen, must be used if the editor wishes to retain that | 2884 | % what has been chosen, must be used if the editor wishes to retain |
2883 | % information in the \texttt{TEI xml} output file. | 2885 | % that information in the \texttt{TEI xml} output file. |
2884 | % | 2886 | % |
2885 | % \subsection{Other Notes for Comments, Sources or Testimonia} | 2887 | % \subsection{Other Notes for Comments, Sources or Testimonia} |
2886 | % \label{ref:type-note} | 2888 | % \label{ref:type-note} |
@@ -3008,11 +3010,11 @@ travels from central Asia; a language, copious, elastic, | |||
3008 | inviting self-explaining combinations and independent | 3010 | inviting self-explaining combinations and independent |
3009 | development; lending itself alike to daily life and | 3011 | development; lending itself alike to daily life and |
3010 | imagination, to description and abstract thought. | 3012 | imagination, to description and abstract thought. |
3011 | <note type="fontium" target="#range(right(61e),left(62a))">Waitz, | 3013 | <note type="fontium" target="#range(right(B61e),left(B62a))">Waitz, |
3012 | <emph>Deutsche Verfassungs Geschichte</emph>, i. 86</note> | 3014 | <emph>Deutsche Verfassungs Geschichte</emph>, i. 86</note> |
3013 | <anchor xml:id="61e" />They had a class of nobles, but | 3015 | <anchor xml:id="B61e" />They had a class of nobles, but |
3014 | their tongue knew no word for slave. | 3016 | their tongue knew no word for slave. |
3015 | <anchor xml:id="#62a" /> | 3017 | <anchor xml:id="B62a" /> |
3016 | <note place="bottom">George Bancroft, | 3018 | <note place="bottom">George Bancroft, |
3017 | <emph>History of the United States from the Discovery of | 3019 | <emph>History of the United States from the Discovery of |
3018 | the American Continent</emph>, II.61--2.</note></p> | 3020 | the American Continent</emph>, II.61--2.</note></p> |
@@ -3888,6 +3890,29 @@ subtype="arabtex">'inna 'abI kAna mina | |||
3888 | % pages would need to be compiled, the magic number should emerge | 3890 | % pages would need to be compiled, the magic number should emerge |
3889 | % quite rapidly. | 3891 | % quite rapidly. |
3890 | % | 3892 | % |
3893 | % \paragraph{Adding and Removing Entries} | ||
3894 | % \DescribeMacro{\addentries} \cs{addentries}\oarg{layer}\marg{n} | ||
3895 | % \newfeature[v1.1]\\ | ||
3896 | % If |maxentries| be set for a given layer of critical notes, | ||
3897 | % \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer, | ||
3898 | % can be used to add \meta{n} to\---or remove it from if \meta{n} be | ||
3899 | % negative\---the number of accepted entries on the current | ||
3900 | % page. \cs{addentries} operates on the default layer of notes, but | ||
3901 | % any other declared layer can be specified in the optional argument | ||
3902 | % of the command. | ||
3903 | % | ||
3904 | % \danger Of course, \cs{addentries} must be issued before the | ||
3905 | % number of entries on a given page has reached the value set as | ||
3906 | % |maxentries|. | ||
3907 | % | ||
3908 | % Once a sensible value for |maxentries| has been found, | ||
3909 | % \cs{addentries} can further be used with a positive integer to allow | ||
3910 | % for more entries and more lines on some pages so that offending | ||
3911 | % vertical spaces are decreased. Conversely, \cs{addentries} with a | ||
3912 | % negative integer will remove entries on pages where there are too | ||
3913 | % many of them and \pkg{ekdosis} still oscillates between different | ||
3914 | % sets of page decisions. | ||
3915 | % | ||
3891 | % \section{\texttt{TEI xml} Output} | 3916 | % \section{\texttt{TEI xml} Output} |
3892 | % \label{sec:teixml-output} | 3917 | % \label{sec:teixml-output} |
3893 | % Several examples of \texttt{TEI xml} output have been provided | 3918 | % Several examples of \texttt{TEI xml} output have been provided |
@@ -5947,10 +5972,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
5947 | % on the current page.} | 5972 | % on the current page.} |
5948 | % If |maxentries| be set for a given layer of critical notes, | 5973 | % If |maxentries| be set for a given layer of critical notes, |
5949 | % \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer, | 5974 | % \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer, |
5950 | % can be used to add \meta{n}\---or remove it if it be negative\---to | 5975 | % can be used to add \meta{n} to\---or remove it from if \meta{n} be |
5951 | % the number of accepted entries on the current page. \cs{addentries} | 5976 | % negative\---the number of accepted entries on the current |
5952 | % operates on the default layer of notes, but any other declared layer | 5977 | % page. \cs{addentries} operates on the default layer of notes, but |
5953 | % can be specified in the optional argument of the command. | 5978 | % any other declared layer can be specified in the optional argument |
5979 | % of the command. | ||
5954 | % \begin{macrocode} | 5980 | % \begin{macrocode} |
5955 | \NewDocumentCommand{\addentries}{O{\ekdan@type} m}{% | 5981 | \NewDocumentCommand{\addentries}{O{\ekdan@type} m}{% |
5956 | \luadirect{ekdosis.addto_bagunits(\luastringO{#1}, \luastringN{#2})}% | 5982 | \luadirect{ekdosis.addto_bagunits(\luastringO{#1}, \luastringN{#2})}% |
@@ -7638,6 +7664,8 @@ local cmdtotags = { | |||
7638 | } | 7664 | } |
7639 | 7665 | ||
7640 | local texpatttotags = { | 7666 | local texpatttotags = { |
7667 | {a="\\addentries%s+%[(.-)%]{(.-)}", b=""}, | ||
7668 | {a="\\addentries%s+{(.-)}", b=""}, | ||
7641 | {a="\\pagebreak%s+%[[1-4]%]", b=""}, | 7669 | {a="\\pagebreak%s+%[[1-4]%]", b=""}, |
7642 | {a="\\pagebreak%s+", b=""}, | 7670 | {a="\\pagebreak%s+", b=""}, |
7643 | {a="\\altrfont%s+", b=""}, | 7671 | {a="\\altrfont%s+", b=""}, |
@@ -8941,10 +8969,10 @@ function ekdosis.get_bagunits(teitype) | |||
8941 | return bagunits[teitype] | 8969 | return bagunits[teitype] |
8942 | end | 8970 | end |
8943 | 8971 | ||
8944 | local function getapplimit(str) | 8972 | local function getapplimit(teitype) |
8945 | for i = 1,#apparatuses | 8973 | for i = 1,#apparatuses |
8946 | do | 8974 | do |
8947 | if apparatuses[i].a == str then | 8975 | if apparatuses[i].a == teitype then |
8948 | limitfound = apparatuses[i].limit | 8976 | limitfound = apparatuses[i].limit |
8949 | break | 8977 | break |
8950 | end | 8978 | end |
@@ -8974,8 +9002,11 @@ function ekdosis.limit_bagunits(teitype) | |||
8974 | end | 9002 | end |
8975 | 9003 | ||
8976 | function ekdosis.addto_bagunits(teitype, n) | 9004 | function ekdosis.addto_bagunits(teitype, n) |
8977 | n = tonumber(n) | 9005 | if tonumber(getapplimit(teitype)) ~= 0 |
8978 | bagunits[teitype] = bagunits[teitype] - n | 9006 | then |
9007 | n = tonumber(n) | ||
9008 | bagunits[teitype] = bagunits[teitype] - n | ||
9009 | end | ||
8979 | end | 9010 | end |
8980 | 9011 | ||
8981 | function ekdosis.increment_bagunits(teitype) | 9012 | function ekdosis.increment_bagunits(teitype) |