aboutsummaryrefslogtreecommitdiff
path: root/ekdosis.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r--ekdosis.dtx70
1 files changed, 56 insertions, 14 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index f8c2dc8..1908456 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -1,6 +1,6 @@
1% \iffalse meta-comment 1% \iffalse meta-comment
2% 2%
3% ekdosis -- Typesetting TEI xml compliant critical editions 3% ekdosis -- Typesetting TEI xml-compliant critical editions
4% Copyright (C) 2020 Robert Alessi 4% Copyright (C) 2020 Robert Alessi
5% 5%
6% Please send error reports and suggestions for improvements to Robert 6% Please send error reports and suggestions for improvements to Robert
@@ -27,7 +27,7 @@
27--[[ 27--[[
28This file is part of the `ekdosis' package 28This file is part of the `ekdosis' package
29 29
30ekdosis -- Typesetting TEI xml compliant critical editions 30ekdosis -- Typesetting TEI xml-compliant critical editions
31Copyright (C) 2020 Robert Alessi 31Copyright (C) 2020 Robert Alessi
32 32
33Please send error reports and suggestions for improvements to Robert 33Please send error reports and suggestions for improvements to Robert
@@ -61,7 +61,7 @@ along with this program. If not, see
61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] 61%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
62%<package>\ProvidesPackage{ekdosis} 62%<package>\ProvidesPackage{ekdosis}
63%<*package> 63%<*package>
64 [2020/10/14 v1.1-dev Typesetting TEI xml compliant critical editions] 64 [2020/10/14 v1.1-dev Typesetting TEI xml-compliant critical editions]
65%</package> 65%</package>
66%<*driver> 66%<*driver>
67\begin{filecontents}[noheader,overwrite]{bibdata.xml} 67\begin{filecontents}[noheader,overwrite]{bibdata.xml}
@@ -110,7 +110,7 @@ along with this program. If not, see
110@Article{Alessi2020, 110@Article{Alessi2020,
111 author = {Alessi, Robert}, 111 author = {Alessi, Robert},
112 title = {ekdosis: Using Lua\LaTeX{} for Producing \texttt{TEI 112 title = {ekdosis: Using Lua\LaTeX{} for Producing \texttt{TEI
113 xml} Compliant Critical Editions and Highlighting 113 xml}-Compliant Critical Editions and Highlighting
114 Parallel Writings}, 114 Parallel Writings},
115 journaltitle = {Journal of Data Mining and Digital Humanities}, 115 journaltitle = {Journal of Data Mining and Digital Humanities},
116 date = 2020, 116 date = 2020,
@@ -478,9 +478,9 @@ along with this program. If not, see
478\metaset{title}{ἔκδοσις} 478\metaset{title}{ἔκδοσις}
479\metaset{date}{\filedate} 479\metaset{date}{\filedate}
480\metaset{draft}{\fileversion} 480\metaset{draft}{\fileversion}
481\metaset{subject}{TEI xml compliant critical editions} 481\metaset{subject}{TEI xml-compliant critical editions}
482\metaset{subtitle}{Typesetting TEI xml Compliant Critical Editions} 482\metaset{subtitle}{Typesetting TEI xml-Compliant Critical Editions}
483\metaset[print]{subtitle}{Typesetting \texttt{TEI xml} Compliant 483\metaset[print]{subtitle}{Typesetting \texttt{TEI xml}-Compliant
484 Critical Editions} 484 Critical Editions}
485\metaset{author}{Robert Alessi} 485\metaset{author}{Robert Alessi}
486\metaset{keywords}{LaTeX, Lua, TEI xml, multilingual critical 486\metaset{keywords}{LaTeX, Lua, TEI xml, multilingual critical
@@ -659,7 +659,7 @@ along with this program. If not, see
659% facing pages, in any number of columns which in turn can be 659% facing pages, in any number of columns which in turn can be
660% synchronized or not. In addition to printed texts, 660% synchronized or not. In addition to printed texts,
661% \pkg{ekdosis} can convert \texttt{.tex} source files so as to 661% \pkg{ekdosis} can convert \texttt{.tex} source files so as to
662% produce \texttt{TEI xml} compliant critical 662% produce \texttt{TEI xml}-compliant critical
663% editions. Database-driven encoding under \LaTeX{} then allows 663% editions. Database-driven encoding under \LaTeX{} then allows
664% extraction of texts entered segment by segment according to 664% extraction of texts entered segment by segment according to
665% various criteria: main edited text, variant readings, translations 665% various criteria: main edited text, variant readings, translations
@@ -1209,8 +1209,8 @@ along with this program. If not, see
1209% \item The rendition to be used in the printed apparatus criticus. 1209% \item The rendition to be used in the printed apparatus criticus.
1210% \end{enumerate} 1210% \end{enumerate}
1211% 1211%
1212% \danger As \pkg{ekdosis} can include and use \texttt{TEI xml} 1212% \danger As \pkg{ekdosis} can include and use \texttt{TEI
1213% compliant lists of references,\footnote{See below 1213% xml}-compliant lists of references,\footnote{See below
1214% \vref{sec:references-cited-works}.} it is advisable to use 1214% \vref{sec:references-cited-works}.} it is advisable to use
1215% Bib\hologo{(La)TeX} labels in the first argument of 1215% Bib\hologo{(La)TeX} labels in the first argument of
1216% \cs{DeclareSource}. Otherwise, the unique label used to declare the 1216% \cs{DeclareSource}. Otherwise, the unique label used to declare the
@@ -4297,6 +4297,47 @@ subtype="arabtex">'inna 'abI kAna mina
4297% must be used even if only one layer of critical notes is needed. 4297% must be used even if only one layer of critical notes is needed.
4298% \end{remarks} 4298% \end{remarks}
4299% 4299%
4300% \paragraph{Backup of Essential Files}
4301% Each time the |.tex| source file is compiled, \pkg{ekdosis} reads
4302% the |.aux| corresponding \LaTeX\ auxiliary file and its own |.ekd|
4303% auxiliary file so as to process labels and collect entries of the
4304% apparatus criticus. If for whatever reason\---e.g.\ some unknown
4305% command has been inserted\---the compilation freezes and so must be
4306% aborted, it may happen that most of the edition text has to be
4307% reconstructed page after page. For large and complex editions, this
4308% makes advisable to have current versions of those files backed up
4309% each time a new compilation begins, which can be achieved by
4310% inserting the following lines before the line that loads the
4311% document class:---
4312%
4313% \iffalse
4314%<*example>
4315% \fi
4316\begin{minted}[linenos=false]{latex}
4317\RequirePackage{verbatimcopy}
4318\IfFileExists{\jobname.aux}{%
4319 \OldVerbatimCopy{\jobname.aux}{\jobname.aux.bak}}{}
4320\IfFileExists{\jobname.ekd}{%
4321 \OldVerbatimCopy{\jobname.ekd}{\jobname.ekd.bak}}{}
4322\documentclass{book}
4323\end{minted}
4324% \iffalse
4325%</example>
4326% \fi
4327%
4328% This way, both |.aux| and |.ekd| files can be recovered from
4329% |.aux.bak| and |.ekd.bak| just after the compilation has been
4330% aborted. Should this be needed, one must proceed carefully as
4331% follows:---
4332% \begin{enumerate}
4333% \item Just after the compilation has been aborted, move both
4334% |aux.bak| and |ekd.bak| files to a safe place.
4335% \item Remove or correct the offending command or lines that broke
4336% the compilation and make sure that the issue is solved.
4337% \item Restore the |.aux| and |.ekd| files from |aux.bak| and
4338% |.ekd.bak| and resume work where it was left off.
4339% \end{enumerate}
4340%
4300% \section{\texttt{TEI xml} Output} 4341% \section{\texttt{TEI xml} Output}
4301% \label{sec:teixml-output} 4342% \label{sec:teixml-output}
4302% Several examples of \texttt{TEI xml} output have been provided 4343% Several examples of \texttt{TEI xml} output have been provided
@@ -4359,7 +4400,7 @@ subtype="arabtex">'inna 'abI kAna mina
4359% The \texttt{TEI} validator is here: 4400% The \texttt{TEI} validator is here:
4360% \url{http://teibyexample.com/xquery/TBEvalidator.xq}.} As for 4401% \url{http://teibyexample.com/xquery/TBEvalidator.xq}.} As for
4361% \pkg{ekdosis}, it is designed to produce on request, in addition to 4402% \pkg{ekdosis}, it is designed to produce on request, in addition to
4362% an edition in print, a \texttt{TEI xml} compliant output file. That 4403% an edition in print, a \texttt{TEI xml}-compliant output file. That
4363% said, one must keep in mind that the \LaTeX\ packages that are part 4404% said, one must keep in mind that the \LaTeX\ packages that are part
4364% of {\TeX}Live can be counted in thousands, and the commands they 4405% of {\TeX}Live can be counted in thousands, and the commands they
4365% provide in tens of thousands. There may even be grounds in asserting 4406% provide in tens of thousands. There may even be grounds in asserting
@@ -4923,7 +4964,7 @@ Sample text with a \textcolor{red}{word} in red.
4923% \DescribeMacro{\AddxmlBibResource} 4964% \DescribeMacro{\AddxmlBibResource}
4924% \cs{AddxmlBibResource}\marg{basename or name.xml} is a preamble-only 4965% \cs{AddxmlBibResource}\marg{basename or name.xml} is a preamble-only
4925% command. If a base name (either suffixed with |.xml| or not) for a 4966% command. If a base name (either suffixed with |.xml| or not) for a
4926% \texttt{TEI xml} compliant bibliographical database be provided, 4967% \texttt{TEI xml}-compliant bibliographical database be provided,
4927% \pkg{ekdosis} will use it and insert formatted data in the back 4968% \pkg{ekdosis} will use it and insert formatted data in the back
4928% matter section of its own \texttt{TEI xml} output file, as 4969% matter section of its own \texttt{TEI xml} output file, as
4929% |<biblStruct>| elements within a |listBibl| section. 4970% |<biblStruct>| elements within a |listBibl| section.
@@ -5127,7 +5168,7 @@ Sample text with a \textcolor{red}{word} in red.
5127% Of course, for this mechanism to work, Bib\TeX\ or Bib\LaTeX\ must 5168% Of course, for this mechanism to work, Bib\TeX\ or Bib\LaTeX\ must
5128% be used and connected to some |.bib| bibliographical database 5169% be used and connected to some |.bib| bibliographical database
5129% file. Additionally, this |.bib| file must have been converted into a 5170% file. Additionally, this |.bib| file must have been converted into a
5130% \texttt{TEI xml} compliant file where all the Bib\hologo{(La)TeX} 5171% \texttt{TEI xml}-compliant file where all the Bib\hologo{(La)TeX}
5131% entries that are used in the document are found within 5172% entries that are used in the document are found within
5132% |<biblStruct>| elements.\footnote{See above n.~\vref{fn:zotero} for 5173% |<biblStruct>| elements.\footnote{See above n.~\vref{fn:zotero} for
5133% information on how to do this.} Finally, this |.xml| bibliographical 5174% information on how to do this.} Finally, this |.xml| bibliographical
@@ -6261,6 +6302,7 @@ Sample text with a \textcolor{red}{word} in red.
6261% \end{macro} 6302% \end{macro}
6262% \end{macro} 6303% \end{macro}
6263% \begin{macro}{\TeXtoTEIPat} 6304% \begin{macro}{\TeXtoTEIPat}
6305% \changes{v1.1}{2020/10/16}{renamed, formerly \cs{TeXtoTEIPatt}}
6264% Finally, the more flexible\---and more delicate to 6306% Finally, the more flexible\---and more delicate to
6265% handle\---\cs{TeXtoTEIPat}\marg{\TeX\ 6307% handle\---\cs{TeXtoTEIPat}\marg{\TeX\
6266% pattern}\allowbreak\marg{\texttt{TEI} pattern} uses pattern matching 6308% pattern}\allowbreak\marg{\texttt{TEI} pattern} uses pattern matching
@@ -6285,7 +6327,7 @@ Sample text with a \textcolor{red}{word} in red.
6285% \end{macro} 6327% \end{macro}
6286% \begin{macro}{\AddxmlBibResource} This is a preamble-only command. 6328% \begin{macro}{\AddxmlBibResource} This is a preamble-only command.
6287% If a base name (either suffixed with |.xml| or not) for a 6329% If a base name (either suffixed with |.xml| or not) for a
6288% \texttt{TEI xml} compliant bibliographical database file be 6330% \texttt{TEI xml}-compliant bibliographical database file be
6289% provided with \cs{AddxmlBibResource}\marg{basename or name.xml}, 6331% provided with \cs{AddxmlBibResource}\marg{basename or name.xml},
6290% \pkg{ekdosis} will use it and insert formatted data in the back 6332% \pkg{ekdosis} will use it and insert formatted data in the back
6291% matter section of its own \texttt{TEI xml} output file, as 6333% matter section of its own \texttt{TEI xml} output file, as