From b430c007a39eb569ca6fc7724d93a000569bd54d Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 5 Jun 2021 18:40:57 +0200 Subject: \ekdpb needed a counter of its own --- ekdosis.dtx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index ca27494..acbedc0 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -61,7 +61,7 @@ along with this program. If not, see %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{ekdosis} %<*package> - [2021/06/02 v1.3-dev Typesetting TEI xml-compliant critical editions] + [2021/06/05 v1.3-dev Typesetting TEI xml-compliant critical editions] % %<*driver> \begin{filecontents}[noheader,overwrite]{bibdata.xml} @@ -7511,7 +7511,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \end{macro} % \begin{macro}{\teidirect} -% \changes{v1.3}{2021/06/02}{direct insertion of elements in the +% \changes{v1.3}{2021/06/05}{direct insertion of elements in the % \texttt{TEI xml} file} % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} % does nothing in \LaTeX. Its only use is to insert elements in the @@ -7684,18 +7684,20 @@ Sample text with a \textcolor{red}{word} in red. % given line and optionally a given page. If the specified conditions % are met then this command triggers \cs{pagebreak}. % \begin{macrocode} +\newcounter{ekd@pb} +\globalcounter{ekd@pb} \NewDocumentCommand{\ekdpb}{s o m}{% \IfBooleanTF{#1} {\pagebreak} {% \def\@tmpoarg{#2}% \def\@tmpmarg{#3}% - \luadirect{ekdosis.dolnlab(\luastringN{#3})}% - \linelabel{\luadirect{tex.sprint(ekdosis.getlnlab())}}% + \stepcounter{ekd@pb}% + \linelabel{ekdpb:\theekd@pb}% \def\tmp@ln{% - \getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}% + \getrefnumber{ekdpb:\theekd@pb}}% \def\tmp@pg{% - \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}}}% + \getpagerefnumber{ekdpb:\theekd@pb}}% \IfNoValueTF{#2} {\ifnum \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0 @@ -7709,8 +7711,7 @@ Sample text with a \textcolor{red}{word} in red. \fi \fi }% - } - \ignorespaces + }\ignorespaces } % \end{macrocode} % \end{macro} @@ -7870,7 +7871,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \end{macro} % \begin{macro}{\SetApparatusNoteLanguage} -% \changes{v1.3}{2021/06/02}{defines an alternate language to be +% \changes{v1.3}{2021/06/05}{defines an alternate language to be % applied in note apparatus entries} % \cs{SetApparatusNoteLang}\marg{languagename} can be used when % it is needed to apply in entries introduced by the \cs{note} command @@ -9784,6 +9785,8 @@ local texpatttotags = { {a="\\teidirect%s+{(.-)}(%b{})", b="<%1>ekd@ob%2ekd@cb"}, {a="\\altrfont%s+", b=""}, {a="\\endmark%s+", b=""}, + {a="\\ekdpb%s+%*?%[(.-)%]{(.-)}", b=""}, + {a="\\ekdpb%s+%*?{(.-)}", b=""}, {a="\\mbox%s+(%b{})", b="ekd@ob%1ekd@cb"}, {a="\\LR%s+(%b{})", b="ekd@ob%1ekd@cb"}, {a="\\RL%s+(%b{})", b="ekd@ob%1ekd@cb"}, -- cgit v1.2.3