diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty | 113 |
1 files changed, 91 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty b/Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty index 2bacb9f9159..0e3058955d5 100644 --- a/Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty +++ b/Master/texmf-dist/tex/lualatex/ekdosis/ekdosis.sty @@ -41,7 +41,7 @@ %% Running "make inst" installs the files in the user's TeX tree. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{ekdosis} - [2021/08/18 v1.3 Typesetting TEI xml-compliant critical editions] + [2021/11/21 v1.4 Typesetting TEI xml-compliant critical editions] \RequirePackage{iftex} \RequireLuaTeX \RequirePackage{expkv-opt} @@ -49,7 +49,7 @@ \newif\if@pkg@float \newif\if@pkg@footins \newif\if@pkg@keyfloat -\newif\if@pkg@fitfloat +\newif\if@pkg@fitapp \newif\if@pkg@ekddivs \newif\if@parnotesroman \newif\if@pkg@parnotes @@ -59,7 +59,7 @@ choice layout = {float = {\@pkg@floattrue}, footins = {\@pkg@floatfalse\@pkg@footinstrue}, keyfloat = {\@pkg@floatfalse\@pkg@keyfloattrue}, - fitfloat = {\@pkg@floatfalse\@pkg@fitfloattrue}}, + fitapp = {\@pkg@floatfalse\@pkg@fitapptrue}}, initial layout = float, unknown-choice layout = \PackageError{ekdosis}{unknown layout=#1}{`layout' must be either `float' or `footins'.}, @@ -110,7 +110,7 @@ \keyparbox[!b]{#1}{\ekd@insert@apparatus}}} \ekd@keyparopts{} \fi -\if@pkg@fitfloat +\if@pkg@fitapp \RequirePackage{tcolorbox} \tcbuselibrary{fitting,skins} \fi @@ -143,6 +143,7 @@ store appfontsize = \ekd@appfontsize, store refnumstyle = \ekd@refnumstyle, store postrefnum = \ekd@postrefnum, + code familysep = \luadirect{ekdosis.setfamilysep(\luastringN{#1})}, store lemmastyle = \ekd@lemmastyle, store readingstyle = \ekd@readingstyle, code keyparopts = \if@pkg@keyfloat\ekd@keyparopts{#1}\fi, @@ -293,6 +294,7 @@ nmeta norule = {rule=none}, code delim = \def\delim@val{\unexpanded{#1}}, store sep = \sep@val, + store subsep = \subsep@val, store bhook = \bhook@val, store ehook = \ehook@val, store maxentries = \limit@val, @@ -314,6 +316,7 @@ \luastringO{\rule@val}, \luastringO{\delim@val}, \luastringO{\sep@val}, + \luastringO{\subsep@val}, \luastringO{\bhook@val}, \luastringO{\ehook@val}, \luastringO{\limit@val}, @@ -402,12 +405,14 @@ \hb@xt@0em{\hss\@makefnmark}#1} \newif\ifrtl@app \edef\ekdsep{] } +\edef\ekdsubsep{} \ekvdefinekeys{default@app}{ choice direction = {LR = \rtl@appfalse, RL = \rtl@apptrue}, unknown-choice direction = \PackageError{ekdosis}{unknown direction=#1}{`direction' must be either `LR' or `RL'.}, code sep = \edef\ekdsep{#1}, + code subsep = \edef\ekdsubsep{#1}, store bhook = \ekd@begin@apparatus, initial bhook = {}, store ehook = \ekd@end@apparatus, @@ -430,6 +435,7 @@ \NewDocumentCommand{\SetRTLapp}{}{\rtl@apptrue} \NewDocumentCommand{\SetLTRapp}{}{\rtl@appfalse} \NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}} +\NewDocumentCommand{\SetSubseparator}{m}{\edef\ekdsubsep{#1}} \NewDocumentCommand{\SetBeginApparatus}{m}{\edef\ekd@begin@apparatus{#1}} \NewDocumentCommand{\SetEndApparatus}{m}{\edef\ekd@end@apparatus{#1}} \NewDocumentCommand{\SetUnitDelimiter}{m}{\def\ekd@unit@delim{#1}} @@ -469,7 +475,8 @@ \newif\ifsubsq@unit \subsq@unittrue \newif\ifekd@inside@app -\if@pkg@fitfloat +\newif\ifekd@keepinapp +\if@pkg@fitapp \newtcboxfit{\ekd@fitapp}{% blankest, fit basedim = \f@size pt, @@ -532,7 +539,7 @@ \if@pkg@keyfloat \ekd@insert@keyparapp \fi - \if@pkg@fitfloat + \if@pkg@fitapp \ekd@fitapp{\ekd@insert@apparatus}% \fi } @@ -599,6 +606,7 @@ \else\if@pkg@poetry@verse\poemlines{#1}\fi\fi, initial vmodulo = 1, default vmodulo = 5, + bool vnumbrokenlines = \ifnum@brokenline, bool continuousvnum = \if@continuous@vnum, choice numbers = {elided = \ekd@elidednumberstrue, full = \ekd@elidednumbersfalse}, @@ -621,6 +629,16 @@ \NewDocumentCommand{\SetLineation}{m}{ \ekvset{ekd@lineation}{#1} } +\NewDocumentCommand{\vmodulolinenumbers}{O{5}}{% + \ifekd@memoir@loaded + \linenumberfrequency{#1}% + \else + \if@pkg@poetry@verse + \poemlines{#1}% + \fi + \fi + \ignorespaces +} \renewcommand\linenumberfont{\normalfont\footnotesize} \ekvdefinekeys{appnote}{ store type = \ekdan@type, @@ -643,6 +661,9 @@ \ekd@isinappfalse \ekd@appinappfalse \endgroup} +\NewDocumentCommand{\ekdpage}{}{% + \luadirect{tex.sprint(ekdosis.getekdabspg())}% +} \def\current@ref@arg#1#2{{%\textdir TLT% \unexpanded\expandafter{\ekd@refnumstyle}% \ifnum% @@ -853,6 +874,9 @@ code post = \def\ekdlr@post{#1}, code prewit = \def\ekdlr@prewit{#1}, code postwit = \def\ekdlr@postwit{#1}, + store subsep = \ekdr@subsep, + initial subsep = \ekdsubsep, + bool nosubsep = \ifekdr@nosubsep, store type = \ekdlr@type, bool nordg = \ifekdr@nordg } @@ -990,6 +1014,7 @@ \ekd@isinlemfalse% \subsq@unittrue% } +\newif\ifekd@subsq@rdg \NewDocumentCommand{\rdg}{O{} m}{% \bgroup% \ekvset{rdg}{#1}% @@ -1006,6 +1031,9 @@ \else% \ifbool{al@rlmode}{% \edef\rdg@app{% + \ifekd@subsq@rdg + \unless\ifekdr@nosubsep\unexpanded\expandafter{\ekdr@subsep}\fi + \fi \ifdefined\ekdlr@alt% \ifdefined\ekdlr@post% \space\unexpanded\expandafter{\ekdlr@post}\space\else\fi @@ -1032,6 +1060,9 @@ }% {% \edef\rdg@app{% + \ifekd@subsq@rdg + \unless\ifekdr@nosubsep\unexpanded\expandafter{\ekdr@subsep}\fi + \fi \ifdefined\ekdlr@alt% \ifdefined\ekdlr@pre% \space\unexpanded\expandafter{\ekdlr@pre}\space\else\fi @@ -1062,13 +1093,14 @@ \space\unexpanded\expandafter{\ekdlr@postwit}\else\fi }% }% - \ifekd@mapps% + \ifekd@mapps \append@app[\ekdan@type]{\rdg@app}% - \else% + \else \append@app{\rdg@app}% - \fi% - \fi% - \egroup% + \fi + \fi + \egroup + \ekd@subsq@rdgtrue } \newif\ifekdn@forcenum \ekvdefinekeys{note}{ @@ -1160,7 +1192,9 @@ } \ekvdefinekeys{ekd@note}{ store pre = \pre@value, - store post = \post@value + store post = \post@value, + nmeta sep = {post=\ekdsep}, + nmeta subsep = {pre=\ekdsubsep} } \NewDocumentCommand{\ekd@note}{O{} m}{% \bgroup% @@ -1237,29 +1271,44 @@ initial delend = \ifbool{al@rlmode}{\{}{\}}, initial sicbegin = \dag, initial sicend = \dag, - initial gapmark = *** + initial gapmark = ***, + bool keepinapp = \ifekd@keepinapp } \NewDocumentCommand{\supplied}{m}{% \ifekd@inside@app - #1% + \ifekd@keepinapp + \suppb@value #1\suppe@value + \else + #1% + \fi \else - \suppb@value #1\suppe@value + \suppb@value #1\suppe@value \fi } \NewDocumentCommand{\surplus}{m}{% \ifekd@inside@app - #1% + \ifekd@keepinapp + \delb@value #1\dele@value + \else + #1% + \fi \else - \delb@value #1\dele@value + \delb@value #1\dele@value \fi } \NewDocumentCommand{\sic}{s m}{% \ifekd@inside@app - #2% + \ifekd@keepinapp + \IfBooleanTF{#1} + {\sicb@value #2} + {\sicb@value #2\sice@value}% + \else + #2% + \fi \else - \IfBooleanTF{#1} - {\sicb@value #2} - {\sicb@value #2\sice@value}% + \IfBooleanTF{#1} + {\sicb@value #2} + {\sicb@value #2\sice@value}% \fi } \NewDocumentCommand{\gap}{m}{% @@ -1502,6 +1551,25 @@ \global\ekd@test@vpnumtrue \fi } +\ifboolexpr{bool {@pkg@poetry@verse} or bool {ekd@memoir@loaded}} + {\newcommand{\@vsifplus}[1]{\@ifnextchar +{\@firstoftwo{#1}}} + \renewcommand{\@vscentercr}{% + \ifhmode \unskip\else \@nolnerr\fi + \@vsifgt{\ifnum@brokenline\@vstypelinenum\fi\verselinebreak}{% + \@vsifplus{\ifnum@brokenline\@vstypelinenum\fi\stepcounter{vslineno}% + \par\@ifstar{\nobreak\@vsxcentercr}{% + \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% + }% + }{% + \@vstypelinenum + \incr@vsline% + \par\@ifstar{\nobreak\@vsxcentercr}{% + \@vsifbang{\@ifnextchar[ {\@vsicentercr}{}}{\@vsxcentercr}% + }% + }% + }% + } + }{} \if@pkg@poetry@verse \patchcmd{\start@vsline}{% \ifaltindent}{% @@ -1513,7 +1581,8 @@ code type = \def\type@value{#1}, } \ifekd@memoir@loaded - \linenumberfont{\normalfont\footnotesize} + \def\vlvnumfont{\normalfont\footnotesize} + \def\verselinenumfont#1{\def\vlvnumfont{#1}} \else \verselinenumfont{\normalfont\footnotesize} \fi |