From 88e41212a021dc51e306e23c2b69926c54aa696e Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 2 Sep 2020 09:14:54 +0200 Subject: new command \addentries for modifying the number of accepted entries on the current page --- Makefile | 2 +- ekdosis.dtx | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index cd52273..694b884 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ NAME = ekdosis SHELL = bash -CMP = lualatex +CMP = lualatex-dev PWD = $(shell pwd) VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) diff --git a/ekdosis.dtx b/ekdosis.dtx index 302d537..2ab754a 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -1103,7 +1103,7 @@ along with this program. If not, see % source file will be printed as \getsiglum{M}, \getsiglum{M1} and % \getsiglum{M2} respectively. Not only the code gains legibility, but % also flexibility for simply changing any declared rendition will -% update corresponding sigla thoughout the entire edition. +% update corresponding sigla throughout the entire edition. % % As a final example, here is how \pkg{ekdosis} would encode % information as declared above for the \emph{Marcianus Gr.}~269 @@ -1286,7 +1286,7 @@ along with this program. If not, see forename=John, surname=Smith, note=Main editor of the text] -\DeclareShorthand{egoscr}{ego}{\emph{scripsi}} +\DeclareShorthand{egoscr}{\emph{scripsi}}{ego} \end{minted} % \iffalse % @@ -1371,8 +1371,8 @@ along with this program. If not, see % \label{sec:single-text-editing} % \DescribeEnv{ekdosis} % Running paragraphs of one single text to be edited should be -% inserted in the \env{ekdosis} environment, like so:---\footnote{See -% above \vref{lst:pj1}.} +% inserted in the \env{ekdosis} environment, like so:\footnote{See +% above \vref{lst:pj1}.}--- % \iffalse %<*example> % \fi @@ -5942,6 +5942,22 @@ Sample text with a \textcolor{red}{word} in red. } \@onlypreamble\DeclareApparatus % \end{macrocode} +% \begin{macro}{\addentries} +% \changes{v1.1}{2020/09/02}{modifies the number of accepted entries +% on the current page.} +% If |maxentries| be set for a given layer of critical notes, +% \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer, +% can be used to add \meta{n}\---or remove it if it be negative\---to +% the number of accepted entries on the current page. \cs{addentries} +% operates on the default layer of notes, but any other declared layer +% can be specified in the optional argument of the command. +% \begin{macrocode} +\NewDocumentCommand{\addentries}{O{\ekdan@type} m}{% + \luadirect{ekdosis.addto_bagunits(\luastringO{#1}, \luastringN{#2})}% + \ignorespaces +} +% \end{macrocode} +% \end{macro} % \end{macro} % Apparatus-related settings and functions. Some booleans to check if % an apparatus should be inserted and what is the current environment. @@ -7617,7 +7633,6 @@ local cmdtotags = { {a="textsf", b="hi", c=" rend=\"sf\""}, {a="arbup", b="hi", c=" rend=\"sup\""}, {a="txarb", b="s", c=" xml:lang=\"arb\""}, - {a="mbox", b="", c=""}, {a="arb", b="foreign", c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""} } @@ -7626,6 +7641,7 @@ local texpatttotags = { {a="\\pagebreak%s+%[[1-4]%]", b=""}, {a="\\pagebreak%s+", b=""}, {a="\\altrfont%s+", b=""}, + {a="\\mbox%s+{(.-)}", b="%1"}, {a="\\LR%s+{(.-)}", b="%1"}, {a="\\RL%s+{(.-)}", b="%1"} } @@ -8957,6 +8973,11 @@ function ekdosis.limit_bagunits(teitype) end end +function ekdosis.addto_bagunits(teitype, n) + n = tonumber(n) + bagunits[teitype] = bagunits[teitype] - n +end + function ekdosis.increment_bagunits(teitype) bagunits[teitype] = (bagunits[teitype] or 0) + 1 end -- cgit v1.2.3