From f5620b99c9e1bbd4f24146b73d5f4d71dd0a3152 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Thu, 28 Apr 2022 15:35:23 +0200 Subject: =?UTF-8?q?new=20commands=20for=20=E2=80=9Cmirrored=E2=80=9D=20pai?= =?UTF-8?q?red=20facing=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ekdosis.dtx | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- ekdosis.el | 5 +- 2 files changed, 153 insertions(+), 9 deletions(-) diff --git a/ekdosis.dtx b/ekdosis.dtx index 5faf7fa..e7594ac 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx @@ -61,7 +61,7 @@ along with this program. If not, see %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{ekdosis} %<*package> - [2022/04/20 v1.5-dev Typesetting TEI xml-compliant critical editions] + [2022/04/28 v1.5-dev Typesetting TEI xml-compliant critical editions] % %<*driver> \begin{filecontents}[noheader,overwrite]{bibdata.xml} @@ -605,9 +605,11 @@ along with this program. If not, see %^^A dox does not work with the latest latex-dev: \ifdefined\SpecialMacroIndex \NewDocElement{Option}{option} + \NewDocElement[printtype=\textit{cnt.}]{Counter}{counter} \else \usepackage{dox} \doxitem{Option}{option}{options} + \doxitem{Counter}{counter}{counter} \fi \usepackage{fontspec} \defaultfontfeatures{Renderer=Harfbuzz} @@ -3330,7 +3332,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+ % pages. The |paired| option leaves every right-hand page number % unchanged, so that both facing pages hold the same page % number.\footnote{For setting headers and footers in this arrangement -% of text, see \vpageref{sec:header-paired-pages}.}\\ +% of text, but also for the current limitations attached to this +% option, see \vpageref{sec:header-paired-pages}.}\\ % \DescribeOption{lineation} |lineation|$=$\verb+page|document+ % \hfill\tcboxverb{Default: document}\\ % This option applies to edition texts initially set to receive an @@ -5951,6 +5954,99 @@ subtype="arabtex">'inna 'abI kAna mina % % \fi % +% \paragraph{\enquote{Mirrored} paired facing pages} +% \newfeature[v1.5] The \textooquote|paired|\textcoquote\ option just +% described can give surprising results at first sight, in which +% facing pages are arranged by succeeding pairs of left- or right-hand +% pages. This is certainly not the desired layout for duplex +% printing. However, this is not a redhibitory inconvenience for +% professional printers can easily carry out the necessary corrections +% by applying offsets to the horizontal margins. That being said, one +% may also wish to have these horizontal offsets applied from the +% outset in the PDF output that is produced by \LaTeX. +% +% \danger What follows assumes that the critical edition is printed on +% facing pages and starts on a left-hand page. Furthermore, it must be +% noted that the |paired| option must be either unset or set to +% |false|. +% +% \DescribeMacro{\setpairedpage} \cs{setpairedpage} is provided to set +% mirrored paired facing pages. This command takes no argument and is +% meant to be issued in commands used to set headers and footers on +% both sides, \emph{before} \cs{thepage} is called, like so:--- +% +% \iffalse +%<*example> +% \fi +\begin{minted}[linenos=false,highlightlines={4,9}]{latex} +% Preamble: +\usepackage{titleps} +\newpagestyle{edition}{ + \sethead[\setpairedpage\ekdprintmark{HEL}{\thepage}] + [\ekdprintmark{HEC}{Hippocratis}] + [] + {} + {\ekdprintmark{HOC}{Epidemiarum liber II, \ekdmark}} + {\setpairedpage\ekdprintmark{HOR}{\thepage}} +} +% Apply the page style: +\pagestyle{edition} +\end{minted} +% \iffalse +% +% \fi +% +% \begin{remarks} +% \item As can be seen, \cs{setpairedpage} must be issued +% \emph{before} \cs{ekdprintmark} so that it can be processed on +% pages where headers and footers are removed by \cs{ekdnohfmarks} +% described below. +% \item If there be no \cs{thepage} in headers or footers, +% \cs{setpairedpage} must still be issued once on each side. +% \end{remarks} +% +% \DescribeMacro{\setpairedpagenum} \cs{setpairedpagenum}\marg{number} +% can be used just ahead of the alignment environment to set the +% number of the first left-hand paired page to follow. The first +% paired page number is initially set to |1|. +% +% \DescribeMacro{\resetpagenumber} Finally, \cs{resetpagenumber} +% \emph{must} be used right out of the alignment environment so that +% any numbering error on the page that follows the edition text can be +% corrected. See below \vref{lst:mirrored-fp}, +% l.~\lnref{ln:mirrored:fp:resetpn}. +% +% A schematic illustration of this technique follows:--- +% +% \captof{\enquote{Mirrored} paired facing +% pages}[\label{lst:mirrored-fp}] +% \iffalse +%<*example> +% \fi +\begin{minted}[escapeinside=++,highlightlines={16}]{latex} +\mainmatter +\part{Edition text} +\cleartoevenpage % this needs the 'nextpage' package. +\pagestyle{edition} % apply the style where 'mirrored' paired facing + % pages are defined as illustrated above. +\begin{alignment} + \begin{edition} + ... + \end{edition} + \begin{translation} + ... + \end{translation} +\end{alignment} +\backmatter % or \cleartooddpage provided by the 'nextpage' + % package. +\resetpagenumber % this command is always required.+\label{ln:mirrored:fp:resetpn}+ +\pagestyle{back} % apply a new page style. +\end{minted} +% \iffalse +% +% \fi +% +% \paragraph{Removing or Resetting Headers and Footers} % \DescribeMacro{\ekdnohfmarks} Once all signposts are marked with % \cs{ekdprintmark}, \cs{ekdnohfmarks} can be used at any point of the % document with the same effect as the \LaTeX\ standard command @@ -8110,7 +8206,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macrocode} % \paragraph{\textsf{ekdosis} Symbol} % \begin{macro}{\eKd} -% \changes{v1.5}{2022/04/20}{Prints \textsf{ekdosis} indentifying +% \changes{v1.5}{2022/04/28}{Prints \textsf{ekdosis} indentifying % symbol} As of v1.5, \pkg{ekdosis} has its own identifying % symbol. It is produced by \cs{eKd} and best printed with the Old % Standard Greek font. @@ -8371,7 +8467,7 @@ Sample text with a \textcolor{red}{word} in red. % \begin{macro}{\teidirectE} % \changes{v1.3}{2021/08/18}{direct insertion of elements in the % \texttt{TEI xml} file} -% \changes{v1.5}{2022/04/20}{direct insertion of empty elements in the +% \changes{v1.5}{2022/04/28}{direct insertion of empty elements in the % \texttt{TEI xml} file} % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} % does nothing in \LaTeX. It is only used to insert elements in the @@ -8386,7 +8482,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macro} % \end{macro} % \begin{macro}{\getTEIxmlid} -% \changes{v1.5}{2022/04/20}{returns \texttt{TEI xml:ids} from a +% \changes{v1.5}{2022/04/28}{returns \texttt{TEI xml:ids} from a % csv-list of ids} This command returns from a csv-list of unique % identifiers declared in commands such as \cs{DeclareWitness} and the % like a space-separated list of their corresponding |xml:id|s, each @@ -8621,7 +8717,7 @@ Sample text with a \textcolor{red}{word} in red. } \protected\def\LRnum#1{\bgroup\textdir TLT#1\egroup} % \end{macrocode} -% Set counter referring to line numbers and make it global. +% Set a counter referring to line numbers and make it global. % \begin{macrocode} \newcounter{ekd@lab} \globalcounter{ekd@lab} @@ -9962,7 +10058,7 @@ Sample text with a \textcolor{red}{word} in red. % \end{macro} % \paragraph{Lacunae} % \begin{macro}{\ilabel} -% \changes{v1.5}{2022/04/20}{recalls and sets the ending label of +% \changes{v1.5}{2022/04/28}{recalls and sets the ending label of % lemmas used to mark lacunae in witnesses} When \cs{lem} has been % used with the optional argument |ilabel=