From f1f70d0df950198cad6fb2d5a72471626857bd40 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 13 Apr 2021 15:11:20 +0200 Subject: added new option 'locus' in \DeclareWitness --- ekdosis.dtx | 32 +++++++++++++++++++++++++++----- ekdosis.el | 3 +++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index 1983e56..5b5fed9 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -7172,7 +7172,8 @@ Sample text with a \textcolor{red}{word} in red. store collection = \collection@value, store idno = \idno@value, store msName = \msName@value, - store origDate = \origDate@value + store origDate = \origDate@value, + store locus = \locus@value } % \end{macrocode} % \begin{macro}{\DeclareWitness} \cs{DeclareWitness} is a @@ -7195,7 +7196,8 @@ Sample text with a \textcolor{red}{word} in red. \luastringO{\collection@value}, \luastringO{\idno@value}, \luastringO{\msName@value}, - \luastringO{\origDate@value})} + \luastringO{\origDate@value}, + \luastringO{\locus@value})} \egroup } \@onlypreamble\DeclareWitness @@ -9261,7 +9263,8 @@ function ekdosis.newwitness(id, Collection, Idno, MsName, - OrigDate) + OrigDate, + Locus) if xmlidfound(id) then tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\"" @@ -9297,6 +9300,10 @@ function ekdosis.newwitness(id, listWit[indexwit].history = {} listWit[indexwit].history.origin = {origDate = OrigDate} end + if Locus ~= "" then + listWit[indexwit].msContents = {} + listWit[indexwit].msContents.msItem = {locus = Locus} + end end return true end @@ -10477,7 +10484,14 @@ function ekdosis.openteistream() end f:write("", "\n") f:write("", "\n") - else end + else end + if listWit[i].msContents ~= nil then + f:write("", "\n") + f:write("", "\n") + f:write("", textotei(listWit[i].msContents.msItem.locus), "", "\n") + f:write("", "\n") + f:write("", "\n") + end if listWit[i].history ~= nil then f:write("", "\n") f:write("", "\n") @@ -10618,7 +10632,15 @@ function ekdosis.basic_cs(msid) else date = "" end - return siglum.."&"..name.."&"..date + if listWit[indexwit].msContents ~= nil + and + listWit[indexwit].msContents.msItem ~= nil + then + locus = listWit[indexwit].msContents.msItem.locus + else + locus = "" + end + return siglum.."&"..name.."\\space "..locus.."&"..date end -- end basic TeX Conspectus siglorum diff --git a/ekdosis.el b/ekdosis.el index 74d6bf1..1df3fd3 100644 --- a/ekdosis.el +++ b/ekdosis.el @@ -120,6 +120,9 @@ (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) '("[l]" ("linelabel")) t) + (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) + '("{{1}}" ("surplus")) + t) ;; This package relies on lualatex, so check for it: (TeX-check-engine-add-engines 'luatex) (TeX-add-symbols -- cgit v1.2.3