From 091aa9ad4f1792f16b4b40e12192603d2a9d3e97 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Wed, 1 Jul 2020 09:54:08 +0200 Subject: include \getsiglum in cmdtotei() --- Makefile | 2 +- ekdosis.dtx | 29 ++++++++++++++++++++++------- ekdosis.ins | 12 ++++++------ 3 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index fe0b2cc..43430a6 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ sty: clean $(CMP) $(NAME).ins $(NAME).pdf: $(NAME).dtx - $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME)-ex.tex >/dev/null +# $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME)-ex.tex >/dev/null $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null biber $(NAME) if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi diff --git a/ekdosis.dtx b/ekdosis.dtx index f0dc576..a96a2a8 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -430,7 +430,10 @@ along with this program. If not, see % Right brace \} Tilde \~} % % \GetFileInfo{\jobname.dtx} -% \DoNotIndex{\newcommand,\newenvironment} +% \DoNotIndex{\newcommand,\newenvironment,\begin,\begingroup} +% \DoNotIndex{\bgroup,\def,\edef,\egroup,\else,\expandafter} +% \DoNotIndex{\fi,\ifdefined,\luadirect,\luastring,\luastringN} +% \DoNotIndex{\luastringO,\NewDocumentCommand,\space,\unexpanded} % % \pdfbookmark[1]{\metaterm{title}}{title} % \begin{tcolorbox}[ @@ -796,7 +799,7 @@ along with this program. If not, see % to do this.} % % As an example, the following line loads \pkg{ekdosis} and instructs -% it to output a \texttt{TEI xml} file (in addition of the PDF one) +% it to output a \texttt{TEI xml} file (in addition to the PDF one) % and to use \pkg{parnotes} to format with Roman numerals the footnotes % that are inserted in the apparatus criticus:--- % \iffalse @@ -1253,7 +1256,7 @@ yesterday. \lem[wit=A,nolem]{met} \rdg[wit=B, alt={\emph{post} met \emph{add.} there}]{met there} - \note*{Ms. B provides other additions of this kind.}}. + \note*{Ms. \getsiglum{B} provides other additions of this kind.}}. \end{ekdosis} \end{minted} % \iffalse @@ -1282,7 +1285,7 @@ yesterday. % \lem[wit=pjA,nolem]{met} % \rdg[wit=pjB, alt={\emph{post} met \emph{add.} there}]{met % there} -% \note*{Ms. B provides other additions of this kind.}}. +% \note*{Ms. \getsiglum{pjB} provides other additions of this kind.}}. % \end{specimen} % \flushpage % \end{alignment} @@ -1333,8 +1336,9 @@ yesterday. met met there - Ms. B provides some further additions of this - kind. + Ms. + Bprovides other additions of + this kind. .

\end{minted} % \iffalse @@ -3659,9 +3663,18 @@ local function cmdtotei(str) str = string.gsub(str, "\\(linelabel)%s?(%b{})", function(cmd, body) body = string.sub(body, 2, -2) - body = cmdtotei(body) + -- body = cmdtotei(body) return string.format("", body) end) + str = string.gsub(str, "\\(getsiglum)%s?(%b{})", + function(cmd, body) + body = string.sub(body, 2, -2) + teisiglum = ekdosis.getsiglum(body, "tei") + printsiglum = ekdosis.getsiglum(body) + -- body = cmdtotei(body) + return string.format("%s", + teisiglum, printsiglum) + end) str = string.gsub(str, "\\(%a+)%s?%*?(%b[])(%b{})", function(cmd, opt, body) body = string.sub(body, 2, -2) @@ -4775,6 +4788,7 @@ end % \iffalse %<*examples> % \fi +% \begin{comment} % \begin{minted}{latex} \documentclass[12pt]{article} \usepackage{fontspec} @@ -4803,6 +4817,7 @@ end \end{document} % \end{minted} +% \end{comment} % \iffalse % % \fi diff --git a/ekdosis.ins b/ekdosis.ins index b724b43..4085554 100644 --- a/ekdosis.ins +++ b/ekdosis.ins @@ -52,12 +52,12 @@ Running "make install" installs the files in the local TeX tree. } } \egroup -\usedir{doc/lualatex/ekdosis} -\generate{ - \file{ekdosis-ex.tex}{ - \from{\jobname.dtx}{examples} - } -} +% \usedir{doc/lualatex/ekdosis} +% \generate{ +% \file{ekdosis-ex.tex}{ +% \from{\jobname.dtx}{examples} +% } +% } \usedir{doc/lualatex/ekdosis} \generate{ \file{README.txt}{\from{\jobname.dtx}{readme}} -- cgit v1.2.3