From 69ee1f20179ff4f9751e87454723ef5bde4ce11a Mon Sep 17 00:00:00 2001
From: Robert Alessi <alessi@robertalessi.net>
Date: Thu, 2 Jul 2020 17:54:11 +0200
Subject: pagelineation boolean option becomes lineation=page|document choice
 option

---
 ekdosis.dtx | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

(limited to 'ekdosis.dtx')

diff --git a/ekdosis.dtx b/ekdosis.dtx
index 760416b..40ed894 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -236,8 +236,12 @@ along with this program.  If not, see
 \usepackage{metalogox}
 \usepackage{hologo}
 \usepackage{xcolor}
+\newbool{nocolordoc}
 \definecolor{ekdcolor}{RGB}{243,241,235}
 \definecolor{cinnamon}{rgb}{0.82, 0.41, 0.12}
+\ifbool{nocolordoc}{
+  \colorlet{ekdcolor}{white}
+  \colorlet{cinnamon}{black}}{}
 \definecolor{gainsboro}{RGB}{222,222,222}
 \PassOptionsToPackage{bookmarks=true}{hyperref}
 \usepackage{xurl}
@@ -266,7 +270,13 @@ along with this program.  If not, see
     }
   }
 }
-\usepackage[symbolpackage=tikz]{biblatex-ext-oa}
+\ifbool{nocolordoc}
+{
+  \usepackage{fontawesome}
+  \def\oasymbol{\faUnlock}
+  \usepackage{biblatex-ext-oa}
+}
+{\usepackage[symbolpackage=l3draw]{biblatex-ext-oa}}
 \DeclareDelimFormat[bib,biblist]{nametitledelim}{\addcomma\space}
 \DeclareDelimFormat[bib,biblist]{innametitledelim}{\addcomma\space}
 \renewcommand*\newunitpunct{\addcomma\space}
@@ -369,6 +379,7 @@ along with this program.  If not, see
   breakable}
 \usepackage[newfloat]{minted}
 \labelformat{listing}{listing~#1}
+\ifbool{nocolordoc}{\usemintedstyle{bw}}{}
 \setminted{bgcolor=ekdcolor,linenos, fontsize=\small}
 \newminted[ekdlua]{lua}{bgcolor={}, linenos, fontsize=\relsize{-0.5},
   xleftmargin=12pt, breaklines, numberblanklines=false, numbersep=3pt,
@@ -376,7 +387,7 @@ along with this program.  If not, see
 \renewcommand{\theFancyVerbLine}{\rmfamily\smaller\arabic{FancyVerbLine}}
 \usepackage[contents]{colordoc}
 \newcommand{\pkg}[1]{\textsf{#1}\index{#1=#1 (package)}}
-\newcommand{\env}[1]{\texttt{#1}}
+\newcommand{\env}[1]{\texttt{#1}\index{#1=#1 (environment)}}
 \backgroundcolor{c}{ekdcolor}
 \usepackage{caption}
 \captionsetup[listing]{position=above,skip=-1ex}
@@ -440,7 +451,7 @@ along with this program.  If not, see
 %
 % \GetFileInfo{\jobname.dtx}
 % \DoNotIndex{\newcommand,\newenvironment,\begin,\begingroup}
-% \DoNotIndex{\bgroup,\def,\edef,\egroup,\else,\expandafter}
+% \DoNotIndex{\bgroup,\def,\edef,\egroup,\else,\expandafter,\endgroup}
 % \DoNotIndex{\fi,\ifdefined,\luadirect,\luastring,\luastringN}
 % \DoNotIndex{\luastringO,\NewDocumentCommand,\space,\unexpanded}
 %
@@ -554,9 +565,10 @@ along with this program.  If not, see
 % 
 % The reader will find here, by way of introduction, a summarized
 % version of the first part of an article that the author submitted
-% some weeks ago to the \mkbibemph{\citefield{Alessi2020}{journaltitle}} as
-% a contribution to a Digital Humanities workshop held at Stanford
-% University (\printdate{2019-04-15}).\footcite{Alessi2020}
+% some weeks ago to the
+% \mkbibemph{\citefield{Alessi2020}{journaltitle}} as a contribution
+% to a Digital Humanities workshop held at Stanford University
+% (\printdate{2019-04-15}).\footcite{Alessi2020}
 %
 % The name of this package, \pkg{ekdosis}, derives from a Greek
 % action noun\---\sg{ἔκδοσις}\---the meaning of which is:
@@ -2960,13 +2972,15 @@ yesterday.
 %    \end{macrocode}
 % Alignment:---
 %    \begin{macrocode}
+\newif\ifekd@pagelineation
 \ekvdefinekeys{ekd@align}{
   store tcols = \tcols@num,
   store lcols = \lcols@num,
   store texts = \texts@value,
   store apparatus = \apparatus@value,
   bool paired = \ifekd@paired,
-  bool pagelineation = \ifekd@pagelineation,
+  choice lineation = {page = \ekd@pagelineationtrue,
+                      document = \ekd@pagelineationfalse},
   choice segmentation = {auto = \def\segmentation@val{auto},
                          noauto = \def\segmentation@val{noauto}},
   bool flush = \ifekd@flushapp,
-- 
cgit v1.2.3

