From e76ae3e1038bfba0c61ef78857f7594b66afb1f1 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 16 Jul 2020 10:21:22 +0200 Subject: added \SetLineation --- Makefile | 2 +- ekdosis.dtx | 29 +++++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b57cb54..fc30a49 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ $(NAME).pdf: $(NAME).dtx mv TMP/*.pdf samples/ mv $(texsamplesout)-tei.xml samples/ @ echo "Build the documentation of $(NAME)..." - $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null + $(CMP) --shell-escape --recorder --interaction=batchmode $(NAME).dtx >/dev/null biber $(NAME) >/dev/null if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi diff --git a/ekdosis.dtx b/ekdosis.dtx index e34dc71..f4204bc 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -2391,6 +2391,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \RequirePackage{refcount} \RequirePackage[user,abspage]{zref} \RequirePackage{ltxcmds} +\RequirePackage{atbegshi} \if@pkg@parnotes \RequirePackage{parnotes} \fi @@ -2735,7 +2736,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ } % \end{macrocode} % \begin{macro}{\SetApparatus} -% All settings can also be defined as|key-value| options within the +% All settings can also be defined as |key-value| options within the % argument of \cs{SetApparatus}:--- % \begin{macrocode} \NewDocumentCommand{\SetApparatus}{m}{ @@ -2882,7 +2883,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \fi% } % \end{macrocode} -% Before inserting any new entry, \cs{add@apparatus} is called +% Before inserting any new entry, \cs{add@apparatus} calls % \cs{test@apparatus} to decide whether a new apparatus block must be % created on a given page. % \begin{macrocode} @@ -3452,6 +3453,27 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \luadirect{ekdosis.storecurcol(\luastring{\thecolumn})}% } % \end{macrocode} +% \paragraph{Lineation settings} +% +% \begin{macrocode} +\newif\ifekd@pagelineation +\NewDocumentCommand{\ekdatbegshihook}{}{% + \ifekd@pagelineation\resetlinenumber\fi +} +\AtBeginShipout{\ekdatbegshihook} +\ekvdefinekeys{ekd@lineation}{ + choice lineation = {page = \ekd@pagelineationtrue, + document = \ekd@pagelineationfalse}, + unknown-choice lineation = \PackageError{ekdosis}{unknown + lineation=#1}{`lineation' must be either `page' or `document'.}, + code modulonum = \chardef\c@linenumbermodulo#1\relax, + noval modulo = \modulolinenumbers +} +\NewDocumentCommand{\SetLineation}{m}{ + \ekvset{ekd@lineation}{#1} +} +% \end{macrocode} +% % Start and stop |ekdosis|: % \begin{macrocode} \NewDocumentCommand{\EkdosisOn}{}{% @@ -3487,12 +3509,11 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \luadirect{ekdosis.exporttei(\luastringN{\par #1\par })}\fi} % \end{macrocode} % \end{environment} -% \paragraph{Alignment} What follows isto arrange texts in parallel +% \paragraph{Alignment} What follows is to arrange texts in parallel % columns either on single pages or on facing pages. % % Define keys to be used by the \env{alignment} environment:--- % \begin{macrocode} -\newif\ifekd@pagelineation \ekvdefinekeys{ekd@align}{ store tcols = \tcols@num, store lcols = \lcols@num, -- cgit v1.2.3