From 1d6eaa292362d18b893ac92db866a471b42ae244 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 8 Jun 2021 09:12:10 +0200 Subject: new command \ekdsetup. added global option for printing ekdpb marks in the margin --- ekdosis.dtx | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index acbedc0..58946ac 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/05 v1.3-dev Typesetting TEI xml-compliant critical editions] + [2021/06/08 v1.3-dev Typesetting TEI xml-compliant critical editions] % %<*driver> \begin{filecontents}[noheader,overwrite]{bibdata.xml} @@ -7295,6 +7295,20 @@ Sample text with a \textcolor{red}{word} in red. \luadirect{ekdosis.closestream()} } % \end{macrocode} +% \begin{macro}{\ekdsetup} +% \changes{v1.3}{2021/06/08}{new command for global options} +% \begin{macrocode} +\ekvdefinekeys{ekd@setup}{ + bool showpagebreaks = \ifekd@showpb, + store spbmk = \ekd@spbmk, + initial spbmk = \marginpar{spb}, + store hpbmk = \ekd@hpbmk, + initial hpbmk = \marginpar{hpb}, +} +\NewDocumentCommand{\ekdsetup}{m}{\ekvset{ekd@setup}{#1}} +\@onlypreamble\ekdsetup +% \end{macrocode} +% \end{macro} % \begin{macro}{\SetHooks} \cs{SetHooks} is used to set % hooks meant to be shared by all declared apparatuses, such as the % font size, the format of numerals, \emph{\&c.} This command can be @@ -7511,7 +7525,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \end{macro} % \begin{macro}{\teidirect} -% \changes{v1.3}{2021/06/05}{direct insertion of elements in the +% \changes{v1.3}{2021/06/08}{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 @@ -7688,7 +7702,8 @@ Sample text with a \textcolor{red}{word} in red. \globalcounter{ekd@pb} \NewDocumentCommand{\ekdpb}{s o m}{% \IfBooleanTF{#1} - {\pagebreak} + {\ifekd@showpb\marginpar{\ekd@hpbmk}\fi + \pagebreak} {% \def\@tmpoarg{#2}% \def\@tmpmarg{#3}% @@ -7701,13 +7716,19 @@ Sample text with a \textcolor{red}{word} in red. \IfNoValueTF{#2} {\ifnum \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0 + \ifekd@showpb\marginpar{\ekd@spbmk}\fi \pagebreak + \else + \ifekd@showpb\marginpar{[\ekd@spbmk]}\fi \fi} {\ifnum \pdf@strcmp{\@tmpoarg}{\tmp@pg} = 0 \ifnum \pdf@strcmp{\@tmpmarg}{\tmp@ln} = 0 + \ifekd@showpb\marginpar{\ekd@spbmk}\fi \pagebreak + \else + \ifekd@showpb\marginpar{[\ekd@spbmk]}\fi \fi \fi }% @@ -7871,7 +7892,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \end{macro} % \begin{macro}{\SetApparatusNoteLanguage} -% \changes{v1.3}{2021/06/05}{defines an alternate language to be +% \changes{v1.3}{2021/06/08}{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 -- cgit v1.2.3