From 3f31f012d1b8e56f96b3a83898335ee39aaf9ae1 Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Sun, 23 Feb 2020 18:11:01 +0100
Subject: added refnumstyle hook

---
 ekdosis.dtx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index d17774b..1d5f998 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -371,9 +371,11 @@ Running "make install" installs the files in the local TeX tree.
 %    \end{macrocode}
 % Hooks
 %    \begin{macrocode}
-\def\ekd@postrefnum{\nobreak\space}
+\def\ekd@refnumstyle{\bfseries}
+\def\ekd@postrefnum{~}
 \options{
   /hooks/.new family,
+  /hooks/refnumstyle/.new cmd = \def\ekd@refnumstyle{#1},
   /hooks/postrefnum/.new cmd = \def\ekd@postrefnum{#1}
 }
 \NewDocumentCommand{\SetEkdosisHooks}{m}{
@@ -650,7 +652,7 @@ Running "make install" installs the files in the local TeX tree.
     "pg_ii")}%
   \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}%
   \ekd@isinappfalse}
-\def\current@ref@arg#1#2{{\textdir TLT\noexpand\bfseries%
+\def\current@ref@arg#1#2{{\textdir TLT\unexpanded\expandafter{\ekd@refnumstyle}%
     \ifnum%
     \getpagerefnumber{#1}
     =
@@ -698,7 +700,7 @@ Running "make install" installs the files in the local TeX tree.
       \fi%
     }%
   }%
-\def\current@ref{{\textdir TLT\noexpand\bfseries%
+\def\current@ref{{\textdir TLT\unexpanded\expandafter{\ekd@refnumstyle}%
     \ifnum%
     \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}
     =
-- 
cgit v1.2.3

