From f5654d2de6e3b3e0b7f2f7dc230476197dfd7680 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Wed, 3 Mar 2021 19:18:30 +0100
Subject: added new general hook 'lemmastyle'

---
 ekdosis.dtx | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index cc27565..4c0cdd8 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -2918,6 +2918,13 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
 % unbreakable space. As an example, |postrefnum=\hskip 0.5em| will
 % insert a \unit[0.5]{em} space between the numerals and the beginning
 % of all subsequent notes.
+% \DescribeOption{lemmastyle} |lemmastyle|$=$\meta{command}
+% \hfill\tcboxverb{Default: not set}\\
+% \newfeature[v1.2] |lemmastyle| can be used to set the family, series
+% or shape of the font used to print the lemma text in the apparatus
+% criticus. For example, |lemmastyle=|\cs{bfseries} will print all
+% instances of lemma text in bold while
+% |lemmastyle=|\cs{color}|{blue}| will print them in blue.
 %
 % \subsection{Single-Layer Apparatus Criticus}
 % \label{sec:single-layer-app}
@@ -4224,7 +4231,7 @@ subtype="arabtex">'inna 'abI kAna mina
 % \DescribeMacro{\ekdpb} \cs{ekdpb}\oarg{page no}\marg{line no}
 % \newfeature[v1.2]\\
 % One way to avoid this inconvenience is to use \cs{ekdpb} instead of
-% the standard \cs{pabebreak} command provided by \LaTeX\ to insert
+% the standard \cs{pagebreak} command provided by \LaTeX\ to insert
 % conditional page breaks. \cs{ekdpb} takes as mandatory argument an
 % integer that represents the line number where the page break should
 % take place. An optional argument allows to further specify the page
@@ -6124,14 +6131,17 @@ Sample text with a \textcolor{red}{word} in red.
 %   hooks meant to be shared by all declared apparatuses, such as the
 %   font size, the format of numerals, \emph{\&c.} This command can be
 %   used in the preamble or at any point of the document.
+%   \changes{v1.2}{2021/03/03}{new option \texttt{lemmastyle}}
 %    \begin{macrocode}
 \ekvdefinekeys{ekd@hooks}{
   store appfontsize = \ekd@appfontsize,
   store refnumstyle = \ekd@refnumstyle,
   store postrefnum = \ekd@postrefnum,
+  store lemmastyle = \ekd@lemmastyle,
   initial appfontsize = \footnotesize,
   initial refnumstyle = \bfseries,
-  initial postrefnum = ~
+  initial postrefnum = ~,
+  initial lemmastyle = 
 }
 \NewDocumentCommand{\SetHooks}{m}{\ekvset{ekd@hooks}{#1}}
 %    \end{macrocode}
@@ -7099,13 +7109,15 @@ Sample text with a \textcolor{red}{word} in red.
       \ifdefined\ekdlr@alt%
         \ifdefined\ekdlr@post%
           \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi
-        {\textdir TRT\unexpanded\expandafter{\ekdlr@alt}}%
+          {\textdir TRT\expandafter\noexpand\ekd@lemmastyle
+            \unexpanded\expandafter{\ekdlr@alt}}%
         \ifdefined\ekdlr@pre%
           \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi
       \else
         \ifdefined\ekdlr@post%
           \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi
-        {\textdir TRT\unexpanded{#2}}%
+          {\textdir TRT\expandafter\noexpand\ekd@lemmastyle
+            \unexpanded{#2}}%
         \ifdefined\ekdlr@pre%
           \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi
       \fi
@@ -7133,17 +7145,21 @@ Sample text with a \textcolor{red}{word} in red.
         \ifdefined\ekdlr@pre%
           \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi
         \ltx@ifpackageloaded{babel}%
-          {{\noexpand\selectlanguage{\languagename}%
+        {{\noexpand\selectlanguage{\languagename}%
+            \expandafter\noexpand\ekd@lemmastyle
             \unexpanded\expandafter{\ekdlr@alt}}}%
-          {\unexpanded\expandafter{\ekdlr@alt}}%
+        {\expandafter\noexpand\ekd@lemmastyle
+          \unexpanded\expandafter{\ekdlr@alt}}%
         \ifdefined\ekdlr@post%
           \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi
       \else
         \ifdefined\ekdlr@pre%
           \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi
           \ltx@ifpackageloaded{babel}%
-          {{\noexpand\selectlanguage{\languagename}\unexpanded{#2}}}{%
-            {\unexpanded{#2}}}%
+          {{\noexpand\selectlanguage{\languagename}%
+              \expandafter\noexpand\ekd@lemmastyle
+              \unexpanded{#2}}}{%
+            {\expandafter\noexpand\ekd@lemmastyle\unexpanded{#2}}}%
         \ifdefined\ekdlr@post%
           \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi
       \fi
@@ -7309,7 +7325,8 @@ Sample text with a \textcolor{red}{word} in red.
       \fi%
       \current@ref@arg{\ekdn@labelb}{\ekdn@labele}%\hskip .25em
       \ifdefined\ekdn@lem%
-          {\textdir TRT\unexpanded\expandafter{\ekdn@lem}}%
+      {\textdir TRT\expandafter\noexpand\ekd@lemmastyle
+        \unexpanded\expandafter{\ekdn@lem}}%
           \unless\ifekdn@nosep
           \unexpanded\expandafter{\ekdn@sep}\fi
           \else\fi%
@@ -7326,8 +7343,10 @@ Sample text with a \textcolor{red}{word} in red.
       \ifdefined\ekdn@lem
         \ltx@ifpackageloaded{babel}%
           {{\noexpand\selectlanguage{\languagename}%
-            \unexpanded\expandafter{\ekdn@lem}}}%
-          {\unexpanded\expandafter{\ekdn@lem}}%
+              \expandafter\noexpand\ekd@lemmastyle
+              \unexpanded\expandafter{\ekdn@lem}}}%
+          {\expandafter\noexpand\ekd@lemmastyle
+            \unexpanded\expandafter{\ekdn@lem}}%
           \unless\ifekdn@nosep
           \unexpanded\expandafter{\ekdn@sep}\fi
           \else\fi%
-- 
cgit v1.2.3

