diff options
author | Robert Alessi <alessi@robertalessi.net> | 2022-05-05 17:15:42 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2022-05-05 17:15:42 +0200 |
commit | 9f094069a9990b07fb61076bd1d6498dba08dd7e (patch) | |
tree | f5fa421f52cc54f9ec85be5fb870ce06d2442ea6 | |
parent | 8b6d5fdd702cf56fff1726738021326f2833ba55 (diff) | |
download | ekdosis-9f094069a9990b07fb61076bd1d6498dba08dd7e.tar.gz |
more detailed documentation about \setpairedpage
-rw-r--r-- | ekdosis.dtx | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index f9c3584..77bc273 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -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 | [2022/05/01 v1.5-dev Typesetting TEI xml-compliant critical editions] | 64 | [2022/05/04 v1.5-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} |
@@ -5983,21 +5983,23 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5983 | % \DescribeMacro{\setpairedpage} \cs{setpairedpage} is provided to set | 5983 | % \DescribeMacro{\setpairedpage} \cs{setpairedpage} is provided to set |
5984 | % mirrored paired facing pages. This command takes no argument and is | 5984 | % mirrored paired facing pages. This command takes no argument and is |
5985 | % meant to be issued in commands used to set headers and footers on | 5985 | % meant to be issued in commands used to set headers and footers on |
5986 | % both sides, \emph{before} \cs{thepage} is called, like so:--- | 5986 | % both sides, \emph{before any call} of the commands \cs{thepage} or |
5987 | % \cs{ekdmark}, like so:--- | ||
5987 | % | 5988 | % |
5988 | % \iffalse | 5989 | % \iffalse |
5989 | %<*example> | 5990 | %<*example> |
5990 | % \fi | 5991 | % \fi |
5991 | \begin{minted}[linenos=false,highlightlines={4,9}]{latex} | 5992 | \begin{minted}[linenos,highlightlines={4,8-10}, escapeinside=++]{latex} |
5992 | % Preamble: | 5993 | % Preamble: |
5993 | \usepackage{titleps} | 5994 | \usepackage{titleps} |
5994 | \newpagestyle{edition}{ | 5995 | \newpagestyle{edition}{ |
5995 | \sethead[\setpairedpage\ekdprintmark{HEL}{\thepage}] | 5996 | \sethead[\setpairedpage\ekdprintmark{HEL}{\thepage}]+\label{ln:ekdpp:i}+ |
5996 | [\ekdprintmark{HEC}{Hippocratis}] | 5997 | [\ekdprintmark{HEC}{Hippocratis}] |
5997 | [] | 5998 | [] |
5998 | {} | 5999 | {} |
5999 | {\ekdprintmark{HOC}{Epidemiarum liber II, \ekdmark}} | 6000 | {\setpairedpage\ekdprintmark{HOC}{Epidemiarum liber II,\+\label{ln:ekdpp:ii}+ |
6000 | {\setpairedpage\ekdprintmark{HOR}{\thepage}} | 6001 | \ekdmark}} |
6002 | {\ekdprintmark{HOR}{\thepage}}\+\label{ln:ekdpp:iii}+ | ||
6001 | } | 6003 | } |
6002 | % Apply the page style: | 6004 | % Apply the page style: |
6003 | \pagestyle{edition} | 6005 | \pagestyle{edition} |
@@ -6007,10 +6009,14 @@ subtype="arabtex">'inna 'abI kAna mina | |||
6007 | % \fi | 6009 | % \fi |
6008 | % | 6010 | % |
6009 | % \begin{remarks} | 6011 | % \begin{remarks} |
6010 | % \item As can be seen, \cs{setpairedpage} must be issued | 6012 | % \item As can be seen from ll.~\lnref{ln:ekdpp:i} and |
6013 | % \lnref{ln:ekdpp:ii}, \cs{setpairedpage} must be issued | ||
6011 | % \emph{before} \cs{ekdprintmark} so that it can be processed on | 6014 | % \emph{before} \cs{ekdprintmark} so that it can be processed on |
6012 | % pages where headers and footers are removed by \cs{ekdnohfmarks} | 6015 | % pages where headers and footers are removed by \cs{ekdnohfmarks} |
6013 | % described below. | 6016 | % described below. |
6017 | % \item Additionally, ll.~\lnref{ln:ekdpp:ii}--\lnref{ln:ekdpp:iii} | ||
6018 | % show that \cs{setpairedpage} precedes both \cs{ekdprintmark} and | ||
6019 | % \cs{thepage}. | ||
6014 | % \item If there be no \cs{thepage} in headers or footers, | 6020 | % \item If there be no \cs{thepage} in headers or footers, |
6015 | % \cs{setpairedpage} must still be issued once on each side. | 6021 | % \cs{setpairedpage} must still be issued once on each side. |
6016 | % \end{remarks} | 6022 | % \end{remarks} |
@@ -8220,7 +8226,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8220 | % \end{macrocode} | 8226 | % \end{macrocode} |
8221 | % \paragraph{\textsf{ekdosis} Symbol} | 8227 | % \paragraph{\textsf{ekdosis} Symbol} |
8222 | % \begin{macro}{\eKd} | 8228 | % \begin{macro}{\eKd} |
8223 | % \changes{v1.5}{2022/05/01}{Prints \textsf{ekdosis} indentifying | 8229 | % \changes{v1.5}{2022/05/04}{Prints \textsf{ekdosis} indentifying |
8224 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying | 8230 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying |
8225 | % symbol. It is produced by \cs{eKd} and best printed with the Old | 8231 | % symbol. It is produced by \cs{eKd} and best printed with the Old |
8226 | % Standard Greek font. | 8232 | % Standard Greek font. |
@@ -8481,7 +8487,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8481 | % \begin{macro}{\teidirectE} | 8487 | % \begin{macro}{\teidirectE} |
8482 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the | 8488 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the |
8483 | % \texttt{TEI xml} file} | 8489 | % \texttt{TEI xml} file} |
8484 | % \changes{v1.5}{2022/05/01}{direct insertion of empty elements in the | 8490 | % \changes{v1.5}{2022/05/04}{direct insertion of empty elements in the |
8485 | % \texttt{TEI xml} file} | 8491 | % \texttt{TEI xml} file} |
8486 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} | 8492 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} |
8487 | % does nothing in \LaTeX. It is only used to insert elements in the | 8493 | % does nothing in \LaTeX. It is only used to insert elements in the |
@@ -8496,7 +8502,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8496 | % \end{macro} | 8502 | % \end{macro} |
8497 | % \end{macro} | 8503 | % \end{macro} |
8498 | % \begin{macro}{\getTEIxmlid} | 8504 | % \begin{macro}{\getTEIxmlid} |
8499 | % \changes{v1.5}{2022/05/01}{returns \texttt{TEI xml:ids} from a | 8505 | % \changes{v1.5}{2022/05/04}{returns \texttt{TEI xml:ids} from a |
8500 | % csv-list of ids} This command returns from a csv-list of unique | 8506 | % csv-list of ids} This command returns from a csv-list of unique |
8501 | % identifiers declared in commands such as \cs{DeclareWitness} and the | 8507 | % identifiers declared in commands such as \cs{DeclareWitness} and the |
8502 | % like a space-separated list of their corresponding |xml:id|s, each | 8508 | % like a space-separated list of their corresponding |xml:id|s, each |
@@ -10072,7 +10078,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10072 | % \end{macro} | 10078 | % \end{macro} |
10073 | % \paragraph{Lacunae} | 10079 | % \paragraph{Lacunae} |
10074 | % \begin{macro}{\ilabel} | 10080 | % \begin{macro}{\ilabel} |
10075 | % \changes{v1.5}{2022/05/01}{recalls and sets the ending label of | 10081 | % \changes{v1.5}{2022/05/04}{recalls and sets the ending label of |
10076 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been | 10082 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been |
10077 | % used with the optional argument |ilabel=<label>|, | 10083 | % used with the optional argument |ilabel=<label>|, |
10078 | % \cs{ilabel}\marg{label} must be used to mark the point where the | 10084 | % \cs{ilabel}\marg{label} must be used to mark the point where the |
@@ -10387,7 +10393,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10387 | % \end{macrocode} | 10393 | % \end{macrocode} |
10388 | % \end{macro} | 10394 | % \end{macro} |
10389 | % \begin{macro}{\ekdEOprint} | 10395 | % \begin{macro}{\ekdEOprint} |
10390 | % \changes{v1.5}{2022/05/01}{Sets headers and footers on | 10396 | % \changes{v1.5}{2022/05/04}{Sets headers and footers on |
10391 | % \enquote{paired} facing pages} | 10397 | % \enquote{paired} facing pages} |
10392 | % To set headers and footers on \enquote{paired} facing pages, | 10398 | % To set headers and footers on \enquote{paired} facing pages, |
10393 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like | 10399 | % \cs{ekdEOprint} accepts two mandatory, self-evident arguments, like |
@@ -10427,7 +10433,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10427 | % counter to set the value of the page numbers. This counter should be | 10433 | % counter to set the value of the page numbers. This counter should be |
10428 | % incremented every two pages. | 10434 | % incremented every two pages. |
10429 | % \begin{counter}{pairedpage} | 10435 | % \begin{counter}{pairedpage} |
10430 | % \changes{v1.5}{2022/05/01}{A counter incremented every two pages} | 10436 | % \changes{v1.5}{2022/05/04}{A counter incremented every two pages} |
10431 | % |pairedpage| is first set as a global counter:--- | 10437 | % |pairedpage| is first set as a global counter:--- |
10432 | % \begin{macrocode} | 10438 | % \begin{macrocode} |
10433 | \newcounter{pairedpage} | 10439 | \newcounter{pairedpage} |
@@ -10435,19 +10441,19 @@ Sample text with a \textcolor{red}{word} in red. | |||
10435 | % \end{macrocode} | 10441 | % \end{macrocode} |
10436 | % \end{counter} | 10442 | % \end{counter} |
10437 | % \begin{macro}{\setpairedpagenum} | 10443 | % \begin{macro}{\setpairedpagenum} |
10438 | % \changes{v1.5}{2022/05/01}{sets the same page number on paired | 10444 | % \changes{v1.5}{2022/05/04}{sets the same page number on paired |
10439 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of | 10445 | % pages} \cs{setpairedpagenum}\marg{number} is used just ahead of |
10440 | % the alignment environment to set the number of the first left-hand | 10446 | % the alignment environment to set the number of the first left-hand |
10441 | % paired page. | 10447 | % paired page. |
10442 | % \begin{macro}{\setpairedpage} | 10448 | % \begin{macro}{\setpairedpage} |
10443 | % \changes{v1.5}{2022/05/01}{sets the page number of the first paired | 10449 | % \changes{v1.5}{2022/05/04}{sets the page number of the first paired |
10444 | % page} \cs{setpairedpage} is an argument-less command meant to be | 10450 | % page} \cs{setpairedpage} is an argument-less command meant to be |
10445 | % issued in commands used to set headers or footers before | 10451 | % issued in commands used to set headers or footers before |
10446 | % \cs{thepage}. This command has the counter |pairedpage| | 10452 | % \cs{thepage}. This command has the counter |pairedpage| |
10447 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ | 10453 | % incremented on right-hand pages only, and sets |page| $\leftarrow$ |
10448 | % |pairedpage| on every page. | 10454 | % |pairedpage| on every page. |
10449 | % \begin{macro}{\resetpagenumber} | 10455 | % \begin{macro}{\resetpagenumber} |
10450 | % \changes{v1.5}{2022/05/01}{resets normal running page numbers} | 10456 | % \changes{v1.5}{2022/05/04}{resets normal running page numbers} |
10451 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} | 10457 | % \cs{resetpagenumber} must be used right out of \enquote{mirrored} |
10452 | % paired pages alignment environments. This argument-less command | 10458 | % paired pages alignment environments. This argument-less command |
10453 | % corrects any numbering error on the page following the edition | 10459 | % corrects any numbering error on the page following the edition |
@@ -10458,7 +10464,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
10458 | } | 10464 | } |
10459 | \NewDocumentCommand{\setpairedpage}{}{% | 10465 | \NewDocumentCommand{\setpairedpage}{}{% |
10460 | \ifnumodd{\thepage}{\setcounter{page}{\thepairedpage}} | 10466 | \ifnumodd{\thepage}{\setcounter{page}{\thepairedpage}} |
10461 | {\refstepcounter{pairedpage}\setcounter{page}{\thepairedpage}}% | 10467 | {\stepcounter{pairedpage}\setcounter{page}{\thepairedpage}}% |
10462 | } | 10468 | } |
10463 | \def\resetpagenumber{% | 10469 | \def\resetpagenumber{% |
10464 | \ifnumodd{\thepairedpage}{}{\addtocounter{page}{-1}} | 10470 | \ifnumodd{\thepairedpage}{}{\addtocounter{page}{-1}} |