aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ekdosis.dtx220
1 files changed, 80 insertions, 140 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index e0ad014..1a184f7 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -1,5 +1,25 @@
1% \iffalse meta-comment 1% \iffalse meta-comment
2% vim: textwidth=75 2%
3% ekdosis -- Typesetting TEI xml compliant critical editions
4% Copyright (C) 2020 Robert Alessi
5%
6% Please send error reports and suggestions for improvements to Robert
7% Alessi <alessi@robertalessi.net>
8%
9% This program is free software: you can redistribute it and/or modify
10% it under the terms of the GNU General Public License as published by
11% the Free Software Foundation, either version 3 of the License, or
12% (at your option) any later version.
13%
14% This program is distributed in the hope that it will be useful, but
15% WITHOUT ANY WARRANTY; without even the implied warranty of
16% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17% General Public License for more details.
18%
19% You should have received a copy of the GNU General Public License
20% along with this program. If not, see
21% <http://www.gnu.org/licenses/>.
22%
3%<*internal> 23%<*internal>
4\iffalse 24\iffalse
5%</internal> 25%</internal>
@@ -44,93 +64,6 @@ along with this program. If not, see
44%</luapre> 64%</luapre>
45%<*internal> 65%<*internal>
46\fi 66\fi
47\def\nameofplainTeX{plain}
48\ifx\fmtname\nameofplainTeX\else
49 \expandafter\begingroup
50\fi
51%</internal>
52%<*install>
53\input docstrip.tex
54\keepsilent
55\askforoverwritefalse
56\preamble
57-------:| -----------------------------------------------------------------
58ekdosis:| Typesetting TEI xml compliant critical editions
59 Author:| Robert Alessi
60 E-mail:| alessi@robertalessi.net
61License:| Released under the GNU General Public License v3 or later
62 See:| http://www.gnu.org/licenses/
63
64This file is part of the `ekdosis' package
65
66ekdosis -- Typesetting TEI xml compliant critical editions
67Copyright (C) 2020 Robert Alessi
68
69Please send error reports and suggestions for improvements to Robert
70Alessi <alessi@robertalessi.net>
71
72This program is free software: you can redistribute it and/or modify
73it under the terms of the GNU General Public License as published by
74the Free Software Foundation, either version 3 of the License, or
75(at your option) any later version.
76
77This program is distributed in the hope that it will be useful, but
78WITHOUT ANY WARRANTY; without even the implied warranty of
79MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
80General Public License for more details.
81
82You should have received a copy of the GNU General Public License
83along with this program. If not, see
84<http://www.gnu.org/licenses/>.
85
86This work consists of the file ekdosis.dtx and a Makefile.
87Running "make" generates the derived files README, ekdosis.pdf and ekdosis.sty.
88Running "make inst" installs the files in the user's TeX tree.
89Running "make install" installs the files in the local TeX tree.
90\endpreamble
91
92\usedir{tex/lualatex/ekdosis}
93\generate{
94 \file{\jobname.sty}{\from{\jobname.dtx}{package}}
95}
96\nopreamble\nopostamble
97\usedir{tex/lualatex/ekdosis}
98\bgroup
99\catcode9=12
100\generate{
101 \file{\jobname.lua}{
102 \from{\jobname.dtx}{luapre}
103 \from{\jobname.dtx}{lua}
104 }
105}
106\egroup
107\usedir{doc/lualatex/ekdosis}
108\generate{
109 \file{ekdosis-ex.tex}{
110 \from{\jobname.dtx}{examples}
111 }
112}
113\usedir{doc/lualatex/ekdosis}
114\generate{
115 \file{README.txt}{\from{\jobname.dtx}{readme}}
116}
117%</install>
118%<install>\endbatchfile
119%<*internal>
120\usedir{source/lualatex/ekdosis}
121\generate{
122 \file{\jobname.ins}{\from{\jobname.dtx}{install}}
123}
124\nopreamble\nopostamble
125\usedir{doc/lualatex/ekdosis}
126\generate{
127 \file{README.txt}{\from{\jobname.dtx}{readme}}
128}
129\ifx\fmtname\nameofplainTeX
130 \expandafter\endbatchfile
131\else
132 \expandafter\endgroup
133\fi
134%</internal> 67%</internal>
135% \fi 68% \fi
136% 69%
@@ -158,13 +91,19 @@ Running "make install" installs the files in the local TeX tree.
158\usepackage{hologo} 91\usepackage{hologo}
159\usepackage{xcolor} 92\usepackage{xcolor}
160\definecolor{ekdcolor}{RGB}{243,241,235} 93\definecolor{ekdcolor}{RGB}{243,241,235}
161\usepackage{latexcolors} 94\definecolor{cinnamon}{rgb}{0.82, 0.41, 0.12}
162\usepackage{hyperxmp} 95\usepackage{hyperxmp}
163\usepackage{uri} 96\usepackage{xurl}
164\usepackage[numbered]{hypdoc} 97\usepackage[numbered]{hypdoc}
165\hypersetup{unicode=true, colorlinks, allcolors=cinnamon, keeppdfinfo, 98\hypersetup{
166 linktocpage=true, pdfauthor={Robert Alessi}, pdftitle={The ekdosis 99 unicode=true,
167 package}, pdfcontactemail={alessi@robertalessi.net}, 100 colorlinks,
101 allcolors=cinnamon,
102 keeppdfinfo,
103 linktocpage=true,
104 pdfauthor={Robert Alessi},
105 pdftitle={The ekdosis package},
106 pdfcontactemail={alessi@robertalessi.net},
168 pdfcontacturl={http://www.robertalessi.net/ekdosis}, 107 pdfcontacturl={http://www.robertalessi.net/ekdosis},
169 pdfcopyright={Copyright (C) 2018 Robert Alessi 108 pdfcopyright={Copyright (C) 2018 Robert Alessi
170 <alessi@robertalessi.net>. This document is licensed under the 109 <alessi@robertalessi.net>. This document is licensed under the
@@ -173,43 +112,36 @@ Running "make install" installs the files in the local TeX tree.
173 http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to 112 http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to
174 Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.}, 113 Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.},
175 pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode}, 114 pdflicenseurl={https://creativecommons.org/licenses/by-sa/4.0/legalcode},
176 pdfmetalang={en-US}, pdftype={Text}, pdfkeywords={Arabic language, 115 pdfmetalang={en-US},
177 arabtex, luatex}} 116 pdftype={Text},
117 pdfkeywords={Arabic language, arabtex, luatex}}
118\usepackage{uri}
178\usepackage[lot]{multitoc} 119\usepackage[lot]{multitoc}
179\usepackage{ekdosis} 120\usepackage{ekdosis}
180\usepackage{arabluatex} 121\usepackage{arabluatex}
181\usepackage{relsize} 122\usepackage{relsize}
182\usepackage{units} 123\usepackage{units}
183\PassOptionsToPackage{newfloat}{minted}
184\usepackage{tikz} 124\usepackage{tikz}
185\usepackage[breakable, skins, xparse, minted]{tcolorbox} 125\usepackage[breakable, skins, xparse]{tcolorbox}
186\usepackage{minted} 126\usepackage[newfloat]{minted}
187\setminted{bgcolor=ekdcolor,linenos, fontsize=\small} 127\setminted{bgcolor=ekdcolor,linenos, fontsize=\small}
188\newminted[ekdlua]{lua}{ 128\newminted[ekdlua]{lua}{bgcolor={}, linenos, fontsize=\relsize{-0.5},
189 bgcolor={}, 129 xleftmargin=12pt, breaklines, numberblanklines=false, numbersep=3pt,
190 linenos,
191 fontsize=\relsize{-0.5},
192 xleftmargin=12pt,
193 breaklines,
194 numberblanklines=false,
195 numbersep=3pt,
196 firstnumber=last} 130 firstnumber=last}
197\renewcommand{\theFancyVerbLine}{\rmfamily\smaller\arabic{FancyVerbLine}} 131\renewcommand{\theFancyVerbLine}{\rmfamily\smaller\arabic{FancyVerbLine}}
198\usepackage[contents]{colordoc} 132\usepackage[contents]{colordoc}
199\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} 133\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
200%
201\backgroundcolor{c}{ekdcolor} 134\backgroundcolor{c}{ekdcolor}
202\usepackage{caption} 135\usepackage{caption}
203\captionsetup[listing]{position=above,skip=-1ex} 136\captionsetup[listing]{position=above,skip=-1ex}
204\usepackage{needspace} 137\usepackage{needspace}
205\NewDocumentCommand{\captof}{O{listing} m O{}}{% 138\NewDocumentCommand{\captof}{O{listing} m O{}}{%
206 \bgroup 139 \bgroup
207 \needspace{2\baselineskip}% 140 \needspace{5\baselineskip}%
208 \vskip 1ex plus 2pt minus 2pt% 141 \vskip 1ex plus 2pt minus 2pt%
209 \captionof{#1}{#2}% 142 \captionof{#1}{#2}%
210 #3% 143 #3%
211 \egroup} 144 \egroup}
212%
213\usepackage{etoc} 145\usepackage{etoc}
214\etocsettocdepth{paragraph} 146\etocsettocdepth{paragraph}
215\newcommand{\ekdtableofcontents}{% 147\newcommand{\ekdtableofcontents}{%
@@ -270,9 +202,7 @@ Running "make install" installs the files in the local TeX tree.
270% \fileversion\ --- \filedate}} 202% \fileversion\ --- \filedate}}
271% 203%
272% \author{Robert Alessi \\ 204% \author{Robert Alessi \\
273% \href{mailto:alessi@robertalessi.net?Subject=ekdosis package}% 205% \mailto[ekdosis package]{alessi@robertalessi.net}}
274% {\texttt{alessi@robertalessi.net}}}
275%
276% \date{} 206% \date{}
277% 207%
278% \maketitle 208% \maketitle
@@ -282,29 +212,24 @@ Running "make install" installs the files in the local TeX tree.
282% 212%
283%\changes{v1.00}{2020/07/01}{First public release} 213%\changes{v1.00}{2020/07/01}{First public release}
284% 214%
285% \begin{abstract} 215% \begin{abstract}%
286% ==== Put abstract text here. ==== 216% \package{ekdosis} is a Lua\LaTeX{} package designed for
217% multilingual critical editions. It can be used to typeset texts
218% and different layers of critical notes in any direction accepted
219% by Lua\TeX. Texts can be arranged in running paragraphs or on
220% facing pages, in any number of columns which in turn can be
221% synchronized or not. In addition to printed texts,
222% \package{ekdosis} can convert \texttt{.tex} source files so as to
223% produce \texttt{TEI xml} compliant critical
224% editions. Database-driven encoding under \LaTeX{} then allows
225% extraction of texts entered segment by segment according to
226% various criteria: main edited text, variant readings, translations
227% or annotated borrowings between texts. It is published under the
228% terms of the GNU General Public License (GPL) version 3.
287% \end{abstract} 229% \end{abstract}
288% 230%
289% \section{Usage} 231% \section{Introduction}
290% 232% \begin{keyfigure}[H]{c={Grid Typesetting}, t={Each square in the grid
291% ==== Put descriptive text here. ====
292%
293% \DescribeMacro{\dummyMacro}
294% This macro does nothing.\index{doing nothing|usage} It is merely an
295% example. If this were a real macro, you would put a paragraph here
296% describing what the macro is supposed to do, what its mandatory and
297% optional arguments are, and so forth.
298%
299% \DescribeEnv{dummyEnv}
300% This environment does nothing. It is merely an example.
301% If this were a real environment, you would put a paragraph here
302% describing what the environment is supposed to do, what its
303% mandatory and optional arguments are, and so forth.
304%
305% \section{Grid}
306% \begin{keyfigure}[H]{c={Grid
307% typesetting},l={fig:grid-typesetting},t={Each square in the grid
308% has a side length of \unit[10]{pt}. Therefore, the distance 233% has a side length of \unit[10]{pt}. Therefore, the distance
309% between the last line of the text and the first line of the 234% between the last line of the text and the first line of the
310% apparatus is here approximately \unit[25]{pt}.}} 235% apparatus is here approximately \unit[25]{pt}.}}
@@ -323,18 +248,33 @@ Running "make install" installs the files in the local TeX tree.
323% \end{tikzpicture} 248% \end{tikzpicture}
324% \end{keyfigure} 249% \end{keyfigure}
325% 250%
326% %*** 251% \captof{The Peter and John example}
327% \captof{Peter and John example} 252% \iffalse
328% \inputminted[firstline=17,lastline=24]{latex}{ekdosis-ex.tex} 253%<*example>
254% \fi
255\begin{minted}[linenos=false]{latex}
256\begin{ekdosis}
257 I saw my friend
258 \app{
259 \lem{Peter}
260 \rdg{John}
261 }
262 at the station yesterday.
263\end{ekdosis}
264\end{minted}
265% \iffalse
266%</example>
267% \fi
329% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] 268% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
330% \begin{specimen} 269% \begin{specimen}
331% I saw my friend \app{ 270% I saw my friend
332% \lem{Peter} 271% \app{
333% \rdg{John}} 272% \lem{Peter}
273% \rdg{John}
274% }
334% at the station yesterday. 275% at the station yesterday.
335% \end{specimen} 276% \end{specimen}
336% \end{alignment} 277% \end{alignment}
337% \inputminted[firstline=35,lastline=39]{xml}{ekdosis-ex-tei.xml}
338% 278%
339% \section{Implementation} 279% \section{Implementation}
340% 280%