diff options
author | Robert Alessi <alessi@robertalessi.net> | 2021-06-10 21:49:54 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2021-06-10 21:49:54 +0200 |
commit | 34a5e851cadb113c3a9baaf341033f30083555d5 (patch) | |
tree | afa50fd70b784a72bc7579129afdbfeb0b234079 | |
parent | 860de12e54f9f60bea25f2ff04f731d587c50ffd (diff) | |
download | ekdosis-34a5e851cadb113c3a9baaf341033f30083555d5.tar.gz |
wrote documentation about \ekdsetup
-rw-r--r-- | ekdosis.dtx | 64 |
1 files changed, 61 insertions, 3 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index faf4d04..48d8551 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -1208,6 +1208,53 @@ along with this program. If not, see | |||
1208 | %</example> | 1208 | %</example> |
1209 | % \fi | 1209 | % \fi |
1210 | % | 1210 | % |
1211 | % \subsection{Setup} | ||
1212 | % \label{sec:setup} | ||
1213 | % \DescribeMacro{\ekdsetup} \newfeature[v1.3] Starting from v1.3, | ||
1214 | % \cs{ekdsetup} can be used to specify options that affect the general | ||
1215 | % behavior of \pkg{ekdosis}. \cs{ekdsetup} is a preamble-only | ||
1216 | % command. It accepts the following |key=value| options the number of | ||
1217 | % which is expected to increase as \pkg{ekdosis} grows:\\ | ||
1218 | % \DescribeOption{showpagebreaks}\phts\label{ref:showpagebreaks-opt} | ||
1219 | % \unskip|showpagebreaks|$=$\verb+true|false+ | ||
1220 | % \hfill \tcboxverb{Initially: false; Default: true}\\ | ||
1221 | % This named argument, which defaults to |true| if used without value, | ||
1222 | % has specific marks printed in the margins so as to spot with a rapid | ||
1223 | % cast of the eye the locations of conditional page breaks generated | ||
1224 | % by the \cs{ekdpb} command described below \vpageref{ref:ekdpb}. By | ||
1225 | % default, page breaks generated by \cs{ekdpb} are identified by the | ||
1226 | % string |spb|\===for \enquote{soft} page break\=== whereas those | ||
1227 | % generated by \cs{ekdpb*} are identified by |hpb|\===for | ||
1228 | % \enquote{hard} page break. Furthermore, when \cs{ekdpb} triggers no | ||
1229 | % page break, the marker is printed between square brackets, like so: | ||
1230 | % |[spb]|. In this | ||
1231 | % way, inoperative \cs{ekdpb} can be easily spotted and removed.\\ | ||
1232 | % \DescribeOption{spbmk} |spbmk|$=$\meta{string} | ||
1233 | % \hfill\tcboxverb{Default: spb}\\ | ||
1234 | % |spbmk| is used to change the string associated to \enquote{soft} | ||
1235 | % page breaks.\\ | ||
1236 | % \DescribeOption{hpbmk} |hpbmk|$=$\meta{string} | ||
1237 | % \hfill\tcboxverb{Default: hpb}\\ | ||
1238 | % |hpbmk| is used to change the string associated to \enquote{hard} | ||
1239 | % page breaks. | ||
1240 | % | ||
1241 | % As an example, what follows has \enquote{soft} page breaks printed | ||
1242 | % in blue and \enquote{hard} page breaks printed in red:--- | ||
1243 | % | ||
1244 | % \iffalse | ||
1245 | %<*example> | ||
1246 | % \fi | ||
1247 | \begin{minted}[linenos=false]{latex} | ||
1248 | \ekdsetup{ | ||
1249 | showpagebreaks, | ||
1250 | spbmk = \textcolor{blue}{spb}, | ||
1251 | hpbmk = \textcolor{red}{hpb} | ||
1252 | } | ||
1253 | \end{minted} | ||
1254 | % \iffalse | ||
1255 | %</example> | ||
1256 | % \fi | ||
1257 | % | ||
1211 | % \subsection{Using a Configuration File} | 1258 | % \subsection{Using a Configuration File} |
1212 | % \label{sec:using-conf-file} | 1259 | % \label{sec:using-conf-file} |
1213 | % Complex editions may use a large number of witnesses, sources and | 1260 | % Complex editions may use a large number of witnesses, sources and |
@@ -5280,7 +5327,7 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5280 | % pages may result in pages that break just after they begin. | 5327 | % pages may result in pages that break just after they begin. |
5281 | % | 5328 | % |
5282 | % \paragraph{Conditional page breaks} | 5329 | % \paragraph{Conditional page breaks} |
5283 | % \DescribeMacro{\ekdpb}\DescribeMacro{\ekdpb*} | 5330 | % \phts\label{ref:ekdpb} \DescribeMacro{\ekdpb}\DescribeMacro{\ekdpb*} |
5284 | % \cs{ekdpb}\oarg{page no}\marg{line no} | 5331 | % \cs{ekdpb}\oarg{page no}\marg{line no} |
5285 | % \newfeature[v1.2]\\ | 5332 | % \newfeature[v1.2]\\ |
5286 | % One way to avoid this inconvenience is to use \cs{ekdpb} instead of | 5333 | % One way to avoid this inconvenience is to use \cs{ekdpb} instead of |
@@ -5293,7 +5340,15 @@ subtype="arabtex">'inna 'abI kAna mina | |||
5293 | % Roman or alphanumeric number. If the specified conditions be not | 5340 | % Roman or alphanumeric number. If the specified conditions be not |
5294 | % met, then the page break is not triggered. Finally, the | 5341 | % met, then the page break is not triggered. Finally, the |
5295 | % \enquote{starred} version of this command forces the page break, | 5342 | % \enquote{starred} version of this command forces the page break, |
5296 | % irrespective of the values specified as page or line numbers. | 5343 | % irrespective of the values specified as page or line numbers. Unlike |
5344 | % \cs{ekdpb}, which requires the lines to be numbered, \cs{ekdpb*} is | ||
5345 | % allowed at any point of the document: as \cs{ekdpb*} disregards the | ||
5346 | % number given as argument, it is equivalent to the standard \LaTeX\ | ||
5347 | % \cs{pagebreak} command. Yet it can be used instead of the latter to | ||
5348 | % have marks further printed in the margins so as to spot with a | ||
5349 | % fleeting glance the locations where induced page breaks | ||
5350 | % occur.\footnote{This requires the |showpagebreaks| option to be set | ||
5351 | % to |true| as described above \vpageref{ref:showpagebreaks-opt}.} | ||
5297 | % | 5352 | % |
5298 | % \paragraph{Using \texttt{maxentries}} | 5353 | % \paragraph{Using \texttt{maxentries}} |
5299 | % Another way\---should the edition text fall into the vicious circle | 5354 | % Another way\---should the edition text fall into the vicious circle |
@@ -7295,8 +7350,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
7295 | \luadirect{ekdosis.closestream()} | 7350 | \luadirect{ekdosis.closestream()} |
7296 | } | 7351 | } |
7297 | % \end{macrocode} | 7352 | % \end{macrocode} |
7353 | % \paragraph{Setup} | ||
7298 | % \begin{macro}{\ekdsetup} | 7354 | % \begin{macro}{\ekdsetup} |
7299 | % \changes{v1.3}{2021/06/08}{new command for global options} | 7355 | % \changes{v1.3}{2021/06/08}{new command for global options} |
7356 | % \cs{ekdsetup} is used to specify options that affect the general | ||
7357 | % behavior of \pkg{ekdosis}. It is a preamble-only command. | ||
7300 | % \begin{macrocode} | 7358 | % \begin{macrocode} |
7301 | \ekvdefinekeys{ekd@setup}{ | 7359 | \ekvdefinekeys{ekd@setup}{ |
7302 | bool showpagebreaks = \ifekd@showpb, | 7360 | bool showpagebreaks = \ifekd@showpb, |
@@ -7696,7 +7754,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
7696 | % \cs{ekdpk}\oarg{page no}\marg{line no} is used to insert conditional | 7754 | % \cs{ekdpk}\oarg{page no}\marg{line no} is used to insert conditional |
7697 | % page breaks by specifying that the page break should occur only on a | 7755 | % page breaks by specifying that the page break should occur only on a |
7698 | % given line and optionally a given page. If the specified conditions | 7756 | % given line and optionally a given page. If the specified conditions |
7699 | % are met then this command triggers \cs{pagebreak}. | 7757 | % be met then this command triggers \cs{pagebreak}. |
7700 | % \begin{macrocode} | 7758 | % \begin{macrocode} |
7701 | \newcounter{ekd@pb} | 7759 | \newcounter{ekd@pb} |
7702 | \globalcounter{ekd@pb} | 7760 | \globalcounter{ekd@pb} |