From 312579a658b4570bd003e00c1d19e649a8177f28 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sun, 30 Aug 2020 11:07:18 +0200 Subject: documented \ekdsep. the set of options in \ekd@note was wrong. note_totei() needed to check whether 'right' opt is empty --- ekdosis.dtx | 60 +++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index cf1db6c..302d537 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -1494,8 +1494,17 @@ yesterday. % bracket (|]|)\\ % \DescribeOption{nosep} |nosep|$=$\verb+true|false+\\ % This named argument does not need a value as it defaults to |true| -% if it is used. Obviously, |nosep| removes the separator mentioned -% above.\\ +% if it is used. |nosep| removes the separator mentioned +% above. Obviously, |nosep| must be used when for some reason no +% \cs{rdg} command follows a \cs{lem} command that has just been +% used, as shown below in \vref{lst:emend-coni-corr}, l.~7. +% \danger \DescribeMacro{\ekdsep} If |nosep| has been used so as to +% insert an explanatory note after the lemma text with the \cs{note} +% command described below \vpageref{ref:editorial-notes}, then +% \cs{ekdsep} can be used\---for instance as value of the |post| +% optional argument of the note\---to put back in the separator. This +% technique is demonstrated below in +% \vref{lst:emend-coni-corr}, ll.~23--5.\\ % \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\ % This named argument does not need a value as it defaults to |true| % if it is used. |nolem| completely removes the lemma text from the @@ -1996,6 +2005,8 @@ yesterday. % Examples follow:\footnote{On the use of \texttt{egomute} (l.~2), see % above \vref{it:egomute}.}--- % +% \captof{Emendations, conjectures and +% corrections}[\label{lst:emend-coni-corr}] % \iffalse %<*example> % \fi @@ -2022,8 +2033,9 @@ yesterday. } ὑπογίνονται Πάντων δὲ \app{ - \lem[resp=egomute, type=emendation, post={addidi (\arb{^gamI`a - 'l-.hummayAti} Gal.)}]{\supplied{τῶν πυρετῶν}} + \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}} + \note[post=\ekdsep]{addidi (\arb{^gamI`a 'l-.hummayAti} + \getsiglum{Gal})} \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}} \rdg[wit=codd, source=edd, alt=om.]{} }, @@ -2058,8 +2070,9 @@ yesterday. % % % Πάντων δὲ \app{ -% \lem[resp=egomute, type=emendation, post={addidi (\arb{^gamI`a -% 'l-.hummayAti} Gal.)}]{\supplied{τῶν πυρετῶν}} +% \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}} +% \note[post=\ekdsep]{addidi (\arb{^gamI`a 'l-.hummayAti} +% \getsiglum{Gal})} % \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}} % \rdg[wit=hcodd, source=hedd, alt=om.]{} % }, @@ -2096,6 +2109,10 @@ yesterday. τῶν πυρετῶν + addidi ( + ^gamI`a 'l-.hummayAti + Gal.) ^gamI`a 'l-.hummayAti @@ -6771,10 +6788,10 @@ Sample text with a \textcolor{red}{word} in red. \bgroup% \ekvset{ekd@note}{#1}% \edef\note@contents{% - \ekvifdefinedNoVal{note}{pre}{}{% + \ekvifdefinedNoVal{ekd@note}{pre}{}{% \unexpanded\expandafter{\pre@value}}% {\unexpanded{#2}}% - \ekvifdefinedNoVal{note}{post}{}{% + \ekvifdefinedNoVal{ekd@note}{post}{}{% \unexpanded\expandafter{\post@value}}% }% \append@app{\note@contents}% @@ -6785,10 +6802,10 @@ Sample text with a \textcolor{red}{word} in red. \bgroup% \ekvset{ekd@note}{#1}% \edef\note@contents{% - \ekvifdefinedNoVal{note}{pre}{}{% + \ekvifdefinedNoVal{ekd@note}{pre}{}{% \unexpanded\expandafter{\pre@value}}% \unskip\noexpand\parnote{\unexpanded{#2}}% - \ekvifdefinedNoVal{note}{post}{}{% + \ekvifdefinedNoVal{ekd@note}{post}{}{% \unexpanded\expandafter{\post@value}}% }% \append@app{\note@contents}% @@ -7722,16 +7739,21 @@ local function note_totei(str) if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end right = get_attr_value(opt, "labelb") left = get_attr_value(opt, "labele") - if left ~= "" + if right == "" then - return string.format( - "<%s%s target=\"#range(right(%s),left(%s))\">%s", - cmd, teitype, right, left, arg, cmd, right) - elseif left == "" - then - return string.format( - "<%s%s target=\"#right(%s)\">%s", - cmd, teitype, right, arg, cmd, right) + return string.format("<%s>%s", cmd, arg, cmd) + else + if left ~= "" + then + return string.format( + "<%s%s target=\"#range(right(%s),left(%s))\">%s", + cmd, teitype, right, left, arg, cmd, right) + elseif left == "" + then + return string.format( + "<%s%s target=\"#right(%s)\">%s", + cmd, teitype, right, arg, cmd, right) + end end end) return str -- cgit v1.2.3