From 38bb13235d051bafc974bb38346e7559e659d359 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 4 Jul 2020 19:58:04 +0200 Subject: still documenting. removed unnecessary \unexpanded from \note@app --- ekdosis.dtx | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 11 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index c9703da..9cfc44f 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -634,6 +634,10 @@ along with this program. If not, see % \pkg{ekdosis} can be seen as an attempt at combining the two % approaches. % +% \subsection{Requirements} +% \label{sec:requirements} +% Please refer to \vref{ref:ekdrequirements}. +% % \subsection{Features} % \label{sec:features} % A list of the main features of \pkg{ekdosis} follows:--- @@ -2300,7 +2304,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ % \StopEventually{} % % \section{Implementation} -% +% \label{sec:implementation} +% % \iffalse %<*package> % \fi @@ -2371,7 +2376,9 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \ExecuteOptionsX{layout,divs} \ProcessOptionsX\relax % \end{macrocode} -% Packages that are required by \pkg{ekdosis}:--- +% \paragraph{Required Packages} \label{ref:ekdrequirements} In +% addition to \pkg{iftex} and \pkg{xkeyval}, a list of the packages +% that are required by \pkg{ekdosis} follows:--- % \begin{macrocode} \RequirePackage{luacode} \RequirePackage{paracol} @@ -2387,7 +2394,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \RequirePackage{parnotes} \fi % \end{macrocode} -% Here begins the real work: load |ekdosis.lua|:--- +% \paragraph{Lua} Here begins the real work: load |ekdosis.lua|:--- % \begin{macrocode} \luadirect{dofile(kpse.find_file("ekdosis.lua"))} % \end{macrocode} @@ -2396,7 +2403,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \luadirect{ekdosis.closestream()} } % \end{macrocode} -% General settings:--- +% Use |\normalfont| for line numbers:--- % \begin{macrocode} \renewcommand\linenumberfont{\normalfont\footnotesize} % \end{macrocode} @@ -2531,20 +2538,40 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ \luadirect{ekdosis.newpatttotag(\luastringN{#1}, \luastringN{#2})} } % \end{macrocode} -% Set |TEI| file name +% \begin{macro}{\SetTEIFilename} \cs{SetTEIFilename}\marg{basename} is +% a preamble-only command. It is used to set the base name of the +% |TEI xml| output file, to which the suffix |.xml| is appended. By +% default, the base name is |\jobname-tei|:--- % \begin{macrocode} \NewDocumentCommand{\SetTEIFileName}{m}{ \luadirect{ekdosis.setteifilename(\luastringN{#1})} } \@onlypreamble\SetTEIFileName +% \end{macrocode} +% \end{macro} +% \begin{macro}{\SetxmlBibResource} This is a preamble-only command. +% If a base name for a \texttt{TEI xml} compliant bibliographical +% database file is provided with +% \cs{SetxmlBibResource}\marg{basename}, \pkg{ekdosis} will use +% insert formatted data in the back matter section of its own +% \texttt{TEI xml} output file, as || elements within a +% || section. +% \begin{macrocode} \NewDocumentCommand{\SetxmlBibResource}{m}{ \luadirect{ekdosis.setxmlbibresource(\luastringN{#1})} } \@onlypreamble\SetxmlBibResource % \end{macrocode} -% Multi-layer apparatuses +% \end{macro} +% +%\paragraph{Multi-layer apparatuses} +% \pkg{ekdosis} must know is an entry is to be processed in a single- +% or multiple-layer context:--- % \begin{macrocode} \newif\ifekd@mapps +% \end{macrocode} +% Now the key-value options can be defined:--- +% \begin{macrocode} \ekvdefinekeys{ekd@newapp}{ choice direction = {LR = \def\direction@val{LR}, RL = \def\direction@val{RL}}, @@ -2556,6 +2583,17 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ initial direction = LR, initial ehook = {\csname ekd@end@apparatus\endcsname} } +% \end{macrocode} +% \begin{macro}{\DeclareApparatus} +% \cs{DeclareApparatus}\marg{apparatus name}\oarg{options} is a +% preamble-only command. As a mandatory argument, it takes the name of +% the new layer of notes to be inserted in the apparatus block. Then, +% the following six key-value options can be used to lay out the +% layer: \verb+direction=LR|RL+, |rule|, |delim| (the delimiter between +% entries), |sep| (the separator between lemma part and readings or +% notes), |bhook| (\LaTeX{} code inserted as the layer begins), +% |ehook| (\LaTeX{} code inserted as the layer ends):--- +% \begin{macrocode} \NewDocumentCommand{\DeclareApparatus}{m O{}}{ \newbool{subsq@unit@#1} \booltrue{subsq@unit@#1} @@ -2575,6 +2613,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ } \@onlypreamble\DeclareApparatus % \end{macrocode} +% \end{macro} % \begin{macrocode} \newbool{do@app} \newif\ifekd@state @@ -3114,12 +3153,12 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ } \NewDocumentCommand{\note@app}{s O{} +m}{% \ifbool{al@rlmode}{% - \IfBooleanTF{#1}{\ekd@note@star[#2]{\unexpanded{% - {\textdir TRT#3}}}} - {\ekd@note[#2]{\unexpanded{{\textdir TRT#3}}}}% + \IfBooleanTF{#1}{\ekd@note@star[#2]{% + {\textdir TRT#3}}} + {\ekd@note[#2]{{\textdir TRT#3}}}% }{% - \IfBooleanTF{#1}{\ekd@note@star[#2]{\unexpanded{#3}}} - {\ekd@note[#2]{\unexpanded{#3}}}% + \IfBooleanTF{#1}{\ekd@note@star[#2]{#3}} + {\ekd@note[#2]{#3}}% }% } \NewDocumentCommand{\note}{s O{} +m}{% -- cgit v1.2.3