aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2020-07-03 11:00:39 +0200
committerRobert Alessi <alessi@robertalessi.net>2020-07-03 11:00:39 +0200
commit95a106f15151c6f49f23ddab1a23bccca782cbc0 (patch)
tree0bc5e231eb8ea362dc1f97bea0b6a4648c50ad78
parent69ee1f20179ff4f9751e87454723ef5bde4ce11a (diff)
downloadekdosis-95a106f15151c6f49f23ddab1a23bccca782cbc0.tar.gz
done documenting alignment environment
-rw-r--r--ekdosis.dtx177
1 files changed, 175 insertions, 2 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 40ed894..0bccdfe 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -340,6 +340,7 @@ along with this program. If not, see
340\metawritepdfcontact 340\metawritepdfcontact
341\metawritepdfrights 341\metawritepdfrights
342\usepackage{multicol} 342\usepackage{multicol}
343\setlength\IndexMin{100pt}
343\usepackage{tocloft} 344\usepackage{tocloft}
344\newlistof{listing}{lol}{List of listings} 345\newlistof{listing}{lol}{List of listings}
345\renewcommand\cfttocprehook{\begin{multicols}{2}} 346\renewcommand\cfttocprehook{\begin{multicols}{2}}
@@ -375,7 +376,7 @@ along with this program. If not, see
375 ([shift={(-0.5em,0.5ex)}]pic cs:#1) ellipse [x radius=45pt, y 376 ([shift={(-0.5em,0.5ex)}]pic cs:#1) ellipse [x radius=45pt, y
376 radius=6pt];} 377 radius=6pt];}
377\usepackage[breakable, skins, xparse]{tcolorbox} 378\usepackage[breakable, skins, xparse]{tcolorbox}
378\tcbset{colback=white, boxrule=.15mm, colframe=cinnamon, 379\tcbset{colback=white, boxrule=0.4pt, colframe=cinnamon,
379 breakable} 380 breakable}
380\usepackage[newfloat]{minted} 381\usepackage[newfloat]{minted}
381\labelformat{listing}{listing~#1} 382\labelformat{listing}{listing~#1}
@@ -1382,7 +1383,7 @@ yesterday.
1382% 1383%
1383% \paragraph{The \env{alignment} Environment} 1384% \paragraph{The \env{alignment} Environment}
1384% \DescribeEnv{alignment} \cs{begin}|{alignment}|\oarg{options}\dots 1385% \DescribeEnv{alignment} \cs{begin}|{alignment}|\oarg{options}\dots
1385% \cs{end}|{alignment}|\\ 1386% \cs{end}|{alignment}|\dummy\label{ref:alignment-syntax}\\
1386% This environment can be used as it is provided to typeset a standard 1387% This environment can be used as it is provided to typeset a standard
1387% critical edition, namely an edition text, equipped with an apparatus 1388% critical edition, namely an edition text, equipped with an apparatus
1388% criticus and laid out on the left-hand pages, accompanied by a 1389% criticus and laid out on the left-hand pages, accompanied by a
@@ -1573,6 +1574,178 @@ yesterday.
1573%</example> 1574%</example>
1574% \fi 1575% \fi
1575% 1576%
1577% \subsection{Alignment of Several Texts}
1578% \label{sec:multiple-alignment}
1579% As described above \vpageref{ref:alignment-syntax}, the
1580% \env{aligment} environment may receive an optional argument in which
1581% the following \enquote{name$=$value} arguments are accepted:---\\
1582% \DescribeOption{tcols}
1583% |tcols|$=$\meta{number}\hfill\tcboxverb{Default: 2}\\
1584% |tcols| stores the \underLine{t}otal number of
1585% \underLine{col}umn\underLine{s} of text to be aligned.\\
1586% \DescribeOption{lcols}
1587% |lcols|$=$\meta{number}\hfill\tcboxverb{Default: 1}\\
1588% |lcols| stores the number of \underLine{col}umn\underLine{s} to be
1589% printed on the \underLine{l}eft-hand page, \emph{out of the total
1590% number} of columns specified with |tcols|. As can be seen from the
1591% preceding two default values, \env{alignment} initially sets two
1592% columns of text on facing pages. Of course, for this setting to work
1593% properly, one must ensure that the \env{alignment} environment is
1594% started on a
1595% left page.\\
1596% \DescribeOption{texts}
1597% |texts|$=$\meta{\underLine{semicolon}-separated
1598% values}\hfill\tcboxverb{Default: edition;translation}\\
1599% Depending on the total number of columns that has been specified
1600% with |tcols| above, |texts| is then used to define the names of the
1601% environments that shall receive edition texts, translations,
1602% \emph{\&c.} Some very important points need to be emphasized in this
1603% respect:---
1604% \begin{enumerate}
1605% \item Only unaccented letters of the alphabet (whatever the case)
1606% are allowed to compose the names of \LaTeX{} environments.
1607% \item These names must be separated from one another by
1608% \emph{semicolons}, as shown in red in the listing below at the end
1609% of lines~1 and 2.
1610% \begin{enumerate}
1611% \item[\dbend] The colon at the end of line~3 closes the whole
1612% value of |text| and acts as a higher level separator.
1613% \end{enumerate}
1614% \item Each name may be followed by a \enquote*{suboptional} argument
1615% between square brackets which will then be used to insert
1616% \texttt{TEI xml} attributes in the corresponding |<div>|
1617% element. For example,
1618% \iffalse
1619%<*example>
1620% \fi
1621\begin{minted}[escapeinside=++]{latex}
1622texts=latin[xml:lang="la"]+\textcolor{red}{;}+
1623 english[xml:lang="en"]+\textcolor{red}{;}+
1624 french[xml:lang="fr"]+\textcolor{red}{,}+
1625\end{minted}
1626% \iffalse
1627%</example>
1628% \fi
1629% will be converted into \texttt{TEI xml} as follows:---
1630% \iffalse
1631%<*example>
1632% \fi
1633\begin{minted}[linenos=false]{xml}
1634<div xml:id="div-latin_1" xml:lang="la">
1635...
1636</div>
1637<div xml:id="div-english_1" xml:lang="en">
1638...
1639</div>
1640<div xml:id="div-french_1" xml:lang="fr">
1641...
1642</div>
1643\end{minted}
1644% \iffalse
1645%</example>
1646% \fi
1647% \begin{enumerate}
1648% \item[\dbend] As can be seen, \pkg{ekdosis} takes care of
1649% computing and inserting the |xml:id| attributes which are
1650% therefore not accepted in the \enquote*{suboptional} arguments
1651% of |texts|.
1652% \end{enumerate}
1653% \item The names of the environments must be specified in exactly the
1654% same order as they are supposed to appear in the print edition,
1655% from left to right.
1656% \end{enumerate}
1657% \DescribeOption{apparatus}
1658% |apparatus|$=$\meta{\underLine{semicolon}-separated
1659% values}\hfill\tcboxverb{Default: edition}\\
1660% Then, the |apparatus| option, just as |texts|, takes a
1661% \underLine{semicolon}-separated list of previously defined
1662% environments that shall receive at least one layer of apparatus
1663% criticus.\\
1664% \DescribeOption{paired} |paired|$=$\verb+true|false+%
1665% \hfill\tcboxverb{Default: true (initially not set)}\\
1666% This named argument does not need a value as it defaults to |true|
1667% if it is used. By default, \pkg{ekdosis} follows the \LaTeX{} page
1668% numbering scheme when multiple texts are arranged on facing
1669% pages. The |paired| option leaves every right-hand page number
1670% unchanged, so that both facing pages hold the same page number.\\
1671% \DescribeOption{lineation} |lineation|$=$\verb+page|document+
1672% \hfill\tcboxverb{Default: document}\\
1673% This option applies to edition texts initially set to receive an
1674% apparatus criticus. By default, lines are continuously numbered
1675% throughout the document. |lineation=page| sets the numbering to
1676% start afresh at the top of each page.\\
1677% \DescribeOption{flush} |flush|$=$\verb+true|false+
1678% \hfill\tcboxverb{Default: false}\\
1679% This named argument does not need a value as it defaults to |true|
1680% if it is used. This option applies on rare occasions only, when two
1681% or more distinct \env{aligment} environments are started on the same
1682% page. Should this happen, any subsequent \env{alignment} environment
1683% must be set with the |flush| option so that every one of them carry
1684% its own apparatus criticus.
1685%
1686% As an example, the alignment of the Latin edition text of Caesar's
1687% \emph{Gallic War}, printed on left-hand pages, along with two
1688% translations into English and French, printed on right-hand pages,
1689% can be set as follows:---
1690% \iffalse
1691%<*example>
1692% \fi
1693\begin{minted}[linenos=false]{latex}
1694\begin{alignment}[tcols=3,
1695 lcols=1,
1696 texts=latin[xml:lang="la"];
1697 english[xml:lang="en"];
1698 french[xml:lang="fr"],
1699 apparatus=latin,
1700 lineation=page]
1701 \begin{latin}
1702 Gallia est omnis divisa in partes tres quarum unam incolunt
1703 Belgae, [...]
1704 \end{latin}
1705 \begin{english}
1706 All Gaul is divided into three parts, one of which the Belgae
1707 inhabit, [...]
1708 \end{english}
1709 \begin{french}
1710 L'ensemble de la Gaule est divisé en trois parties: l'une est
1711 habitée par les Belges, [...]
1712 \end{french}
1713\end{alignment}
1714\end{minted}
1715% \iffalse
1716%</example>
1717% \fi
1718%
1719% \DescribeMacro{\SetEkdosisAlignment}
1720% \cs{SetEkdosisAlignment}\marg{alignment settings}\\
1721% If the same aligment settings are to be shared by several
1722% \env{alignment} environments, common settings can be collected in
1723% the argument of \cs{SetEkdosisEnvironment}, like
1724% so:---\\
1725% \iffalse
1726%<*example>
1727% \fi
1728\begin{minted}[linenos=false]{latex}
1729\SetEkdosisAlignment{
1730 tcols=3,
1731 lcols=1,
1732 texts=latin[xml:lang="la"];
1733 english[xml:lang="en"];
1734 french[xml:lang="fr"],
1735 apparatus=latin,
1736 lineation=page
1737}
1738\begin{alignment}
1739 ...
1740\end{alignment}
1741\end{minted}
1742% \iffalse
1743%<æxample>
1744% \fi
1745%
1746% \cs{SetEkdosisAlignment} can be used either in the preamble or at
1747% any point of the document to set or to modify alignment settings.
1748%
1576% \section{Multiple-Layer Apparatus Criticus} 1749% \section{Multiple-Layer Apparatus Criticus}
1577% \label{sec:multilayer-apparatus} 1750% \label{sec:multilayer-apparatus}
1578% 1751%