aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2021-08-31 14:14:23 +0200
committerRobert Alessi <alessi@robertalessi.net>2021-08-31 14:14:23 +0200
commite329140ea4ab6404ea1d54781b32694baaabbd77 (patch)
treeb460097edb0c745c4a30f0d75028b0701b565a3b
parent541c35d0217ae18d734252448015ef6d5ed9a745 (diff)
downloadekdosis-e329140ea4ab6404ea1d54781b32694baaabbd77.tar.gz
siglumsep -> familysep
-rw-r--r--ekdosis.dtx71
1 files changed, 44 insertions, 27 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 2be331a..4d36bcd 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -61,7 +61,7 @@ along with this program. If not, see
61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
62%<package>\ProvidesPackage{ekdosis} 62%<package>\ProvidesPackage{ekdosis}
63%<*package> 63%<*package>
64 [2021/08/30 v1.4-dev Typesetting TEI xml-compliant critical editions] 64 [2021/08/31 v1.4-dev Typesetting TEI xml-compliant critical editions]
65%</package> 65%</package>
66%<*driver> 66%<*driver>
67\begin{filecontents}[noheader,overwrite]{bibdata.xml} 67\begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -1861,8 +1861,8 @@ yesterday.
1861% apparatus criticus, preceded by the line number where it occurs or a 1861% apparatus criticus, preceded by the line number where it occurs or a
1862% broad space when the entry refers to the same line as the preceding 1862% broad space when the entry refers to the same line as the preceding
1863% entry. \phts\label{ref:lem-opts-b}The optional argument of \cs{lem} 1863% entry. \phts\label{ref:lem-opts-b}The optional argument of \cs{lem}
1864% accepts the following 1864% accepts the following comma-separated list of \enquote{name$=$value}
1865% comma-separated list of \enquote{name$=$value} arguments:---\\ 1865% arguments:---\\
1866% \DescribeOption{wit} |wit|$=$\meta{csv list of 1866% \DescribeOption{wit} |wit|$=$\meta{csv list of
1867% witnesses}\phts\label{ref:lem-wit}\\ 1867% witnesses}\phts\label{ref:lem-wit}\\
1868% While a single witness may be recorded as in |wit=A|, 1868% While a single witness may be recorded as in |wit=A|,
@@ -1870,11 +1870,16 @@ yesterday.
1870% enclosed in curly braces, like so: 1870% enclosed in curly braces, like so:
1871% |wit={A,B,C}|. \phts\label{ref:mss-sep-families}It must be noted 1871% |wit={A,B,C}|. \phts\label{ref:mss-sep-families}It must be noted
1872% that witnesses can be grouped by using spaces as separators, like 1872% that witnesses can be grouped by using spaces as separators, like
1873% so: \verb*|wit={A,B,C, D,E,F}|. Although any unique identifiers or 1873% so: \verb*|wit={A,B,C, D,E,F}|. \danger In the apparatus criticus in
1874% labels used to \enquote{declare} sources and scholars as described 1874% print, it is customary to remind the reader of the manuscript
1875% above \vpagerefrange{ref:declare-source}{ref:declare-scholar} can 1875% groupings by spaces or commas. \pkg{ekdosis} prints spaces by
1876% also be used as values of the |wit| optional argument, it is 1876% default, but can be instructed to print any other symbol
1877% recommended to use |sources| and |resp| to refer to either category 1877% instead.\footnote{See below \vpageref{ref:familysep} for details.}
1878% \danger Although any unique identifiers or labels used to
1879% \enquote{declare} sources and scholars as described above
1880% \vpagerefrange{ref:declare-source}{ref:declare-scholar} can also be
1881% used as values of the |wit| optional argument, it is recommended to
1882% use |sources| and |resp| to refer to either category
1878% respectively as described below.\\ 1883% respectively as described below.\\
1879% \DescribeOption{source} |source|$=$\meta{csv list of 1884% \DescribeOption{source} |source|$=$\meta{csv list of
1880% sources}\phts\label{ref:lem-source}\newfeature[v1.1]\\ 1885% sources}\phts\label{ref:lem-source}\newfeature[v1.1]\\
@@ -1910,12 +1915,11 @@ yesterday.
1910% if used. |nosep| removes the separator mentioned above. Obviously, 1915% if used. |nosep| removes the separator mentioned above. Obviously,
1911% |nosep| must be used when for some reason no \cs{rdg} command 1916% |nosep| must be used when for some reason no \cs{rdg} command
1912% follows a \cs{lem} command that has just been used, as shown below 1917% follows a \cs{lem} command that has just been used, as shown below
1913% in \vref{lst:emend-coni-corr}, l.~7. 1918% in \vref{lst:emend-coni-corr}, l.~7. \danger If |nosep| be used so
1914% \danger If |nosep| be used so as to insert an explanatory note after 1919% as to insert an explanatory note after the lemma text with the
1915% the lemma text with the \cs{note} command described below 1920% \cs{note} command described below \vpageref{ref:editorial-notes},
1916% \vpageref{ref:editorial-notes}, then the |sep| optional argument of 1921% then the |sep| optional argument of \cs{note} can be used to put
1917% \cs{note} can be used to put back in the separator. This technique 1922% back in the separator. This technique is demonstrated below in
1918% is demonstrated below in
1919% \vref{lst:emend-coni-corr}, ll.~23--5.\\ 1923% \vref{lst:emend-coni-corr}, ll.~23--5.\\
1920% \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\ 1924% \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\
1921% This named argument does not need a value as it defaults to |true| 1925% This named argument does not need a value as it defaults to |true|
@@ -3349,6 +3353,20 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3349% \hfill\tcboxverb{Default: not set}\\ 3353% \hfill\tcboxverb{Default: not set}\\
3350% \newfeature[v1.2] |readingstyle| operates in the same way as 3354% \newfeature[v1.2] |readingstyle| operates in the same way as
3351% |lemmastyle| but applies to variant readings.\\ 3355% |lemmastyle| but applies to variant readings.\\
3356% \DescribeOption{familysep} |familysep|$=$\meta{symbol}\verb+|reset+
3357% \phts\label{ref:familysep}\hfill\tcboxverb{Default: not set}\\
3358% \newfeature[v1.4] As described above \vpageref{ref:lem-wit},
3359% multiple witnesses must be recorded in the |wit| optional argument
3360% of the \cs{lem} and \cs{rdg} commands as comma-separated lists of
3361% sigla which can be further grouped into families by inserting spaces
3362% as separators just after commas at specific places. \pkg{ekdosis}
3363% saves and prints these spaces in the apparatus criticus but can be
3364% instructed to print any other symbol instead by means of
3365% |familysep|. For instance, |familysep={,}| has the separating spaces
3366% replaced with commas and |familysep={,\allowbreak}| does the same
3367% while further allowing breaks after commas at the end of
3368% lines. Finally, |familysep=reset| can be used to restore the default
3369% behavior.\\
3352% \DescribeOption{initialrule} |initialrule|$=$\meta{command} 3370% \DescribeOption{initialrule} |initialrule|$=$\meta{command}
3353% \phts\label{ref:initialrule}\hfill\bgroup\footnotesize 3371% \phts\label{ref:initialrule}\hfill\bgroup\footnotesize
3354% \tcboxverb{Default: \rule{0.4\columnwidth}{0.4pt} (initially not set)}% 3372% \tcboxverb{Default: \rule{0.4\columnwidth}{0.4pt} (initially not set)}%
@@ -3356,8 +3374,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
3356% between the edition text and all subsequent layers of critical 3374% between the edition text and all subsequent layers of critical
3357% notes. Of course, this option only makes sense when multiple-layer 3375% notes. Of course, this option only makes sense when multiple-layer
3358% apparatus criticus are set. Therefore, it has no effect on 3376% apparatus criticus are set. Therefore, it has no effect on
3359% single-layer apparatus 3377% single-layer apparatus criticus.\\
3360% criticus.\\
3361% \DescribeOption{noinitialrule}\hfill\tcboxverb{Default: not set}\\ 3378% \DescribeOption{noinitialrule}\hfill\tcboxverb{Default: not set}\\
3362% This is a no-value option. It removes any previously set 3379% This is a no-value option. It removes any previously set
3363% |initialrule|. 3380% |initialrule|.
@@ -7757,7 +7774,7 @@ Sample text with a \textcolor{red}{word} in red.
7757 store appfontsize = \ekd@appfontsize, 7774 store appfontsize = \ekd@appfontsize,
7758 store refnumstyle = \ekd@refnumstyle, 7775 store refnumstyle = \ekd@refnumstyle,
7759 store postrefnum = \ekd@postrefnum, 7776 store postrefnum = \ekd@postrefnum,
7760 code siglumsep = \luadirect{ekdosis.setsiglumsep(\luastringN{#1})}, 7777 code familysep = \luadirect{ekdosis.setfamilysep(\luastringN{#1})},
7761 store lemmastyle = \ekd@lemmastyle, 7778 store lemmastyle = \ekd@lemmastyle,
7762 store readingstyle = \ekd@readingstyle, 7779 store readingstyle = \ekd@readingstyle,
7763 code keyparopts = \if@pkg@keyfloat\ekd@keyparopts{#1}\fi, 7780 code keyparopts = \if@pkg@keyfloat\ekd@keyparopts{#1}\fi,
@@ -8305,7 +8322,7 @@ Sample text with a \textcolor{red}{word} in red.
8305% \end{macrocode} 8322% \end{macrocode}
8306% \end{macro} 8323% \end{macro}
8307% \begin{macro}{\SetSubseparator} 8324% \begin{macro}{\SetSubseparator}
8308% \changes{v1.4}{2021/08/30}{New command for subseparators} 8325% \changes{v1.4}{2021/08/31}{New command for subseparators}
8309% \cs{SetSubseparator}\marg{sub-separator} allows to change the 8326% \cs{SetSubseparator}\marg{sub-separator} allows to change the
8310% \enquote{subseparator} between variant readings. By default, 8327% \enquote{subseparator} between variant readings. By default,
8311% no subseparator is set:--- 8328% no subseparator is set:---
@@ -9880,7 +9897,7 @@ Sample text with a \textcolor{red}{word} in red.
9880% \end{macrocode} 9897% \end{macrocode}
9881% \end{macro} 9898% \end{macro}
9882% \begin{macro}{\\+} 9899% \begin{macro}{\\+}
9883% \changes{v1.4}{2021/08/30}{New macro for poetry} 9900% \changes{v1.4}{2021/08/31}{New macro for poetry}
9884% |\\+| comes in addition to the verse commands that are provided by 9901% |\\+| comes in addition to the verse commands that are provided by
9885% the \pkg{verse} package. |\\+| causes a linebreak within a verse 9902% the \pkg{verse} package. |\\+| causes a linebreak within a verse
9886% line. In contrast to |\\>|, the subsequent line is not indented and 9903% line. In contrast to |\\>|, the subsequent line is not indented and
@@ -10368,14 +10385,14 @@ function ekdosis.newsource(id, siglum)
10368 return true 10385 return true
10369end 10386end
10370 10387
10371local siglumsep = nil 10388local familysep = nil
10372 10389
10373function ekdosis.setsiglumsep(str) 10390function ekdosis.setfamilysep(str)
10374 if str == "reset" 10391 if str == "reset"
10375 then 10392 then
10376 siglumsep = nil 10393 familysep = nil
10377 else 10394 else
10378 siglumsep = str 10395 familysep = str
10379 end 10396 end
10380 return true 10397 return true
10381end 10398end
@@ -10401,12 +10418,12 @@ function ekdosis.getsiglum(str, opt)
10401 for i = 1,#idsRend do 10418 for i = 1,#idsRend do
10402 local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") 10419 local tempc = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1")
10403 str = string.gsub(str, tempc.."%,", idsRend[i].abbr) 10420 str = string.gsub(str, tempc.."%,", idsRend[i].abbr)
10404 if siglumsep ~= nil
10405 then
10406 str = string.gsub(str, "%s", siglumsep)
10407 end
10408 ctrl = string.gsub(ctrl, tempc.."%,", "") 10421 ctrl = string.gsub(ctrl, tempc.."%,", "")
10409 end 10422 end
10423 if familysep ~= nil
10424 then
10425 str = string.gsub(str, "%s+", familysep)
10426 end
10410 end 10427 end
10411 -- if string.find(ctrl, "[A-Za-z0-9]") 10428 -- if string.find(ctrl, "[A-Za-z0-9]")
10412 if string.find(ctrl, "%S") 10429 if string.find(ctrl, "%S")