summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/README.md2
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/american-sbl.lbx1
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.pdfbin340521 -> 343541 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.tex8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.pdfbin58351 -> 60288 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.tex58
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.bib11
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.def525
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.pdfbin158695 -> 164804 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.tex110
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/english-sbl.lbx3
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/german-sbl.lbx1
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.pdfbin78787 -> 78804 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.sty16
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.tex7
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.bbx4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx116
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.dbx4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-sbl/spanish-sbl.lbx3
-rw-r--r--macros/latex/contrib/fgruler/fgruler.dtx547
-rw-r--r--macros/latex/contrib/fgruler/fgruler.pdfbin283694 -> 421392 bytes
-rw-r--r--macros/latex/contrib/grant/LICENSE2
-rw-r--r--macros/latex/contrib/grant/VERSION1
-rw-r--r--macros/latex/contrib/grant/grant.dtx312
-rw-r--r--macros/latex/contrib/grant/grant.ins22
-rw-r--r--macros/latex/contrib/grant/grant.pdfbin115574 -> 115908 bytes
-rw-r--r--macros/latex/contrib/xltabular/Changes1
-rw-r--r--macros/latex/contrib/xltabular/xltabular-doc.pdfbin71437 -> 71248 bytes
-rw-r--r--macros/latex/contrib/xltabular/xltabular.sty18
-rw-r--r--macros/luatex/latex/ekdosis/Makefile2
-rw-r--r--macros/luatex/latex/ekdosis/README.md6
-rw-r--r--macros/luatex/latex/ekdosis/ekdosis.dtx2183
-rw-r--r--macros/luatex/latex/ekdosis/ekdosis.pdfbin600804 -> 707134 bytes
-rw-r--r--macros/luatex/latex/ekdosis/samples/Caesar_BG-6-13-1.pdfbin17992 -> 17992 bytes
34 files changed, 3075 insertions, 888 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/README.md b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/README.md
index 71a40a6784..fefcb07149 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/README.md
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/README.md
@@ -50,7 +50,7 @@ The following packages are required:
## Licence
```
-Copyright 2015-2018 David Purton
+Copyright 2015-2020 David Purton
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/american-sbl.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/american-sbl.lbx
index 95f47d3d09..bdb38b9a6a 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/american-sbl.lbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/american-sbl.lbx
@@ -25,4 +25,5 @@
\iffieldbibstring{#1}
{\bibstring{\thefield{#1}}}
{\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
+ \DeclarePunctuationPairs{comma}{*!?}%
}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.pdf
index 08429afbd5..00501af9d4 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.tex b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.tex
index d9fad6d8ab..c7cbc4bcd4 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-examples.tex
@@ -11,7 +11,7 @@
\usepackage{listings}
\usepackage{imakeidx}
\makeindex[title=Author Index,intoc,options=-q]
-\usepackage[style=sbl,indexing=cite,idemtracker=false,ibidtracker=false]{biblatex}
+\usepackage[style=sbl,indexing=cite]{biblatex}
\usepackage{hyperref}
\addbibresource{biblatex-sbl.bib}
@@ -176,7 +176,7 @@
revdauthor,revdtitle,revdeditor,institution,type,shorthand,xref,%
note,eprintdate,volumes,shortmaintitle,options,eprintclass,relatedoptions,%
editortype,crossref,editora,editorb,editorc,editoratype,editorbtyle,%
- editorctype,entrysubtype,sortkey,titleaddon,witheditor,witheditortype,%
+ editorctype,entrysubtype,sorttitle,titleaddon,witheditor,witheditortype,%
withtranslator,withtranslatortype,eventtitle,venue,eventdate,shortauthor%
},
sensitive=false,
@@ -2117,7 +2117,6 @@ Than the Author}
date = {1994},
shorthand = {ANF},
options = {useeditor=false,skipbiblist},
- sortkey = {Ante-Nicene Fathers},
xref = {ANF:abbreviation}
}
@@ -2155,7 +2154,6 @@ Than the Author}
date = {1994},
shorthand = {NPNF\textsuperscript{1}},
options = {useeditor=false,skipbiblist},
- sortkey = {Nicene and Post-Nicene Fathers, Series 1},
xref = {NPNF1:abbreviation}
}
@@ -2193,7 +2191,7 @@ Than the Author}
editor = {Migne, J.-P.},
volumes = {217},
location = {Paris},
- date = {1844/1864},
+ date = {1844/1855},
shorthand = {PL}
}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.pdf
index 95b796a2ea..62d82711bd 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.tex b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.tex
index 011d44dba7..11c969e09a 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl-ibid.tex
@@ -9,7 +9,7 @@
\usepackage{imakeidx}
\makeindex[title=Author Index,intoc,options=-q]
\usepackage{hyperref}
-\usepackage[style=sbl,indexing=cite]{biblatex}
+\usepackage[style=sbl,indexing=cite,ibidtracker=constrict,idemtracker=citation]{biblatex}
\addbibresource{biblatex-sbl.bib}
\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase]
@@ -147,16 +147,25 @@
\maketitle
This file tests the behaviour of the various options related to using
-\emph{ibidem} and \emph{idem} in Biblatex-SBL.
+\emph{ibidem} and \emph{idem} in Biblatex-SBL. By default neither
+\emph{ibidem} nor \emph{idem} are used.\footnote{See
+\url{https://sblhs2.com/2018/02/01/cms-update-ibid/}.} When referencing
+multiple works by the same author within a footnote, subsequent references use
+only the family name of the author.\footnote{See
+\url{https://sblhs2.com/2016/10/11/placement-citations-traditional/}.} This
+corresponds to the \verb|biblatex| option \verb|idemtracker=sbl|.
-\section*{Default \emph{ibidem} tracking}
+\section*{Using \emph{ibidem}}
By default ibid.\@ is not used across page breaks and \emph{ibidem} is taken
-to mean ‘same author + same title’. See \texttt{biblatex-sbl.pdf} for a
-description of the options \texttt{ibidtracker} can take.
+to mean ‘same author + same title + same page’.\footnote{See
+\url{https://sblhs2.com/2017/01/05/subsequent-bibliographic-references/}.} See
+\texttt{biblatex-sbl.pdf} for a description of the options
+\texttt{ibidtracker} can take. It is recommended to use
+\verb|ibidtracker=constrict| for SBL compliance.
\begin{biboutput}
- \samplemacro{\textbackslash usepackage[style=sbl]\{biblatex\}}
+ \samplemacro{\textbackslash usepackage[style=sbl,ibidtracker=constrict]\{biblatex\}}
\samplecite{1}[127]{talbert:1992}
\samplecite{2}[22]{talbert:1992}
\samplecite{3}[22]{talbert:1992}
@@ -167,17 +176,15 @@ description of the options \texttt{ibidtracker} can take.
\samplecite{6}[22]{talbert:1992}
\end{biboutput}
-\section*{Not tracking \emph{ibidem} across pages}
+\section*{Using \emph{ibidem} across pages}
-\boolfalse{pagetracker}
-
-Set the \texttt{pagetracker} option to \texttt{false} to allow that the first
+Set the \texttt{pagetracker} option to \texttt{false} to allow the first
citation on a page to be ibid.
\boolfalse{pagetracker}
\begin{biboutput}
- \samplemacro{\textbackslash usepackage[style=sbl,pagetracker=false]\{biblatex\}}
+ \samplemacro{\textbackslash usepackage[style=sbl,ibidtracker=constrict,pagetracker=false]\{biblatex\}}
\samplecite{7}[53]{scott+etal:1993}
\samplecite{8}[42]{scott+etal:1993}
\samplemacro{\textbackslash clearpage}
@@ -185,43 +192,44 @@ citation on a page to be ibid.
\samplecite{9}[42]{scott+etal:1993}
\end{biboutput}
-\section*{\emph{Ibidem} meaning ‘same author + same title + same page’}
+\section*{\emph{Ibidem} meaning ‘same author + same title’}
-Turn on the \texttt{ibidpage} option to indicate that \emph{ibidem} should
-mean ‘same author + same title + same page’.
+Turn off the \texttt{ibidpage} option to indicate that \emph{ibidem} should
+mean ‘same author + same title’.
\makeatletter
-\let\blx@imc@ifloccit\blx@ifloccit@global
-\let\blx@loccittracker\blx@loccittracker@global
-\let\blx@loccitreset\blx@loccitreset@global
+\blx@opt@loccittracker@false
\makeatother
\begin{biboutput}
- \samplemacro{\textbackslash usepackage[style=sbl,ibidpage]\{biblatex\}}
+ \samplemacro{\textbackslash usepackage[style=sbl,ibidtracker=constrict,ibidpage=false]\{biblatex\}}
\samplecite{10}[28]{egger:1996}
\samplecite{11}[28]{egger:1996}
\samplecite{12}[291]{egger:1996}
\end{biboutput}
-\section*{Default \emph{idem} tracking}
+\section*{Using \emph{idem}}
-By default \emph{idem} is used. \emph{Idem} tracking is controlled using the
-\texttt{idemtracker} option. See \texttt{biblatex-sbl.pdf} for a description
-of the options \texttt{idemtracker} can take.
+By default \emph{idem} is not used. Rather only the family name of the author
+is given for subsequent references when works by the same author are cited
+within a single footnote. \emph{Idem} tracking is controlled using
+the \texttt{idemtracker} option. See \texttt{biblatex-sbl.pdf} for a
+description of the options \texttt{idemtracker} can take. To comply with SBL
+style, \verb|idemtracker=citation| should be used.\footnote{See
+\url{https://sblhs2.com/2017/01/10/idem/}.}
\begin{biboutput}
- \samplemacro{\textbackslash usepackage[style=sbl]\{biblatex\}}
- \makeatletter\blx@opt@idemtracker@constrict\makeatother
+ \samplemacro{\textbackslash usepackage[style=sbl,idemtracker=citation]\{biblatex\}}
\samplemacro{\textbackslash autocites[35]\{vanseters:1997\}\{vanseters:1995\}}
\color{biblatex-colour}
\hspace*{\bibindent}13.~\cites[35]{vanseters:1997}{vanseters:1995}.
\color{black}
\samplemacro{\textbackslash
autocites[35]\{vanseters:1997\}[222]\{vanseters:1995\}}
- \makeatletter\blx@idemreset\makeatother
\color{biblatex-colour}
\hspace*{\bibindent}14.~\cites[35]{vanseters:1997}[222]{vanseters:1995}.
\color{black}
+ \samplecite{15}[35]{vanseters:1997}
\end{biboutput}
\printbibliography
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.bib b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.bib
index cbd2ccb6ae..da2353e554 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.bib
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.bib
@@ -976,7 +976,6 @@
date = {1994},
shorthand = {ANF},
options = {useeditor=false,skipbiblist},
- sortkey = {Ante-Nicene Fathers},
xref = {ANF:abbreviation}
}
@@ -1004,7 +1003,6 @@
date = {1994},
shorthand = {NPNF\textsuperscript{1}},
options = {useeditor=false,skipbiblist},
- sortkey = {Nicene and Post-Nicene Fathers, Series 1},
xref = {NPNF1:abbreviation}
}
@@ -1032,7 +1030,7 @@
editor = {Migne, J.-P.},
volumes = {217},
location = {Paris},
- date = {1844/1864},
+ date = {1844/1855},
shorthand = {PL}
}
@@ -1330,7 +1328,12 @@
date = {2015-02},
url = {https://www.sbl-site.org/assets/pdfs/pubs/SBLHSsupp2015-02.pdf},
options = {useauthor=false,useeditor=false},
- sortkey = {Student Supplement for the SBL Handbook of Style, Second Edition}
+}
+
+@periodical{sblhs2.com,
+ title = {SBL Handbook of Style},
+ subtitle = {Explanations, Clarifications, and Expansions},
+ url = {https://sblhs2.com}
}
@mvbook{sasson:2000,
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.def b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.def
index aa7301d280..0f8ece1b0d 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.def
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.def
@@ -15,8 +15,8 @@
% VERSION STRINGS
% ------------------------------------------------------------------
-\def\sbl@abx@date{2018/12/13}
-\def\sbl@abx@version{0.11}
+\def\sbl@abx@date{2020/11/04}
+\def\sbl@abx@version{0.12}
\def\sbl@abx@bbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl bibliography style (DCP)}
\def\sbl@abx@cbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl citation style (DCP)}
\def\sbl@abx@lbxid{\sbl@abx@date\space v\sbl@abx@version\space biblatex-sbl localization (DCP)}
@@ -52,7 +52,12 @@
\NumCheckSetup{\def\mkbibparens#1{#1}}
-\renewbibmacro*{postnote}{}
+\renewbibmacro*{postnote}{%
+ \iftoggle{blx@unit}
+ {}
+ {\newunit}%
+ \printfield{postnote}}
+
\newbibmacro*{pages}{}
\DeclareBibliographyOption[string]{citepages}[permit]{%
@@ -62,7 +67,6 @@
{Invalid option 'citepages=#1'}
{Valid values are 'sbl', 'permit', 'omit', 'separate'.}}}
-\providebibmacro*{postnote}{}
\providebibmacro*{pages}{}
\def\cbx@opt@citepages@sbl{%
@@ -82,17 +86,7 @@
{\iffieldpages{postnote}
{}
{\setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\printfield{postnote}}
- {\printfield{pages}%
- \setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}}
+ \printtext[parens]{\printfield{postnote}}}}}}}
\def\cbx@opt@citepages@permit{%
\renewbibmacro*{pages}{%
@@ -109,18 +103,7 @@
}
{}
{\setunit{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\newunit
- \printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}}
+ \printtext[parens]{\printfield{postnote}}}}}}
\def\cbx@opt@citepages@omit{%
\renewbibmacro*{pages}{%
@@ -139,23 +122,12 @@
{\printfield{postnote}}
{\printfield{pages}%
\setunit*{\addspace}%
- \printtext[parens]{\printfield{postnote}}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\newunit
- \printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
\printtext[parens]{\printfield{postnote}}}}}}}
\def\cbx@opt@citepages@separate{%
\renewbibmacro*{pages}{%
\iffieldundef{pages}
- {\ifool{bx@inset}
+ {\ifbool{bbx@inset}
{}
{\printfield{postnote}%
\global\booltrue{suppresspostnote}}}
@@ -172,34 +144,57 @@
{\bibstring{thiscite}%
\setunit{\addspace}}
{}%
- \printfield{postnote}}}}}%
- \renewbibmacro*{postnote}{%
- \iffieldundef{postnote}
- {\printfield{pages}}
- {\iffieldpages{postnote}
- {\printfield{postnote}}
- {\iffieldundef{pages}
- {\printfield{postnote}}
- {\printfield{pages}%
- \setunit*{\addspace}%
- \printtext[parens]{%
- \iffieldpages{postnote}
- {\bibstring{thiscite}%
- \setunit{\addspace}}
- {}%
- \printfield{postnote}}}}}}}
+ \printfield{postnote}}}}}}
% ------------------------------------------------------------------
% IDEM MACROS
% ------------------------------------------------------------------
+\def\blx@opt@idemtracker@citation{%
+ \let\blx@imc@ifciteidem\blx@ifciteidem@citation
+ \let\blx@idemtracker\blx@idemtracker@constrict
+ \let\blx@idemreset\blx@idemreset@context
+ \booltrue{citetracker}}
+
+\def\blx@opt@idemtracker@sbl{%
+ \let\blx@imc@ifciteidem\blx@ifciteidem@sbl
+ \let\blx@idemtracker\blx@idemtracker@constrict
+ \let\blx@idemreset\blx@idemreset@context
+ \booltrue{citetracker}}
+
+\def\blx@ifciteidem@citation{%
+ \ifbool{citetracker}
+ {\iftoggle{blx@footnote}
+ {\blx@ifmpfncheckidem
+ {\blx@imc@iffieldequals{fullhash}\blx@lasthash@foot}
+ {\@secondoftwo}}
+ {\iffirstcitekey
+ {\@secondoftwo}
+ {\blx@imc@iffieldequals{fullhash}\blx@lasthash@text}}}
+ {\@secondoftwo}}
+
+\def\blx@ifciteidem@sbl{%
+ \blx@ifciteidem@citation}
+
+\def\blx@ifmpfncheckidem{%
+ \ifnum\numexpr\value\@mpfn-\blx@lastmpfn<\@ne
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+
+\def\ifciteidemsbl{%
+ \ifdefequal{\blx@imc@ifciteidem}{\blx@ifciteidem@sbl}}
+
\newbibmacro*{ifidemused}{%
\ifboolexpr{
test {\ifciteidem}
and
not test {\iffirstonpage}
}
- {\bibstring[\mkibid]{idem\thefield{gender}}%
+ {\ifciteidemsbl
+ {\printnames{labelname}}
+ {\bibstring[\mkibid]{idem\thefield{gender}}}%
\@firstoftwo}
{\@secondoftwo}}
@@ -310,7 +305,6 @@
\ExecuteBibliographyOptions{%
citetracker,
- punctfont,
alldates=comp,
eprintdate=comp,
dateabbrev=false,
@@ -320,9 +314,9 @@
minxrefs=1,
isbn=false,
pagetracker,
- idemtracker=constrict,
- ibidtracker=constrict,
- ibidpage=false,
+ idemtracker=sbl,
+ ibidtracker=false,
+ ibidpage=true,
maxbibnames=99,
maxcitenames=3,
citepages=sbl,
@@ -363,6 +357,7 @@
\NewBibliographyString{paperpresented}
\NewBibliographyString{patentfiled}
\NewBibliographyString{released}
+\NewBibliographyString{article}
\DeclareLanguageMappingSuffix{-sbl}
@@ -404,6 +399,7 @@
\ifinteger{#1}
{\mkbibordedition{#1}~\bibsstring{edition}}
{\ifcapital{\MakeCapital{#1}}{#1}\isdot}}
+\DeclareFieldFormat{eid}{\bibsstring{article}~#1}
\DeclareFieldFormat{eprint:ebook}{#1 \biblstring{edition}}
\DeclareFieldFormat{eprint}{%
\iffieldundef{eprinttype}
@@ -453,7 +449,10 @@
\DeclareFieldFormat{volcitepages}{\mkcomprange{#1}}
\DeclareFieldFormat{part}{#1}
\DeclareFieldFormat{pt}{\bibstring{part}~#1}
-\DeclareFieldFormat{postnote}{\mkcomprange{#1}}
+\DeclareFieldFormat{postnote}{%
+ \iffieldundef{eid}
+ {\mkcomprange{#1}}
+ {\mkpageprefix[pagination][\mkcomprange]{#1}}}
\DeclareFieldFormat{multipostnote}{#1}
\DeclareFieldFormat{byauthor}{\bibstring{byauthor} #1}
\DeclareFieldFormat{revdtitle}{\biblstring{reviewof} \mkbibemph{#1}}
@@ -472,8 +471,8 @@
\DeclareFieldFormat{isrn}{ISRN\addcolon\space #1}
\DeclareFieldFormat{issn}{ISSN\addcolon\space #1}
\DeclareFieldFormat{pages}{\mkcomprange{#1}}
-\DeclareFieldFormat{pagepages}{\mkcomprange[\mkpageprefix]{#1}}
-\DeclareFieldFormat{pagesin}{\mkcomprange[\mkpageprefix]{#1} \usebibmacro{in}}
+\DeclareFieldFormat{pagepages}{\mkpageprefix[pagination][\mkcomprange]{#1}}
+\DeclareFieldFormat{pagesin}{\mkpageprefix[pagination][\mkcomprange]{#1} \usebibmacro{in}}
\DeclareFieldFormat{chapter}{\bibsstring{chapter}~#1}
\DeclareFieldFormat{chapterin}{\bibsstring{chapter}~#1 \usebibmacro{in}}
\DeclareFieldFormat{volume}{#1}
@@ -515,13 +514,15 @@
\DeclareFieldFormat[incommentary,inreference,inlexicon,online,review,seminarpaper,conferencepaper]{title}{\mkbibquote{#1}}
\DeclareFieldFormat[incommentary,inreference,inlexicon,online,review,seminarpaper,conferencepaper]{shorttitle}{\mkbibquote{#1}}
\DeclareFieldFormat[suppperiodical]{title}{\mkbibquote{#1}}
-\DeclareFieldFormat{issuetitle}{\mkbibquote{#1}}
-\DeclareFieldFormat{issuesubtitle}{\mkbibquote{#1}}
-\DeclareFieldFormat{shortissuetitle}{\mkbibquote{#1}}
+\DeclareFieldFormat{issuetitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{issuesubtitle}{\mkbibemph{#1}}
+\DeclareFieldFormat{shortissuetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{howpublished}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
\DeclareFieldFormat[patent]{title}{#1}
\DeclareFieldFormat[ancienttext]{title}{%
\ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{primarysource}}
+ or
test {\iffieldequalstr{entrysubtype}{inscription}}
or
test {\iffieldequalstr{entrysubtype}{chronicle}}
@@ -532,6 +533,8 @@
{\mkbibquote{#1}}}}
\DeclareFieldFormat[ancienttext]{shorttitle}{%
\ifboolexpr{
+ test {\iffieldequalstr{entrysubtype}{primarysource}}
+ or
test {\iffieldequalstr{entrysubtype}{inscription}}
or
test {\iffieldequalstr{entrysubtype}{chronicle}}
@@ -561,6 +564,18 @@
\iffieldundef{type}
{#1}
{\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{title}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{subtitle}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
+\DeclareFieldFormat[classictext]{shorttitle}{%
+ \ifnameundef{author}
+ {#1}
+ {\mkbibemph{#1}}}
\DeclareBibliographyAlias{cite:mvbook}{cite:book}
\DeclareBibliographyAlias{cite:mvcollection}{cite:collection}
@@ -675,6 +690,13 @@
% LIST OF ABBREVIATIONS
% ------------------------------------------------------------------
+\DeclareFieldFormat{shorttitlewidth}{%
+ \ifentrytype{classictext}
+ {\iffieldequalstr{entrysubtype}{churchfather}
+ {}
+ {\mkbibemph{#1}}}
+ {}}
+
\newtoggle{blx@abbrevcite}
\newlength{\abbrevwidth}
@@ -686,16 +708,30 @@
}
\defbibenvironment{abbreviations}
- {\list
+ {\setlength{\abbrevwidth}{0pt}%
+ \list
{\printfield[shorthandwidth]{shortjournal}%
- \iffieldundef{shorthand}
- {\printfield[shorthandwidth]{shortseries}}
- {\iffieldsequal{shorthand}{shorttitle}
- {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
- {\printfield[shorthandwidth]{shorthand}}}}
+ \iffieldsequal{shorthand}{shorttitle}
+ {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
+ {\printfield[shorthandwidth]{shorthand}}%
+ \ifentrytype{classictext}
+ {\printfield{shorttitle}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\printfield{shortseries}}}
{\setmaxlength{\abbrevwidth}{\shorthandwidth}%
\setmaxlength{\abbrevwidth}{\shortserieswidth}%
\setmaxlength{\abbrevwidth}{\shortjournalwidth}%
+ \setmaxlength{\abbrevwidth}{\shorttitlewidth}%
\addtolength{\abbrevwidth}{\biblabelsep}%
\setlength{\labelwidth}{\abbrevwidth}%
\setlength{\leftmargin}{\labelwidth}%
@@ -721,15 +757,38 @@
{\setunit{\subtitlepunct}%
\printfield{journalsubtitle}}}%
\iffieldundef{shorthand}
- {\iffieldundef{shortseries}
- {}
- {\bibhypertarget{\strfield{shortseries}}{}%
- \printfield{series}}}
+ {}
{\bibhypertarget{\strfield{shorthand}}{}%
\iffieldsequal{shorthand}{shorttitle}
{\toggletrue{blx@abbrevcite}}
{}%
\usebibmacro{bibentrycite}}%
+ \ifentrytype{classictext}
+ {\iffieldundef{shorttitle}
+ {}
+ {\bibhypertarget{\strfield{shorttitle}\strname{author}}{}%
+ \ifnameundef{author}
+ {}
+ {\usebibmacro{author}%
+ \newunit}%
+ \printfield{title}%
+ \setunit*{\subtitlepunct}%
+ \printfield{subtitle}}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\iffieldundef{shortseries}
+ {}
+ {\bibhypertarget{\strfield{shortseries}}{}%
+ \printfield{series}}}%
\usebibmacro{finentry}}
\DeclareBiblistFilter{abbreviations}{
@@ -737,6 +796,26 @@
\filter[type=field,filter=shorthand]
\filter[type=field,filter=shortjournal]
\filter[type=field,filter=shortseries]
+ \filter[type=field,filter=shorttitle]
+ }
+}
+
+\DeclareBiblistFilter{primary}{
+ \filteror{
+ \filter[type=subtype,filter=primarysource]
+ \filter[type=type,filter=classictext]
+ }
+ \filteror{
+ \filter[type=field,filter=shorthand]
+ \filter[type=field,filter=shorttitle]
+ }
+}
+
+\DeclareBiblistFilter{secondary}{
+ \filteror{
+ \filter[type=field,filter=shorthand]
+ \filter[type=field,filter=shortjournal]
+ \filter[type=field,filter=shortseries]
}
}
@@ -752,25 +831,65 @@
{}
{\iffieldundef{shortjournal}
{}
- {\ifcsdef{sbl\therefsection\strfield{shortjournal}=\strfield{journaltitle}}
+ {\ifcsdef{\therefsection-\strfield{shortjournal}=\strfield{journaltitle}}
{\skipentry}
- {\savefieldcs{journaltitle}{sbl\therefsection\strfield{shortjournal}=\strfield{journaltitle}}}}%
+ {\savefieldcs{journaltitle}{\therefsection-\strfield{shortjournal}=\strfield{journaltitle}}}}%
\iffieldundef{shorthand}
- {\iffieldundef{shortseries}
+ {}
+ {\ifcsdef{\therefsection-\strfield{shorthand}=\strfield{shorttitle}}
+ {\skipentry}
+ {\savefieldcs{shorthand}{\therefsection-\strfield{shorthand}=\strfield{shorttitle}}}}%
+ \ifentrytype{classictext}
+ {\iffieldundef{shorttitle}
{}
- {\ifcsdef{sbl\therefsection\strfield{shortseries}=\strfield{series}}
+ {\ifcsdef{\therefsection-\strfield{shorttitle}=\strname{author}\strfield{title}}
{\skipentry}
- {\savefieldcs{series}{sbl\therefsection\strfield{shortseries}=\strfield{series}}}}}
- {\ifcsdef{sbl\therefsection\strfield{shorthand}=\strfield{title}}
+ {\savefieldcs{shorttitle}{\therefsection-\strfield{shorttitle}=\strname{author}\strfield{title}}}}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\ifcsdef{\therefsection-\strfield{shortseries}=\strfield{series}}
{\skipentry}
- {\savefieldcs{shorthand}{sbl\therefsection\strfield{shorthand}=\strfield{title}}}}}}
-
-\DeclareSortingTemplate{abbreviations}{%
- \sort{%
- \field{shorthand}%
- \field{shortjournal}%
- \field{shortseries}%
- }%
+ {\savefieldcs{series}{\therefsection-\strfield{shortseries}=\strfield{series}}}}%
+ \iffieldequalstr{entrysubtype}{churchfather}
+ {\skipentry}
+ {}%
+ \ifboolexpr{
+ not test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ and
+ test {\iffieldundef{shortjournal}}
+ and
+ test {\iffieldundef{shorthand}}
+ and
+ test {\iffieldundef{shortseries}}
+ }
+ {\skipentry}
+ {}}}
+
+\DeclareSortingTemplate{abbreviations}{
+ \sort{
+ \field{sortshorthand}
+ \field{shorthand}
+ \field{shortjournal}
+ \field{shortseries}
+ \field{shorttitle}
+ }
+ \sort{
+ \field{journaltitle}
+ \field{author}
+ \field{title}
+ \field{series}
+ }
}
% ------------------------------------------------------------------
@@ -787,13 +906,14 @@
\step[fieldset=shorttitle, fieldvalue={$1}]
}
\map{
- \step[fieldsource=journaltitle, match=\regexp{(.*?):}, final]
- \step[fieldset=shortjournal, fieldvalue={$1}]
- }
- \map{
\step[fieldsource=revdtitle, match=\regexp{(.*?):}, final]
\step[fieldset=revdshorttitle, fieldvalue={$1}]
}
+ \map[overwrite=true]{
+ \step[notfield=sorttitle, final]
+ \step[fieldsource=title, match=\regexp{^(A|An|The)\s+(.+)}, final]
+ \step[fieldset=sorttitle, fieldvalue={$2}]
+ }
\map{
\pertype{suppbook}
\pertype{suppcollection}
@@ -826,16 +946,6 @@
\step[fieldset=journalsubtitle, origfieldval]
}
\map{
- \pertype{periodical}
- \step[fieldsource=shorttitle, final]
- \step[fieldset=shortjournal, origfieldval]
- }
- \map{
- \step[fieldsource=journalsubtitle, final]
- \step[fieldsource=journaltitle, final]
- \step[fieldset=shortjournal, origfieldval]
- }
- \map{
\step[fieldsource=entrysubtype, match=\regexp{ANRW}, final]
\step[fieldset=options, fieldvalue={skipbib=false}]
}
@@ -857,17 +967,32 @@
\pertype{ancienttext}
\pertype{classictext}
\step[fieldsource=related, final]
- \step[fieldset=relatedtype, fieldvalue=ancienttext]
\step[fieldsource=relatedoptions, match=\regexp{(.*)}]
\step[fieldset=relatedoptions, fieldvalue={skipbib=false,skipbiblist=false,}]
\step[fieldset=relatedoptions, fieldvalue={$1}, append]
+ \step[notfield=relatedtype, final]
+ \step[fieldset=relatedtype, fieldvalue=ancienttext]
}
\map[overwrite]{
\step[fieldsource=shortseries, final]
\step[fieldsource=shorthand, final]
\step[fieldsource=entrykey, match=\regexp{(.*)}]
\step[fieldset=xref, fieldvalue=series-$1]
- \step[entrynew=series-$1, entrynewtype=misc]
+ \step[entrynew=series-$1, entrynewtype=series]
+ \step[fieldsource=shortseries]
+ \step[fieldset=shortseries, origfieldval, entrytarget=series-$1]
+ \step[fieldsource=series]
+ \step[fieldset=series, origfieldval, entrytarget=series-$1]
+ \step[fieldset=options, fieldvalue={skipbib}, entrytarget=series-$1]
+ }
+ \map[overwrite]{
+ \pertype{classictext}
+ \step[fieldsource=shortseries, final]
+ \step[fieldsource=shorttitle, final]
+ \step[fieldset=sortshorthand, origfieldval]
+ \step[fieldsource=entrykey, match=\regexp{(.*)}]
+ \step[fieldset=xref, fieldvalue=series-$1]
+ \step[entrynew=series-$1, entrynewtype=series]
\step[fieldsource=shortseries]
\step[fieldset=shortseries, origfieldval, entrytarget=series-$1]
\step[fieldsource=series]
@@ -959,10 +1084,28 @@
{#2}}
\ExplSyntaxOn
-\cs_new_protected:Nn \sbl_ifinstringt:nnn {
- \tl_if_in:nnT {#2}{#1}{#3}}
-\cs_generate_variant:Nn \sbl_ifinstringt:nnn { non }
-\cs_new_eq:NN \IfInStringT \sbl_ifinstringt:non
+\cs_new_protected:Nn \sbl_ifinstringtf:nnnn {
+ \tl_if_in:nnTF {#2}{#1}{#3}{#4}}
+\cs_generate_variant:Nn \sbl_ifinstringtf:nnnn { nonn }
+\cs_new_eq:NN \IfInStringTF \sbl_ifinstringtf:nonn
+
+\DeclareExpandableDocumentCommand \iffirstcharsec { m m m }
+ {
+ \exp_args:Nnf \IfInStringTF { § } { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ {
+ \exp_args:Nnf \IfInStringTF { \textsection } { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ { #3 }
+ }
+ }
+
+\DeclareExpandableDocumentCommand \iffirstcharnum { m m m }
+ {
+ \exp_args:Nf \ifnumeral { \tl_use:N \tl_head:f { #1 } }
+ { #2 }
+ { #3 }
+ }
\ExplSyntaxOff
\newbibmacro*{setpostnotedelim}{%
@@ -971,38 +1114,52 @@
{}%
\iffieldundef{postnote}
{}
- {\IfInStringT{.}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{:}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{§}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@postnote}
- {\renewcommand*{\postnotedelim}{\addspace}}}}
+ {\iffirstcharnum{\abx@field@postnote}
+ {\ifboolexpr{
+ test {\ifentrytype{ancienttext}}
+ and
+ test {\usebibmacro{ifuseshorthand}}
+ }
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}%
+ \ifboolexpr{
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ }
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}%
+ \IfInStringTF{.}{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}}
+ {\iffirstcharsec{\abx@field@postnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}
+ {}}}}
\newbibmacro*{setaltpostnotedelim}{%
\iffieldundef{altpostnote}
{}
- {\IfInStringT{.}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{:}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{§}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@altpostnote}
- {\renewcommand*{\postnotedelim}{\addspace}}}}
+ {\IfInStringTF{.}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{§}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}%
+ \IfInStringTF{\textsection}{\abx@field@altpostnote}
+ {\renewcommand*{\postnotedelim}{\addspace}}{}}}
\newbibmacro*{setpagesdelim}{%
\iffieldundef{pages}
{}
- {\IfInStringT{.}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{:}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{§}{\abx@field@pages}
- {\setunit{\addspace}}%
- \IfInStringT{\textsection}{\abx@field@pages}
- {\setunit{\addspace}}}}
+ {\IfInStringTF{.}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{:}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{§}{\abx@field@pages}
+ {\setunit{\addspace}}{}%
+ \IfInStringTF{\textsection}{\abx@field@pages}
+ {\setunit{\addspace}}{}}}
% ------------------------------------------------------------------
% JOINING WORD MACROS
@@ -1123,6 +1280,24 @@
{\printtext[maintitle]{\printfield[titlecase]{shortmaintitle}}}%
\newunit}
+\newbibmacro*{classictexttitle}{%
+ \ifboolexpr{%
+ not togl {blx@useshorttitle}
+ or
+ test {\iffieldundef{shorttitle}}
+ }
+ {\iffieldundef{title}
+ {}
+ {\printtext[title]{%
+ \printfield[titlecase]{title}%
+ \setunit{\subtitlepunct}%
+ \printfield[titlecase]{subtitle}}%
+ \newunit
+ \printfield{titleaddon}%
+ \usebibmacro{language}}}
+ {\printtext[shorttitle]{%
+ \bibhyperlink{\strfield{shorttitle}\strname{author}}{\thefield{shorttitle}}}}}
+
\renewbibmacro*{title}{%
\ifciteseen
{\usebibmacro{shorttitle}}
@@ -1226,14 +1401,17 @@
\newbibmacro*{shortjournal}{%
\iffieldundef{shortjournal}
- {\printfield{journaltitle}}
+ {\printtext[journaltitle]{%
+ \printfield[titlecase]{journaltitle}%
+ \setunit*{\subtitlepunct}%
+ \printfield[titlecase]{journalsubtitle}}}
{\printtext[shortjournal]{%
\bibhyperlink{\strfield{shortjournal}}{\thefield{shortjournal}}}}}
\newbibmacro*{shortjournal+issue}{%
\usebibmacro{shortjournal}%
\setunit{\addspace}%
- \usebibmacro{series+volume+number+eid}%
+ \usebibmacro{series+volume+number}%
\ifboolexpr{
not test {\ifnameundef{editor}}
or
@@ -1262,7 +1440,8 @@
test {\iffieldundef{date}}
}
{\usebibmacro{setpagesdelim}}
- {}}
+ {}%
+ \usebibmacro{eid}}
\renewbibmacro*{issue+date}{%
\ifboolexpr{
@@ -1296,7 +1475,7 @@
\usebibmacro{date}}}%
\setunit{\addcolon\space}}}}
-\newbibmacro*{series+volume+number+eid}{%
+\newbibmacro*{series+volume+number}{%
\iffieldundef{series}
{}
{\newunit
@@ -1304,9 +1483,7 @@
\newunit}%
\printfield{volume}%
\setunit*{\addperiod}%
- \printfield{number}%
- \setunit{\addcomma\space}%
- \printfield{eid}}
+ \printfield{number}}
\newbibmacro{inissuetitle}{%
\iffieldundef{issuetitle}
@@ -1325,7 +1502,7 @@
{\printtext[issuetitle]{\printfield[titlecase]{shortissuetitle}}}%
\newunit}
-\newbibmacro{issuetitle}{%
+\newbibmacro*{issuetitle}{%
\iffieldundef{issuetitle}
{}
{\ifciteseen
@@ -1335,6 +1512,10 @@
\setunit*{\subtitlepunct}%
\printfield[titlecase]{issuesubtitle}}}}}
+\newbibmacro*{eid}{%
+ \printfield{eid}%
+ \setunit*{\addcomma\space}}
+
% ------------------------------------------------------------------
% NAME MACROS
% ------------------------------------------------------------------
@@ -1699,15 +1880,13 @@
{}}
\newbibmacro*{byauthor/byeditor+others/bytranslator+others}{%
- \iffieldundef{title}
- {}
- {\usebibmacro{byauthor}%
+ \usebibmacro{byauthor}%
+ \newunit
+ \usebibmacro{ifbooktitleormaintitle}
+ {\usebibmacro{byeditor/bytranslator}}
+ {\usebibmacro{byeditor+others}%
\newunit
- \usebibmacro{ifbooktitleormaintitle}
- {\usebibmacro{byeditor/bytranslator}}
- {\usebibmacro{byeditor+others}%
- \newunit
- \usebibmacro{bytranslator+others}}}}
+ \usebibmacro{bytranslator+others}}}
\newbibmacro*{bybookeditor}{%
\ifnameundef{bookeditor}
@@ -2386,10 +2565,11 @@
\usedriver
{\renewbibmacro*{related:init}{}%
\ifbibliography
- {\renewbibmacro*{parens+publisher+location+date}{%
- \newunit
- \usebibmacro{publisher+location+date}}}
- {}}
+ {}
+ {\renewcommand*{\newunitpunct}{\addsemicolon\space}}%
+ \renewbibmacro*{parens+publisher+location+date}{%
+ \newunit
+ \usebibmacro{publisher+location+date}}}
{\ifbibliography
{\thefield{entrytype}}
{cite:\thefield{entrytype}}}}}
@@ -2421,23 +2601,27 @@
\newtoggle{blx@testpostnotedelim}
\newbibmacro*{volume+part+postnote}{%
- \usebibmacro{volume}%
- \iffieldundef{part}
- {}
- {\setunit{\addperiod}%
- \printfield{part}}%
- \iftoggle{blx@testpostnotedelim}{\usebibmacro{setpostnotedelim}}{}%
- \ifbool{usevolpostnotedelim}
- {\setunit{\volpostnotedelim}}
- {\setunit{\postnotedelim}}%
\ifboolexpr{
test {\ifciteseen}
- or
- test {\iffieldundef{pages}}
+ and
+ test {\iffieldundef{postnote}}
}
- {\printfield{postnote}}
- {\usebibmacro{pages}}%
- \global\booltrue{suppresspostnote}}
+ {}
+ {\usebibmacro{volume}%
+ \iffieldundef{part}
+ {}
+ {\setunit{\addperiod}%
+ \printfield{part}}%
+ \iftoggle{blx@testpostnotedelim}{\usebibmacro{setpostnotedelim}}{}%
+ \ifbool{usevolpostnotedelim}
+ {\setunit{\volpostnotedelim}}
+ {\setunit{\postnotedelim}}%
+ \ifciteseen
+ {\printfield{postnote}}
+ {\iffieldundef{pages}
+ {\printfield{postnote}}
+ {\usebibmacro{pages}}}%
+ \global\booltrue{suppresspostnote}}}
\newbibmacro*{classic:translator+series}{%
\ifnameundef{translator}
@@ -2448,7 +2632,10 @@
\iftoggle{blx@useseries}
{\newunit
\usebibmacro{shortseries}}
- {}}}}
+ {}%
+ \usebibmacro{setaltpostnotedelim}%
+ \setunit{\postnotedelim}%
+ \printfield{altpostnote}}}}
% ------------------------------------------------------------------
% ALTERNATE POSTNOTE MACROS
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.pdf
index 3f2859021f..2d7f40a15e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.tex b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.tex
index 02ea67f292..35caf8365a 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/biblatex-sbl.tex
@@ -11,7 +11,7 @@
\usepackage{framed}
\usepackage{enumitem}
-\usepackage[style=sbl,indexing=cite,idemtracker=false,ibidtracker=false]{biblatex}
+\usepackage[style=sbl,indexing=cite]{biblatex}
\addbibresource{biblatex-sbl.bib}
\hypersetup{colorlinks,citecolor=spot}
@@ -143,15 +143,16 @@
\biblatexsbl provides support to \biblatex and LaTeX for citations,
bibliography, and a list of abbreviations in the style recommended by the
Society of Biblical Literature (\citeshorthand{SBL}). The style conforms to
-the second edition of the \cite{SBLHS}.
-
-The style supports all examples given in the handbook (see
-\sty{biblatex-sbl-examples.pdf}). Shorthand citations and a list of
-abbreviations containing journals, series, and shorthands are handled
-automatically. Repeated authors in the bibliography are replaced by a
-horizontal line. \emph{Ibidem} and \emph{idem} is enabled by default. Indexing
-of names is supported, but not enabled by default. Only note style citations,
-not Author-Date citations are supported. Primary sources can be cited in
+the second edition of the \cite{SBLHS} and includes updates from the
+\citetitle*{sblhs2.com} blog \autocite{sblhs2.com}.
+
+The style supports all examples given in the handbook and any relevant updates
+given on the Blog (see \sty{biblatex-sbl-examples.pdf}). Shorthand citations
+and a list of abbreviations containing journals, series, and shorthands are
+handled automatically. Repeated authors in the bibliography are replaced by a
+horizontal line. \emph{Ibidem}, \emph{idem} and indexing of names are
+supported, but not enabled by default. Only note style citations,
+not Author-Date citations, are supported. Primary sources can be cited in
parentheses. \biblatexsbl is compatible with \biblatex's support for
\sty{hyperref}.
@@ -211,7 +212,7 @@ and Hebrew usage with \sty{babel}.
\begin{quote}
\begin{lstlisting}[style=latex]{}
-\usepackage[nil,bidi=default]{babel}
+\usepackage[nil,bidi=default]{babel}% consider bidi=basic for lualatex
\usepackage{csquotes}
\babelprovide[import=en-US,main]{american}
\babelprovide[import=he]{hebrew}
@@ -275,17 +276,35 @@ e.g.,
\sampleparencite[2.233-235]{josephus:ant}
\end{snugshade}
-\cmditem{journalcite}{key}
-\cmditem{seriescite}{key}
-\cmditem{shorthandcite}{key}
-
-\cmd{journalcite}, \cmd{seriescite}, and \cmd{shorthandcite} inserts the
+\cmditem{citefullauthor}[prenote][postnote]{key}
+\cmditem{citefullauthor*}[prenote][postnote]{key}
+\cmditem{Citefullauthor}[prenote][postnote]{key}
+\cmditem{Citefullauthor*}[prenote][postnote]{key}
+
+These commands print the full names of the authors. Strictly speaking, it
+prints the \bibfield{labelname} list in the format of a first citation, which
+may be the \bibfield{author}, the \bibfield{editor}, or the
+\bibfield{translator}. \cmd{Citefullauthor} is similar to \cmd{citefullauthor}
+but capitalizes the name prefix of the first name in the citation if the
+\opt{useprefix} option is enabled, provided that there is a name prefix. The
+starred variants effectively force \opt{maxcitenames} to 1 for just this
+command on so only print the first name in the \bibfield{labelname} list
+(potentially followed by the “et al” string if there are more names). This
+allows more natural textual flow when referring to a paper in the singular
+when otherwise \cmd{citefullauthor} would generate a (naturally plural) list
+of names.
+
+\cmditem{citejournal}{key}
+\cmditem{citeseries}{key}
+\cmditem{citeshorthand}{key}
+
+\cmd{citejournal}, \cmd{citeseries}, and \cmd{citeshorthand} inserts the
respective abbreviation into the text and also adds it to the list of
abbreviations. The abbreviation is hyperlinked to the list of abbreviations if
the \sty{hyperref} package is loaded.
-These commands ignore the \bibfield{prenote} and \bibfield{postnote} fields,
-so can safely be used anywhere within a database entry.
+These commands do not take a \bibfield{prenote} or \bibfield{postnote} field,
+and can safely be used nested within a citation.
\cmditem{printbiblist}
@@ -316,8 +335,8 @@ custom ones outlined below.
\optitem[false]{accessdate}{\opt{true}, \opt{false}}
The \cite{SBLHS} discourages the use of access
-dates.\autocite[See][§6.1.6, 84]{SBLHS} If they are required this option can be
-passed to \biblatex.
+dates \autocite[See][§6.1.6, 84]{SBLHS}. If they are required this option can
+be passed to \biblatex.
\optitem[sbl]{citepages}{\opt{sbl}, \opt{permit}, \opt{omit}, \opt{separate}}
@@ -341,7 +360,7 @@ the first time an entry is cited.
The one exception to this is the \bibtype{incommentary} entry type which
always sets \opt{citepages} to \opt{omit} (see below) when \bibfield{volume}
- is defined.\autocite[See][§1.3.3.2]{SBLHS:studentsupp}
+ is defined \autocite[See][§1.3.3.2]{SBLHS:studentsupp}.
\item[permit] The \bibfield{postnote} is printed in parentheses after the
\bibfield{pages} field. e.g.,
@@ -397,7 +416,7 @@ controls the format of the \bibfield{eprintdate}.
The \emph{Student Supplement for the} \cite{SBLHS} permits two styles for the
bibliography entry for Bible dictionaries, encyclopaedias, and multivolume
commentaries for the entire Bible by multiple
-authors.\autocite[4–5]{SBLHS:studentsupp}
+authors \autocite[4–5]{SBLHS:studentsupp}.
This option applies to \bibtype{inreference} and \bibtype{incommentary}
entry types.
@@ -419,7 +438,7 @@ entry types.
\end{snugshade}
\end{valuelist}
-\optitem[constrict]{ibidtracker}{\opt{true}, \opt{false}, \opt{context},
+\optitem[false]{ibidtracker}{\opt{true}, \opt{false}, \opt{context},
\opt{strict}, \opt{constrict}}
This option controls the \emph{ibidem} tracker. The possible choices are:
@@ -444,17 +463,19 @@ This option controls the \emph{ibidem} tracker. The possible choices are:
the same footnote or in immediately consecutive footnotes.
\end{valuelist}
-\boolitem[false]{ibidpage}
+\boolitem[true]{ibidpage}
The scholarly abbreviation \emph{ibidem} is sometimes taken to mean both ‘same
author + same title’ and ‘same author + same title + same page’ in traditional
-citation schemes. By default, this is not the case with this style because it
-may lead to ambiguous citations. If you prefer the wider interpretation of
-\emph{ibidem}, set the package option \opt{ibidpage=true} or simply
-\opt{ibidpage} in the preamble. The default setting is \opt{ibidpage=false}.
+citation schemes. In line with SBL recommendations, this style uses the
+latter.\footnote{See
+\url{https://sblhs2.com/2017/01/05/subsequent-bibliographic-references/}.} If
+you prefer the narrower interpretation of \emph{ibidem}, set the package
+option \opt{ibidpage=false} in the preamble. The default setting is
+\opt{ibidpage=true}.
-\optitem[constrict]{idemtracker}{\opt{true}, \opt{false}, \opt{context},
-\opt{strict}, \opt{constrict}}
+\optitem[sbl]{idemtracker}{\opt{true}, \opt{false}, \opt{context},
+\opt{strict}, \opt{constrict}, \opt{citation}, \opt{sbl}}
This option controls the \emph{idem} tracker. The possible choices are:
@@ -470,7 +491,12 @@ This option controls the \emph{idem} tracker. The possible choices are:
\item[constrict] This mode is similar to \opt{context} with one additional
condition: a reference in a footnote will only be considered as unambiguous
if the current citation and the previous citation are given in the same
- footnote.
+ footnote or in immediately consecutive footnotes.
+\item[citation] This option only allows \emph{idem} within a citation or
+ footnote. This is the preferred option if you intend to use \emph{idem}.
+\item[sbl] This option is similar to \opt{citation}, but does not actually
+ use \emph{idem}. Rather, it uses the author family name in subsequent
+ citations. This is the default option to comply with SBL style.
\end{valuelist}
\optitem[true]{pagetracker}{\opt{true}, \opt{false}}
@@ -886,6 +912,10 @@ This field holds the month component of the \bibfield{eprintdate} field.
This field holds the year component of the \bibfield{eprintdate} field.
+\listitem{mainauthor}{name}
+
+The author(s) of the \bibfield{maintitle}.
+
\listitem{maineditor}{name}
The editor(s) of the \bibfield{maintitle}.
@@ -966,6 +996,14 @@ automatically inserted into the list of abbreviations.
The \bibfield{title} in abridged form. This is printed instead of the full
title on subsequent citations.
+\fielditem{sorttitle}{literal}
+
+A field used to modify the sorting order of the bibliography. If present, this
+field is used instead of the title field when sorting the bibliography. This
+field is automatically populated if it doesn't exist and the \bibfield{title}
+field begins with `A', `An', or `The' so that these articles do not affect
+sorting.
+
\listitem{withauthor}{name}
The author(s) who assist the \bibfield{author}. See \bibfield{witheditortype},
@@ -1251,6 +1289,14 @@ e.g.,
\section{Important Changes}
+\subsection*{0.12\quad 2020-11-04}
+
+\begin{itemize}
+ \item Ibid.\@ and idem are no longer used by default.
+ \item Only the author family name is printed for subsequent citations of a
+ different work by the same author within a footnote or citation.
+\end{itemize}
+
\subsection*{0.11\quad 2018-12-13}
\begin{itemize}
@@ -1269,7 +1315,7 @@ e.g.,
\begin{itemize}[itemsep=0pt]
\item Support and require \biblatex 3.11.
- \item Use ibid and idem by default.
+ \item Use ibid.\@ and idem by default.
\item \sty{polyglossia} is no longer supported. You should use \sty{babel}
instead.
\end{itemize}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/english-sbl.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/english-sbl.lbx
index e56c07368a..88b94e5bbe 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/english-sbl.lbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/english-sbl.lbx
@@ -26,7 +26,8 @@
commonera = {{CE}{CE}},
beforecommonera = {{BCE}{BCE}},
annodomini = {{AD}{AD}},
- beforechrist = {{BC}{BC}}
+ beforechrist = {{BC}{BC}},
+ article = {{article}{art\adddot}},
}
\DeclareBibliographyExtras{%
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/german-sbl.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/german-sbl.lbx
index cb98da0185..a6d6fe8b09 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/german-sbl.lbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/german-sbl.lbx
@@ -25,4 +25,5 @@
beforecommonera = {{v\adddotspace u\adddotspace Z\adddot}{v\adddotspace u\adddotspace Z\adddot}},
annodomini = {{n\adddotspace Chr\adddot}{n\adddotspace Chr\adddot}},
beforechrist = {{v\adddotspace Chr\adddot}{v\adddotspace Chr\adddot}},
+ article = {{artikel}{art\adddot}},
}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.pdf
index a297d85e2e..91e1112207 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.sty b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.sty
index 65a1884b92..2a44292b3e 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.sty
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.sty
@@ -1,4 +1,4 @@
-%Copyright 2015-2018 David Purton
+%Copyright 2015-2020 David Purton
%
%This work may be distributed and/or modified under the
%conditions of the LaTeX Project Public License, either version 1.3
@@ -13,7 +13,7 @@
%The Current Maintainer of this work is David Purton.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{sbl-paper}
- [2018/05/24 Society of Bibilical Literature Paper Style (DCP)]
+ [2020/11/04 Society of Bibilical Literature Paper Style (DCP)]
% Load required packages
@@ -565,7 +565,7 @@
\biblerefmap{Timothy2}{02@\br@newtestament !16}
\biblerefmap{Titus}{02@\br@newtestament !17}
\biblerefmap{Phlm}{02@\br@newtestament !18}
-\biblerefmap{Phlemon}{02@\br@newtestament !18}
+\biblerefmap{Philemon}{02@\br@newtestament !18}
\biblerefmap{Heb}{02@\br@newtestament !19}
\biblerefmap{Hebrews}{02@\br@newtestament !19}
\biblerefmap{Jas}{02@\br@newtestament !20}
@@ -581,4 +581,14 @@
\biblerefmap{Rev}{02@\br@newtestament !27}
\biblerefmap{Revelation}{02@\br@newtestament !27}
+
+% Style Options
+
+\DeclareOption{jblstyle}{%
+ \renewcommand\@makefntext[1]{%
+ \parindent\footnotemargin\normalsize\@thefnmark.\@\space\footnotelayout #1}
+ \renewcommand{\footnotelayout}{\raggedright\normalsize\doublespacing}}
+
+\ProcessOptions\relax
+
\endinput
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.tex b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.tex
index 633965f8bd..f099fbca63 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl-paper.tex
@@ -21,7 +21,11 @@
% Language and font set up
% Note: Polyglossia is *not* well supported
\ifxetexorluatex
- \usepackage[nil,bidi=default]{babel}
+ \ifluatex
+ \usepackage[nil,bidi=basic]{babel}
+ \else
+ \usepackage[nil,bidi=default]{babel}
+ \fi
\babelprovide[import=en-US,main]{american}
\babelprovide[import=he]{hebrew}
\babelprovide[import=el]{polutonikogreek}
@@ -42,6 +46,7 @@
% Load main style
% Pass indexing=cite to biblatex (if you want author indexing)
\PassOptionsToPackage{indexing=cite}{biblatex}
+% Pass jblstyle to sbl-paper if you want double spaced footnotes
\usepackage{sbl-paper}
% Add your bib resource here
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.bbx
index 4c9ee7f50d..3afa6beffc 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.bbx
@@ -65,7 +65,9 @@
\usebibmacro{bymaintranslator+others}}%
\usebibmacro{publisher+location+date}%
\newunit}
- {\DeclareFieldFormat[ancienttext]{title}{\mkbibemph{##1}}%
+ {\iffieldequalstr{entrysubtype}{primarysource}
+ {}
+ {\DeclareFieldFormat[ancienttext]{title}{\mkbibemph{##1}}}%
\clearfield{related}%
\usedriver{}{book}}%
\usebibmacro{finentry}%
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
index bb745ef0b8..6e67fb24f4 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.cbx
@@ -130,11 +130,23 @@
\sloppy
\hangindent 6em\rlap
{\printfield[shorthandwidth]{shortjournal}%
- \iffieldundef{shorthand}
- {\printfield[shorthandwidth]{shortseries}}
- {\iffieldsequal{shorthand}{shorttitle}
- {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
- {\printfield[shorthandwidth]{shorthand}}}}%
+ \iffieldsequal{shorthand}{shorttitle}
+ {\printtext{\mkbibemph{\printfield[shorthandwidth]{shorthand}}}}
+ {\printfield[shorthandwidth]{shorthand}}%
+ \ifentrytype{classictext}
+ {\printfield{shorttitle}}
+ {}%
+ \ifboolexpr{
+ not test {\iffieldundef{shorthand}}
+ or
+ (
+ test {\ifentrytype{classictext}}
+ and
+ not test {\iffieldundef{shorttitle}}
+ )
+ }
+ {}
+ {\printfield{shortseries}}}%
\renewcommand*{\bibhypertarget}[2]{##2}%
\hskip 6em \setunit{}\usedriver{}{abbreviations}\par
}
@@ -294,23 +306,50 @@
{\multicitedelim}
{\usebibmacro{cite:postnote}}
-\DeclareCiteCommand{\citeseries}
- {}
+\newrobustcmd*{\Citefullauthor}{%
+ \@ifstar{\bibsentence\citefullauthor*}{\bibsentence\citefullauthor}}
+
+\DeclareCiteCommand{\citefullauthor}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printnames[given-family]{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+\DeclareCiteCommand*{\citefullauthor}
+ {\boolfalse{citetracker}%
+ \boolfalse{pagetracker}%
+ \usebibmacro{prenote}}
+ {\ifciteindex
+ {\indexnames{labelname}}
+ {}%
+ \printnames[given-family][1-1]{labelname}}
+ {\multicitedelim}
+ {\usebibmacro{postnote}}
+
+% Thanks to @moewe (https://tex.stackexchange.com/a/497548/87678)
+\newcommand*{\DeclareNestableCiteCommand}[2]{%
+ \newcommand*{#1}[1]{%
+ \blx@xsanitizeafter\blx@nocite@do{##1}%
+ \blx@ifdata{##1}
+ {\begingroup
+ \blx@blxinit
+ \entrydata{##1}{#2}%
+ \endgroup}
+ {\abx@missing@entry{##1}}}}
+
+\DeclareNestableCiteCommand{\citeseries}
{\usebibmacro{shortseries}}
- {}
- {}
-\DeclareCiteCommand{\citejournal}
- {}
+\DeclareNestableCiteCommand{\citejournal}
{\usebibmacro{shortjournal}}
- {}
- {}
-\DeclareCiteCommand{\citeshorthand}
- {}
+\DeclareNestableCiteCommand{\citeshorthand}
{\usebibmacro{shorthand}}
- {}
- {}
\newbibmacro*{textcite}{%
\ifnameundef{labelname}
@@ -457,9 +496,9 @@
{\let\ifciteseen\@firstoftwo}%
\usebibmacro{author}%
\newunit
- \usebibmacro{shorttitlenohyperlink}%
\iffieldequalstr{entrysubtype}{churchfather}
- {\setunit{\addspace}%
+ {\usebibmacro{shorttitlenohyperlink}%
+ \setunit{\addspace}%
\printfield{altpostnote}%
\DeclareFieldFormat{related}{\mkbibparens{##1}}%
\renewcommand*{\begrelateddelim}{\addspace}%
@@ -467,7 +506,8 @@
\usebibmacro{related:init}%
\usebibmacro{related}%
\global\toggletrue{relatedseen}}
- {\clearfield{pages}%
+ {\usebibmacro{classictexttitle}%
+ \clearfield{pages}%
\usebibmacro{volume+part+postnote}%
\usebibmacro{classic:translator+series}}%
\usebibmacro{finentry}}
@@ -663,11 +703,13 @@
{\usebibmacro{xrefshortmaintitle}%
\iffieldundef{volume}
{}
- {\setunit{\addspace}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}%
- \global\booltrue{usevolpostnotedelim}}}
+ {\iffieldpages{postnote}
+ {\setunit{\addspace}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}%
+ \global\booltrue{usevolpostnotedelim}}
+ {}}}
{\printfield{note}%
\newunit
\usebibmacro{xrefshortmaintitle}%
@@ -743,11 +785,13 @@
{\usebibmacro{xrefshortmaintitle+xrefshortbooktitle}%
\iffieldundef{volume}
{}
- {\setunit{\addspace}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}%
- \global\booltrue{usevolpostnotedelim}}}
+ {\iffieldpages{postnote}
+ {\setunit{\addspace}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}%
+ \global\booltrue{usevolpostnotedelim}}
+ {}}}
{\usebibmacro{title}%
\newunit
\printfield{note}%
@@ -773,11 +817,13 @@
{\newunit
\iffieldundef{volume}
{}
- {\newunit
- \global\booltrue{usevolpostnotedelim}%
- \printfield{volume}%
- \setunit*{\addperiod}%
- \printfield{part}}}
+ {\iffieldpages{postnote}
+ {\newunit
+ \global\booltrue{usevolpostnotedelim}%
+ \printfield{volume}%
+ \setunit*{\addperiod}%
+ \printfield{part}}
+ {}}}
{\newunit
\printfield{note}%
\newunit
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.dbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.dbx
index 02f0b2ed21..53ff00bc0f 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.dbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/sbl.dbx
@@ -2,8 +2,12 @@
\DeclareDatamodelEntrytypes{
ancienttext,
+ classictext,
conferencepaper,
+ mvcommentary,
incommentary,
+ lexicon,
+ mvlexicon,
inlexicon,
review,
seminarpaper}
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/spanish-sbl.lbx b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/spanish-sbl.lbx
index e6a8345dfa..d41cf64e04 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-sbl/spanish-sbl.lbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-sbl/spanish-sbl.lbx
@@ -25,5 +25,6 @@
commonera = {{e\adddotspace c\adddot}{e\adddotspace c\adddot}},
beforecommonera = {{a\adddotspace e\adddotspace c\adddot}{a\adddotspace e\adddotspace c\adddot}},
annodomini = {{d\adddotspace C\adddot}{d\adddotspace C\adddot}},
- beforechrist = {{a\adddotspace C\adddot}{a\adddotspace C\adddot}}
+ beforechrist = {{a\adddotspace C\adddot}{a\adddotspace C\adddot}},
+ article = {{art{\'i}culo}{art\adddot}},
}
diff --git a/macros/latex/contrib/fgruler/fgruler.dtx b/macros/latex/contrib/fgruler/fgruler.dtx
index 385795b7a8..855e1411a6 100644
--- a/macros/latex/contrib/fgruler/fgruler.dtx
+++ b/macros/latex/contrib/fgruler/fgruler.dtx
@@ -21,13 +21,15 @@
\ProvidesFile{fgruler.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-%<package>\ProvidesPackage{fgruler}[2020/10/26 v1.2 Package for drawing rulers on the foreground or in the text]
+%<package>\ProvidesPackage{fgruler}[2020/11/04 v1.3 Package for drawing rulers on the foreground or in the text]
%
%<*driver>
\documentclass{ltxdoc}
\OnlyDescription
\usepackage[a4paper,margin=25mm,marginparwidth=19mm,marginparsep=5mm,headsep=5mm,headheight=4mm,footskip=10mm]{geometry}
\usepackage[pdfstartview=FitH,colorlinks,allcolors=black,bookmarksnumbered,hyperfootnotes=false]{hyperref}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{listings,fontawesome,fancyvrb}
\usepackage[type=none,color=red!80!black]{fgruler}
@@ -64,7 +66,7 @@ keepspaces]}
%
% \GetFileInfo{fgruler.sty}
%
-% \title{The {\bfseries\sffamily fgruler} package\\{\large v1.2 (2020/10/26)}}
+% \title{The {\bfseries\sffamily fgruler} package\\{\large v1.3 (2020/11/04)}}
% \author{Tibor T\'{o}m\'{a}cs\\{\normalsize\url{tomacs.tibor@uni-eszterhazy.hu}}}
% \date{}
% \maketitle
@@ -102,57 +104,59 @@ keepspaces]}
% By default, the \texttt{fgruler} package draws a square ruler on the foreground of every page. The following package options set the parameters of these rulers.
% \begin{description}
% \item\commandinline|unit=!<unit>!|\\
-% Ruler unit.
+% Ruler unit. The \commandinline|!<unit>!| legal values:
% \begin{description}
-% \item\commandinline|!<unit>!| values:\\
-% \commandinline|cm| Metric ruler (centimeter). Default value.\\
-% \commandinline|in| English ruler (inch).
+% \item\commandinline|cm| Metric ruler (centimeter). Default value.
+% \item\commandinline|in| English ruler (inch).
% \end{description}
%
% \item\commandinline|type=!<type name>!|\\
-% Origin and directions.
+% Origin, directions and lengths of the ruler. The \commandinline|!<type name>!| legal values:
% \begin{description}
-% \item\commandinline|!<type name>!| values:\\
-% \commandinline|upperleft | Origin: upper left corner. Directions: down and right. Default value.\\
-% \commandinline|upperright| Origin: upper right corner. Directions: down and left.\\
-% \commandinline|lowerleft | Origin: lower left corner. Directions: up and right.\\
-% \commandinline|lowerright| Origin: lower right corner. Directions: up and left.\\
-% \commandinline|none | Not drawing ruler.\\
-% \commandinline|user | Each \commandinline|!<unit>!|--\commandinline|!<type name>!| pair activates an \commandinline|\fgruler@!<unit>!@!<type name>!@fg| command. You can control the effect of this option by redefining the \commandinline|\fgruler@!<unit>!@user@fg| commands, which are empty in the default case. (See \ref{example:user1}, \ref{example:user2} and \ref{example:user3} examples.)
+% \item\commandinline|upperleft | Default value. Origin: upper left corner of the paper. Directions: down and right. Lengths: paper sizes.
+% \item\commandinline|upperright | Origin: upper right corner of the paper. Directions: down and left. Lengths: paper sizes.
+% \item\commandinline|lowerleft | Origin: lower left corner of the paper. Directions: up and right. Lengths: paper sizes.
+% \item\commandinline|lowerright | Origin: lower right corner of the paper. Directions: up and left. Lengths: paper sizes.
+% \item\commandinline|upperleftT | Origin: upper left corner of the text area. Directions: down and right. Lengths: text area sizes.
+% \item\commandinline|upperrightT| Origin: upper right corner of the text area. Directions: down and left. Lengths: text area sizes.
+% \item\commandinline|lowerleftT | Origin: lower left corner of the text area. Directions: up and right. Lengths: text area sizes.
+% \item\commandinline|lowerrightT| Origin: lower right corner of the text area. Directions: up and left. Lengths: text area sizes.
+% \item\commandinline|none| Not drawing ruler.
+% \item\commandinline|user| Each \commandinline|!<unit>!|--\commandinline|!<type name>!| pair activates an \commandinline|\fgruler@!<unit>!@!<type name>!@fg| command, which is equivalent to \commandinline|\fgrulertype{!<unit>!}{!<type name>!}|.\\
+% You can control the effect of this option by redefining the \commandinline|\fgruler@!<unit>!@user@fg| commands, which are empty in the default case.\\
+% \commandinline|\def\fgruler@cm@user@fg{!<code>!}| is equivalent to \commandinline|\fgrulerdefusercm{!<code>!}|.\\
+% Similarly, \commandinline|\def\fgruler@in@user@fg{!<code>!}| is equivalent to \commandinline|\fgrulerdefuserin{!<code>!}|.\\
+% See \ref{example:user-first}--\ref{example:user-last} examples.
% \end{description}
%
% \item\commandinline|hshift=!<length>!|\\
-% Horizontal shift.
-% The shift direction is right, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|lowerleft|, otherwise it is left.\\
-% Default: \verb|hshift=0cm|.\\ The \commandinline|!<length>!| is saved in \commandinline|\fgruler@hshift|.
+% Horizontal shift of the ruler, if the \commandinline|!<type name>!| is \verb|upperleft|, \verb|lowerleft|, \verb|upperright| or \verb|lowerright|.
+% The shift direction is right, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|lowerleft|.
+% The shift direction is left, if the \commandinline|!<type name>!| is \verb|upperright| or \verb|lowerright|.
+% Default: \verb|hshift=0cm|.
%
% \item\commandinline|vshift=!<length>!|\\
-% Vertical shift.
-% The shift direction is down, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|upperright|, otherwise it is up.\\
-% Default: \verb|vshift=0cm|.\\ The \commandinline|!<length>!| is saved in \commandinline|\fgruler@vshift|.
+% Vertical shift of the ruler, if the \commandinline|!<type name>!| is \verb|upperleft|, \verb|lowerleft|, \verb|upperright| or \verb|lowerright|.
+% The shift direction is down, if the \commandinline|!<type name>!| is \verb|upperleft| or \verb|upperright|.
+% The shift direction is up, if the \commandinline|!<type name>!| is \verb|lowerleft| or \verb|lowerright|.
+% Default: \verb|vshift=0cm|.
%
% \item\commandinline|color=!<color name>!|\\
-% Ruler color (see \texttt{xcolor} package).\\
-% Default: \verb|color=black|.\\ The \commandinline|!<color name>!| is saved in \commandinline|\fgruler@color|.
+% Ruler color (see \texttt{xcolor} package). Default: \verb|color=black|.
%
% \item\commandinline|numsep=!<length>!|\\
-% Separation between number and ruler.\\
-% Default: \verb|numsep=3pt|.\\ The \commandinline|!<length>!| is saved in \commandinline|\fgruler@numsep|.
+% Separation between number and ruler. Default: \verb|numsep=3pt|.
%
% \item\commandinline|markthick=!<length>!|\\
-% Mark thickness.\\
-% Default: \verb|markthick=0.4pt|.\\ The \commandinline|!<length>!| is saved in \commandinline|\fgruler@markthick|.
+% Mark thickness. Default: \verb|markthick=0.4pt|.
%
% \item\commandinline|marklength=!<length>!|\\
-% Mark length at integer units:
-% {\fgrulernoborderline\fgrulercaptioncm{}\fgrulerthickcm{}{}{1pt}\fgrulercolorcm{}{}{red}\ruler{rightup}{3cm}}\\
-% Default: \verb|marklength=2mm|.\\ The \commandinline|!<length>!| is saved in \commandinline|\fgruler@marklength|.\\
-% See the length of the other marks in Section \ref{sec:additional}.
+% Mark length at integer units (see the red marks):
+% {\fgrulernoborderline\fgrulercaptioncm{}\fgrulerthickcm{}{}{1pt}\fgrulercolorcm{}{}{red}\ruler{rightup}{3cm}}
+% Default: \verb|marklength=2mm|. See the length of the other marks in Section \ref{sec:additional}.
%
% \item\commandinline|numfont=!<font type>!|\\
-% Number font type.\\
-% You can use this option only in \verb|\setfgruler| command.\\
-% Default: \verb|numfont=\scriptsize\sffamily|.\\ The \commandinline|!<font type>!| is saved in \commandinline|\fgruler@numfont|.
+% Number font type. Default: \verb|numfont=\scriptsize\sffamily|. You can use this option only in \verb|\setfgruler| command.
%
% \item\commandinline|showframe| or \commandinline|showframe=true|\\
% It draws visible frames for the text and margin area, and lines for the head and foot.
@@ -297,15 +301,15 @@ keepspaces]}
% \item For example, \verb|\rulerparams{}{}{red}{}{}| changes the ruler color to red.
% \end{description}
%
+% \item\commandinline|\rulerparamsfromfg|\\
+% It sets the ruler parameters from the actual foreground ruler parameters.
+%
% \item\commandinline|\rulernorotatenum|\\
% By default, the numbers of the vertical rulers (which were generated by \verb|\ruler| or \verb|\squareruler|) are rotated by 90$^\circ$.
% It kills this action.
% This command is usable only in \texttt{document} environment.
%
-% Example: \verb|\ruler{upright}{1cm}| \ruler{upright}{1cm}\\
-% but
-% \verb|{\rulernorotatenum\ruler{upright}{1cm}}|
-% {\rulernorotatenum\ruler{upright}{1cm}}
+% Example: \verb|{\rulernorotatenum\ruler{upright}{1cm}}| {\rulernorotatenum\ruler{upright}{1cm}}
%
% \item\commandinline|\rulerrotatenum|\\
% After \verb|\rulernorotatenum|, it reactivates the number rotating.
@@ -316,19 +320,28 @@ keepspaces]}
% The following commands can work on all of the rulers, which are drawn by \texttt{fgruler} package.
% \begin{description}
% \item\commandinline|\fgrulerstartnum{!<num>!}|\\
-% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the ruler.
+% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the horizontal and vertical rulers.
% Default: \verb|\fgrulerstartnum{0}|
%
-% Example: \verb|{\fgrulerstartnum{5}\ruler{rightup}{3cm}}| {\fgrulerstartnum{5}\ruler{rightup}{3cm}}
+% Example: \verb|{\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnum{5}\squareruler{lowerleft}{3cm}{1cm}}
+%
+% \item\commandinline|\fgrulerstartnumh{!<num>!}|\\
+% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the horizontal rulers.
+% Default: \verb|\fgrulerstartnumh{0}|
+%
+% Example: \verb|{\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumh{5}\squareruler{lowerleft}{3cm}{1cm}}
+%
+% \item\commandinline|\fgrulerstartnumv{!<num>!}|\\
+% The \commandinline|!<num>!| is a nonnegative integer, which will be the starting number on the vertical rulers.
+% Default: \verb|\fgrulerstartnumv{0}|
+%
+% Example: \verb|{\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}| {\fgrulerstartnumv{5}\squareruler{lowerleft}{3cm}{1cm}}
%
% \item\commandinline|\fgrulernoborderline|\\
% By default, there is a borderline on one side of the ruler.
% It disappears by this command.
%
-% Example: \verb|\ruler{rightup}{3cm}| \ruler{rightup}{3cm}\\
-% but
-% \verb|{\fgrulernoborderline\ruler{rightup}{3cm}}|
-% {\fgrulernoborderline\ruler{rightup}{3cm}}
+% Example: \verb|{\fgrulernoborderline\ruler{rightup}{3cm}}| {\fgrulernoborderline\ruler{rightup}{3cm}}
%
% \item\commandinline|\fgrulerborderline|\\
% After \verb|\fgrulernoborderline|, it reactivates the previous default effect.
@@ -337,10 +350,7 @@ keepspaces]}
% Unit caption in metric ruler.
% Default: \verb|\fgrulercaptioncm{cm}|
%
-% Example: \verb|\ruler{rightup}{3cm}| \ruler{rightup}{3cm}\\
-% but
-% \verb|{\fgrulercaptioncm{}\ruler{rightup}{3cm}}|
-% {\fgrulercaptioncm{}\ruler{rightup}{3cm}}
+% Example: \verb|{\fgrulercaptioncm{}\ruler{rightup}{3cm}}| {\fgrulercaptioncm{}\ruler{rightup}{3cm}}
%
% \item\commandinline|\fgrulercaptionin{!<caption>!}|\\
% Unit caption in English ruler.
@@ -351,9 +361,7 @@ keepspaces]}
% Its current value is printed by the \commandinline|\thefgrulernum|.
% Its default definition is \verb|\def\thefgrulernum{\arabic{fgrulernum}}|, which is equivalent to \verb|\fgrulerdefnum{\arabic{fgrulernum}}|.
%
-% Example:\\
-% \verb|{\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}|
-% {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}
+% Example: \verb|{\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}| {\fgrulerdefnum{}\fgrulercaptioncm{}\ruler{rightdown}{2cm}}
%
% \item\commandinline|\fgrulerratiocm{!<ratio1>!}{!<ratio2>!}|\\
% Mark length ratios in metric rulers.
@@ -516,12 +524,12 @@ keepspaces]}
% \end{description}
%
% \medskip\noindent\textcolor{red}{\faWarning}
-% All setting commands\footnote{Namely \verb|\setfgruler|, \verb|\rulerparams|, \verb|\rulernorotatenum|, \verb|\rulerrotatenum|, furthermore all commands in this section.} obey the normal scoping rules, i.e.\ if you use them inside a group, then the changing of the parameters is not valid outside the group.
+% All setting commands obey the normal scoping rules, i.e.\ if you use them inside a group, then the changing of the parameters is not valid outside the group.
%
% \newpage\fgrulerreset
% \section{Examples}
% \subsection{Deafult case}
-% The output of the following code is the ruler in this page. It is the default case.
+% The output of the following example is the ruler in this page. It is the default case.
% \begin{examplelst}
% \documentclass{article}
% \usepackage{fgruler}
@@ -531,7 +539,7 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{The `showframe' option}
+% \subsection{The \texttt{showframe} and \texttt{color} options}
% \setfgruler{color=red,showframe}
% \begin{examplelst}
% \documentclass{article}
@@ -542,7 +550,7 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Shifting in default case}
+% \subsection{Shift in default case}
% \setfgruler{hshift=1cm,vshift=2cm}
% \begin{examplelst}
% \documentclass{article}
@@ -553,7 +561,7 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Shifting in case `type=upperright' option}
+% \subsection{Shift in case \texttt{type=upperright} option}
% \setfgruler{type=upperright,hshift=1cm,vshift=2cm}
% \begin{examplelst}
% \documentclass{article}
@@ -564,7 +572,7 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Shifting in case `type=lowerleft' option}
+% \subsection{Shift in case \texttt{type=lowerleft} option}
% \setfgruler{type=lowerleft,hshift=1cm,vshift=2cm}
% \begin{examplelst}
% \documentclass{article}
@@ -575,7 +583,7 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{Shifting in case `type=lowerright' option}
+% \subsection{Shift in case \texttt{type=lowerright} option}
% \setfgruler{type=lowerright,hshift=1cm,vshift=2cm}
% \begin{examplelst}
% \documentclass{article}
@@ -586,104 +594,132 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{An example for the `type=user' option}\label{example:user1}
+% \subsection{The \texttt{type=upperleftT} option}
+% \setfgruler{type=upperleftT}
+% \begin{examplelst}
+% \documentclass{article}
+% \usepackage[type=upperleftT]{fgruler}
+% \begin{document}
+% ...
+% \end{document}
+% \end{examplelst}
+%
+% \newpage\fgrulerreset
+% \subsection{Setting the \texttt{type=user} option}\label{example:user-first}
+% In the next example the \texttt{type=user} option activates \texttt{type=upperright} or \texttt{type=upperleft}, depending on the page number is odd or even.
% \setfgruler{type=none}
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=user]{fgruler}
-% \makeatletter
-% \def\fgruler@cm@user@fg{%
-% \ifodd\value{page}\fgruler@cm@upperright@fg%
-% \else\fgruler@cm@upperleft@fg\fi}
-% \def\fgruler@in@user@fg{%
-% \ifodd\value{page}\fgruler@in@upperright@fg%
-% \else\fgruler@in@upperleft@fg\fi}
-% \makeatother
+% \fgrulerdefusercm{%
+% \ifodd\value{page}\fgrulertype{cm}{upperright}%
+% \else\fgrulertype{cm}{upperleft}\fi}
+% \fgrulerdefuserin{%
+% \ifodd\value{page}\fgrulertype{in}{upperright}%
+% \else\fgrulertype{in}{upperleft}\fi}
% \begin{document}
% ...
% \end{document}
% \end{examplelst}
-% In this case the \texttt{type=upperright} option will be activated, if the page number is odd. Otherwise \texttt{type=upperleft} will be activated.
%
% \newpage\fgrulerreset
-% \subsection{An other example for the `type=user' option}\label{example:user2}
-% \setfgruler{type=user,color=red}
-%\makeatletter
-%\newlength{\fgruler@tempdim}
-%\renewcommand{\fgruler@cm@user@fg}{\AtTextLowerLeft{\ignorespaces%
-%\settowidth{\fgruler@tempdim}{\ruler{downleft}{\textheight}}%
-%\rulerparams{}{}{\fgruler@color}{}{}%
-%\put(-\fgruler@tempdim,0){\ignorespaces%
-%\rulernorotatenum\fgrulercaptioncm{}\ruler{downleft}{\textheight}}%
-%\put(0,\textheight){\ignorespaces\ruler{rightup}{\textwidth}}}}
-%\makeatother
+% \subsection{Setting the \texttt{type=user} option}
+% In the next example the \texttt{type=user} option combines the effect of \texttt{type=upperleft} and \texttt{type=upperleftT}.
+% \setfgruler{type=user}
+% \fgrulerdefusercm{\fgrulertype{cm}{upperleft}\fgrulertype{cm}{upperleftT}}
% \begin{examplelst}
% \documentclass{article}
-% \usepackage[type=user,color=red]{fgruler}
-% \makeatletter
-% \newlength{\fgruler@tempdim}
-% \newcommand{\fgruler@user}[1]{%
-% \AtTextLowerLeft{% See eso-pic package!
-% \rulerparams{\fgruler@markthick}{\fgruler@numfont}{\fgruler@color}%
-% {\fgruler@marklength}{\fgruler@numsep}%
-% \settowidth{\fgruler@tempdim}{\ruler[#1]{downleft}{\textheight}}%
-% \put(-\fgruler@tempdim,0){%
-% \rulernorotatenum%
-% \fgrulercaptioncm{}%
-% \fgrulercaptionin{}%
-% \ruler[#1]{downleft}{\textheight}%
-% }%
-% \put(0,\textheight){%
-% \ruler[#1]{rightup}{\textwidth}%
+% \usepackage[type=user]{fgruler}
+% \fgrulerdefusercm{\fgrulertype{cm}{upperleft}\fgrulertype{cm}{upperleftT}}
+% \fgrulerdefuserin{\fgrulertype{in}{upperleft}\fgrulertype{in}{upperleftT}}
+% \begin{document}
+% ...
+% \end{document}
+% \end{examplelst}
+%
+% \newpage\fgrulerreset
+% \subsection{Setting the \texttt{type=user} option}
+% In this example the \texttt{type=user} option combines the effect of \texttt{type=upperleftT} and \texttt{type=lowerrightT}.
+% \setfgruler{type=user}
+% \fgrulerdefusercm{\fgrulertype{cm}{upperleftT}\fgrulertype{cm}{lowerrightT}}
+% \begin{examplelst}
+% \documentclass{article}
+% \usepackage[type=user]{fgruler}
+% \fgrulerdefusercm{\fgrulertype{cm}{upperleftT}\fgrulertype{cm}{lowerrightT}}
+% \fgrulerdefuserin{\fgrulertype{in}{upperleftT}\fgrulertype{in}{lowerrightT}}
+% \begin{document}
+% ...
+% \end{document}
+% \end{examplelst}
+%
+% \newpage\fgrulerreset
+% \subsection{Setting the \texttt{type=user} option}
+% In the next example the \texttt{type=user} option places a vertical ruler at the left border of the text area.
+% \setfgruler{type=user}
+%\fgrulerdefusercm{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\llap{\ruler{downleft}{\textheight}}}}
+% \begin{examplelst}
+% \documentclass{article}
+% \usepackage[type=user]{fgruler}
+% \newcommand{\fgruleruser}[1]{%
+% \AtTextLowerLeft{% See eso-pic package!
+% \rulerparamsfromfg%
+% \llap{\ruler[#1]{downleft}{\textheight}}%
% }%
-% }%
% }
-% \renewcommand{\fgruler@cm@user@fg}{\fgruler@user{cm}}
-% \renewcommand{\fgruler@in@user@fg}{\fgruler@user{in}}
-% \makeatother
+% \fgrulerdefusercm{\fgruleruser{cm}}
+% \fgrulerdefuserin{\fgruleruser{in}}
% \begin{document}
% ...
% \end{document}
% \end{examplelst}
-% This code places rulers at the left and the top border of the body. In this case the \texttt{hshift} and \texttt{vshift} options don't work.
%
% \newpage\fgrulerreset
-% \subsection{The third example for the `type=user' option}\label{example:user3}
-% \setfgruler{type=user,color=blue}
-%\makeatletter
-%\renewcommand{\fgruler@cm@user@fg}{\fgruler@cm@upperleft@fg\AtTextLowerLeft{\ignorespaces%
-%\rulerparams{}{}{\fgruler@color}{}{}%
-%\put(\textwidth,0){\ignorespaces%
-%\rulernorotatenum\fgrulercaptioncm{}\ruler{downright}{\textheight}}%
-%\put(0,\textheight){\ignorespaces\ruler{rightup}{\textwidth}}}}
-%\makeatother
+% \subsection{Setting the \texttt{type=user} option}
+% In the next example the \texttt{type=user} option places rulers at the right and bottom borders of the text area.
+% \setfgruler{type=user}
+%\fgrulerdefusercm{\AtTextLowerLeft{\ignorespaces\rulerparamsfromfg\rulernorotatenum\llap{\ruler{downleft}{\textheight}}\ruler*{rightdown}{\textwidth}}}
% \begin{examplelst}
% \documentclass{article}
-% \usepackage[type=user,color=blue]{fgruler}
-% \makeatletter
-% \newcommand{\fgruler@user}[1]{%
-% \AtTextLowerLeft{% See eso-pic package!
-% \rulerparams{\fgruler@markthick}{\fgruler@numfont}{\fgruler@color}%
-% {\fgruler@marklength}{\fgruler@numsep}%
-% \put(\textwidth,0){%
-% \rulernorotatenum%
-% \fgrulercaptioncm{}%
-% \fgrulercaptionin{}%
-% \ruler[#1]{downright}{\textheight}%
+% \usepackage[type=user]{fgruler}
+% \newcommand{\fgruleruser}[1]{%
+% \AtTextLowerLeft{% See eso-pic package!
+% \rulerparamsfromfg%
+% \rulernorotatenum%
+% \llap{\ruler[#1]{downleft}{\textheight}}%
+% \ruler*[#1]{rightdown}{\textwidth}%
% }%
-% \put(0,\textheight){%
-% \ruler[#1]{rightup}{\textwidth}%
+% }
+% \fgrulerdefusercm{\fgruleruser{cm}}
+% \fgrulerdefuserin{\fgruleruser{in}}
+% \begin{document}
+% ...
+% \end{document}
+% \end{examplelst}
+%
+% \newpage\fgrulerreset
+% \subsection{Setting the \texttt{type=user} option}\label{example:user-last}
+% In the next example the \texttt{type=user} option places rulers at the right and top borders of the text area.
+% \setfgruler{type=user}
+%\fgrulerdefusercm{\AtTextUpperLeft{\ignorespaces%
+%\rulerparamsfromfg\ruler{rightup}{\textwidth}\ignorespaces%
+%\rulernorotatenum\fgrulercaptioncm{}\ignorespaces\ruler*{downright}{\textheight}}}
+% \begin{examplelst}
+% \documentclass{article}
+% \usepackage[type=user]{fgruler}
+% \newcommand{\fgruleruser}[1]{%
+% \AtTextUpperLeft{% See eso-pic package!
+% \rulerparamsfromfg%
+% \ruler[#1]{rightup}{\textwidth}%
+% \rulernorotatenum\fgrulercaptioncm{}\fgrulercaptionin{}%
+% \ruler*[#1]{downright}{\textheight}%
% }%
-% }%
% }
-% \renewcommand{\fgruler@cm@user@fg}{\fgruler@cm@upperleft@fg\fgruler@user{cm}}
-% \renewcommand{\fgruler@in@user@fg}{\fgruler@in@upperleft@fg\fgruler@user{in}}
-% \makeatother
+% \fgrulerdefusercm{\fgruleruser{cm}}
+% \fgrulerdefuserin{\fgruleruser{in}}
% \begin{document}
% ...
% \end{document}
% \end{examplelst}
-% In this code the effect of \texttt{type=user} is similar to \texttt{type=upperleft}, but it places further rulers at the right and the top border of the body.
%
% \newpage\fgrulerreset
% \subsection{Rulers on the foreground of a given page, and in text}
@@ -711,10 +747,10 @@ keepspaces]}
% text
% \ruler*{rightdown}{3cm}
% text
-% \rotatebox[origin=tl]{30}{\ruler*{rightdown}{3cm}}
+% \rotatebox[origin=tl]{30}{\ruler*{rightdown}{3cm}}
+% % \rotatebox is defined in graphicx package
% \end{document}
% \end{examplelst}
-% \emph{Remark.} The \verb|\rotatebox| command is defined in the \texttt{graphicx} package!
%
% \newpage\fgrulerreset
% \subsection{Ruler types in text}
@@ -874,31 +910,18 @@ keepspaces]}
% \end{examplelst}
%
% \newpage\fgrulerreset
-% \subsection{A new square ruler}
+% \subsection{A new square ruler type}
% \setfgruler{type=none}
-%
-% \makeatletter
-% \newcommand{\usersquareruler}[2]{
-% \begin{picture}(#1+1em+\fgruler@marklength,#2+1em+\fgruler@marklength)
-% {\fgrulercaptioncm{}
-% \ruler{downleft}{#2}}
-% \put(0,#2){\ruler{rightup}{#1}}
-% \end{picture}}
-% \makeatother
-% \usersquareruler{3cm}{5cm}
+% {\rulernorotatenum\fgrulercaptioncm{}\ruler*{downleft}{5cm}}\ruler{rightup}{3cm}
%
% \bigskip
% \begin{examplelst}
% \documentclass{article}
% \usepackage[type=none]{fgruler}
-% \makeatletter
% \newcommand{\usersquareruler}[2]{%
-% \begin{picture}(#1+1em+\fgruler@marklength,#2+1em+\fgruler@marklength)%
-% {\fgrulercaptioncm{}%
-% \ruler{downleft}{#2}}%
-% \put(0,#2){\ruler{rightup}{#1}}%
-% \end{picture}}
-% \makeatother
+% {\rulernorotatenum\fgrulercaptioncm{}\ruler*{downleft}{#2}}%
+% \ruler{rightup}{#1}%
+% }
% \begin{document}
% \usersquareruler{3cm}{5cm}
% \end{document}
@@ -953,6 +976,8 @@ keepspaces]}
\rulerparams{.4pt}{\scriptsize\sffamily}{black}{2mm}{3pt}
+\def\rulerparamsfromfg{\rulerparams{\fgruler@markthick}{\fgruler@numfont}{\fgruler@color}{\fgruler@marklength}{\fgruler@numsep}}
+
\def\fgruler@fgsetting{%
\fgruler@set{\fgruler@markthick}{\fgruler@numfont}{\fgruler@color}{\fgruler@marklength}{\fgruler@numsep}%
\rulernorotatenum}
@@ -963,14 +988,24 @@ keepspaces]}
\def\fgruler@activate@type{%
\def\fgruler@check{cm}\ifx\fgruler@unit\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@unit\fgruler@check\else%
-\@latexerr{Undefined unit: \fgruler@unit\space(Defined units: cm, in)}{}\fi\fi%
+\PackageError{fgruler}{\fgruler@unit\space is invalid unit}{Valid units: cm, in}%
+\fi\fi%
\def\fgruler@check{upperleft}\ifx\fgruler@type\fgruler@check\else%
\def\fgruler@check{upperright}\ifx\fgruler@type\fgruler@check\else%
\def\fgruler@check{lowerleft}\ifx\fgruler@type\fgruler@check\else%
\def\fgruler@check{lowerright}\ifx\fgruler@type\fgruler@check\else%
+\def\fgruler@check{upperleftT}\ifx\fgruler@type\fgruler@check\else%
+\def\fgruler@check{upperrightT}\ifx\fgruler@type\fgruler@check\else%
+\def\fgruler@check{lowerleftT}\ifx\fgruler@type\fgruler@check\else%
+\def\fgruler@check{lowerrightT}\ifx\fgruler@type\fgruler@check\else%
\def\fgruler@check{none}\ifx\fgruler@type\fgruler@check\else%
\def\fgruler@check{user}\ifx\fgruler@type\fgruler@check\else%
-\@latexerr{Undefined type: \fgruler@type\space(Defined types: upperleft, upperright, lowerleft, lowerright, user, none)}{}\fi\fi\fi\fi\fi\fi%
+\PackageError{fgruler}{\fgruler@type\space is invalid type}%
+{Valid types:\MessageBreak
+upperleft, upperright, lowerleft, lowerright,\MessageBreak
+upperleftT, upperrightT, lowerleftT, lowerrightT,\MessageBreak
+user, none}%
+\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
\def\fgruler@output{\csname fgruler@\fgruler@unit @\fgruler@type @fg\endcsname}}
\def\fgrulerratiocm#1#2{%
@@ -1051,7 +1086,7 @@ keepspaces]}
\def\fgruler@param{#1}%
\def\fgruler@check{cm}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@param\fgruler@check\else%
-\@latexerr{Invalid parameter: \fgruler@param\space(Defined parameters: cm, in)}{}%
+\PackageError{fgruler}{\fgruler@param\space is invalid parameter}{Valid parameters: cm, in}%
\fi\fi%
\def\fgruler@param{#2}%
\def\fgruler@check{rightdown}\ifx\fgruler@param\fgruler@check\else%
@@ -1062,21 +1097,26 @@ keepspaces]}
\def\fgruler@check{downleft}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upright}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upleft}\ifx\fgruler@param\fgruler@check\else%
-\@latexerr{Invalid parameter: \fgruler@param\space(Defined parameters: rightdown, rightup, leftdown, leftup, downright, downleft, upright, upleft)}{}%
+\PackageError{fgruler}{\fgruler@param\space is invalid parameter}%
+{Valid parameters:\MessageBreak
+rightdown, rightup, leftdown, leftup,\MessageBreak
+downright, downleft, upright, upleft}%
\fi\fi\fi\fi\fi\fi\fi\fi}
\def\fgruler@check@param@#1#2{%
\def\fgruler@param{#1}%
\def\fgruler@check{cm}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{in}\ifx\fgruler@param\fgruler@check\else%
-\@latexerr{Invalid parameter: \fgruler@param\space(Defined parameters: cm, in)}{}%
+\PackageError{fgruler}{\fgruler@param\space is invalid parameter}{Valid parameters: cm, in}%
\fi\fi%
\def\fgruler@param{#2}%
\def\fgruler@check{upperleft}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{upperright}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{lowerleft}\ifx\fgruler@param\fgruler@check\else%
\def\fgruler@check{lowerright}\ifx\fgruler@param\fgruler@check\else%
-\@latexerr{Invalid parameter: \fgruler@param\space(Defined parameters: upperleft, upperright, lowerleft, lowerright)}{}%
+\PackageError{fgruler}{\fgruler@param\space is invalid parameter}%
+{Valid parameters:\MessageBreak
+upperleft, upperright, lowerleft, lowerright}%
\fi\fi\fi\fi}
\newcommand{\fgruler@ruler}[3][cm]{\fgruler@check@param{#1}{#2}\fgruler@intextsetting\csname fgruler@#1@#2@\endcsname{#3}}
@@ -1110,8 +1150,11 @@ keepspaces]}
\def\fgruler@ifodd#1{\ifodd\value{fgrulernum}#1\fi\stepcounter{fgrulernum}}
-\def\fgrulerstartnum#1{\def\fgruler@startnum{#1}\ignorespaces}
-\def\fgruler@startnum{0}
+\def\fgrulerstartnum#1{\def\fgruler@startnumh{#1}\def\fgruler@startnumv{#1}\ignorespaces}
+\def\fgrulerstartnumh#1{\def\fgruler@startnumh{#1}\ignorespaces}
+\def\fgrulerstartnumv#1{\def\fgruler@startnumv{#1}\ignorespaces}
+\def\fgruler@startnumh{0}
+\def\fgruler@startnumv{0}
\def\fgrulerdefnum#1{\def\thefgrulernum{#1}\ignorespaces}
@@ -1120,13 +1163,13 @@ keepspaces]}
\def\rulernorotatenum{%
\ifx\@onlypreamble\@notprerr%
\def\fgruler@rotatebox##1##2{##2}%
-\else\@latexerr{Don't use \protect\rulernorotatenum\space in preamble!}{}\fi%
+\else\PackageError{fgruler}{Don't use \protect\rulernorotatenum\space in preamble!}{}\fi%
\ignorespaces}
\def\rulerrotatenum{%
\ifx\@onlypreamble\@notprerr%
\def\fgruler@rotatebox##1##2{\rotatebox{##1}{##2}}%
-\else\@latexerr{Don't use \protect\rulerrotatenum\space in preamble!}{}\fi%
+\else\PackageError{fgruler}{Don't use \protect\rulerrotatenum\space in preamble!}{}\fi%
\ignorespaces}
\def\fgrulerreset{%
@@ -1171,10 +1214,11 @@ keepspaces]}
\def\thefgrulernum{\arabic{fgrulernum}}%
\def\fgruler@caption@cm{cm}%
\def\fgruler@caption@in{inch}%
-\def\fgruler@startnum{0}%
+\def\fgruler@startnumh{0}%
+\def\fgruler@startnumv{0}%
\fgruler@borderlinetrue%
\fgruler@showframefalse%
-\else\@latexerr{Don't use \protect\fgrulerreset\space in preamble!}{}\fi%
+\else\PackageError{fgruler}{Don't use \protect\fgrulerreset\space in preamble!}{}\fi%
\ignorespaces}
\AtEndPreamble{
@@ -1261,14 +1305,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,-1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(10,-\fgruler@sep)(10,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@cm@rightdown@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(#1,\fgruler@width)(0,-\fgruler@width)%
\fgruler@cm@rightdown{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5cm\put(5,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@cm}}\fi%
\end{picture}}
@@ -1294,14 +1338,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,-1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(16,-\fgruler@sep)(16,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@in@rightdown@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(#1,\fgruler@width)(0,-\fgruler@width)%
\fgruler@in@rightdown{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5in\put(8,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@in}}\fi%
\end{picture}}
@@ -1321,14 +1365,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(10,\fgruler@sep)(10,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@cm@rightup@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(#1,\fgruler@width)%
\fgruler@cm@rightup{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5cm\put(5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}\fi%
\end{picture}}
@@ -1354,14 +1398,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(16,\fgruler@sep)(16,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@in@rightup@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(#1,\fgruler@width)%
\fgruler@in@rightup{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5in\put(8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}\fi%
\end{picture}}
@@ -1381,14 +1425,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(-10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,-1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-10,-\fgruler@sep)(-10,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@cm@leftdown@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(#1,\fgruler@width)(-#1,-\fgruler@width)%
\fgruler@cm@leftdown{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5cm\put(-5,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@cm}}\fi%
\end{picture}}
@@ -1414,14 +1458,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(-16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,-1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-16,-\fgruler@sep)(-16,0){\fgruler@tempdima}{\makebox(0,0)[t]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@in@leftdown@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(#1,\fgruler@width)(-#1,-\fgruler@width)%
\fgruler@in@leftdown{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5in\put(-8,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@in}}\fi%
\end{picture}}
@@ -1441,14 +1485,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(-10,0){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(0,1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-10,\fgruler@sep)(-10,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@cm@leftup@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(#1,\fgruler@width)(-#1,0)%
\fgruler@cm@leftup{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5cm\put(-5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}\fi%
\end{picture}}
@@ -1474,14 +1518,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(-16,0){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(0,1){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(-1,0){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}\stepcounter{fgrulernum}%
\multiput(-16,\fgruler@sep)(-16,0){\fgruler@tempdima}{\makebox(0,0)[b]{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}
\def\fgruler@in@leftup@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(#1,\fgruler@width)(-#1,0)%
\fgruler@in@leftup{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
\ifdim#1>.5in\put(-8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}\fi%
\end{picture}}
@@ -1501,14 +1545,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(0,-10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,-10)(0,-10){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@cm@downright@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(\fgruler@width,#1)(0,-#1)%
\fgruler@cm@downright{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5cm\put(\fgruler@sep,-5){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\fgruler@caption@cm}}}\fi%
\end{picture}}
@@ -1534,14 +1578,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(0,-16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,-16)(0,-16){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@in@downright@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(\fgruler@width,#1)(0,-#1)%
\fgruler@in@downright{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5in\put(\fgruler@sep,-8){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\fgruler@caption@in}}}\fi%
\end{picture}}
@@ -1561,14 +1605,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(0,-10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(-1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,-10)(0,-10){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@cm@downleft@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(\fgruler@width,#1)(-\fgruler@width,-#1)%
\fgruler@cm@downleft{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5cm\put(-\fgruler@sep,-5){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\fgruler@caption@cm}}}\fi%
\end{picture}}
@@ -1594,14 +1638,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(0,-16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(-1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,-1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,-16)(0,-16){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@in@downleft@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(\fgruler@width,#1)(-\fgruler@width,-#1)%
\fgruler@in@downleft{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5in\put(-\fgruler@sep,-8){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\fgruler@caption@in}}}\fi%
\end{picture}}
@@ -1621,14 +1665,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(0,10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,10)(0,10){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@cm@upright@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(\fgruler@width,#1)%
\fgruler@cm@upright{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5cm\put(\fgruler@sep,5){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\fgruler@caption@cm}}}\fi%
\end{picture}}
@@ -1654,14 +1698,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(0,16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(\fgruler@sep,16)(0,16){\fgruler@tempdima}{\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@in@upright@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(\fgruler@width,#1)%
\fgruler@in@upright{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5in\put(\fgruler@sep,8){\makebox(0,0)[l]{\fgruler@rotatebox{90}{\fgruler@font@\fgruler@caption@in}}}\fi%
\end{picture}}
@@ -1681,14 +1725,14 @@ keepspaces]}
\fgruler@div{#1}{10}%
\multiput(0,0)(0,10){\@tempcnta}{\fgruler@cm@thick@iii\fgruler@cm@color@iii\line(-1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,10)(0,10){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@cm@upleft@#1{%
\setlength{\unitlength}{1mm}%
\begin{picture}(\fgruler@width,#1)(-\fgruler@width,0)%
\fgruler@cm@upleft{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5cm\put(-\fgruler@sep,5){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\fgruler@caption@cm}}}\fi%
\end{picture}}
@@ -1714,14 +1758,14 @@ keepspaces]}
\fgruler@div{#1}{16}%
\multiput(0,0)(0,16){\@tempcnta}{\fgruler@in@thick@v\fgruler@in@color@v\line(-1,0){\fgruler@marklth}}%
\iffgruler@borderline\put(0,0){\line(0,1){#1}}\fi%
-\setcounter{fgrulernum}{\fgruler@startnum}\stepcounter{fgrulernum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}\stepcounter{fgrulernum}%
\multiput(-\fgruler@sep,16)(0,16){\fgruler@tempdima}{\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum\stepcounter{fgrulernum}}}}}
\def\fgruler@in@upleft@#1{%
\setlength{\unitlength}{.0625in}%
\begin{picture}(\fgruler@width,#1)(-\fgruler@width,0)%
\fgruler@in@upleft{#1}%
-\setcounter{fgrulernum}{\fgruler@startnum}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\thefgrulernum}}}%
\ifdim#1>.5in\put(-\fgruler@sep,8){\makebox(0,0)[r]{\fgruler@rotatebox{-90}{\fgruler@font@\fgruler@caption@in}}}\fi%
\end{picture}}
@@ -1918,9 +1962,132 @@ keepspaces]}
\def\fgruler@in@lowerright@fg{\fgruler@in@lowerright@fg@{\fgruler@hshift}{\fgruler@vshift}}
+%% UPPERLEFTT CM
+\def\fgruler@cm@upperleftT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{1mm}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(0,-\textheight)%
+\fgruler@cm@rightup{\textwidth}%
+\fgruler@cm@downleft{\textheight}%
+\put(5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% UPPERLEFTT IN
+\def\fgruler@in@upperleftT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{.0625in}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(0,-\textheight)%
+\fgruler@in@rightup{\textwidth}%
+\fgruler@in@downleft{\textheight}%
+\put(8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% UPPERRIGHTT CM
+\def\fgruler@cm@upperrightT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{1mm}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(-\textwidth,-\textheight)%
+\fgruler@cm@leftup{\textwidth}%
+\fgruler@cm@downright{\textheight}%
+\put(-5,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@cm}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% UPPERRIGHTT IN
+\def\fgruler@in@upperrightT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{.0625in}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(-\textwidth,-\textheight)%
+\fgruler@in@leftup{\textwidth}%
+\fgruler@in@downright{\textheight}%
+\put(-8,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\fgruler@caption@in}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,\fgruler@sep){\makebox(0,0)[b]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% LOWERLEFTT CM
+\def\fgruler@cm@lowerleftT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{1mm}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(0,0)%
+\fgruler@cm@rightdown{\textwidth}%
+\fgruler@cm@upleft{\textheight}%
+\put(5,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@cm}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% LOWERLEFTT IN
+\def\fgruler@in@lowerleftT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{.0625in}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(0,0)%
+\fgruler@in@rightdown{\textwidth}%
+\fgruler@in@upleft{\textheight}%
+\put(8,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@in}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(-\fgruler@sep,0){\makebox(0,0)[r]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% LOWERRIGHTT CM
+\def\fgruler@cm@lowerrightT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{1mm}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(-\textwidth,0)%
+\fgruler@cm@leftdown{\textwidth}%
+\fgruler@cm@upright{\textheight}%
+\put(-5,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@cm}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
+%% LOWERRIGHTT IN
+\def\fgruler@in@lowerrightT@fg{%
+\AtTextLowerLeft{%
+\setlength{\unitlength}{.0625in}%
+\fgruler@fgsetting%
+\begin{picture}(\textwidth,\textheight)(-\textwidth,0)%
+\fgruler@in@leftdown{\textwidth}%
+\fgruler@in@upright{\textheight}%
+\put(-8,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\fgruler@caption@in}}%
+\setcounter{fgrulernum}{\fgruler@startnumh}%
+\put(0,-\fgruler@sep){\makebox(0,0)[t]{\fgruler@font@\thefgrulernum}}%
+\setcounter{fgrulernum}{\fgruler@startnumv}%
+\put(\fgruler@sep,0){\makebox(0,0)[l]{\fgruler@font@\thefgrulernum}}%
+\end{picture}}}
+
%% USER
\def\fgruler@cm@user@fg{}
\def\fgruler@in@user@fg{}
+\def\fgrulertype#1#2{\csname fgruler@#1@#2@fg\endcsname}
+\def\fgrulerdefusercm#1{\def\fgruler@cm@user@fg{#1}}
+\def\fgrulerdefuserin#1{\def\fgruler@in@user@fg{#1}}
% \end{macrocode}
% \Finale
\endinput \ No newline at end of file
diff --git a/macros/latex/contrib/fgruler/fgruler.pdf b/macros/latex/contrib/fgruler/fgruler.pdf
index cd1989fa8f..a823e23c5a 100644
--- a/macros/latex/contrib/fgruler/fgruler.pdf
+++ b/macros/latex/contrib/fgruler/fgruler.pdf
Binary files differ
diff --git a/macros/latex/contrib/grant/LICENSE b/macros/latex/contrib/grant/LICENSE
index 1e5a099765..f72ac7c28c 100644
--- a/macros/latex/contrib/grant/LICENSE
+++ b/macros/latex/contrib/grant/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2016 Karr Lab
+Copyright (c) 2016-2019 Karr Lab
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/macros/latex/contrib/grant/VERSION b/macros/latex/contrib/grant/VERSION
deleted file mode 100644
index 6812f8122e..0000000000
--- a/macros/latex/contrib/grant/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-0.0.3 \ No newline at end of file
diff --git a/macros/latex/contrib/grant/grant.dtx b/macros/latex/contrib/grant/grant.dtx
index 6c8a96d5f4..153a3d780e 100644
--- a/macros/latex/contrib/grant/grant.dtx
+++ b/macros/latex/contrib/grant/grant.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2016 Jonathan Karr <karr@mssm.edu>
+% Copyright (C) 2016-2019 Jonathan Karr <karr@mssm.edu>
% -----------------------------------------------------------
%
% This file may be distributed and/or modified under the conditions of
@@ -18,7 +18,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[2003/12/01]
%<package>\ProvidesPackage{grant}
%<*package>
- [2016/08/22 v0.0.3 Grant package for formatting federal grant applications]
+ [2019/02/26 v0.0.5 Grant package for formatting federal grant applications]
%</package>
%
%
@@ -53,7 +53,11 @@
%% Right brace \} Tilde \~}
-% \changes{v0.0.2}{2016/08/17}{Initial version}
+% \changes{v0.0.5}{2019/02/26}{Adding examples}
+% \changes{v0.0.4}{2016/09/26}{Debugging class renaming and .dtx file for pdf compilation}
+% \changes{v0.0.3}{2016/08/22}{Rename classes to grant-*.cls}
+% \changes{v0.0.2}{2016/08/17}{Packaging with ins, dtx files}
+% \changes{v0.0.1}{2016/08/17}{Initial version}
%
% \GetFileInfo{grant.dtx}
%
@@ -69,7 +73,8 @@
%
% This package provides LaTeX classes to format grant applications for the following federal agencies:
% \begin{description}[labelindent=0.25in]
-% \item[\texttt{grant-arl}]: Army Research Laboratory
+% \item[\texttt{grant-afosr}]: Air Force Office of Scientific Research
+% \item[\texttt{grant-aro}]: Army Research Office
% \item[\texttt{grant-darpa}]: Defense Advanced Research Projects Agency
% \item[\texttt{grant-doe}]: Department of Energy
% \item[\texttt{grant-nih}]: National Institutes of Health
@@ -109,7 +114,7 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant}[2016/01/12 grant class]
+\ProvidesClass{grant}[2019/02/26 grant class]
%%%%%%%%%%%%%%%%%%%%%%
%% options
@@ -128,14 +133,21 @@
{\booltrue{isdraft}}
\DeclareOption{isnotdraft}
{\boolfalse{isdraft}}
-
+
+\newbool{iswhitepaper}
+\boolfalse{iswhitepaper}
+\DeclareOption{iswhitepaper}
+ {\booltrue{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}
+ {\boolfalse{iswhitepaper}}
+
\newbool{issectioncompact}
\boolfalse{issectioncompact}
\DeclareOption{issectioncompact}
{\booltrue{issectioncompact}}
\DeclareOption{isnotsectioncompact}
{\boolfalse{issectioncompact}}
-
+
\newbool{isbibcompact}
\boolfalse{isbibcompact}
\DeclareOption{isbibcompact}
@@ -143,7 +155,7 @@
\DeclareOption{isnotbibcompact}
{\boolfalse{isbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
%%%%%%%%%%%%%%%%%%%%%%
@@ -165,6 +177,16 @@
%underline
\usepackage[normalem]{ulem}
\usepackage{soul}
+\soulregister\cite7
+
+%highlighting
+\usepackage{xcolor}
+\usepackage{framed}
+\definecolor{hlcolor}{rgb}{1, 1, 0}
+\sethlcolor{hlcolor}
+\colorlet{shadecolor}{hlcolor}
+\setlength{\fboxsep}{0.05ex}
+\setlength{\OuterFrameSep}{-\fboxsep}
%spacing
\usepackage{setspace}
@@ -241,13 +263,18 @@
\subsubsection*{#2}%
}
+\ifbool{iswhitepaper}{
+ \titleformat{\section}[runin]{\bfseries}{\uline{\thesection.~}}{0ex}{\uline{#1}}[:]
+}{
+ \usepackage[auto]{chappg}
+}
+
\ifbool{issectioncompact}{
\titleformat{\section}[runin]{\bfseries}{\uline{\thesection.~}}{0ex}{\uline{#1}}[.]
\titlespacing*{\section}{0pt}{*0.0}{*0.5}
}{}
%page numbering
-\usepackage[auto]{chappg}
%header/footer
\usepackage{fancyhdr}
@@ -262,6 +289,12 @@
\rfoot{\small\thepage}
}{}
+\ifbool{iswhitepaper}{
+ \lfoot{}
+ \rfoot{}
+ \cfoot{\small\thepage}
+}{}
+
%lists
\usepackage{paralist}
\usepackage{enumitem}
@@ -314,10 +347,17 @@
\renewcommand{\bibfont}{\footnotesize}
\ExecuteBibliographyOptions{maxbibnames=1,minbibnames=1}
+
\DeclareFieldFormat[article]{title}{}
\DeclareFieldFormat[article]{pages}{}
\DeclareFieldFormat[article]{volume}{}
\DeclareFieldFormat[article]{number}{}
+
+ \DeclareFieldFormat[inproceedings]{title}{}
+ \DeclareFieldFormat[inproceedings]{pages}{}
+ \DeclareFieldFormat[inproceedings]{volume}{}
+ \DeclareFieldFormat[inproceedings]{number}{}
+
\DeclareFieldFormat[online]{url}{}
\DeclareFieldFormat[online]{urldate}{}
@@ -474,6 +514,8 @@
\newcommand{\PoEmail}{}
\newcommand{\PoPhone}{}
+\newcommand{\FundingIdTitle}{\FundingId\ifdefempty{\FundingTitle}{}{: \FundingTitle}}
+
\newcommand{\makecoverpage}{
{\LARGE\bfseries
@@ -483,7 +525,7 @@
\vskip1ex
\uline{Funding opportunity}
\\\FundingAgency
- \\{\FundingTitle} (\href{\FundingUrl}{\FundingId})
+ \\\FundingIdTitle (\href{\FundingUrl}{\FundingId})
\\\FundingDeadline
\uline{Applicant}
@@ -503,12 +545,36 @@
\\\PoPhone
}
+\newcommand{\AbstractName}{Abstract}
+\newcommand{\AbstractOtherPersonnelName}{Other key personnel and primary subcontractors}
+\providetoggle{AbstractIsCentered}
+\providetoggle{AbstractShowAdminPOC}
+\providetoggle{AbstractShowLeadOrg}
+\providetoggle{AbstractShowOtherPersonnel}
+\providetoggle{AbstractShowDuration}
+\providetoggle{AbstractShowCost}
+\settoggle{AbstractIsCentered}{false}
+\settoggle{AbstractShowAdminPOC}{true}
+\settoggle{AbstractShowLeadOrg}{true}
+\settoggle{AbstractShowOtherPersonnel}{true}
+\settoggle{AbstractShowDuration}{true}
+\settoggle{AbstractShowCost}{true}
+
+
\newcommand{\makeabstractcoverpage}{
- \begin{center}\LARGE\textbf{
- ABSTRACT\\[0.5ex]
- \FundingId: \FundingTitle\\[0.5ex]
- \ProposalTitle
+ {\setlength{\parskip}{12pt}
+
+ \iftoggle{AbstractIsCentered}{
+ \centering
+ }{}
+
+ \begin{center}\textbf{
+ \LARGE{\MakeUppercase{\AbstractName}}\\[18pt]
+ \LARGE{\FundingId}\\
+ \large{\FundingTitle}\\[18pt]
+ \LARGE{\ProposalTitle}
}\end{center}
+ \vskip-8pt
\textbf{Technical point of contact: \PiName}\\
\PiTitle\\
@@ -517,25 +583,32 @@
\PiAddress\\
Tel: \PiPhone, Fax: \PiFax, Email: \href{mailto:\PiEmail}{\PiEmail}, Web: \href{http://www.\PiUrl}{\PiUrl}
+ \iftoggle{AbstractShowAdminPOC}{
\textbf{Administrative point of contact: \AdminName}\\
\AdminTitle\\
\AdminAddress\\
\AdminInstitution\\
Tel: \AdminPhone, Fax: \AdminFax, Email: \href{mailto:\AdminEmail}{\AdminEmail}
+ }{}
+ \iftoggle{AbstractShowLeadOrg}{
\textbf{Lead organization: \LeadOrganizationName}\\
\LeadOrganizationAddress\\
DUNS number: \LeadOrganizationDUNS\\
Taxpayer identification number: \LeadOrganizationTIN\\
CAGE code: \LeadOrganizationCAGE
+ }{}
- \textbf{Other key personnel and primary subcontractors}\\
+ \iftoggle{AbstractShowOtherPersonnel}{
+ \textbf{\AbstractOtherPersonnelName}\\
\OtherKeyPersonnel
+ }{}
- \textbf{Duration: {\ProposalDurationInYears} years}
+ \iftoggle{AbstractShowDuration}{\textbf{Duration: {\ProposalDurationInYears} years}}{}
- \textbf{Estimated cost: \${\ProposalCostInMillions} million in total costs}
+ \iftoggle{AbstractShowCost}{\textbf{Estimated cost: \${\ProposalCostInMillions} million in total costs}}{}
+ }
\clearpage
}
@@ -544,18 +617,88 @@
%</grant>
% \end{macrocode}
+% \begin{macrocode}
+%<*grant-afosr>
+% \end{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{grant-afosr}[2019/02/26 AFOSR class]
+
+\newcommand{\draftstatus}{isnotdraft}
+\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
+\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
+\newcommand{\sectioncompactstatus}{isnotsectioncompact}
+\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
+\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
+
+\newcommand{\bibcompactstatus}{isnotbibcompact}
+\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
+\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
+
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ProcessOptions
+
+\LoadClass[12pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+
+%%%%%%%%%%%%%%%%%%%%%%
+%% formatting
+%%%%%%%%%%%%%%%%%%%%%%
+
+%geometry
+\geometry{margin=1in}
+
+%font
+\usepackage{times}
+\renewcommand{\familydefault}{\rmdefault}
+
+%paragraph skip
+\setlength{\parskip}{4pt}
+
+%%%%%%%%%%%%%%%%%%%%%%
+%% abstract
+%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand{\AbstractName}{White paper}
+\settoggle{AbstractIsCentered}{true}
+\settoggle{AbstractShowAdminPOC}{false}
+\settoggle{AbstractShowLeadOrg}{false}
+\settoggle{AbstractShowOtherPersonnel}{false}
+\settoggle{AbstractShowDuration}{false}
+\settoggle{AbstractShowCost}{false}
+
+\ifbool{iswhitepaper}{
+ \titleformat{\section}[block]{\bfseries}{\uline{\thesection.~}}{0ex}{\uline{#1}}[]
+ \titleformat{\subsection}[runin]{\bfseries}{\thesubsection.~}{0ex}{#1}[.]
+ \titleformat{\subsubsection}[runin]{}{\uline{\thesubsubsection.~}}{0ex}{\uline{#1}}[.]
+
+ \titlespacing*{\section}{0pt}{*0.0}{*-1}
+
+ \renewcommand{\bibfont}{\normalsize}
+}{}
+
% \begin{macrocode}
-%<*grant-arl>
+%</grant-afosr>
% \end{macrocode}
+
+% \begin{macrocode}
+%<*grant-aro>
+% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-arl}[2016/01/19 ARL class]
+\ProvidesClass{grant-aro}[2019/02/26 ARO class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -564,10 +707,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[12pt, \draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[12pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -583,8 +726,30 @@
%paragraph skip
\setlength{\parskip}{4pt}
+%%%%%%%%%%%%%%%%%%%%%%
+%% abstract
+%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand{\AbstractName}{White paper}
+\settoggle{AbstractIsCentered}{true}
+\settoggle{AbstractShowAdminPOC}{true}
+\settoggle{AbstractShowLeadOrg}{true}
+\settoggle{AbstractShowOtherPersonnel}{true}
+\settoggle{AbstractShowDuration}{false}
+\settoggle{AbstractShowCost}{false}
+
+\ifbool{iswhitepaper}{
+ \titleformat{\section}[block]{\bfseries}{\uline{\thesection.~}}{0ex}{\uline{#1}}[]
+ \titleformat{\subsection}[runin]{\bfseries}{\thesubsection.~}{0ex}{#1}[.]
+ \titleformat{\subsubsection}[runin]{}{\uline{\thesubsubsection.~}}{0ex}{\uline{#1}}[.]
+
+ \titlespacing*{\section}{0pt}{*0.0}{*-1}
+
+ \renewcommand{\bibfont}{\normalsize}
+}{}
+
+
% \begin{macrocode}
-%</grant-arl>
+%</grant-aro>
% \end{macrocode}
@@ -592,12 +757,16 @@
%<*grant-darpa>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-darpa}[2016/01/12 DARPA class]
+\ProvidesClass{grant-darpa}[2019/02/26 DARPA class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -606,10 +775,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[12pt, \draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[12pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -633,12 +802,16 @@
%<*grant-doe>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-doe}[2016/01/12 DOE class]
+\ProvidesClass{grant-doe}[2019/02/26 DOE class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -647,10 +820,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[\draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[11pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -658,6 +831,26 @@
%geometry
\geometry{margin=1in}
+
+%font
+\usepackage{times}
+\renewcommand{\familydefault}{\rmdefault}
+
+%%%%%%%%%%%%%%%%%%%%%
+%% cover page
+%%%%%%%%%%%%%%%%%%%%%
+\renewcommand{\makeabstractcoverpage}{
+ \titlespacing*{\chapter}{0pt}{-4.4ex}{*-1}
+ {\centering
+ \chapter*{\centerline{\ProposalTitle}}
+ \PiName, \PiTitle\\
+ \PiDepartment, \PiInstitution\\
+ \PiPhone, \href{mailto:\PiEmail}{\PiEmail}, \href{http://www.\PiUrl}{\PiUrl}\\
+ DOE/Office of Science Program Office\\
+ Funding Opportunity Announcement Number: \FundingId\\
+ }
+}
+
% \begin{macrocode}
%</grant-doe>
% \end{macrocode}
@@ -667,12 +860,16 @@
%<*grant-nih>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-nih}[2016/01/12 NIH class]
+\ProvidesClass{grant-nih}[2019/02/26 NIH class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -681,10 +878,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[\draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[\draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -702,12 +899,16 @@
%<*grant-nrl>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-nrl}[2016/01/19 NRL class]
+\ProvidesClass{grant-nrl}[2019/02/26 NRL class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -716,10 +917,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[12pt, \draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[12pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -743,12 +944,16 @@
%<*grant-nsf>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-nsf}[2016/01/12 NSF class]
+\ProvidesClass{grant-nsf}[2019/02/26 NSF class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -757,10 +962,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[10pt, \draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[10pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -777,12 +982,16 @@
%<*grant-onr>
% \end{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{grant-onr}[2016/01/19 ONR class]
+\ProvidesClass{grant-onr}[2019/02/26 ONR class]
\newcommand{\draftstatus}{isnotdraft}
\DeclareOption{isdraft}{\renewcommand{\draftstatus}{isdraft}}
\DeclareOption{isnotdraft}{\renewcommand{\draftstatus}{isnotdraft}}
+\newcommand{\whitepaperstatus}{isnotwhitepaper}
+\DeclareOption{iswhitepaper}{\renewcommand{\whitepaperstatus}{iswhitepaper}}
+\DeclareOption{isnotwhitepaper}{\renewcommand{\whitepaperstatus}{isnotwhitepaper}}
+
\newcommand{\sectioncompactstatus}{isnotsectioncompact}
\DeclareOption{issectioncompact}{\renewcommand{\sectioncompactstatus}{issectioncompact}}
\DeclareOption{isnotsectioncompact}{\renewcommand{\sectioncompactstatus}{isnotsectioncompact}}
@@ -791,10 +1000,10 @@
\DeclareOption{isbibcompact}{\renewcommand{\bibcompactstatus}{isbibcompact}}
\DeclareOption{isnotbibcompact}{\renewcommand{\bibcompactstatus}{isnotbibcompact}}
-\ExecuteOptions{isdraft, isnotdraft, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
+\ExecuteOptions{isdraft, isnotdraft, iswhitepaper, isnotwhitepaper, issectioncompact, isnotsectioncompact, isbibcompact, isnotbibcompact}
\ProcessOptions
-\LoadClass[12pt, \draftstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
+\LoadClass[12pt, \draftstatus, \whitepaperstatus, \sectioncompactstatus, \bibcompactstatus]{grant}
%%%%%%%%%%%%%%%%%%%%%%
%% formatting
@@ -809,6 +1018,29 @@
%paragraph skip
\setlength{\parskip}{4pt}
+
+%%%%%%%%%%%%%%%%%%%%%%
+%% abstract
+%%%%%%%%%%%%%%%%%%%%%%
+\renewcommand{\AbstractName}{White paper}
+\settoggle{AbstractIsCentered}{true}
+\settoggle{AbstractShowAdminPOC}{false}
+\settoggle{AbstractShowLeadOrg}{false}
+\settoggle{AbstractShowOtherPersonnel}{false}
+\settoggle{AbstractShowDuration}{false}
+\settoggle{AbstractShowCost}{false}
+
+\ifbool{iswhitepaper}{
+ \titleformat{\section}[block]{\bfseries}{\uline{\thesection.~}}{0ex}{\uline{#1}}[]
+ \titleformat{\subsection}[runin]{\bfseries}{\thesubsection.~}{0ex}{#1}[.]
+ \titleformat{\subsubsection}[runin]{}{\uline{\thesubsubsection.~}}{0ex}{\uline{#1}}[.]
+
+ \titlespacing*{\section}{0pt}{*0.0}{*-1}
+
+ \renewcommand{\bibfont}{\normalsize}
+}{}
+
+
% \begin{macrocode}
%</grant-onr>
% \end{macrocode}
diff --git a/macros/latex/contrib/grant/grant.ins b/macros/latex/contrib/grant/grant.ins
index 74f5035994..a726dbff3a 100644
--- a/macros/latex/contrib/grant/grant.ins
+++ b/macros/latex/contrib/grant/grant.ins
@@ -1,5 +1,5 @@
%%
-%% Copyright (C) 2016 Jonathan Karr <karr@mssm.edu>
+%% Copyright (C) 2016-2019 Jonathan Karr <karr@mssm.edu>
%%
%% This file may be distributed and/or modified under the conditions of
%% the MIT License. The latest version of this license is in:
@@ -16,7 +16,7 @@
This is a generated file.
-Copyright (C) 2016 Jonathan Karr <karr@mssm.edu>
+Copyright (C) 2016-2019 Jonathan Karr <karr@mssm.edu>
This file may be distributed and/or modified under the conditions of
the MIT License. The latest version of this license is in:
@@ -26,13 +26,14 @@ the MIT License. The latest version of this license is in:
\endpreamble
\generate{\file{grant.cls}{\from{grant.dtx}{grant}}}
-\generate{\file{grant-arl.cls}{\from{grant.dtx}{arl}}}
-\generate{\file{grant-darpa.cls}{\from{grant.dtx}{darpa}}}
-\generate{\file{grant-doe.cls}{\from{grant.dtx}{doe}}}
-\generate{\file{grant-nih.cls}{\from{grant.dtx}{nih}}}
-\generate{\file{grant-nrl.cls}{\from{grant.dtx}{nrl}}}
-\generate{\file{grant-nsf.cls}{\from{grant.dtx}{nsf}}}
-\generate{\file{grant-onr.cls}{\from{grant.dtx}{onr}}}
+\generate{\file{grant-afosr.cls}{\from{grant.dtx}{grant-afosr}}}
+\generate{\file{grant-aro.cls}{\from{grant.dtx}{grant-aro}}}
+\generate{\file{grant-darpa.cls}{\from{grant.dtx}{grant-darpa}}}
+\generate{\file{grant-doe.cls}{\from{grant.dtx}{grant-doe}}}
+\generate{\file{grant-nih.cls}{\from{grant.dtx}{grant-nih}}}
+\generate{\file{grant-nrl.cls}{\from{grant.dtx}{grant-nrl}}}
+\generate{\file{grant-nsf.cls}{\from{grant.dtx}{grant-nsf}}}
+\generate{\file{grant-onr.cls}{\from{grant.dtx}{grant-onr}}}
\obeyspaces
\Msg{*************************************************************}
@@ -41,7 +42,8 @@ the MIT License. The latest version of this license is in:
\Msg{* files into a directory searched by TeX: *}
\Msg{* *}
\Msg{* grant.cls *}
-\Msg{* grant-arl.cls *}
+\Msg{* grant-afosr.cls *}
+\Msg{* grant-aro.cls *}
\Msg{* grant-darpa.cls *}
\Msg{* grant-doe.cls *}
\Msg{* grant-nih.cls *}
diff --git a/macros/latex/contrib/grant/grant.pdf b/macros/latex/contrib/grant/grant.pdf
index 73387da30b..d3b7416192 100644
--- a/macros/latex/contrib/grant/grant.pdf
+++ b/macros/latex/contrib/grant/grant.pdf
Binary files differ
diff --git a/macros/latex/contrib/xltabular/Changes b/macros/latex/contrib/xltabular/Changes
index d29caef556..4863998012 100644
--- a/macros/latex/contrib/xltabular/Changes
+++ b/macros/latex/contrib/xltabular/Changes
@@ -1,3 +1,4 @@
+2.0e 2020/11/04 - insert a \par at the beginning of xltabular
2.0c 2020/03/20 - restore of original longtable more robust
2.0a 2018/12/16 - better hyperref support; example files
1.0a 2018/05/23 - restore original tabularx must not be statically
diff --git a/macros/latex/contrib/xltabular/xltabular-doc.pdf b/macros/latex/contrib/xltabular/xltabular-doc.pdf
index 99ae7edd82..31763a2549 100644
--- a/macros/latex/contrib/xltabular/xltabular-doc.pdf
+++ b/macros/latex/contrib/xltabular/xltabular-doc.pdf
Binary files differ
diff --git a/macros/latex/contrib/xltabular/xltabular.sty b/macros/latex/contrib/xltabular/xltabular.sty
index 9b76de8875..6752047c5e 100644
--- a/macros/latex/contrib/xltabular/xltabular.sty
+++ b/macros/latex/contrib/xltabular/xltabular.sty
@@ -6,7 +6,7 @@
% Copyright 2018-2020 Herbert Voss <hvoss@tug.org>
% Rolf Niepraschk <Rolf.Niepraschk@gmx.de>
%%
-\ProvidesPackage{xltabular}[2020/06/14 v0.2d `xltabular' package (hv,RN)]
+\ProvidesPackage{xltabular}[2020/11/04 v0.2e `xltabular' package (hv,RN)]
\RequirePackage{tabularx}
\let\XLT@i@tabularx=\tabularx
\let\XLT@i@endtabularx=\endtabularx
@@ -35,16 +35,18 @@
% define a new tabularx like the one from "ltablex"
%
\newenvironment{xltabular}[1][x]%
-{\if l#1%
+{%
+ \par
+ \if l#1%
\LTleft\z@ \LTright\fill
- \else\if r#1%
+ \else\if r#1%
\LTleft\fill \LTright\z@
- \else\if c#1%
+ \else\if c#1%
\LTleft\fill \LTright\fill
- \fi\fi\fi
- \let\TX@endtabularx=\XLT@ii@TX@endtabularx
- \let\endtabularx\endxltabular
- \XLT@ii@tabularx}
+ \fi\fi\fi
+ \let\TX@endtabularx=\XLT@ii@TX@endtabularx
+ \let\endtabularx\endxltabular
+ \XLT@ii@tabularx}
{\def\@currenvir{tabularx}}
\def\LT@caption{%
diff --git a/macros/luatex/latex/ekdosis/Makefile b/macros/luatex/latex/ekdosis/Makefile
index 550ae95d12..694b884d81 100644
--- a/macros/luatex/latex/ekdosis/Makefile
+++ b/macros/luatex/latex/ekdosis/Makefile
@@ -34,6 +34,8 @@ $(NAME).pdf: testsamples $(NAME).dtx
if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
$(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
+ $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
samples: clean sty
$(MAKE) --directory=$(SAMPLES)
diff --git a/macros/luatex/latex/ekdosis/README.md b/macros/luatex/latex/ekdosis/README.md
index 8b54b9dc96..9d9e5d0605 100644
--- a/macros/luatex/latex/ekdosis/README.md
+++ b/macros/luatex/latex/ekdosis/README.md
@@ -12,7 +12,7 @@ critical notes in any direction accepted by LuaTeX. Texts can be
arranged in running paragraphs or on facing pages, in any number of
columns which in turn can be synchronized or not. In addition to
printed texts, `ekdosis` can convert `.tex` source files so as to
-produce `TEI xml` compliant critical editions. Database-driven
+produce `TEI xml`-compliant critical editions. Database-driven
encoding under LaTeX then allows extraction of texts entered segment
by segment according to various criteria: main edited text, variant
readings, translations or annotated borrowings between texts. It is
@@ -21,7 +21,7 @@ version 3.
License and Disclamer
=====================
-ekdosis – Typesetting TEI xml Compliant Critical Editions
+ekdosis – Typesetting TEI xml-Compliant Critical Editions
Copyright ⓒ 2020 Robert Alessi
@@ -81,7 +81,7 @@ Installation
`ekdosis.lua` files.
2. To finish the installation you have to move the `ekdosis.sty` and
- `ekdosis.lua` files into a directory where LaTeX can find it. See
+ `ekdosis.lua` files into a directory where LaTeX can find them. See
the FAQ on `texfaq.org` at <https://texfaq.org/FAQ-inst-wlcf> for
more on this.
diff --git a/macros/luatex/latex/ekdosis/ekdosis.dtx b/macros/luatex/latex/ekdosis/ekdosis.dtx
index 5eb4844caa..10400c8396 100644
--- a/macros/luatex/latex/ekdosis/ekdosis.dtx
+++ b/macros/luatex/latex/ekdosis/ekdosis.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% ekdosis -- Typesetting TEI xml compliant critical editions
+% ekdosis -- Typesetting TEI xml-compliant critical editions
% Copyright (C) 2020 Robert Alessi
%
% Please send error reports and suggestions for improvements to Robert
@@ -27,7 +27,7 @@
--[[
This file is part of the `ekdosis' package
-ekdosis -- Typesetting TEI xml compliant critical editions
+ekdosis -- Typesetting TEI xml-compliant critical editions
Copyright (C) 2020 Robert Alessi
Please send error reports and suggestions for improvements to Robert
@@ -61,11 +61,11 @@ along with this program. If not, see
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{ekdosis}
%<*package>
- [2020/08/14 v1.0 Typesetting TEI xml compliant critical editions]
+ [2020/11/04 v1.1 Typesetting TEI xml-compliant critical editions]
%</package>
%<*driver>
\begin{filecontents}[noheader,overwrite]{bibdata.xml}
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<listBibl xmlns="http://www.tei-c.org/ns/1.0">
<biblStruct type="book" xml:id="ReynoldsWilson1991">
<monogr>
@@ -86,13 +86,31 @@ along with this program. If not, see
</imprint>
</monogr>
</biblStruct>
+ <biblStruct type="book" xml:id="sDrak">
+ <monogr>
+ <title level="m">Punicorum libri septemdecim</title>
+ <author>
+ <forename>Tiberius Catius</forename>
+ <surname>Silius Italicus</surname>
+ </author>
+ <editor>
+ <forename>Arnold</forename>
+ <surname>Drakenborch</surname>
+ </editor>
+ <edition>Trajecti ad Rhenum</edition>
+ <imprint>
+ <pubPlace>Utrecht</pubPlace>
+ <date>1717</date>
+ </imprint>
+ </monogr>
+ </biblStruct>
</listBibl>
\end{filecontents}
\begin{filecontents}[overwrite]{\jobname.bib}
@Article{Alessi2020,
author = {Alessi, Robert},
title = {ekdosis: Using Lua\LaTeX{} for Producing \texttt{TEI
- xml} Compliant Critical Editions and Highlighting
+ xml}-Compliant Critical Editions and Highlighting
Parallel Writings},
journaltitle = {Journal of Data Mining and Digital Humanities},
date = 2020,
@@ -139,6 +157,15 @@ along with this program. If not, see
location = {Oxford}
}
+@Book{West1973,
+ author = {West, Martin L.},
+ title = {Textual Criticism and Editorial Technique},
+ date = 1973,
+ titleaddon = {Applicable to Greek and Latin Texts},
+ publisher = {B. G. Teubner},
+ location = {Stuttgart}
+}
+
@Online{DLL-TC,
author = {{Digital Latin Library}},
title = {Textual Criticism},
@@ -165,6 +192,15 @@ along with this program. If not, see
url = {http://www.teibyexample.org}
}
+@Software{fnpos,
+ title = {The Fnpos package},
+ titleaddon = {Control the position of footnotes on the page},
+ author = {Nakashima, Hiroshi},
+ url = {http://www.ctan.org/pkg/fnpos},
+ date = {2018-09-03},
+ version = {1.0}
+}
+
@Software{lineno,
title = {The Lineno package},
titleaddon = {Line numbers on paragraphs},
@@ -174,6 +210,15 @@ along with this program. If not, see
version = {4.41}
}
+@Software{paracol,
+ title = {The Paracol package},
+ titleaddon = {Multiple columns with texts “in parallel”},
+ author = {Nakashima, Hiroshi},
+ url = {http://www.ctan.org/pkg/paracol},
+ date = {2018-12-31},
+ version = {1.35}
+}
+
@Software{polyglossia,
title = {The Polyglossia package},
titleaddon = {An alternative to babel for XeLaTeX and LuaLaTeX},
@@ -222,13 +267,12 @@ along with this program. If not, see
\end{filecontents}
\begin{filecontents}[overwrite]{\jobname-cfg.tex}
\footnotelayout{m}
+\EnvtoTEI{ancientgreek}{p}[xml:lang="grc"]
\DeclareApparatus{fontium}[
delim=\hskip0.75em,
- bhook=\textbf{Sources:},
- ehook=.]
+ bhook=\textbf{Sources:}]
\DeclareApparatus{default}[
- delim=\hskip0.75em,
- ehook=.]
+ delim=\hskip0.75em]
\DeclareApparatus{ltr}[
delim=\hskip0.75em]
\DeclareApparatus{rtl}[
@@ -246,6 +290,7 @@ along with this program. If not, see
% Peter and John Story:
\DeclareWitness{pjA}{A}{Manuscript A Call No 123}
\DeclareWitness{pjB}{B}{Manuscript B Call No 456}
+\DeclareWitness{pjC}{C}{Manuscript C Call No 789}
% Caesar's Gallic War:
\DeclareWitness{cA}{A}{\emph{Bongarsianus} 81}[
msName=Bongarsianus,
@@ -280,8 +325,21 @@ along with this program. If not, see
% Hippocrates Epidemics, Book 2:
\DeclareWitness{hV}{V}{\emph{Vaticanus Gr.} 276}
\DeclareWitness{hI}{I}{\emph{Parisinus Gr.} 2140}
+\DeclareHand{hIac}{hI}{I\textsuperscript{ac}}[Lectio ante correctionem]
+\DeclareHand{hIpc}{hI}{I\textsuperscript{pc}}[Lectio post correctionem]
\DeclareWitness{hR}{R}{\emph{Vaticanus Gr.} 277}
\DeclareWitness{hH}{H}{\emph{Parisinus Gr.} 2142}
+\DeclareSource{Lit}{Littré}
+\DeclareSource{Erm}{Ermerins}
+\DeclareSource{Sm}{Smith}
+\DeclareSource{Gal}{Gal.}
+\DeclareScholar{ego}{ego}[
+ forename=Robert,
+ surname=Alessi]
+\DeclareShorthand{egomute}{\unskip}{ego}
+\DeclareShorthand{hcodd}{codd.}{hV,hI,hR,hH}
+\DeclareShorthand{hedd}{edd.}{Lit,Erm,Sm}
+\DeclareShorthand{hegoscr}{\emph{scripsi}}{ego}
% Silius Italicus' Punica, IX, 30--2:
\DeclareWitness{sL}{L}{Laurentianus, plut, XXXVII, cod. 16}[
origDate=s. XV]
@@ -291,7 +349,7 @@ along with this program. If not, see
origDate=s. XV]
\DeclareWitness{sV}{V}{Vaticanus lat. 1652}[
origDate=s. XV]
-\DeclareScholar{sDrak}{\emph{Drakenborch}}
+\DeclareSource{sDrak}{\emph{Drakenborch}}
\end{filecontents}
\documentclass{ltxdoc}
%\usepackage[letterpaper,margin=25mm,left=50mm,nohead]{geometry}
@@ -320,9 +378,9 @@ along with this program. If not, see
\def\sg#1{\textancientgreek{#1}}
\usepackage[Old Standard]{mathfont}
\usepackage{arabluatex}
-\usepackage[parnotes=roman,teiexport=tidy]{ekdosis}
+\usepackage[parnotes=roman,teiexport=tidy,verse]{ekdosis}
\input{ekdosis-cfg}
-\SetxmlBibResource{bibdata}
+\AddxmlBibResource{bibdata.xml}
\usepackage{booktabs}
\usepackage{xltabular}
\usepackage[prevent-all]{widows-and-orphans}
@@ -369,8 +427,6 @@ along with this program. If not, see
\labelformat{subsection}{sect.~#1}
\labelformat{subsubsection}{sect.~#1}
\labelformat{figure}{fig.~#1}
-\newcounter{dummy}
-\newcommand{\dummy}{\refstepcounter{dummy}}
\usepackage[defaultindex=none,citecmd=autocite]{icite}
\bibinput{ekdosis}
\usepackage[nospace,american]{varioref}
@@ -385,8 +441,8 @@ along with this program. If not, see
}
\ifbool{nocolordoc}
{
- \usepackage{fontawesome}
- \def\oasymbol{\faUnlock}
+ \usepackage{academicons}
+ \def\oasymbol{\aiOpenAccess}
\usepackage{biblatex-ext-oa}
}
{\usepackage[symbolpackage=tikz]{biblatex-ext-oa}}
@@ -422,9 +478,9 @@ along with this program. If not, see
\metaset{title}{ἔκδοσις}
\metaset{date}{\filedate}
\metaset{draft}{\fileversion}
-\metaset{subject}{TEI xml compliant critical editions}
-\metaset{subtitle}{Typesetting TEI xml Compliant Critical Editions}
-\metaset[print]{subtitle}{Typesetting \texttt{TEI xml} Compliant
+\metaset{subject}{TEI xml-compliant critical editions}
+\metaset{subtitle}{Typesetting TEI xml-Compliant Critical Editions}
+\metaset[print]{subtitle}{Typesetting \texttt{TEI xml}-Compliant
Critical Editions}
\metaset{author}{Robert Alessi}
\metaset{keywords}{LaTeX, Lua, TEI xml, multilingual critical
@@ -496,8 +552,7 @@ along with this program. If not, see
\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,
- firstnumber=last}
+ xleftmargin=12pt, breaklines, numberblanklines=false, numbersep=3pt}
\renewcommand{\theFancyVerbLine}{\normalfont\smaller\arabic{FancyVerbLine}}
\usepackage[contents]{colordoc}
\newcommand{\pkg}[1]{\textsf{#1}\index{#1=#1 (package)}}
@@ -513,6 +568,13 @@ along with this program. If not, see
\captionof{#1}{#2}%
#3%
\egroup}
+\NewDocumentCommand{\newfeature}{o}{%
+ \leavevmode
+ \IfNoValueTF{#1}
+ {\marginpar{\hfill\emph{New feature}}}
+ {\marginpar{\hfill\emph{New feature} #1}}%
+ \ignorespaces
+}
% \usepackage{etoc}
% \etocsettocdepth{paragraph}
% \newcommand{\ekdtableofcontents}{%
@@ -538,14 +600,14 @@ along with this program. If not, see
\RecordChanges
%\OnlyDescription
\begin{document}
- \DocInput{\jobname.dtx}
- \PrintChanges
- \PrintIndex
+\DocInput{\jobname.dtx}
+\PrintChanges
+\PrintIndex
\end{document}
%</driver>
% \fi
%
-% \CheckSum{1669}
+% \CheckSum{1893}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -587,6 +649,7 @@ along with this program. If not, see
%
% \changes{v0.99a}{2020/07/08}{First public release (documentation in
% progress)}
+% \changes{v1.0}{2020/08/14}{Documentation complete}
%
% \begin{abstract}
% \pkg{ekdosis} is a Lua\LaTeX{} package designed for
@@ -596,7 +659,7 @@ along with this program. If not, see
% facing pages, in any number of columns which in turn can be
% synchronized or not. In addition to printed texts,
% \pkg{ekdosis} can convert \texttt{.tex} source files so as to
-% produce \texttt{TEI xml} compliant critical
+% produce \texttt{TEI xml}-compliant critical
% editions. Database-driven encoding under \LaTeX{} then allows
% extraction of texts entered segment by segment according to
% various criteria: main edited text, variant readings, translations
@@ -802,9 +865,10 @@ along with this program. If not, see
%</example>
% \fi
%
-% \needspace{5\baselineskip}
% PDF output:---
% \medskip
+%
+% \needspace{7\baselineskip}
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
% I
@@ -850,7 +914,7 @@ along with this program. If not, see
% the first lemma above spans several lines whereas the second one is
% written in sequence without spaces.
%
-% In the PDF ouput, the edition text is printed in the upper part of
+% In the PDF output, the edition text is printed in the upper part of
% the page, above the line, and naturally shows the accepted
% readings. The margins are used for numeration. In the apparatus
% criticus, below the line, reference to the text is made by
@@ -956,14 +1020,28 @@ along with this program. If not, see
%</example>
% \fi
%
-% \subsection{Witnesses, Hands, Shorthands \& Scholars}
+% \subsection{Witnesses, Hands, Sources, Scholars \& Shorthands}
% \label{sec:declarations}
+% \paragraph{Terminology}
+% \label{sec:terminology}
+% Strictly speaking, the term \enquote{witness} should apply to any
+% manuscript evidence dating back to the Middle Ages used by the
+% editor to establish the edition text. That said, editors often
+% consult many other types of documents, such as modern editions,
+% articles, notes, correspondence and the like, all of which fall into
+% the category of \enquote{sources}. Furthermore, unpublished
+% conjectures are also taken into account, not to mention the
+% corrections and emendations that are proposed in many places by the
+% editor of the text. As it is necessary to refer to scholars as
+% individuals, \enquote{scholars} naturally emerges as a third
+% category.
+%
% Any reference that is to be used in the apparatus criticus must be
% \enquote{declared} in the preamble beforehand, namely: manuscript
% sigla (either for single manuscripts or manuscript families, primary
-% or later hands, \emph{\&c.}) or abbreviated last names of scholars.
-% To that effect, \pkg{ekdosis} provides the following preamble-only
-% commands:---
+% or later hands, \emph{\&c.}), abbreviated last names of sources
+% and scholars. To that effect, \pkg{ekdosis} provides the following
+% preamble-only commands:---
%
% \paragraph{Witnesses}
% \DescribeMacro{\DeclareWitness} \cs{DeclareWitness}\marg{unique
@@ -1008,8 +1086,10 @@ along with this program. If not, see
% \label{ref:marcianus-b}
% To take here one example, a witness such as the \emph{Marcianus
% Graecus}~269, referred to as manuscript \enquote*{M} in the
-% editions, which contains sixty treatises from Hippocrates, could be
-% declared as follows:--- \iffalse
+% editions, which contains sixty treatises transmitted under the name
+% of Hippocrates, could be declared as follows:---
+%
+%\iffalse
%<*example>
% \fi
\begin{minted}[linenos=false]{latex}
@@ -1034,7 +1114,7 @@ along with this program. If not, see
% \item The unique identifier of the hand to be used both in the
% |.tex| source file and as an |xml:id| in the \texttt{TEI xml} output
% if any.
-% \item The unique idendifier of the witness the hand is related
+% \item The unique identifier of the witness the hand is related
% to. Of course, this witness must have been declared beforehand.
% \item The rendition to be used in the printed apparatus criticus,
% which also will be found within the |<handNote>| element of the
@@ -1061,7 +1141,7 @@ along with this program. If not, see
% source file will be printed as \getsiglum{M}, \getsiglum{M1} and
% \getsiglum{M2} respectively. Not only the code gains legibility, but
% also flexibility for simply changing any declared rendition will
-% update corresponding sigla thoughout the entire edition.
+% update corresponding sigla throughout the entire edition.
%
% As a final example, here is how \pkg{ekdosis} would encode
% information as declared above for the \emph{Marcianus Gr.}~269
@@ -1081,7 +1161,7 @@ along with this program. If not, see
<institution>Marciana Library</institution>
<idno>269</idno>
<msName>
- <emph>Marcianus Gr.</emph>
+ Marcianus Gr.
</msName>
</msIdentifier>
<physDesc>
@@ -1112,9 +1192,91 @@ along with this program. If not, see
% \fi
% \label{ref:marcianus-e}
%
+% \paragraph{Sources}
+% \label{ref:declare-source}
+% \DescribeMacro{\DeclareSource} \cs{DeclareSource}\marg{unique
+% label}\marg{rendition}\newfeature[v1.1]\\
+% The \emph{Conspectus Siglorum} that is placed ahead of the edition
+% text is traditionally divided into two parts: a)~\emph{Codices},
+% which provides the list of sigla used in the apparatus,
+% b)~\emph{Editiones uel Studia}, which provides references to
+% sources, either published or unpublished, which contain conjectures
+% used in the apparatus criticus. \cs{DeclareSource} takes two
+% mandatory arguments used to specify consecutively:---
+% \begin{enumerate}
+% \item A unique label used in the |.tex| source file to refer to the
+% work where the conjecture is found.
+% \item The rendition to be used in the printed apparatus criticus.
+% \end{enumerate}
+%
+% \danger As \pkg{ekdosis} can include and use \texttt{TEI
+% xml}-compliant lists of references,\footnote{See below
+% \vref{sec:references-cited-works}.} it is advisable to use
+% Bib\hologo{(La)TeX} labels in the first argument of
+% \cs{DeclareSource}. Otherwise, the unique label used to declare the
+% source would point to no |xml:id| and the \texttt{TEI xml} would not
+% be valid. Likewise, shorthands fields from the bibliographical
+% database can be recalled from within the second argument of
+% \cs{DeclareSource}:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+\DeclareSource{Wil}{Wilamowitz}
+% or for example:
+\DeclareSource{Wil}{\citename{Wil}{shorteditor}}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+% \label{sec:declarations-end}
+%
+% \paragraph{Scholars}
+% \label{ref:declare-scholar}
+% \DescribeMacro{\DeclareScholar}\cs{DeclareScholar}\marg{unique
+% id}\marg{rendition}\oarg{options}\newfeature[v1.1]\\
+% Occasionally, it is necessary to refer to a scholar as a person. For
+% example, corrections and conjectures are commonly inserted as
+% self-references to the editor of the text in the apparatus criticus
+% in print with such words as \emph{scripsi}, \emph{addidi},
+% \emph{correxi} and the like. Other examples come from unpublished
+% conjectures of other scholars found in private
+% libraries. \cs{DeclareScholar} takes two mandatory arguments to
+% specify consecutively:---
+% \begin{enumerate}
+% \item The unique identifier of the scholar to be used both in the
+% |.tex| source file and as an |xml:id| in the \texttt{TEI xml} output
+% if any.
+% \item The rendition to be used in the apparatus criticus in print,
+% which also will be found within the |<sourceDesc>| element of the
+% \texttt{TEI} header where the description of the persons cited
+% occurs, within an |<abbr type="siglum">| element.
+% \end{enumerate}
+% Finally, the optional argument of \cs{DeclareScholar} accepts the
+% following comma-separated list of |key-value| arguments:---\\
+% \DescribeOption{rawname}|rawname|$=$\meta{name}\\
+% |rawname| refers to a name that is not to be dissected into name
+% part components such as forename, surname and the like. If |rawname|
+% be used, then \pkg{ekdosis} will ignore the following three optional
+% arguments: |forename|, |surname| and |addname|.\\
+% \DescribeOption{forename}|forename|$=$\meta{forename}\\
+% |forename| refers to first and middle names or initials.\\
+% \DescribeOption{surname}|surname|$=$\meta{surname}\\
+% |surname| stores the last name.\\
+% \DescribeOption{addname} |addname|$=$\meta{additional name}\\
+% |addname| refers to an additional or alternate name by which the
+% scholar is known viz.\ a Latinized form of the name, a nickname, an
+% epithet or alias.\\
+% \DescribeOption{note} |note|$=$\meta{note}\\
+% |note| may hold any relevant information about the material used by
+% the editor. For example, a note may specify that this material has
+% been found as marginal notes by the hand of the scholar in some
+% edition in print.
+%
% \paragraph{Shorthands}
% \DescribeMacro{\DeclareShorthand} \cs{DeclareShorthand}\marg{unique
-% id}\marg{rendition}\marg{csv list of witnesses}\\
+% id}\marg{rendition}\marg{csv list of identifiers}\\
% This command provides a convenient way to declare \emph{families} of
% witnesses. It takes three mandatory arguments used to specify
% consecutively:---
@@ -1147,50 +1309,39 @@ along with this program. If not, see
% Then, symbols |a| and |b| can be used in the |.tex| source file in
% place of manuscripts that belong to either family.
%
-% \paragraph{Scholars}
-% \label{ref:declare-scholar}
-% \DescribeMacro{\DeclareScholar} \cs{DeclareScholar}\marg{unique
-% label}\marg{rendition}\\
-% The \emph{Conspectus Siglorum} that is placed ahead of the edition
-% text is traditionally divided into two parts: a)~\emph{Codices},
-% which provides the list of sigla used in the apparatus,
-% b)~\emph{Editiones uel Studia}, which provides references to
-% scholars whose published or unpublished works contain conjectures
-% used in the apparatus criticus. \cs{DeclareScholar} takes two
-% mandatory arguments used to specify consecutively:---
-% \begin{enumerate}
-% \item A unique label used in the |.tex| source file to refer to the
-% work where the conjecture is found.
-% \item The rendition to be used in the printed apparatus criticus.
-% \end{enumerate}
+% That said, \cs{DeclareShorthand} is not meant to be restricted to
+% declared witnesses. On the contrary, it also applies to any declared
+% sources and scholars by means of \cs{DeclareSource} and
+% \cs{DeclareScholar}. As an example, assuming that a self-reference
+% to the person responsible for the edition has been set in the
+% preamble, an associated shorthand can be defined like so:---
%
-% As \pkg{ekdosis} can include and use \texttt{TEI xml} compliant
-% lists of references,\footnote{See below
-% \vref{sec:references-cited-works}.} it is avisable to use
-% Bib\hologo{(La)TeX} labels in the first argument of
-% \cs{DeclareScholar}. Likewise, shorthands fields from the
-% bibliographical database can be recalled from within the second
-% argument of \cs{DeclareScholar}:---
-%
% \iffalse
%<*example>
% \fi
-\begin{minted}[linenos=false]{latex}
-\DeclareScholar{Wil}{Wilamowitz}
-% or for example:
-\DeclareScholar{Wil}{\citename{Wil}{shorteditor}}
+\begin{minted}{latex}
+\DeclareScholar{ego}{ego}[
+ forename=John,
+ surname=Smith,
+ note=Main editor of the text]
+\DeclareShorthand{egoscr}{\emph{scripsi}}{ego}
\end{minted}
% \iffalse
%</example>
% \fi
-% \label{sec:declarations-end}
+%
+% Then, the shorthand |egoscr| (l.~5) can be used to print in the
+% apparatus criticus the technical term \emph{scripsi} and use at the
+% same time the pointer |#ego| that is expected in the \texttt{TEI
+% xml} output file. Detailed examples of this technique will be
+% provided below in \vref{sec:emendations-conjectures}.
%
% \subsubsection{Printing Formatted Witnesses
% --- Conspectus Siglorum}
% \label{sec:print-witnesses}
-% Once witnesses, hands and scholars have been declared, \pkg{ekdosis}
-% provides two commands to have them printed as declared from their
-% indentifiers.
+% Once witnesses, hands, scholars and sources have been declared,
+% \pkg{ekdosis} provides two commands to have them printed as declared
+% from their identifiers.
%
% \DescribeMacro{\getsiglum} \cs{getsiglum}\marg{csv list of witnesses
% or single witness} behaves exactly as the |wit| optional argument of
@@ -1254,12 +1405,12 @@ along with this program. If not, see
% \SigLine{cl}\\
% \end{xltabular}
%
-% \subsection{Editing a Single Text With No Translation}
+% \subsection{Editing a Single Text}
% \label{sec:single-text-editing}
% \DescribeEnv{ekdosis}
% Running paragraphs of one single text to be edited should be
-% inserted in the \env{ekdosis} environment, like so:---\footnote{See
-% above \vref{lst:pj1}.}
+% inserted in the \env{ekdosis} environment, like so:\footnote{See
+% above \vref{lst:pj1}.}---
% \iffalse
%<*example>
% \fi
@@ -1323,7 +1474,11 @@ yesterday.
% \emph{reading}, which contains deviant readings rejected by the
% editor.
%
-% \paragraph{Lemmata} \DescribeMacro{\lem}
+% \danger What follows refers to the notions of \enquote{witness},
+% \enquote{source} and \enquote{scholar} as defined above
+% \vpageref{sec:terminology}.
+%
+% \paragraph{Lemmata} \label{ref:lemmata}\DescribeMacro{\lem}
% \cs{lem}\oarg{options}\marg{lemma text}\\
% As \meta{lemma text} is a word or a phrase judged by the editor to
% be authentic or authoritative, \cs{lem} prints it by default both in
@@ -1338,18 +1493,38 @@ yesterday.
% While a single witness may be recorded as in |wit=A|,
% comma-separated lists of multiple witnesses must obviously be
% enclosed in curly braces, like so:
-% |wit={A,B,C}|. \label{ref:mss-sep-families}It must be noted
-% that witnesses can be grouped by using spaces as separators, like
-% so: \verb*|wit={A,B,C, D,E,F}|.\\
+% |wit={A,B,C}|. \label{ref:mss-sep-families}It must be noted that
+% witnesses can be grouped by using spaces as separators, like so:
+% \verb*|wit={A,B,C, D,E,F}|. Although any unique identifiers or
+% labels used to \enquote{declare} sources and scholars as described
+% above \vpagerefrange{ref:declare-source}{ref:declare-scholar} can
+% also be used as values of the |wit| optional argument, it is
+% recommended to use |sources| and |resp| to refer to either category
+% respectively as described below.\\
+% \DescribeOption{source} |source|$=$\meta{csv list of
+% sources}\label{ref:lem-source}\newfeature[v1.1]\\
+% A \enquote{source} refers to any type of document consulted by the
+% editor to establish the edition text. Most commonly, corrections and
+% emendations from previous editions are cited in the apparatus
+% criticus.\footnote{For edition texts used as sources, see examples
+% below in \vref{sec:emendations-conjectures} and
+% \vref{sec:references-cited-works}.}\\
+% \DescribeOption{resp} |resp|$=$\meta{csv list of
+% scholars}\label{ref:lem-resp}\newfeature[v1.1]\\
+% |resp| refers to scholars responsible for the emendations,
+% conjectures and corrections that are cited in the apparatus
+% criticus.\footnote{See detailed examples in
+% \vref{sec:emendations-conjectures}.}\\
% \DescribeOption{alt} |alt|$=$\meta{alternate lemma}\\
% While the mandatory argument of \cs{lem}, \meta{lemma text}, is
% always used to print the edition text in the upper part of the page,
% \meta{alternate lemma}, if specified, supersedes what is printed in
-% the related entry of the apparatus criticus. This mechanism is useful
-% in more than one respect. For instance, it can be used to insert
-% abbreviated lemmata in the apparatus criticus, or to introduce an
-% alternate way of writing entries with Latin technical terms in the
-% apparatus criticus as will be demonstrated below in the example
+% the related entry of the apparatus criticus. This mechanism is
+% useful in more than one respect. For instance, it can be used to
+% insert abbreviated lemmata in the apparatus criticus, or to
+% introduce an alternate way of writing entries with Latin technical
+% terms in the apparatus criticus as will be demonstrated below in the
+% example
% provided by \vref{lst:pj2}.\\
% \DescribeOption{sep} |sep|$=$\meta{separator}\\
% |sep| allows to change the symbol used to separate the lemma text
@@ -1357,8 +1532,17 @@ yesterday.
% bracket (|]|)\\
% \DescribeOption{nosep} |nosep|$=$\verb+true|false+\\
% This named argument does not need a value as it defaults to |true|
-% if it is used. Obviously, |nosep| removes the separator mentioned
-% above.\\
+% if it is used. |nosep| removes the separator mentioned
+% above. Obviously, |nosep| must be used when for some reason no
+% \cs{rdg} command follows a \cs{lem} command that has just been
+% used, as shown below in \vref{lst:emend-coni-corr}, l.~7.
+% \danger \DescribeMacro{\ekdsep} If |nosep| has been used so as to
+% insert an explanatory note after the lemma text with the \cs{note}
+% command described below \vpageref{ref:editorial-notes}, then
+% \cs{ekdsep} can be used\---for instance as value of the |post|
+% optional argument of the note\---to put back in the separator. This
+% technique is demonstrated below in
+% \vref{lst:emend-coni-corr}, ll.~23--5.\\
% \DescribeOption{nolem} |nolem|$=$\verb+true|false+\\
% This named argument does not need a value as it defaults to |true|
% if it is used. |nolem| completely removes the lemma text from the
@@ -1366,10 +1550,12 @@ yesterday.
% entry in the apparatus criticus.\\
% \DescribeOption{type} |type|$=$\meta{value}\\
% This named argument has no effect on the apparatus criticus of the
-% edition in print, but it is used in the \texttt{TEI xml} ouput to
+% edition in print, but it is used in the \texttt{TEI xml} output to
% classify the variation recorded in the entry according to some
% convenient typology. Categories such as lexical, morphological,
-% orthographical and the like may apply.
+% orthographical and the like may apply. Obviously, |type=emendation|
+% should be restricted to lemma texts and |type=conjecture| to variant
+% readings recorded by means of \cs{rdg} described below.
%
% \needspace{11\baselineskip}
% Finally, four named arguments can be used to insert words at the
@@ -1404,19 +1590,24 @@ yesterday.
% more detailed information:---\\
% \DescribeOption{wit} |wit|$=$\meta{csv list of
% witnesses}\label{ref:rdg-wit}\\
+% \DescribeOption{source} |source|$=$\meta{csv list of sources}\\
+% \DescribeOption{resp} |resp|$=$\meta{csv list of scholars}\\
% \DescribeOption{alt} |alt|$=$\meta{alternate reading}\\
% \DescribeOption{nordg} |nordg|$=$\verb+true|false+\\
% This named argument does not need a value as it defaults to |true|
% if it is used. |nordg| completely removes the variant reading from
% the related entry in the apparatus criticus.\\
% \DescribeOption{type} |type|$=$\meta{value}\\
+% Obviously, |type=conjecture| should be restricted to variant
+% readings and |type=emendation| to lemma texts recorded by means of
+% \cs{lem} described above.\\
% \DescribeOption{pre} |pre|$=$\meta{words}\\
% \DescribeOption{post} |post|$=$\meta{words}\\
% \DescribeOption{prewit} |prewit|$=$\meta{words}\\
% \DescribeOption{postwit} |postwit|$=$\meta{words}\\
%
% \paragraph{Notes}
-% \DescribeMacro{\note}\DescribeMacro{\note*}
+% \DescribeMacro{\note}\label{ref:notes-b}\DescribeMacro{\note*}
% \cs{note}\oarg{options}\marg{text} or
% \cs{note*}\oarg{options}\marg{text}\label{ref:editorial-notes}\\
% It may happen that editorial notes be needed to record short
@@ -1485,6 +1676,8 @@ yesterday.
% \iffalse
%</example>
% \fi
+%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -1566,6 +1759,580 @@ yesterday.
% \iffalse
%</example>
% \fi
+% \label{ref:notes-e}
+%
+% \subsection{Indicating Subvariation in Apparatus Entries}
+% \label{sec:indic-subv-appar}
+% It must be noted that grouping readings so as to keep emphasis on
+% subvariation, regardless of its cause, is entirely optional.
+% Furthermore, the applicability of this technique is limited to the
+% \texttt{TEI xml} output as it helps the machines to understand a
+% grouping otherwise immediately accessible to human mind from the
+% information that is available in well-written
+% apparatus. \pkg{ekdosis} provides two ways of expressing
+% subvariation.
+%
+% \subsubsection{Implicit Grouping}
+% \label{sec:implicit-grouping}
+% Because apparatus entries may nest recursively, the \cs{app} command
+% can be used to group similar readings.
+%
+% \danger However, for nesting to work, the |alt| optional argument
+% must be used in every \cs{lem} and \cs{rdg} command involved in the
+% nesting. This rule applies to both parent and child commands, as
+% demonstrated in the following example:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+As I was walking home through Times Square, I saw my friend
+\app{
+ \lem[wit={A,B}, alt={Peter\---Street}]{Peter at the
+ \app{
+ \lem[wit=A, alt=station]{station}
+ \rdg[wit=B, alt=bookstore]{bookstore}
+ }
+ on 42nd Street}
+ \rdg[wit=C, alt={John on Broadway}]{John on Broadway}
+}.
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% PDF output:---
+% \medskip
+%
+% \needspace{7\baselineskip}
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+% \begin{specimen}
+% As I was walking home through Times Square, I saw my friend
+% \app{
+% \lem[wit={pjA,pjB}, alt={Peter\---Street}]{Peter at the
+% \app{
+% \lem[wit=pjA, alt=station]{station}
+% \rdg[wit=pjB, alt=bookstore]{bookstore}}
+% on 42nd Street}
+% \rdg[wit=pjC, alt={John on Broadway}]{John on Broadway}}.
+% \end{specimen}
+% \end{alignment}
+%
+% \begin{remarks}
+% \item[\textsc{Rem.}] Two \cs{app} commands naturally insert two
+% entries in the apparatus criticus. As the subvariation comes
+% first, what ms.\ C reads is only mentioned in the subsequent
+% entry.
+% \end{remarks}
+%
+% \texttt{TEI xml} output:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p>As I was walking home through Times Square, I saw my
+friend
+<app>
+ <lem wit="#A #B">Peter at the
+ <app>
+ <lem wit="#A">station</lem>
+ <rdg wit="#B">bookstore</rdg>
+ </app>on 42nd Street</lem>
+ <rdg wit="#C">John on Broadway</rdg>
+</app>.</p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \subsubsection{Explicit Grouping}
+% \label{sec:explicit-grouping}
+% \DescribeMacro{\rdgGrp} \cs{rdgGrp}\oarg{options}\marg{lemma text
+% \textbar\ readings}\newfeature[v1.1]\\
+% Explicit grouping of readings can be achieved by means of the
+% \cs{rdgGrp} command. It takes as mandatory argument the commands
+% used for inserting lemma texts, readings and notes that are
+% described \vpagerefrange{ref:lemmata}{ref:notes-e}, viz.\ \cs{lem},
+% \cs{rdg} and \cs{note}. \cs{rdgGrp} accepts one further optional
+% argument:---\\
+% \DescribeOption{type} |type|$=$\meta{value}\\
+% This named argument is used in the \texttt{TEI xml} output to
+% define an attribute common to all elements representing the
+% variation.
+%
+% Here follows how the technique of explicit grouping would apply to
+% the same passage as above:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+As I was walking home through Times Square, I saw my friend
+\app{
+ \rdgGrp[type=subvariation]{
+ \lem[wit=A, alt={Peter\---Street}]{Peter at the station
+ on 42nd Street}
+ \rdg[wit=B, alt={bookstore \emph{pro} station}]{Peter at the
+ bookstore on 42nd Street}
+ }
+ \rdg[wit=C]{John on Broadway}
+}.
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% PDF output:---
+% \medskip
+%
+% \needspace{7\baselineskip}
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+% \begin{specimen}
+% As I was walking home through Times Square, I saw my friend
+% \app{
+% \rdgGrp[type=subvariation]{
+% \lem[wit=pjA, alt={Peter\---Street}]{Peter at the station
+% on 42nd Street}
+% \rdg[wit=pjB, alt={bookstore \emph{pro} station}]{Peter at the
+% bookstore on 42nd Street}
+% }
+% \rdg[wit=pjC]{John on Broadway}
+% }.
+% \end{specimen}
+% \end{alignment}
+%
+% \begin{remarks}
+% \item[\textsc{Rem.}] In this example, the subvariation is emphasized
+% with a Latin technical term and may be expressed in one single
+% entry in a more economical manner.
+% \end{remarks}
+%
+% \texttt{TEI xml} output:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p>As I was walking home through Times Square, I saw my
+friend
+<app>
+ <rdgGrp type="subvariation">
+ <lem wit="#A">Peter at the station on 42nd
+ Street</lem>
+ <rdg wit="#B">Peter at the bookstore on 42nd
+ Street</rdg>
+ </rdgGrp>
+ <rdg wit="#C">John on Broadway</rdg>
+</app>.</p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \section{Emendations and Conjectures}
+% \label{sec:emendations-conjectures}
+% From a technical standpoint, \enquote{conjectures} are readings that
+% are not supported by manuscript evidence, but are instead proposed
+% by scholars to be taken into consideration for establishing the
+% edition text. A conjecture is called an \enquote{emendation} if it
+% is adopted in place of what is provided by or missing from the text
+% provided by the manuscripts. Emendations and conjectures are
+% therefore readings and as such expected to be found within |<lem>|
+% or |<rdg>| elements. However, as both come from editions or
+% scholars, not from manuscripts, they are naturally associated with
+% |source| or |resp| attributes as described above
+% \vpagerefrange{ref:lem-source}{ref:lem-resp},\footnote{See also
+% \vpagerefrange{ref:declare-source}{ref:declare-scholar}.} and can be
+% distinguished from one another by the |type| attribute, eg.\ either
+% |emendation| or |conjecture|.
+%
+% As an example, the representation of witnesses, editors and
+% shorthands of Hippocrates' \emph{Epidemics}, Book~2 could be
+% summarized as follows:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}{latex}
+% Witnesses:
+\DeclareWitness{V}{V}{\emph{Vaticanus Gr.} 276}
+\DeclareWitness{I}{I}{\emph{Parisinus Gr.} 2140}
+\DeclareHand{Iac}{I}{I\textsuperscript{ac}}[Lectio ante correctionem]
+\DeclareHand{Ipc}{I}{I\textsuperscript{pc}}[Lectio post correctionem]
+\DeclareWitness{R}{R}{\emph{Vaticanus Gr.} 277}
+\DeclareWitness{H}{H}{\emph{Parisinus Gr.} 2142}
+% Sources (the first arguments below must refer to biblatex labels and
+% an xml bibliographical database must be supplied):
+\DeclareSource{Lit}{Littré}
+\DeclareSource{Erm}{Ermerins}
+\DeclareSource{Sm}{Smith}
+% Persons:
+\DeclareScholar{ego}{ego}[
+ forename=Robert,
+ surname=Alessi]
+% Useful shorthands:
+\DeclareShorthand{codd}{codd.}{V,I,R,H}
+\DeclareShorthand{edd}{edd.}{Lit,Erm,Sm}
+\DeclareShorthand{egoscr}{\emph{scripsi}}{ego}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% As can be seen from lines~18--20, three useful shorthands have been
+% defined: |codd| prints \enquote{codd.} for Latin pl.\ \emph{codices}
+% viz.\ \enquote{all manuscripts} and refers to the three \texttt{xml}
+% identifiers |V|, |I|, |R| and |H| declared at ll.~2--3 and 6--7;
+% |edd| prints \enquote{edd.} for Latin pl.\ \emph{editores} viz.\
+% \enquote{all editors} and refers to the three \texttt{xml}
+% identifiers |Lit|, |Erm| and |Sm| declared at
+% ll.~10--12;\footnote{For detailed information on how to use
+% \cs{DeclareSource} and insert references to cited works, the reader
+% is invited to refer to \vref{sec:references-cited-works}.} finally,
+% |egoscr| (l.~20) is used to print the technical Latin term
+% \enquote{\emph{scripsi}}, \enquote{I wrote}, to denote a personal
+% conjecture. Then, the |.tex| source file can be structured as
+% follows:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}{latex}
+\begin{ekdosis}
+ καὶ ἐγίνετο μᾶλλον \app{
+ \lem[wit={V, Ipc,R,H}]{νότῳ}
+ \rdg[wit=Iac]{νότου}
+ \rdg[source=Erm, type=conjecture]{ἐν νώτῳ}}· [...] % conjecture
+
+ εἰ
+ \app{
+ \lem[resp=egoscr, type=emendation]{μὲν} % emendation
+ \rdg[wit=codd, source=edd]{μὴ}
+ } εἴη διὰ ταῦτα [...]
+\end{ekdosis}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \begin{remarks}
+% \item Line~5 introduces a \emph{conjecture} which has been annotated
+% with |type=conjecture| to facilitate its identification. Other
+% optional arguments could have been used, such as
+% |prewit=|\texttt{coni.} or |prewit=|\texttt{falso coni.}, to print
+% explanatory words in the apparatus criticus before the abridged
+% name of the scholar.
+% \item \label{it:egomute}Conversely, line~9 introduces an
+% \emph{emendation} for which the shorthand |egoscr| has been used
+% to print the exact term \emph{scripsi} in the apparatus criticus
+% while keeping |ego| as an |xml:id| for the \texttt{TEI xml} output
+% file. Other strategies could have been used. For example, one
+% could have defined a specific shorthand to print nothing in place
+% of |ego| and leave the insertion of technical terms to the |post|
+% optional argument of \cs{lem}, like so:---
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+% Preamble:
+% (\unskip is for removing the space left by the empty 2nd argument
+% below.)
+\DeclareShorthand{egomute}{\unskip}{ego}
+
+% Document:
+ \app{
+ \lem[resp=egomute, post=\emph{scripsi}, type=emendation]{μὲν}
+ \rdg[wit=codd, source=edd]{μὴ}
+ } εἴη διὰ ταῦτα [...]
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+% \end{remarks}
+%
+% PDF output:---
+% \medskip
+%
+% \needspace{7\baselineskip}
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+% \begin{specimen}
+% \begin{ancientgreek}
+% καὶ ἐγίνετο μᾶλλον \app{
+% \lem[wit={hV, hIpc,hR,hH}]{νότῳ}
+% \rdg[wit=hIac]{νότου}
+% \rdg[source=Erm, type=conjecture]{ἐν νώτῳ}}· [...]
+%
+% εἰ \app{
+% \lem[resp=hegoscr, type=emendation]{μὲν}
+% \rdg[wit=hcodd, source=hedd]{μὴ}
+% } εἴη διὰ ταῦτα [...]
+% \end{ancientgreek}
+% \end{specimen}
+% \end{alignment}
+%
+% \texttt{TEI xml} output:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p xml:lang="grc">καὶ ἐγίνετο μᾶλλον
+<app>
+ <lem wit="#V #Ipc #R #H">νότῳ</lem>
+ <rdg wit="#Iac">νότου</rdg>
+ <rdg source="#Erm" type="conjecture">ἐν νώτῳ</rdg>
+</app>· [...]</p>
+<p>εἰ
+<app>
+ <lem resp="#ego" type="emendation">μὲν</lem>
+ <rdg wit="#V #I #R #H" source="#Lit #Erm #Sm">
+ μὴ</rdg>
+</app>εἴη διὰ ταῦτα [...]</p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \subsection{Editorial Addition and Deletion}
+% \label{sec:editorial-add-del}
+% \pkg{ekdosis} provides a set of commands to indicate that text has
+% been supplied or removed by conjecture. As regards critical
+% symbols conventionally used for representing emendations, lacunae,
+% omissions, gaps, editorial deletions or additions and the like,
+% \pkg{ekdosis} follows the standards as described by
+% \textcite[80--82]{West1973}:---
+% \begin{description}[font=\ttfamily]
+% \item[<>] text added by conjecture or from a parallel source.
+% \item[***] lacuna in the whole textual tradition.
+% \item[<***>] conjectured lacuna.
+% \item[\{\}] editorial deletion.
+% \item[\dag\dag] text judged by the editor to be corrupt. Note that if
+% only one word is suspect, only one crux is needed.
+% \end{description}
+%
+% \DescribeMacro{\SetCritSymbols}\newfeature[v1.1]
+% \cs{SetCritSymbols}\marg{csv list of options} can be used to change
+% the critical symbols described above. This command accepts the
+% following list of |key-value|
+% optional arguments:---\\
+% \DescribeOption{suppbegin}|suppbegin|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: <}\\
+% The opening symbol used to mark the text that is supplied.\\
+% \DescribeOption{suppend}|suppend|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: >}\\
+% The closing symbol used to mark the text that is supplied.\\
+% \DescribeOption{delbegin}|delbegin|$=$\meta{symbol}
+% \hfill\tcboxverb|Default: {|\\
+% The opening symbol used to mark the text that is deleted.\\
+% \DescribeOption{delend}|delend|$=$\meta{symbol}
+% \hfill\tcboxverb|Default: }|\\
+% The closing symbol used to mark the text that is deleted.\\
+% \DescribeOption{sicbegin}|sicbegin|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: †}\\
+% The opening symbol used to mark the text that is deemed to be
+% suspect.\\
+% \DescribeOption{sicend}|sicend|$=$\meta{symbol}
+% \hfill\tcboxverb{Default: †}\\
+% The closing symbol used to mark the text that is deemed to be
+% suspect.\\
+% \DescribeOption{gapmark}|gapmark|$=$\meta{symbols}
+% \hfill\tcboxverb{Default: ***}\\
+% The symbols used to mark lacunae.\\
+%
+% As an example, what follows sets |[]| for deletions and |...| for
+% lacunae:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+\SetCritSymbols{
+ delbegin = [,
+ delend = ],
+ gapmark = \dots
+}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \danger If modified, brackets can be adapted to languages that are
+% written from right to left. To that effect, \pkg{ekdosis} provides a
+% boolean expression |al@rlmode| which is evaluated as |true| if the
+% writing direction is set from right to left and as |false|
+% otherwise. As the \pkg{etoolbox} package is loaded by \pkg{ekdosis},
+% \cs{ifboolean}|{al@rlmode}|\marg{rtl symbol}\marg{ltr symbol} can be
+% used to perform the test.
+%
+% \paragraph{Editorial Addition}
+% \DescribeMacro{\supplied}\newfeature[v1.1]\cs{supplied}\marg{text}
+% is used to mark \meta{text} that is by definition missing from the
+% tradition as supplied by the editor or some other scholar. This
+% command is normally expected in \cs{lem}|{}| or \cs{rdg}|{}|.
+%
+% \paragraph{Editorial Deletion}
+% \DescribeMacro{\surplus}\newfeature[v1.1] \cs{surplus}\marg{text}
+% is used to mark \meta{text} that is deemed to be inauthentic, but
+% nevertheless retained between braces in the edition text as it is
+% transmitted by all witnesses. This command is normally expected in
+% \cs{lem}|{}| or \cs{rdg}|{}|.
+%
+% \paragraph{Crux}
+% \DescribeMacro{\sic}\newfeature[v1.1] \cs{sic}\marg{text} takes as
+% mandatory argument the text deemed by the editor to be readable but
+% not understandable. \cs{sic} inserts \meta{text} between cruces
+% while \cs{sic*} prints only one crux before \meta{text}.
+%
+% \paragraph{Lacuna}
+% \DescribeMacro{\gap}\newfeature[v1.1] \cs{gap}\marg{csv list of
+% options} indicates that some amount of text has fallen away from the
+% entire tradition. It takes as mandatory argument a comma-separated
+% list of options that can be used to further specify the reason for
+% omission, the unit of measurement, the quantity or the extent, as
+% follows:---\\
+% \DescribeOption{reason}|reason|$=$\meta{reason}\\
+% |reason| gives the reason for omission.\\
+% \DescribeOption{unit} |unit|$=$\meta{unit}\\
+% |unit| provides some regularized measurement, such as |character|,
+% |word|, |line| and the like.
+% \DescribeOption{quantity} |quantity|$=$\meta{n}\\
+% |quantity| specifies the number of the given unit that comprise the
+% measurement.\\
+% \DescribeOption{extent} |extent|$=$\meta{description}\\
+% |extent| describes the size, including quantity and unit in a single
+% string of words.
+%
+% \paragraph{Conjectured Lacuna}
+% Assumably, the conjectured lacuna should be enclosed by
+% \cs{supplied} and as such contained by \cs{lem} with
+% |type=emendation| to indicate that the lacuna has been accepted by
+% the editor.
+%
+% Examples follow:\footnote{On the use of \texttt{egomute} (l.~2), see
+% above \vref{it:egomute}.}---
+%
+% \captof{Emendations, conjectures and
+% corrections}[\label{lst:emend-coni-corr}]
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}{latex}
+% Preamble:
+\DeclareShorthand{egomute}{\unskip}{ego}
+
+% Document:
+\begin{ekdosis}
+ σχεδὸν \app{
+ \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba
+ excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost,
+ unit=word, quantity=4}}}
+ } οὗτοι
+
+ subsidiis magnis \sic*{epicuri} constabilitas
+
+ declinare quis est qui \sic{possit cernere sese}.
+
+ \app{
+ \lem[resp=egomute, type=emendation, nosep, post={ante
+ ὑπογίν.}]{\surplus{καὶ}}
+ \note{deleui e Gal.P}
+ } ὑπογίνονται
+
+ Πάντων δὲ \app{
+ \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}}
+ \note[post=\ekdsep]{addidi (\arb{^gamI`a 'l-.hummayAti}
+ \getsiglum{Gal})}
+ \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}}
+ \rdg[wit=codd, source=edd, alt=om.]{}
+ },
+\end{ekdosis}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% PDF output:---
+% \medskip
+%
+% \needspace{7\baselineskip}
+% \resetlinenumber
+% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
+% \begin{specimen}
+% σχεδὸν \app{
+% \lem[resp=egomute, nosep, post={post σχεδὸν quattuor uerba
+% excidisse uid.}, type=emendation]{\supplied{\gap{reason=lost,
+% unit=word, quantity=4}}}
+% } οὗτοι
+%
+% subsidiis magnis \sic*{epicuri} constabilitas
+%
+% declinare quis est qui \sic{possit cernere sese}.
+%
+% \app{
+% \lem[resp=egomute, type=emendation, nosep, post={ante
+% ὑπογίν.}]{\surplus{καὶ}}
+% \note{deleui e Gal.P}
+% } ὑπογίνονται
+%
+%
+% Πάντων δὲ \app{
+% \lem[resp=egomute, type=emendation, nosep]{\supplied{τῶν πυρετῶν}}
+% \note[post=\ekdsep]{addidi (\arb{^gamI`a 'l-.hummayAti}
+% \getsiglum{Gal})}
+% \rdg[nordg, source=Gal]{\arb{^gamI`a 'l-.hummayAti}}
+% \rdg[wit=hcodd, source=hedd, alt=om.]{}
+% },
+% \end{specimen}
+% \end{alignment}
+%
+% \texttt{TEI xml} output:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{xml}
+<p>σχεδὸν
+<app>
+ <lem resp="#ego" type="emendation">
+ <supplied>
+ <gap reason="lost" unit="word" quantity="4" />
+ </supplied>
+ </lem>
+</app>οὗτοι</p>
+<p>subsidiis magnis
+<sic>epicuri</sic> constabilitas</p>
+<p>declinare quis est qui
+<sic>possit cernere sese</sic>.</p>
+<p>
+<app>
+ <lem resp="#ego" type="emendation">
+ <surplus>καὶ</surplus>
+ </lem>
+ <note>deleui e Gal.P</note>
+</app>ὑπογίνονται</p>
+<p>Πάντων δὲ
+<app>
+ <lem resp="#ego" type="emendation">
+ <supplied>τῶν πυρετῶν</supplied>
+ </lem>
+ <note>addidi (
+ <foreign xml:lang="ar-Latn" type="transliterated"
+ subtype="arabtex">^gamI`a 'l-.hummayAti</foreign>
+ <ref target="#Gal">Gal.</ref>)</note>
+ <rdg source="#Gal">
+ <foreign xml:lang="ar-Latn" type="transliterated"
+ subtype="arabtex">^gamI`a 'l-.hummayAti</foreign>
+ </rdg>
+ <rdg wit="#V #I #R #H" source="#Lit #Erm #Sm" />
+</app>,</p>
+\end{minted}
+% \iffalse
+%</example>
+% \fi
%
% \section{Alignment of Parallel Texts}
% \label{sec:alignment-basic}
@@ -1578,7 +2345,7 @@ yesterday.
% accompanied by a translation into a modern language on the facing
% page. One can also imagine an edition of two classical texts or two
% different recensions of the same text, each of which provides
-% variants recorded in separate apparatus crititus, laid out on the
+% variants recorded in separate apparatus criticus, laid out on the
% left-hand pages, with one or more translations on the corresponding
% right-hand pages, and so forth.
%
@@ -1645,10 +2412,12 @@ yesterday.
% manuscripts and manuscript families above
% \vpageref{ref:caesar-bg-sigla}. As this document is not set for
% duplex printing, both texts have been put together on the same
-% page. However, the reader will find the full |.tex| source file
-% in \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in
+% page. However, the reader will find the full |.tex| source file in
+% \vref{sec:caesar-gw-tex} and \texttt{TEI xml} output in
% \vref{sec:caesar-gw-tei}. The corresponding PDF output is available
-% in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:---
+% in \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}:\footnote{On
+% the use of \cs{ekddiv} (ll.~3 and 20), see below
+% \vref{sec:ekddiv}.}---
%
% \captof{Caesar's \emph{Gallic War}, VI, 13.1}[\label{lst:caesar-bg}]
% \iffalse
@@ -1686,6 +2455,7 @@ yesterday.
%</example>
% \fi
%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \FormatDiv{2}{}{.}
% \begin{alignment}[flush,lcols=2,
@@ -1820,11 +2590,10 @@ yesterday.
% \item[\dbend] The colon at the end of line~3 closes the whole
% value of |text| and acts as a higher level separator.
% \end{enumerate}
-% \item Each name may be followed by a \enquote*{suboptional} argument
-% between square brackets which will then be used to insert
-% \texttt{TEI xml} attributes in the corresponding |<div>|
-% element. For example,
-% \iffalse
+% \item \label{it:lang-subopt} Each name may be followed by a
+% \enquote*{suboptional} argument between square brackets which will
+% then be used to insert \texttt{TEI xml} attributes in the
+% corresponding |<div>| element. For example, \iffalse
%<*example>
% \fi
\begin{minted}[escapeinside=++]{latex}
@@ -1959,12 +2728,11 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
% \label{sec:alignment-hooks}
% \DescribeMacro{\AtBeginEnvironment} Once environments corresponding
% to texts to be aligned have been defined, it is advisable to use the
-% \cs{AtBeginEnvironment}\marg{environment}\marg{code} command that is
-% provided by the \pkg{etoolbox} package\footnote{This package is
-% loaded by \pkg{ekdosis}.} to further adjust languages, hyphenation
-% rules, and/or fonts to be applied in each environment. To return to
-% the example provided above, once \cs{SetAlignment} has been
-% used, the languages can be set as follows:---
+% \cs{AtBeginEnvironment}\marg{environment}\marg{code} command to
+% further adjust languages, hyphenation rules, and/or fonts to be
+% applied in each environment. To return to the example provided
+% above, once \cs{SetAlignment} has been used, the languages can be
+% set as follows:---
%
% \iffalse
%<*example>
@@ -1978,7 +2746,135 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
%</example>
% \fi
%
-% \section{Laying Out the Apparatus Criticus }
+% \subsection{Laying Out Parallel Texts}
+% \label{sec:laying-out-parallel}
+% As \pkg{ekdosis} uses the \pkg{paracol} package for the layout of
+% parallel texts, most of the commands provided by this package
+% apply. In this respect, quite useful are the commands described in
+% sections 7.3 to 7.6 on pp.~15--21 of the documentation of this
+% package.\footcite{paracol}
+%
+% \danger It must be noted that all these commands are to be inserted
+% \emph{before} the \env{alignment} environments on which they are
+% supposed to operate.
+%
+% \subsubsection{Columns and Gutters}
+% \label{sec:columns-gutters}
+%
+% \paragraph{Column Ratio on Single Pages}
+% \DescribeMacro{\columnratio}
+% \cs{columnratio}\marg{r\textsubscript{1}, r\textsubscript{2}, \dots\
+% , r\textsubscript{n}}, where \emph{r\textsubscript{1}} refers to the
+% leftmost column, can be used to set the ratio of the columns in
+% relation to each other. Depending on the total number of columns on
+% which one wishes to operate, a comma-separated list of decimal
+% numbers is expected. As an example, \cs{columnratio}|{0.6}| will
+% instruct \pkg{ekdosis} to have the first column spread over 60~\% of
+% the total width of the text block, minus the total width of
+% intercolumnar gutters.
+%
+% \paragraph{Column Ratio on Facing Pages}
+% \cs{columnratio} accepts an optional argument which can be used as
+% described above to set the ratio of columns to be printed on
+% right-hand pages, like so: \cs{columnratio}\marg{r\textsubscript{1},
+% r\textsubscript{2}, \dots\ ,
+% r\textsubscript{n}}\oarg{r\textsubscript{1}, r\textsubscript{2},
+% \dots\ , r\textsubscript{n}}.
+%
+% \paragraph{Column Width on Single Pages}
+% \DescribeMacro{\setcolumnwidth}
+% \cs{setcolumnwidth}\marg{w\textsubscript{1}, w\textsubscript{2},
+% \dots\ , w\textsubscript{n}} operates the same way as
+% \cs{columnratio} described above, except that dimensions are
+% expected instead of ratios. As an example,
+% \cs{setcolumnwidth}|{1in}| will have the width of the first column
+% set to \unit[1]{in}.
+%
+% \paragraph{Gutter Width}
+% Each value accepted by \cs{setcolumnwidth} can be expressed as a
+% pair as in
+% \cs{setcolumnwidth}\marg{w\textsubscript{1}/g\textsubscript{1},
+% w\textsubscript{2}/g\textsubscript{2}, \dots\ ,
+% w\textsubscript{n}/g\textsubscript{n}} where the character |/| acts
+% as a separator, in which case \emph{g\textsubscript{x}} is used to
+% set the width of the gutter that follows the
+% \emph{x}\textsuperscript{th} column. As an example,
+% \cs{setcolumnwidth}|{1in/0.25in}| will print a
+% \unit[1]{in} first column, followed by a \unit[0.25]{in} gutter.
+%
+% \paragraph{Automatically Computed Values}
+% Widths of columns and widths of gutters can be replaced with
+% \cs{fill} and \cs{columnsep} respectively. As an example,
+% \cs{setcolumnwidth}|{\fill/0.25|\allowbreak|in}| will only operate
+% on the width that follows the first column, all remaining values
+% being computed automatically.
+%
+% \paragraph{Column and Gutter Width on Facing Pages}
+% Just like \cs{columnratio}, \cs{setcolumnwidth} accepts an optional
+% argument which can be used to set the width of columns and gutters
+% to be printed on right-hand pages, like so:
+% \cs{setcolumnwidth}\marg{w\textsubscript{1}, w\textsubscript{2},
+% \dots\ , w\textsubscript{n}}\oarg{w\textsubscript{1},
+% w\textsubscript{2}, \dots\ , w\textsubscript{n}} for columns only,
+% and \cs{setcolumnwidth}\marg{w\textsubscript{1}/g\textsubscript{1},
+% w\textsubscript{2}/g\textsubscript{2}, \dots\ ,
+% w\textsubscript{n}/g\textsubscript{n}}%
+% \oarg{w\textsubscript{1}/g\textsubscript{1},
+% w\textsubscript{2}/g\textsubscript{2}, \dots\ ,
+% w\textsubscript{n}/g\textsubscript{n}} for columns and gutters.
+%
+% \paragraph{Vertical Rules}
+% Vertical rules between columns can be drawn by setting the length of
+% the \LaTeX\ \cs{columnseprule} register to a non-zero value, like
+% so:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+\setlength{\columnseprule}{0.4pt}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \subsubsection{Marginal Notes}
+% \label{sec:marginal-notes}
+% By default, marginal notes that refer to the first column are
+% printed in the left margin, while notes that refer to subsequent
+% columns are printed in the right margin.
+%
+% \DescribeMacro{\marginparthreshold} \cs{marginparthreshold}\marg{n},
+% where \emph{n} is an integer, can be used to change the default
+% settings. This command instructs \pkg{ekdosis} that columns of text,
+% up to the \emph{n}\textsuperscript{th} column included, shall have
+% their marginal notes printed to the left. As a result, to take an
+% example, \cs{marginparthreshold}|{0}| will have all marginal notes
+% printed in the right margin. \cs{marginparthreshold} also accepts an
+% optional argument, namely
+% \cs{marginparthreshold}\allowbreak\marg{n}\oarg{n'}, that can be
+% used to set the threshold for columns printed in right-hand pages.
+%
+% \subsubsection{Regular Footnotes}
+% \label{sec:regular-footnotes}
+% \DescribeMacro{\footnotelayout} By default, regular footnotes are
+% printed at the bottom of the column on which they are
+% called. \cs{footnotelayout}\marg{key-letter} can be used to change
+% this setting. This command accepts as mandatory argument a
+% key-letter which can be either |c|, |p| or |m|. |c| means
+% \emph{column-wise} footnotes, which is the default value. |p| means
+% \emph{page-wise}: footnotes from all columns are gathered in a
+% single spanning block at the bottom of the page. Finally, |m| stands
+% for \emph{merge}, which means that all footnotes that are called on
+% a given page, including notes that are called outside the
+% \env{alignment} environment, are printed in a single spanning block
+% at the bottom of the page.
+%
+% \danger Regular footnotes are printed above the block of critical
+% notes. Places can be interchanged by just loading the \pkg{fnpos}
+% package in the preamble.\footcite{fnpos}
+%
+% \section{Laying Out the Apparatus Criticus}
% \label{sec:apparatus-layout}
%
% \subsection{General Hooks}
@@ -2041,11 +2937,14 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
% indentation of one em.
%
% \DescribeMacro{\SetEndApparatus}
+% \label{ref:setendapparatus}
% \cs{SetEndApparatus}\marg{characters} can be used to append
% \meta{characters} at the end of the apparatus block. By default,
-% nothing is appended. As an example of use, |\SetEndApparatus{.}|
-% will have a period printed at the end of the apparatus as it is
-% customary in some editions.
+% nothing is appended. \label{ref:ending-dot}As an example of use,
+% |\SetEndApparatus{.}| will have a period printed at the end of the
+% apparatus as it is customary in some
+% editions.\footnote{\label{fn:rm-dots}See also below
+% \vpageref{sec:superfluous-dots} on how to remove superfluous dots.}
%
% \DescribeMacro{\SetUnitDelimiter}
% \cs{SetUnitDelimiter}\marg{delimiter} can be used to set the
@@ -2086,7 +2985,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
% apparatus block.\\
% \DescribeOption{ehook} |ehook|$=$\meta{characters}
% \hfill\tcboxverb{Default: empty}\\
-% The characters to be appended at the end of the apparatus block.\\
+% The characters to be appended at the end of the apparatus
+% block.\footnote{See also n.~\vref{fn:rm-dots}.}\\
% \DescribeOption{rule} |rule|$=$\meta{command}\verb+|+|none|
% \hfill\tcboxverb{Default: \rule{0.4\columnwidth}{0.4pt}}\\
% As described above, |rule| is used to draw the separating line
@@ -2145,8 +3045,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
% preamble, this |default| layer must be included in the list of
% declared layers.\\
% \DescribeMacro{\SetDefaultApparatus}\label{ref:ekd-default-app}
-% \cs{SetDefaultApparatus}\marg{name} can be used at any point of
-% the document to change the default name that is used by
+% \cs{SetDefaultApparatus}\marg{name} can be used at any point of the
+% document to change the name to be used as the default one by
% \pkg{ekdosis}.
%
% \subsubsection{Declaring Additional Layers}
@@ -2189,7 +3089,7 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
% \DescribeOption{ehook}
% \DescribeOption{rule}
% \DescribeOption{norule}
-% With regard to layout, any declared layer inherits the defaut values
+% With regard to layout, any declared layer inherits the default values
% described above in \vref{sec:single-layer-app}. That said, as the
% optional argument of \cs{DeclareApparatus} accepts the exact same
% |key-value| options as \cs{SetApparatus} described
@@ -2322,9 +3222,9 @@ Some \app[type=rec2]{
%</example>
% \fi
%
-% At any rate, |type=default| or |type=rec1|, depending on what has
-% been chosen, must be used if the editor wishes to retain that
-% information in the \texttt{TEI xml} output file.
+% \danger At any rate, |type=default| or |type=rec1|, depending on
+% what has been chosen, must be used if the editor wishes to retain
+% that information in the \texttt{TEI xml} output file.
%
% \subsection{Other Notes for Comments, Sources or Testimonia}
% \label{ref:type-note}
@@ -2406,21 +3306,22 @@ Some \app[type=rec2]{
Asia; a language, copious, elastic, inviting self-explaining
combinations and independent development; lending itself alike to
daily life and imagination, to description and abstract thought.
- \note[type=fontium, labelb=61e, labele=62a, lem={They
+ \note[type=fontium, labelb=B61e, labele=B62a, lem={They
had... slave}]{Waitz, \emph{Deutsche Verfassungs Geschichte},
i. 86} They had a class of nobles, but their tongue knew no word
- for slave.\linelabel{62a}\footnote{George Bancroft, \emph{History of
- the United States from the Discovery of the American Continent},
- II.61--2.}
+ for slave.\linelabel{B62a}\footnote{George Bancroft, \emph{History
+ of the United States from the Discovery of the American
+ Continent}, II.61--2.}
\end{ekdosis}
\end{minted}
% \iffalse
%</example>
% \fi
%
-% \needspace{5\baselineskip}
% PDF output:---
% \medskip
+%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -2430,10 +3331,10 @@ Some \app[type=rec2]{
% self-explaining combinations and independent development;
% lending itself alike to daily life and imagination, to
% description and abstract thought. \note[type=fontium,
-% labelb=61e, labele=62a, lem={They had... slave}]{Waitz,
+% labelb=B61e, labele=B62a, lem={They had... slave}]{Waitz,
% \emph{Deutsche Verfassungs Geschichte}, i. 86} They had a class
% of nobles, but their tongue knew no word for
-% slave.\linelabel{62a}\footnote{George Bancroft, \emph{History of
+% slave.\linelabel{B62a}\footnote{George Bancroft, \emph{History of
% the United States from the Discovery of the American Continent},
% II.61--2.}
% \end{specimen}
@@ -2451,11 +3352,11 @@ travels from central Asia; a language, copious, elastic,
inviting self-explaining combinations and independent
development; lending itself alike to daily life and
imagination, to description and abstract thought.
-<note type="fontium" target="#range(right(61e),left(62a))">Waitz,
+<note type="fontium" target="#range(right(B61e),left(B62a))">Waitz,
<emph>Deutsche Verfassungs Geschichte</emph>, i. 86</note>
-<anchor xml:id="61e" />They had a class of nobles, but
+<anchor xml:id="B61e" />They had a class of nobles, but
their tongue knew no word for slave.
-<anchor xml:id="#62a" />
+<anchor xml:id="B62a" />
<note place="bottom">George Bancroft,
<emph>History of the United States from the Discovery of
the American Continent</emph>, II.61--2.</note></p>
@@ -2488,9 +3389,10 @@ text to demonstrate how to insert a note in the argument of the
%</example>
% \fi
%
-% \needspace{5\baselineskip}
% PDF output:---
% \medskip
+%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -2641,7 +3543,7 @@ argument of the
% apparatus, as described in \vref{sec:single-layer-app}, can be
% typeset within the Arabic environment that is provided by
% \pkg{polyglossia}. Unfortunately, the same cannot be said for
-% multi-layer apparatus.
+% multiple-layer apparatus.
%
% Whether \pkg{babel} or \pkg{polyglossia} is used, \pkg{ekdosis}
% automatically applies the current language to the entries of the
@@ -2650,7 +3552,9 @@ argument of the
% \pkg{polyglossia} can use the same language switching commands as
% \pkg{babel},\footcite[See][3.2 \pno~14]{polyglossia} the general
% advice given above in \vref{sec:alignment-hooks} applies in all
-% cases.
+% cases. As regards setting languages in the \texttt{TEI xml} output
+% file, the reader is invited to refer to point \vref{it:lang-subopt}
+% and \vref{sec:teixml-output}.
%
% \subsection{Languages Written From Right to Left}
% \label{sec:rtl-languages}
@@ -2808,9 +3712,10 @@ argument of the
% \vref{sec:multilayer-apparatus} (multiple-layer apparatus
% criticus).}
%
-% \needspace{5\baselineskip}
% The PDF output with left-to-right apparatus criticus follows:---
% \medskip
+%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -2826,7 +3731,10 @@ argument of the
% \needspace{5\baselineskip}
% And here follows the PDF output with right-to-left apparatus
% criticus:---
-% \medskip \resetlinenumber
+% \medskip
+%
+% \needspace{7\baselineskip}
+% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
% \begin{arab}[fullvoc]
@@ -2867,7 +3775,7 @@ argument of the
% Preamble:
% load ekdosis and ask for TEI xml output:
\usepackage[teiexport]{ekdosis}
-% load arabluatex and request a LaTeX ouput with Unicode Arabic:
+% load arabluatex and request a LaTeX output with Unicode Arabic:
\usepackage[export,fullvoc]{arabluatex}
% document:
@@ -2888,9 +3796,11 @@ argument of the
%</example>
% \fi
%
-% \needspace{7\baselineskip}
% The PDF output with left-to-right apparatus criticus is of course
% the same as above:---
+% \medskip
+%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -3015,12 +3925,13 @@ subtype="arabtex">'inna 'abI kAna mina
% Variant readings can be inserted in headings. In this case, the
% optional argument of the \LaTeX\ sectional command must naturally be
% used to prevent variants from going into headers, footers or the
-% table of contents, like so:---
+% table of contents, like so:\footnote{On the use of \texttt{egomute}
+% (l.~13), see above \vref{it:egomute}.}---
%
% \iffalse
%<*example>
% \fi
-\begin{minted}[linenos=false]{latex}
+\begin{minted}{latex}
% Preamble:
\usepackage[teiexport=tidy, divs=latex]{ekdosis}
\MkBodyDivs{chapter}{section}{}{}{}{}
@@ -3031,7 +3942,11 @@ subtype="arabtex">'inna 'abI kAna mina
\lem[wit={I,R,H}]{βιβλίον δεύτερον}
\rdg[wit=V]{λόγος β’}}}
-\section{<Τμῆμα πρῶτον>}
+\section[Τμῆμα πρῶτον]{
+ \app{
+ \lem[resp=egomute, type=emendation, nosep,
+ post=suppleui]{\supplied{Τμῆμα πρῶτον}}
+ }}
Ἄνθρακες θερινοὶ ἐν Κραννῶνι· [...]
\end{minted}
% \iffalse
@@ -3051,7 +3966,12 @@ subtype="arabtex">'inna 'abI kAna mina
<rdg wit="#V">λόγος β’</rdg>
</app></head>
<div2 type="section">
- <head>&lt;Τμῆμα πρῶτον&gt;</head>
+ <head>
+ <app>
+ <lem><supplied resp="#ego" type="emendation">Τμῆμα
+ πρῶτον</supplied></lem>
+ </app>
+ </head>
<p>Ἄνθρακες θερινοὶ ἐν Κραννῶνι· [...]</p>
</div2>
</div1>
@@ -3104,7 +4024,7 @@ subtype="arabtex">'inna 'abI kAna mina
% indicate the depth of the division within the hierarchy, the largest
% being |1| and the smallest being |9|.\\
% \DescribeOption{toc}
-% |toc|$=$\verb+|book|part|chapter|section|subsection|subsubsection|paragraph+\\
+% |toc|$=$\verb+book|part|chapter|section|subsection|subsubsection|paragraph|+\\
% |subparagraph|\hfill\tcboxverb{Default: not set}\\
% If |toc| be set, the title of the division goes into the table of
% contents at the hierarchic level that is specified as value.
@@ -3134,7 +4054,7 @@ subtype="arabtex">'inna 'abI kAna mina
% To elaborate on the example provided above in \vref{sec:latex-divs},
% here follows how the first three hierarchical levels could be
% formatted as un-numbered divisions:---
-%
+%
% \iffalse
%<*example>
% \fi
@@ -3157,7 +4077,10 @@ subtype="arabtex">'inna 'abI kAna mina
}
\ekddiv{
- head={<Τμῆμα πρῶτον>},
+ head={\app{
+ \lem[resp=egomute, post=suppleui,
+ type=emendation]{\supplied{Τμῆμα πρῶτον}}
+ \rdg[wit=codd, alt=om.]{}}},
type=section,
depth=2,
n=II.1
@@ -3171,10 +4094,10 @@ subtype="arabtex">'inna 'abI kAna mina
%</example>
% \fi
%
-% \needspace{5\baselineskip}
% PDF output:---
% \medskip
%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \FormatDiv{1}{\begin{center}\Large}{\end{center}}
% \FormatDiv{2}{\begin{center}\large}{\end{center}}
@@ -3194,7 +4117,15 @@ subtype="arabtex">'inna 'abI kAna mina
% depth=1,
% n=II}
%
-% \ekddiv{head={<Τμῆμα πρῶτον>}, type=section, depth=2, n=II.1}
+% \ekddiv{
+% head={\app{
+% \lem[resp=egomute, post=suppleui,
+% type=emendation]{\supplied{Τμῆμα πρῶτον}}
+% \rdg[wit=hcodd, alt=om.]{}}},
+% type=section,
+% depth=2,
+% n=II.1
+% }
%
% \ekddiv{head=1, type=paragraph, depth=3, n=II.1.1} Ἄνθρακες
% θερινοὶ ἐν Κραννῶνι· [...]
@@ -3215,7 +4146,14 @@ subtype="arabtex">'inna 'abI kAna mina
<rdg wit="#V">λόγος β’</rdg>
</app></head>
<div type="section" n="II.1">
- <head>&lt;Τμῆμα πρῶτον&gt;</head>
+ <head>
+ <app>
+ <lem resp="#ego" type="emendation">
+ <supplied>Τμῆμα πρῶτον</supplied>
+ </lem>
+ <rdg wit="#V #I #R #H" />
+ </app>
+ </head>
<div type="paragraph" n="II.1.1">
<head>1</head>
<p>Ἄνθρακες θερινοὶ ἐν Κραννῶνι· [...]</p>
@@ -3237,11 +4175,11 @@ subtype="arabtex">'inna 'abI kAna mina
% the apparatus criticus does not show. Instead, \pkg{ekdosis}
% produces an auxiliary file named \cs{jobname}|.ekd| in which all the
% entries of the apparatus criticus are collected. Then, on the second
-% run a test is performed on this auxliary file to determine whether
+% run a test is performed on this auxiliary file to determine whether
% there are entries\---and if so, which ones\---to be printed on the
% current page. At the same time, references to the line numbers are
-% updated if necessary. Then, on the third run, the apparatus criticus
-% is printed.
+% updated if necessary. Finally, on the third run, the apparatus
+% criticus is printed.
%
% Of course, every change made to the input may similarly require
% \hologo{LuaLaTeX} to be run three more times to get everything to
@@ -3269,7 +4207,7 @@ subtype="arabtex">'inna 'abI kAna mina
% a good way to get out of the vicious circle. And surely, if only a
% few pages are at stake, this is the way to go. However,
% \cs{pagebreak} commands should only be inserted when the whole
-% edition text is ready for any subtantial change in the preceding
+% edition text is ready for any substantial change in the preceding
% pages may result in pages that break just after they begin.
%
% Another way\---should the edition text fall into the vicious circle
@@ -3277,16 +4215,16 @@ subtype="arabtex">'inna 'abI kAna mina
% layer of apparatus criticus may accept as described above
% \vpageref{ref:maxentries}. As a result, \pkg{ekdosis} will take care
% of inserting automatic breakpoints between pages whenever the number
-% of entries on a given page reaches the value set as |maxnumber|.
+% of entries on a given page reaches the value set as |maxentries|.
%
-% |maxnumber| must not be too small: otherwise offensive to look at
+% |maxentries| must not be too small: otherwise offensive to look at
% vertical spaces may come between the edition text and the apparatus
-% criticus. Conversely, |maxnumber| must not be too big: otherwise,
+% criticus. Conversely, |maxentries| must not be too big: otherwise,
% should entries overflow on a given page, the edition text and the
-% apparatus criticus may clash. As said above, a couple of clashes can
-% be managed with a couple of manually inserted page breaks. But if
-% there are too many ot them, it is a good indication that the
-% selected value of |maxentries| is too to high.
+% apparatus criticus may clash again. As said above, a couple of
+% clashes can be managed with a couple of manually inserted page
+% breaks. But if there are too many of them, it is a good indication
+% that the selected value of |maxentries| is too to high.
%
% Complex edition texts do have a magic number. An advisable way to
% figure it out would be to start from a sample of only a few pages,
@@ -3294,6 +4232,124 @@ subtype="arabtex">'inna 'abI kAna mina
% pages would need to be compiled, the magic number should emerge
% quite rapidly.
%
+% \paragraph{Adding and Removing Entries}
+% \DescribeMacro{\addentries} \cs{addentries}\oarg{layer}\marg{n}
+% \newfeature[v1.1]\\
+% If |maxentries| be set for a given layer of critical notes,
+% \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer,
+% can be used to add \meta{n} to\---or remove it from if \meta{n} be
+% negative\---the number of accepted entries on the current
+% page. \cs{addentries} operates on the default layer of notes, but
+% any other declared layer can be specified in the optional argument
+% of the command.
+%
+% \danger Of course, \cs{addentries} must be issued before the
+% number of entries on a given page has reached the value set as
+% |maxentries|.
+%
+% Once a sensible value for |maxentries| has been found,
+% \cs{addentries} can further be used with a positive integer to allow
+% for more entries and more lines on some pages so that offending
+% vertical spaces are decreased. Conversely, \cs{addentries} with a
+% negative integer will remove entries on pages where there are too
+% many of them and \pkg{ekdosis} still oscillates between different
+% sets of page decisions.
+%
+% \subsection{Variae Quaestiones}
+% \label{sec:variae-quaestiones}
+% This section is about issues that are not strictly speaking part of
+% the documentation of \pkg{ekdosis} but may nevertheless
+% circumstantially arise.
+%
+% \paragraph{Superfluous Dots}
+% \label{sec:superfluous-dots}
+% As said above \vpageref{ref:ending-dot}, it is customary in some
+% editions to have a full stop printed at the end of the apparatus
+% criticus. \pkg{ekdosis} provides specific commands to achieve this
+% in a straightforward way, such as \cs{SetEndApparatus} and the
+% |ehook| optional argument of \cs{SetApparatus} and
+% \cs{DeclareApparatus}.\footnote{See above
+% \vpagerefrange{ref:setendapparatus}{sec:declaring-layers}.} However,
+% if the last word of the apparatus criticus on a given page be an
+% abbreviation followed by a dot, such a setting will have two dots
+% printed at the end of the apparatus instead of one. The solution is
+% to define a command to have a dot printed only if it is not followed
+% by a dot, and append this command to the abbreviated form of the
+% word, like so:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}{latex}
+% Preamble:
+\usepackage{xspace}
+\usepackage{ekdosis}
+
+\makeatletter
+\newcommand{\ekddot}{%
+ \ltx@ifnextchar{.}{\xspace}{.\xspace}}
+\makeatother
+
+\DeclareApparatus{default}[ehook=.]
+\DeclareScholar{Erm}{Erm\ekddot}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% \begin{remarks}
+% \item Line~2: The \pkg{xspace} package is needed for \cs{xspace} is
+% used by the \cs{ekddot} command that is defined at l.~6.
+% \item Line~7: \cs{ltx@ifnextchar} is part of the \pkg{ltxcmds}
+% package which is loaded by \pkg{ekdosis}. As this command uses a
+% private control sequence, it must be found within
+% \cs{makeatletter} \dots\ \cs{makeatother}.
+% \item Line~10: \cs{ekddot} will only work with multiple-layer
+% apparatus criticus. Therefore, \cs{DeclareAppa{\allowbreak}ratus}
+% must be used even if only one layer of critical notes is needed.
+% \end{remarks}
+%
+% \paragraph{Backup of Essential Files}
+% Each time the |.tex| source file is compiled, \pkg{ekdosis} reads
+% the |.aux| corresponding \LaTeX\ auxiliary file and its own |.ekd|
+% auxiliary file so as to process labels and collect entries of the
+% apparatus criticus. If for whatever reason\---e.g.\ some unknown
+% command has been inserted\---the compilation freezes and so must be
+% aborted, it may happen that most of the edition text has to be
+% reconstructed page after page. For large and complex editions, this
+% makes advisable to have current versions of those files backed up
+% each time a new compilation begins, which can be achieved by
+% inserting the following lines before the line that loads the
+% document class:---
+%
+% \iffalse
+%<*example>
+% \fi
+\begin{minted}[linenos=false]{latex}
+\RequirePackage{verbatimcopy}
+\IfFileExists{\jobname.aux}{%
+ \OldVerbatimCopy{\jobname.aux}{\jobname.aux.bak}}{}
+\IfFileExists{\jobname.ekd}{%
+ \OldVerbatimCopy{\jobname.ekd}{\jobname.ekd.bak}}{}
+\documentclass{book}
+\end{minted}
+% \iffalse
+%</example>
+% \fi
+%
+% This way, both |.aux| and |.ekd| files can be recovered from
+% |.aux.bak| and |.ekd.bak| just after the compilation has been
+% aborted. Should this be needed, one must proceed carefully as
+% follows:---
+% \begin{enumerate}
+% \item Just after the compilation has been aborted, move both
+% |aux.bak| and |ekd.bak| files to a safe place.
+% \item Remove or correct the offending command or lines that broke
+% the compilation and make sure that the issue is solved.
+% \item Restore the |.aux| and |.ekd| files from |aux.bak| and
+% |.ekd.bak| and resume work where it was left off.
+% \end{enumerate}
+%
% \section{\texttt{TEI xml} Output}
% \label{sec:teixml-output}
% Several examples of \texttt{TEI xml} output have been provided
@@ -3311,10 +4367,10 @@ subtype="arabtex">'inna 'abI kAna mina
% language (Latin, English and French) is to be found in two different
% places, namely for \texttt{TEI xml} output (ll.~21--3) and for PDF
% output through \LaTeX\ (ll.~27--9). Finally, it provides examples of
-% declaring witnesses, hands, scholars and shorthands (ll.~31--60). As
-% to the document itself, it shows how to lay out a conspectus
-% siglorum in a table (ll.~64--80), before giving detailed examples of
-% how the edition text is entered (ll.~85--101) and sectional commands
+% declaring witnesses, hands and shorthands (ll.~31--60). As to the
+% document itself, it shows how to lay out a conspectus siglorum in a
+% table (ll.~64--80), before giving detailed examples of how the
+% edition text is entered (ll.~85--101) and sectional commands
% provided by \pkg{ekdosis} are used (ll.~86, 103 and
% 110).\footnote{The PDF output is available as
% \href{samples/Caesar_BG-6-13-1.pdf}{a separate file}.}
@@ -3356,7 +4412,7 @@ subtype="arabtex">'inna 'abI kAna mina
% The \texttt{TEI} validator is here:
% \url{http://teibyexample.com/xquery/TBEvalidator.xq}.} As for
% \pkg{ekdosis}, it is designed to produce on request, in addition to
-% an edition in print, a \texttt{TEI xml} compliant output file. That
+% an edition in print, a \texttt{TEI xml}-compliant output file. That
% said, one must keep in mind that the \LaTeX\ packages that are part
% of {\TeX}Live can be counted in thousands, and the commands they
% provide in tens of thousands. There may even be grounds in asserting
@@ -3383,7 +4439,7 @@ subtype="arabtex">'inna 'abI kAna mina
% are marked in \LaTeX\ with \enquote{open} commands such as
% \cs{chapter} or \cs{section} with no clear indication where the
% closure of divisions occurs, contrary to \texttt{TEI xml} markup
-% with numered or un-numbered |<div>| elements allowed to nest
+% with numbered or un-numbered |<div>| elements allowed to nest
% recursively. As regards running paragraphs of text, the situation is
% even worse than in the latter case, as the following simple example
% shows:---
@@ -3434,29 +4490,6 @@ subtype="arabtex">'inna 'abI kAna mina
% \textsf{Lua} functions which involve string matching (both forward
% and reverse matching) and recursions.
%
-% \paragraph{The \texttt{xml:id} Attribute}
-% As a general rule, the |xml:id| global attribute must be unique for
-% the element that bears the attribute. Furthermore, it must begin
-% with a letter or an underscore and contain no characters other that
-% letters, digits, hyphens underscores and full stops. \pkg{ekdosis}
-% issues a warning when it finds that any \meta{unique id} of
-% \meta{unique label} expected in the first argument of
-% \cs{DeclareWitness}, \cs{DeclareHand} or \cs{DeclareScholar} is not
-% unique or breaks the rules just described, but does not prevent the
-% |.tex| source file from compiling. Instead, it prints the string
-% |<??>| in place of the expected formatted siglum so that the error
-% in the |.tex| source file can be easily spotted and corrected.
-%
-% \danger As the \meta{unique id} declared with \cs{DeclareShorthand}
-% is not to be exported in the \texttt{TEI xml} outputfile,
-% \pkg{ekdosis} checks neither its uniqueness nor its validness.
-%
-% \danger It must be noted that \LaTeX\ labels that are provided in
-% commands such as \cs{label}, \cs{cite} and the like must also be
-% unique in the document. As \LaTeX\ will issue warnings if it finds
-% duplicates, \cs{ekdosis} does not check their uniqueness but will
-% issue warnings if such labels contain invalid strings.
-%
% \paragraph{\texttt{TEI xml} Export Settings}
% \label{ref:setteixmlexport}
% \DescribeMacro{\SetTEIxmlExport} \cs{SetTEIxmlExport}\marg{csv list
@@ -3488,6 +4521,30 @@ subtype="arabtex">'inna 'abI kAna mina
% paragraphs within |<p>| elements when |autopar| has been set to
% |false| by means of \cs{SetTEIxmlExport} described above.
%
+% \paragraph{The \texttt{xml:id} Attribute}
+% As a general rule, the |xml:id| global attribute must be unique for
+% the element that bears the attribute. Furthermore, it must begin
+% with a letter or an underscore and contain no characters other that
+% letters, digits, hyphens, underscores and full stops. \pkg{ekdosis}
+% issues a warning when it finds that any \meta{unique id} of
+% \meta{unique label} expected in the first argument of
+% \cs{DeclareWitness}, \cs{DeclareHand}, \cs{DeclareSource} or
+% \cs{DeclareScholar} is not unique or breaks the rules just
+% described, but does not prevent the |.tex| source file from
+% compiling. Instead, it prints the string |<??>| in place of the
+% expected formatted siglum so that the error in the |.tex| source
+% file can be easily spotted and corrected.
+%
+% \danger As the \meta{unique id} declared with \cs{DeclareShorthand}
+% is not to be exported in the \texttt{TEI xml} output file,
+% \pkg{ekdosis} checks neither its uniqueness nor its validness.
+%
+% \danger It must be noted that \LaTeX\ labels that are provided in
+% commands such as \cs{label}, \cs{cite} and the like must also be
+% unique in the document. As \LaTeX\ will issue warnings if it finds
+% duplicates, \cs{ekdosis} does not check their uniqueness but will
+% issue warnings if such labels contain invalid strings.
+%
% \subsection{Routine \LaTeX\ Commands and Environments}
% \label{sec:routine-cmds}
% The list of \LaTeX\ commands known by \pkg{ekdosis} at the time of
@@ -3509,6 +4566,7 @@ subtype="arabtex">'inna 'abI kAna mina
% \cs{textsc}|{}| & |<hi rend="smallcaps"></hi>| \\
% \cs{textsf}|{}| & |<hi rend="sf"></hi>| \\
% \cs{footnote}|{}| & |<note place="bottom"></note>| \\
+% \cs{marginpar}|{}| & |<note place="margin"></note>| \\
% \cs{enquote}\meta{*}|{}| & |<quote></quote>| \\
% \cs{label}|{label}| & |<anchor xml:id="label"/>| \\
% \cs{linelabel}|{label}| & |<anchor xml:id="label"/>| \\
@@ -3517,7 +4575,7 @@ subtype="arabtex">'inna 'abI kAna mina
% \cs{vref}|{label}| & |<ptr ="#label"/>| \\
% \cs{vpageref}|{label}| & |<ptr ="#label"/>| \\
% \cs{pagebreak}\meta{\oarg{1-4}} & no output \\
-% \cs{mbox}|{}| & no output \\
+% \cs{mbox}\marg{text} & \meta{text} \\
% \bottomrule
% \end{xltabular}
%
@@ -3610,7 +4668,7 @@ many mathematical writings and to the sense of
% \texttt{TEI} element it is to be converted into and any additional
% \texttt{xml} attributes to be appended to the opening \texttt{TEI}
% element. For example, the \cs{sidenote} command that is provided by
-% the \cs{sidenotes} package can be processed like so:---
+% the \pkg{sidenotes} package can be processed like so:---
%
% \iffalse
%<*example>
@@ -3650,13 +4708,16 @@ many mathematical writings and to the sense of
%
% Even more subtly, provided that the code |#STC| points to some more
% information identifying the agency concerned:\footnote{At the time
-% of writing, \enquote*{scholars} can be declared with
-% \cs{DeclareScholar} as described above
-% \vpageref{ref:declare-scholar}. Then the unique ID used in the first
-% argument of this command can point to the list of references
-% inserted by \pkg{ekdosis} in the back matter section of the
-% \texttt{TEI} ouput file. See below \vref{sec:references-cited-works}
-% for more information on how to do this.}---
+% of writing, \enquote*{sources} can be declared with
+% \cs{DeclareSource} as described above
+% \vpageref{ref:declare-source}. Then the unique identifier used in
+% the first argument of this command can point to the list of
+% references inserted by \pkg{ekdosis} in the back matter section of
+% the \texttt{TEI} output file. See below
+% \vref{sec:references-cited-works} for more information on how to do
+% this. Scholars can also be referred to as individuals by means of
+% the \cs{DeclareScholar} command. See above
+% \vpageref{ref:declare-source}.}---
%
% \iffalse
%<*example>
@@ -3754,8 +4815,8 @@ many mathematical writings and to the sense of
%</example>
% \fi
%
-% \DescribeMacro{\TeXtoTEIPatt}
-% \cs{TeXtoTEIPatt}\marg{\TeX\ pattern}\marg{TEI pattern}\\
+% \DescribeMacro{\TeXtoTEIPat}
+% \cs{TeXtoTEIPat}\marg{\TeX\ pattern}\marg{TEI pattern}\\
% Finally, this more flexible\---and more delicate to
% handle\---command uses pattern matching to instruct \pkg{ekdosis}
% how to convert \hologo{(La)TeX} commands into \texttt{TEI}
@@ -3780,7 +4841,7 @@ many mathematical writings and to the sense of
%<*example>
% \fi
\begin{minted}[linenos=false]{latex}
-\TeXtoTEIPatt{\textcolor {#1}{#2}}{<hi rend="#1">#2</hi>}
+\TeXtoTEIPat{\textcolor␣{#1}{#2}}{<hi rend="#1">#2</hi>}
Sample text with a \textcolor{red}{word} in red.
\end{minted}
@@ -3841,12 +4902,12 @@ Sample text with a \textcolor{red}{word} in red.
%
% \begin{remarks}
% \item Lines~2--3 define a basic environment meant to contain
-% indivivual speeches and a command to hold the name of the
+% individual speeches and a command to hold the name of the
% speaker. This name is printed in bold face and followed by a new
% paragraph in the PDF output.
% \item Line~4 instructs \pkg{ekdosis} to convert \env{speech} \LaTeX\
% environments into |<sp>| \texttt{TEI xml} elements.
-% \item Line~6 disables the |autopar| algorithm that \cs{ekdosis}
+% \item Line~6 disables the |autopar| algorithm that \pkg{ekdosis}
% provides by default for running paragraphs of text. As a
% consequence, \env{ekdpar} is used to mark the paragraphs.
% \end{remarks}
@@ -3854,6 +4915,7 @@ Sample text with a \textcolor{red}{word} in red.
% PDF output:---
% \medskip
%
+% \needspace{7\baselineskip}
% \SetTEIxmlExport{autopar=false}
% \begingroup
% \newenvironment{speech}{\par\selectlanguage{greek}}{\par}
@@ -3911,18 +4973,19 @@ Sample text with a \textcolor{red}{word} in red.
% the |<listWit>| element of the \texttt{TEI} header, whereas the
% latter is to be found within the |<listBibl>| element.
%
-% \DescribeMacro{\SetxmlBibResource}
-% \cs{SetxmlBibResource}\marg{basename} is a preamble-only command. If
-% a base name for a \texttt{TEI xml} compliant bibliographical
-% database be provided, \pkg{ekdosis} will use it and insert formatted
-% data in the back matter section of its own \texttt{TEI xml} output
-% file, as |<biblStruct>| elements within a |listBibl| section.
+% \DescribeMacro{\AddxmlBibResource}
+% \cs{AddxmlBibResource}\marg{basename or name.xml} is a preamble-only
+% command. If a base name (either suffixed with |.xml| or not) for a
+% \texttt{TEI xml}-compliant bibliographical database be provided,
+% \pkg{ekdosis} will use it and insert formatted data in the back
+% matter section of its own \texttt{TEI xml} output file, as
+% |<biblStruct>| elements within a |listBibl| section.
%
% As an example, the following Bib\hologo{(La)TeX} entry and its
-% \texttt{TEI} equivalent follow:\footnote{\label{fn:zotero}To the
-% author's knowledge, \textsf{Zotero} (\url{https://www.zotero.org})
-% provides excellent \texttt{TEI xml} output from Bib\hologo{(La)TeX}
-% input files.}---
+% \texttt{TEI} equivalent are provided:\footnote{\label{fn:zotero}To
+% the author's knowledge, \textsf{Zotero}
+% (\url{https://www.zotero.org}) provides excellent \texttt{TEI xml}
+% output from Bib\hologo{(La)TeX} input files.}---
%
% \iffalse
%<*example>
@@ -3975,7 +5038,7 @@ Sample text with a \textcolor{red}{word} in red.
% the Bib\hologo{(La)TeX} file (l.~1) and an |xml:id| in the
% \texttt{TEI} file (l.~3). This same label must be used again in the
% preamble of the |.tex| source file to declare Arnold Drakenborch as a
-% scholar,\footnote{See above \vpageref{ref:declare-scholar}.} like
+% source,\footnote{See above \vpageref{ref:declare-source}.} like
% so:---
%
% \iffalse
@@ -3983,10 +5046,10 @@ Sample text with a \textcolor{red}{word} in red.
% \fi
\begin{minted}{latex}
% Use 'bibl.xml' as a TEI xml bibliographical database:
-\SetxmlBibResource{bibl} % 'bibl' is the basename of 'bibl.xml'
+\AddxmlBibResource{bibdata.xml}
-% Declare A. Drakenborch as scholar:
-\DeclareScholar{Drak}{\emph{Drakenborch}}
+% Declare A. Drakenborch as source:
+\DeclareSource{Drak}{\emph{Drakenborch}}
\end{minted}
% \iffalse
%</example>
@@ -4002,19 +5065,24 @@ Sample text with a \textcolor{red}{word} in red.
% \fi
\begin{minted}{latex}
% Preamble:
+\usepackage[style=oxnotes]{biblatex}
+\addbibresource{bibdata.bib}
+
\usepackage[teiexport=tidy]{ekdosis}
+% basename of the .xml bibliographical database:
+\AddxmlBibResource{bibdata.xml}
+
% Witnesses:
\DeclareWitness{L}{L}{Laurentianus, plut, XXXVII, cod. 16}[
origDate=s. XV]
% Other witnesses [...]
-% Scholars:
-\DeclareScholar{Drak}{\emph{Drakenborch}}
-% Other scholars [...]
-
-% basename of the .xml bibliographical database:
-\SetxmlBibResource{bibl}
+% Sources:
+\DeclareSource{Drak}{\emph{Drakenborch}}
+% Alternatively, use BibLaTeX for the rendition:
+% \DeclareSource{Drak}{\citename{Drak}{editor}}
+% Other sources [...]
% Document:
\begin{ekdosis}
@@ -4022,10 +5090,10 @@ Sample text with a \textcolor{red}{word} in red.
Sed uos, quorum oculos atque ora humentia uidi,\\
uertere cum consul terga et remeare iuberet,\\
\app{
- \lem[wit=Drak]{ne morem}
+ \lem[source=Drak, type=emendation]{ne morem}
\rdg[wit={L, F}]{me morem}
\rdg[wit={O, V}]{memorem}
- } et pugnae signum exspectate petendae:
+ } et pugnae signum exspectate petendae:\\
\end{ekdverse}
\end{ekdosis}
\end{minted}
@@ -4033,22 +5101,22 @@ Sample text with a \textcolor{red}{word} in red.
%</example>
% \fi
%
-% \needspace{7\baselineskip}
% PDF output:---
% \medskip
%
+% \needspace{7\baselineskip}
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
-% \resetlinenumber[30]\rightlinenumbers
-% \setlength{\linenumbersep}{-1.5in}
+% \setverselinenums{30}{0}
+% \setlength{\vrightskip}{-1.5in}
% \begin{specimen}
% \begin{ekdverse}
% Sed uos, quorum oculos atque ora humentia uidi,\\
% uertere cum consul terga et remeare iuberet,\\
% \app{
-% \lem[wit=sDrak]{ne morem}
+% \lem[source=sDrak, type=emendation]{ne morem}
% \rdg[wit={sL, sF}]{me morem}
% \rdg[wit={sO, sV}]{memorem}
-% } et pugnae signum exspectate petendae:
+% } et pugnae signum exspectate petendae:\\
% \end{ekdverse}
% \end{specimen}
% \end{alignment}
@@ -4067,7 +5135,7 @@ Sample text with a \textcolor{red}{word} in red.
<l>uertere cum consul terga et remeare iuberet,</l>
<l>
<app>
- <lem wit="#Drak">ne morem</lem>
+ <lem source="#Drak" type="emendation">ne morem</lem>
<rdg wit="#L #F">me morem</rdg>
<rdg wit="#O #V">memorem</rdg>
</app>et pugnae signum exspectate petendae:</l>
@@ -4106,18 +5174,18 @@ Sample text with a \textcolor{red}{word} in red.
% \pkg{ekdosis} can also convert into \texttt{TEI xml} references to
% cited works. Depending on the optional arguments used in the
% citation command, references will be converted into |<ptr>| or
-% |<ref>| elements with the appropriate ID supplied by means of the
-% |target| attribute.
+% |<ref>| elements with the appropriate identifier supplied by means
+% of the |target| attribute.
%
% Of course, for this mechanism to work, Bib\TeX\ or Bib\LaTeX\ must
% be used and connected to some |.bib| bibliographical database
% file. Additionally, this |.bib| file must have been converted into a
-% \texttt{TEI xml} compliant file where all the Bib\hologo{(La)TeX}
+% \texttt{TEI xml}-compliant file where all the Bib\hologo{(La)TeX}
% entries that are used in the document are found within
% |<biblStruct>| elements.\footnote{See above n.~\vref{fn:zotero} for
% information on how to do this.} Finally, this |.xml| bibliographical
% database must have been connected to the |.tex| source file by means
-% of \cs{SetxmlBibResource} described above in
+% of \cs{AddxmlBibResource} described above in
% \vref{sec:references-cited-works}.
%
% As an example, the following |sample.bib| file is used:---
@@ -4175,7 +5243,7 @@ Sample text with a \textcolor{red}{word} in red.
% \fi
%
% Once both files have been prepared, inserting references and
-% exporting them into the \texttt{TEI xml} ouput file can be achieved
+% exporting them into the \texttt{TEI xml} output file can be achieved
% in a straightforward way. (The full |sample.tex| is provided
% below.)---
%
@@ -4186,8 +5254,7 @@ Sample text with a \textcolor{red}{word} in red.
\documentclass{article}
\usepackage[teiexport=tidy]{ekdosis}
-\SetxmlBibResource{sample} % base name supplied here, without the
- % extension
+\AddxmlBibResource{sample.xml}
\usepackage[style=oxnotes]{biblatex}
\addbibresource{sample.bib}
@@ -4205,6 +5272,7 @@ Sample text with a \textcolor{red}{word} in red.
% PDF output:---
% \medskip
%
+% \needspace{7\baselineskip}
% \resetlinenumber
% \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen]
% \begin{specimen}
@@ -4213,7 +5281,7 @@ Sample text with a \textcolor{red}{word} in red.
% \end{alignment}
%
% \medskip
-% \texttt{TEI xml} ouput narrowed down to the contents of the |<text>|
+% \texttt{TEI xml} output narrowed down to the contents of the |<text>|
% element:---
%
% \iffalse
@@ -4284,14 +5352,18 @@ Sample text with a \textcolor{red}{word} in red.
%
% \section{Future Work}
% \label{sec:future-work}
-% A short, uncommented list of what is planned in the versions of
+% A short, un-commented list of what is planned in the versions of
% \pkg{ekdosis} to come follows:---
% \begin{enumerate}
% \item Very short-term (weeks):---
% \begin{enumerate}
-% \item Editorial changes, for inserting corrections and
-% conjectures.
% \item Text structure: milestone elements.
+% \item Marginal edition texts: It may happen that the marginalia of
+% manuscripts contain texts worth editing in addition to and along
+% the main text to which they are linked by reference
+% signs.
+% \item Headers and footers: \cs{ekddiv} will provide top and bottom
+% marks to be used in headers and footers.
% \end{enumerate}
% \item Short-term (months):---
% \begin{enumerate}
@@ -4896,7 +5968,7 @@ Sample text with a \textcolor{red}{word} in red.
% instruct ekdosis to output TEI xml (arabic-sample-tei.xml):
\usepackage[teiexport=tidy]{ekdosis}
-% instruct arabluatex to ouput sample-arabic_out.tex with Unicode
+% instruct arabluatex to output sample-arabic_out.tex with Unicode
% Arabic strings in place of arabtex ASCII scheme:
\usepackage[fullvoc,export]{arabluatex}
@@ -4961,7 +6033,8 @@ Sample text with a \textcolor{red}{word} in red.
\AtBeginDocument{\luadirect{ekdosis.setekddivsfalse()}}}},
initial divs = ekdosis,
unknown-choice divs = \PackageError{ekdosis}{unknown divs=#1}{`divs'
- must be either `ekdosis' or `latex'.},
+ must be either `ekdosis' or `latex'.},
+ bool verse = \if@pkg@verse,
choice parnotes = {false = {},
true = {\@pkg@parnotestrue},
roman = {\@pkg@parnotestrue\@parnotesromantrue}},
@@ -4992,7 +6065,6 @@ Sample text with a \textcolor{red}{word} in red.
% \RequirePackage{expkv-def} % already loaded above
\RequirePackage{luacode}
\RequirePackage{paracol}
-\RequirePackage{xparse}
\RequirePackage{etoolbox}
\RequirePackage{lineno}
\RequirePackage{keyfloat}
@@ -5000,8 +6072,11 @@ Sample text with a \textcolor{red}{word} in red.
\RequirePackage{zref-user}
\RequirePackage{zref-abspage}
\RequirePackage{ltxcmds}
-\RequirePackage{atbegshi}
+\RequirePackage{pdftexcmds}
\RequirePackage{ifoddpage}
+\if@pkg@verse
+ \RequirePackage{verse}
+\fi
\if@pkg@parnotes
\RequirePackage{parnotes}
\fi
@@ -5070,11 +6145,11 @@ Sample text with a \textcolor{red}{word} in red.
% \end{macrocode}
% \end{macro}
% \begin{macro}{\DeclareHand} As \cs{DeclareWitness}, \cs{DeclareHand}
-% is a preamble-only command meant to collect data and store them in
-% |Lua| tables. It takes three mandatory arguments and one optional
-% argument. The second argument is used to connect the hand to a
-% declared witness it is related to. Then the table in which this
-% witness is recorded can be fed with new data.
+% is a preamble-only command meant to collect data and store them in
+% |Lua| tables. It takes three mandatory arguments and one optional
+% argument. The second argument is used to connect the hand to a
+% declared witness it is related to. Then the table in which this
+% witness is recorded can be fed with new data.
% \begin{macrocode}
\NewDocumentCommand{\DeclareHand}{m m m +O{}}{
\luadirect{ekdosis.newhand(\luastringN{#1},
@@ -5085,20 +6160,57 @@ Sample text with a \textcolor{red}{word} in red.
\@onlypreamble\DeclareHand
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\DeclareScholar} There is also a table in which are
-% collected data related to scholars' names to be used in the
-% apparatus criticus. \cs{DeclareScholar} is a preamble-only command
-% and takes two mandatory arguments: a unique id and a shorthand to
-% be used in the apparatus criticus which can be extracted from a
-% bibliographic database.
+% Build and process the list of scholars:---
% \begin{macrocode}
-\NewDocumentCommand{\DeclareScholar}{m m}{
- \luadirect{ekdosis.newscholar(\luastringN{#1},
- \luastringN{#2})}
+\ekvdefinekeys{ekd@scholar}{
+ store rawname = \rawname@value,
+ store forename = \forename@value,
+ store surname = \surname@value,
+ store addname = \addname@value,
+ store note = \note@value
}
+% \end{macrocode}
+% \begin{macro}{\DeclareScholar}
+% \changes{v1.1}{2020/11/04}{nows builds a list of persons}
+% \cs{DeclareScholar} is used to build a list of persons within the
+% |<listPerson>| element. It takes two mandatory arguments to specify
+% consecutively a unique identifier and the rendition to be used in
+% the apparatus criticus in print, and one optional argument used to
+% collect the name parts components and further items of information
+% from |key-value| \enquote*{named} arguments.
+% \begin{macrocode}
+\NewDocumentCommand{\DeclareScholar}{m m O{}}{%
+ \bgroup
+ \ekvset{ekd@scholar}{#3}
+ \luadirect{ekdosis.newscholar(
+ \luastringN{#1},
+ \luastringN{#2},
+ \luastringO{\rawname@value},
+ \luastringO{\forename@value},
+ \luastringO{\surname@value},
+ \luastringO{\addname@value},
+ \luastringO{\note@value})}
+ \egroup
+ }
\@onlypreamble\DeclareScholar
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\DeclareSource}
+% \changes{v1.1}{2020/11/04}{new command added}There is also a table in
+% which are collected data related to sources to be used in the
+% apparatus criticus. \cs{DeclareSource} is a preamble-only
+% command and takes two mandatory arguments: a unique id and a
+% shorthand (preferably a Bib\hologo{(La)TeX} label) to be used in
+% the apparatus criticus which can be extracted from a bibliographic
+% database.
+% \begin{macrocode}
+\NewDocumentCommand{\DeclareSource}{m m}{
+ \luadirect{ekdosis.newsource(\luastringN{#1},
+ \luastringN{#2})}
+}
+\@onlypreamble\DeclareSource
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\DeclareShorthand} \cs{DeclareShorthand} is a
% preamble-only command that can be used to record manuscript
% families or any kind of shorthand to be used to refer to
@@ -5118,7 +6230,7 @@ Sample text with a \textcolor{red}{word} in red.
% \begin{macro}{\getsiglum}
% \cs{getsiglum}\marg{csv list} takes a comma-separated list of
% declared ids by means of \cs{DeclareWitness}, \cs{DeclareHand},
-% \cs{DeclareShorthand} or \cs{DeclareScholar} and returns their
+% \cs{DeclareShorthand} or \cs{DeclareSource} and returns their
% respective renditions.
% \begin{macrocode}
\NewDocumentCommand{\getsiglum}{m}{%
@@ -5207,14 +6319,15 @@ Sample text with a \textcolor{red}{word} in red.
% \end{macrocode}
% \end{macro}
% \end{macro}
-% \begin{macro}{\TeXtoTEIPatt}
+% \begin{macro}{\TeXtoTEIPat}
+% \changes{v1.1}{2020/11/04}{renamed, formerly \cs{TeXtoTEIPatt}}
% Finally, the more flexible\---and more delicate to
-% handle\---\cs{TeXtoTEIPatt}\marg{\TeX\
+% handle\---\cs{TeXtoTEIPat}\marg{\TeX\
% pattern}\allowbreak\marg{\texttt{TEI} pattern} uses pattern matching
% to instruct \pkg{ekdosis} how to convert \hologo{(La)TeX} commands
% into \texttt{TEI} equivalents.
% \begin{macrocode}
-\NewDocumentCommand{\TeXtoTEIPatt}{m m}{%
+\NewDocumentCommand{\TeXtoTEIPat}{m m}{%
\luadirect{ekdosis.newpatttotag(\luastringN{#1}, \luastringN{#2})}
}
% \end{macrocode}
@@ -5230,22 +6343,22 @@ Sample text with a \textcolor{red}{word} in red.
\@onlypreamble\SetTEIFileName
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\SetxmlBibResource} This is a preamble-only command.
-% If a base name for a \texttt{TEI xml} compliant bibliographical
-% database file is provided with
-% \cs{SetxmlBibResource}\marg{basename}, \pkg{ekdosis} will use it
-% and insert formatted data in the back matter section of its own
-% \texttt{TEI xml} output file, as |<biblStruct>| elements within a
-% |<listBibl>| section.
+% \begin{macro}{\AddxmlBibResource} This is a preamble-only command.
+% If a base name (either suffixed with |.xml| or not) for a
+% \texttt{TEI xml}-compliant bibliographical database file be
+% provided with \cs{AddxmlBibResource}\marg{basename or name.xml},
+% \pkg{ekdosis} will use it and insert formatted data in the back
+% matter section of its own \texttt{TEI xml} output file, as
+% |<biblStruct>| elements within a |<listBibl>| section.
% \begin{macrocode}
-\NewDocumentCommand{\SetxmlBibResource}{m}{
- \luadirect{ekdosis.setxmlbibresource(\luastringN{#1})}
+\NewDocumentCommand{\AddxmlBibResource}{m}{
+ \luadirect{ekdosis.addxmlbibresource(\luastringN{#1})}
}
-\@onlypreamble\SetxmlBibResource
+\@onlypreamble\AddxmlBibResource
% \end{macrocode}
% \end{macro}
%
-%\paragraph{Multi-layer apparatuses}
+%\paragraph{Multiple-layer apparatuses}
% \pkg{ekdosis} must know if an entry is to be processed in a single-
% or multiple-layer context:---
% \begin{macrocode}
@@ -5302,6 +6415,23 @@ Sample text with a \textcolor{red}{word} in red.
}
\@onlypreamble\DeclareApparatus
% \end{macrocode}
+% \begin{macro}{\addentries}
+% \changes{v1.1}{2020/11/04}{modifies the number of accepted entries
+% on the current page.}
+% If |maxentries| be set for a given layer of critical notes,
+% \cs{addentries}\oarg{layer}\marg{n}, where \meta{n} is an integer,
+% can be used to add \meta{n} to\---or remove it from if \meta{n} be
+% negative\---the number of accepted entries on the current
+% page. \cs{addentries} operates on the default layer of notes, but
+% any other declared layer can be specified in the optional argument
+% of the command.
+% \begin{macrocode}
+\NewDocumentCommand{\addentries}{O{\ekdan@type} m}{%
+ \luadirect{ekdosis.addto_bagunits(\luastringO{#1}, \luastringN{#2})}%
+ \ignorespaces
+}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% Apparatus-related settings and functions. Some booleans to check if
% an apparatus should be inserted and what is the current environment.
@@ -5505,8 +6635,11 @@ Sample text with a \textcolor{red}{word} in red.
% \end{macrocode}
% \cs{add@@apparatus} inserts the apparatus block on a given page
% either in the footnote floating block or in a float of its own,
-% depending on the value set in the |layout| global option.
+% depending on the value set in the |layout| global option. As some
+% commands need to know whether they are called from inside the
+% apparatus criticus, a conditional is first defined.
% \begin{macrocode}
+\newif\ifekd@inside@app
\def\add@@apparatus{%
\if@pkg@parnotes\parnotes\else\fi%
\if@pkg@footins%
@@ -5517,8 +6650,10 @@ Sample text with a \textcolor{red}{word} in red.
\if@parnotesroman%
\renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
\parnoteclear\else\fi%
+ \ekd@inside@apptrue
\footnotesize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
- \if@pkg@parnotes\parnotes\parnotereset\else\fi%
+ \ekd@inside@appfalse
+ \if@pkg@parnotes\parnotes\parnotereset\else\fi
}%
\egroup%
\fi%
@@ -5528,7 +6663,9 @@ Sample text with a \textcolor{red}{word} in red.
\if@parnotesroman%
\renewcommand*{\theparnotemark}{\roman{parnotemark}}\else\fi%
\parnoteclear\else\fi%
+ \ekd@inside@apptrue
\ekd@appfontsize\apparatus\unless\ifekd@mapps\ekd@end@apparatus\fi%
+ \ekd@inside@appfalse
\if@pkg@parnotes\parnotes\parnotereset\else\fi%
}%
\fi%
@@ -5605,7 +6742,7 @@ Sample text with a \textcolor{red}{word} in red.
\NewDocumentCommand{\ekdatbegshihook}{}{%
\ifekd@pagelineation\resetlinenumber\fi
}
-\AtBeginShipout{\ekdatbegshihook}
+\AddToHook{shipout/before}{\ekdatbegshihook}
\newif\ifekd@elidednumbers
\ekvdefinekeys{ekd@lineation}{
choice lineation = {page = \ekd@pagelineationtrue,
@@ -5614,6 +6751,9 @@ Sample text with a \textcolor{red}{word} in red.
lineation=#1}{`lineation' must be either `page' or `document'.},
code modulonum = \chardef\c@linenumbermodulo#1\relax,
noval modulo = \modulolinenumbers,
+ code vmodulonum = \if@pkg@verse\poemlines{#1}\fi,
+ initial vmodulonum = 1,
+ noval vmodulo = \if@pkg@verse\poemlines{5}\fi,
choice numbers = {elided = \ekd@elidednumberstrue,
full = \ekd@elidednumbersfalse},
unknown-choice numbers = \PackageError{ekdosis}{unknown
@@ -5664,6 +6804,7 @@ Sample text with a \textcolor{red}{word} in red.
% \cs{rdg} or \cs{note}\meta{*}:---
% \begin{macrocode}
\NewDocumentCommand{\app}{O{} > { \TrimSpaces } +m}{%
+ \leavevmode
\begingroup
\ekvset{appnote}{#1}%
\ekd@isinapptrue%
@@ -5685,9 +6826,9 @@ Sample text with a \textcolor{red}{word} in red.
\def\current@ref@arg#1#2{{%\textdir TLT%
\unexpanded\expandafter{\ekd@refnumstyle}%
\ifnum%
- \getpagerefnumber{#1}
+ \pdf@strcmp{\getpagerefnumber{#1}}{\getpagerefnumber{#2}}
=
- \getpagerefnumber{#2}
+ 0
\ifnum%
\getrefnumber{#1}
=
@@ -5744,9 +6885,11 @@ Sample text with a \textcolor{red}{word} in red.
\def\current@ref{{%\textdir TLT%
\unexpanded\expandafter{\ekd@refnumstyle}%
\ifnum%
- \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}
+ \pdf@strcmp{%
+ \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}}%
+ {\getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}}
=
- \getpagerefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-e}
+ 0
\ifnum%
\getrefnumber{\luadirect{tex.sprint(ekdosis.getlnlab())}-b}
=
@@ -5801,6 +6944,8 @@ Sample text with a \textcolor{red}{word} in red.
% \begin{macrocode}
\ekvdefinekeys{lem}{
code wit = \def\ekdlr@wit{#1},
+ code source = \def\ekdlr@source{#1},
+ code resp = \def\ekdlr@resp{#1},
code alt = \def\ekdlr@alt{#1},
code pre = \def\ekdlr@pre{#1},
code post = \def\ekdlr@post{#1},
@@ -5814,6 +6959,8 @@ Sample text with a \textcolor{red}{word} in red.
}
\ekvdefinekeys{rdg}{
code wit = \def\ekdlr@wit{#1},
+ code source = \def\ekdlr@source{#1},
+ code resp = \def\ekdlr@resp{#1},
code alt = \def\ekdlr@alt{#1},
code pre = \def\ekdlr@pre{#1},
code post = \def\ekdlr@post{#1},
@@ -5823,6 +6970,20 @@ Sample text with a \textcolor{red}{word} in red.
bool nordg = \ifekdr@nordg
}
% \end{macrocode}
+% \begin{macro}{\rdgGrp}
+% \changes{v1.1}{2020/11/04}{new macro for grouping readings}
+% \cs{rdgGrp}\oarg{option}\marg{lemma and/or readings} may be used to
+% group readings so as to indicate subvariation in apparatus
+% entries. This command is expected inside \cs{app}|{}|, and takes as
+% argument readings to be grouped introduced by means of \cs{lem}
+% and/or \cs{rdg} commands. It further accepts |type| as an optional
+% key-value argument to describe the type of grouping.
+% \begin{macrocode}
+\NewDocumentCommand{\rdgGrp}{O{} > {\TrimSpaces } m}{%
+ \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}%
+}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\lem}
% \cs{lem}\oarg{options}\marg{lemma text} inserts \meta{lemma text}
% both in the edition text and in the apparatus criticus by default,
@@ -5882,6 +7043,8 @@ Sample text with a \textcolor{red}{word} in red.
\fi
\ifdefined\ekdlr@postwit%
\space\unexpanded\expandafter{\ekdlr@postwit}\else\fi
+ \ifdefined\ekdlr@resp\space\getsiglum{\ekdlr@resp}\else\fi
+ \ifdefined\ekdlr@source\space\getsiglum{\ekdlr@source}\else\fi
\ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
\ifdefined\ekdlr@prewit%
\space\unexpanded\expandafter{\ekdlr@prewit}\space\else\fi
@@ -5919,6 +7082,8 @@ Sample text with a \textcolor{red}{word} in red.
\ifdefined\ekdlr@prewit%
\space\unexpanded\expandafter{\ekdlr@prewit}\space\else\fi
\ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
+ \ifdefined\ekdlr@source\space\getsiglum{\ekdlr@source}\else\fi
+ \ifdefined\ekdlr@resp\space\getsiglum{\ekdlr@resp}\else\fi
\ifdefined\ekdlr@postwit%
\space\unexpanded\expandafter{\ekdlr@postwit}\else\fi
\ifekdl@nosep\else\unexpanded\expandafter{\ekdl@sep}\fi
@@ -5972,6 +7137,8 @@ Sample text with a \textcolor{red}{word} in red.
\fi
\ifdefined\ekdlr@postwit%
\space\unexpanded\expandafter{\ekdlr@postwit}\else\fi
+ \ifdefined\ekdlr@resp\space\getsiglum{\ekdlr@resp}\else\fi
+ \ifdefined\ekdlr@source\space\getsiglum{\ekdlr@source}\else\fi
\ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
\ifdefined\ekdlr@prewit%
\space\unexpanded\expandafter{\ekdlr@prewit}\space\else\fi
@@ -6000,6 +7167,8 @@ Sample text with a \textcolor{red}{word} in red.
\ifdefined\ekdlr@prewit%
\space\unexpanded\expandafter{\ekdlr@prewit}\space\else\fi
\ifdefined\ekdlr@wit\space\getsiglum{\ekdlr@wit}\else\fi
+ \ifdefined\ekdlr@source\space\getsiglum{\ekdlr@source}\else\fi
+ \ifdefined\ekdlr@resp\space\getsiglum{\ekdlr@resp}\else\fi
\ifdefined\ekdlr@postwit%
\space\unexpanded\expandafter{\ekdlr@postwit}\else\fi
}%
@@ -6037,7 +7206,7 @@ Sample text with a \textcolor{red}{word} in red.
% specified; otherwise \pkg{ekdosis} will issue an error message.
% \begin{macrocode}
\NewDocumentCommand{\note@noapp}{O{} +m}{%
- \null
+ \leavevmode
\bgroup%
\ekvset{note}{#1}%
\stepcounter{ekd@lab}%
@@ -6128,10 +7297,10 @@ Sample text with a \textcolor{red}{word} in red.
\bgroup%
\ekvset{ekd@note}{#1}%
\edef\note@contents{%
- \ekvifdefinedNoVal{note}{pre}{}{%
+ \ekvifdefinedNoVal{ekd@note}{pre}{}{%
\unexpanded\expandafter{\pre@value}}%
{\unexpanded{#2}}%
- \ekvifdefinedNoVal{note}{post}{}{%
+ \ekvifdefinedNoVal{ekd@note}{post}{}{%
\unexpanded\expandafter{\post@value}}%
}%
\append@app{\note@contents}%
@@ -6142,10 +7311,10 @@ Sample text with a \textcolor{red}{word} in red.
\bgroup%
\ekvset{ekd@note}{#1}%
\edef\note@contents{%
- \ekvifdefinedNoVal{note}{pre}{}{%
+ \ekvifdefinedNoVal{ekd@note}{pre}{}{%
\unexpanded\expandafter{\pre@value}}%
\unskip\noexpand\parnote{\unexpanded{#2}}%
- \ekvifdefinedNoVal{note}{post}{}{%
+ \ekvifdefinedNoVal{ekd@note}{post}{}{%
\unexpanded\expandafter{\post@value}}%
}%
\append@app{\note@contents}%
@@ -6186,6 +7355,101 @@ Sample text with a \textcolor{red}{word} in red.
}
% \end{macrocode}
% \end{macro}
+% \paragraph{Emendations and Conjectures}
+% Here follows the |key-value| options to be used by
+% \cs{SetCritSymbols} below:---
+% \begin{macrocode}
+\ekvdefinekeys{ekd@corr}{
+ store suppbegin = \suppb@value,
+ store suppend = \suppe@value,
+ store delbegin = \delb@value,
+ store delend = \dele@value,
+ store sicbegin = \sicb@value,
+ store sicend = \sice@value,
+ store gapmark = \gapm@value,
+ initial suppbegin = \ifbool{al@rlmode}{>}{<},
+ initial suppend = \ifbool{al@rlmode}{<}{>},
+ initial delbegin = \ifbool{al@rlmode}{\}}{\{},
+ initial delend = \ifbool{al@rlmode}{\{}{\}},
+ initial sicbegin = \dag,
+ initial sicend = \dag,
+ initial gapmark = ***
+}
+% \end{macrocode}
+% \begin{macro}{\supplied}
+% \changes{v1.1}{2020/11/04}{new macro for editorial additions}
+% \cs{supplied}\marg{text} takes as mandatory argument the text added
+% or supplied by conjecture.
+% \begin{macrocode}
+\NewDocumentCommand{\supplied}{m}{%
+ \ifekd@inside@app
+ #1%
+ \else
+ \suppb@value #1\suppe@value
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\surplus}
+% \changes{v1.1}{2020/11/04}{new macro for editorial deletions}
+% \cs{surplus}\marg{text} takes as mandatory argument the text
+% considered by the editor to be inauthentic, but nevertheless
+% retained between braces in the edition text as it is transmitted by
+% all witnesses.
+% \begin{macrocode}
+\NewDocumentCommand{\surplus}{m}{%
+ \ifekd@inside@app
+ #1%
+ \else
+ \delb@value #1\dele@value
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\sic}
+% \changes{v1.1}{2020/11/04}{new macro for text deemed to be not
+% understandable}
+% \cs{sic}\marg{text} takes as mandatory argument the text deemed by
+% the editor to be readable but not understandable. \cs{sic} insert
+% \meta{text} between cruces while \cs{sic*} prints only one crux
+% before \meta{text}.
+% \begin{macrocode}
+\NewDocumentCommand{\sic}{s m}{%
+ \ifekd@inside@app
+ #2%
+ \else
+ \IfBooleanTF{#1}
+ {\sicb@value #2}
+ {\sicb@value #2\sice@value}%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\gap}
+% \changes{v1.1}{2020/11/04}{new macro for lacunae}
+% \cs{gap}\marg{options} indicates that some amount of text has fallen
+% away from the entire tradition. It takes as mandatory argument a
+% comma-separated list of options that can be used to further specify
+% the reason for omission, the unit of measurement, the quantity and
+% extent.
+% \begin{macrocode}
+\NewDocumentCommand{\gap}{m}{%
+ \gapm@value
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\SetCritSymbols}
+% \changes{v1.1}{2020/11/04}{new macro to set the symbols to be
+% used to mark the corrections} \cs{SetCritSymbols}\marg{csv list of
+% options} is used to change the symbols that \pkg{ekdosis} uses by
+% default for representing emendations, lacunae, omissions, gaps and
+% editorial deletions.
+% \begin{macrocode}
+\NewDocumentCommand{\SetCritSymbols}{m}{
+ \ekvset{ekd@corr}{#1}
+}
+% \end{macrocode}
+% \end{macro}
% \cs{apparatus} is used internally by \pkg{ekdosis} to print the
% apparatus at the bottom of pages. Therefore, it is not documented,
% but this may change in the future for it will be possible to have
@@ -6457,12 +7721,45 @@ Sample text with a \textcolor{red}{word} in red.
}
% \end{macrocode}
% \end{macro}
-% A very basic and provisional implementation of poetry lines
-% follows:---
+% \begin{environment}{ekdverse}
+% \env{ekdverse} provides an implementation of poetry lines. It is
+% set to use either the \pkg{lineno} or the \pkg{verse} package
+% depending on the value that is passed to the global option
+% |verse|:---
% \begin{macrocode}
+\if@pkg@verse
+\verselinenumfont{\normalfont\footnotesize}
+\setcounter{poemline}{1}
+\NewDocumentEnvironment{ekdverse}{O{\linewidth}}{%
+ \nolinenumbers
+ \let\linelabel\label
+ \stepcounter{verse@envctr}%
+ \addtocounter{poemline}{-1}\refstepcounter{poemline}%
+ \setcounter{vslineno}{1}%
+ \let\\=\@vscentercr
+ \list{}{\itemsep \z@
+ \itemindent -\vindent%
+ \listparindent\itemindent
+ \parsep \stanzaskip
+ \setlength{\itemsep}{0pt}%
+ \setlength{\topsep}{0pt}%
+ \setlength{\partopsep}{0pt}%
+ \ifdim #1 < \linewidth
+ \rightmargin \z@
+ \setlength{\leftmargin}{\linewidth}%
+ \addtolength{\leftmargin}{-#1}%
+ \addtolength{\leftmargin}{-0.5\leftmargin}%
+ \else
+ \rightmargin \leftmargin
+ \fi
+ \addtolength{\leftmargin}{\vindent}}%
+ \item[]%
+}
+{\endlist}
+\else
\newlength{\ekdverseindentlength}
\setlength{\ekdverseindentlength}{\parindent}
-\newenvironment*{ekdverse}[1][\ekdverseindentlength]{
+\NewDocumentEnvironment{ekdverse}{O{\ekdverseindentlength}}{
\begin{list}{}{%
\setlength{\leftmargin}{#1}
\setlength{\itemsep}{0pt}
@@ -6471,7 +7768,9 @@ Sample text with a \textcolor{red}{word} in red.
}
\item[]
}{\end{list}}
+\fi
% \end{macrocode}
+% \end{environment}
% \begin{environment}{ekdpar}
% When |autopar| is set to |false| by means of \cs{SetTEIxmlExport},
% \env{ekdpar}\---or any other environment set to be inserted within
@@ -6560,7 +7859,8 @@ local citecmds = lpeg.Cs(lpeg.P("icite")
local next = next
-- General
-xmlids = {}
+local xmlids = {}
+table.insert(xmlids, {xmlid = "scholars"} )
local function xmlidfound(element)
for i = 1,#xmlids do
@@ -6582,9 +7882,12 @@ local function checkxmlid(str)
end
-- Witnesses
-listWit = {}
-idsRend = {}
-shorthands = {}
+local listWit = {}
+-- Persons/Scholars
+local listPerson = {}
+
+local idsRend = {}
+local shorthands = {}
local function isfound(table, value)
for i = 1,#table do
@@ -6727,14 +8030,67 @@ function ekdosis.newshorthand(id, rend, xmlids)
return true
end
+function ekdosis.newscholar(id,
+ siglum,
+ rawname,
+ Forename,
+ Surname,
+ AddName,
+ Note)
+ if xmlidfound(id)
+ then
+ tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
+ ..id..
+ "\" already exists as an xml:id. "
+ ..
+ "Please pick another id.}}")
+ elseif not checkxmlid(id)
+ then
+ tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
+ ..id..
+ "\" is not a valid xml:id. \\MessageBreak "
+ ..
+ "Please pick another id.}}")
+ else
+ table.insert(xmlids, {xmlid = id})
+ table.sort(xmlids, function(a ,b) return(#a.xmlid > #b.xmlid) end)
+ table.insert(idsRend, {xmlid = id, abbr = siglum})
+ table.sort(idsRend, function(a ,b) return(#a.xmlid > #b.xmlid) end)
+ if rawname ~= ""
+ then
+ table.insert(listPerson, {xmlid = id,
+ abbr = siglum,
+ note = Note,
+ persName = {
+ name = rawname}
+ })
+ else
+ table.insert(listPerson, {xmlid = id,
+ abbr = siglum,
+ note = Note,
+ persName = {
+ forename = Forename,
+ surname = Surname,
+ addName = AddName}
+ })
+ end
+ end
+ return true
+end
+
local xmlbibresource = nil
-function ekdosis.setxmlbibresource(str)
- xmlbibresource = str..".xml"
+function ekdosis.addxmlbibresource(str)
+ if string.find(str, "%.xml$")
+ then
+ xmlbibresource = str
+ else
+ xmlbibresource = str..".xml"
+ end
return true
end
-function ekdosis.newscholar(id, siglum)
+function ekdosis.newsource(id, siglum)
if xmlidfound(id)
then
tex.print("\\unexpanded{\\PackageWarning{ekdosis}{\""
@@ -6796,6 +8152,7 @@ local cmdtotags = {
{a="LRfootnote", b="note", c=" place=\"bottom\""},
{a="RLfootnote", b="note", c=" place=\"bottom\""},
{a="enquote *", b="quote", c=""},
+ {a="marginpar", b="note", c=" place=\"margin\""},
{a="footnote", b="note", c=" place=\"bottom\""},
{a="enquote", b="quote", c=""},
{a="txtrans", b="s", c=" xml:lang=\"ar-Latn\" type=\"transliterated\""},
@@ -6805,15 +8162,21 @@ local cmdtotags = {
{a="textsf", b="hi", c=" rend=\"sf\""},
{a="arbup", b="hi", c=" rend=\"sup\""},
{a="txarb", b="s", c=" xml:lang=\"arb\""},
- {a="mbox", b="", c=""},
{a="arb", b="foreign",
c=" xml:lang=\"ar-Latn\" type=\"transliterated\" subtype=\"arabtex\""}
}
local texpatttotags = {
+ {a="\\addentries%s+%[(.-)%]{(.-)}", b=""},
+ {a="\\addentries%s+{(.-)}", b=""},
+ {a="\\setverselinenums%s+{(.-)}{(.-)}", b=""},
+ {a="\\resetlinenumber%s+%[(.-)%]", b=""},
+ {a="\\resetlinenumber%s+", b=""},
+ {a="\\poemlines%s+{(.-)}", b=""},
{a="\\pagebreak%s+%[[1-4]%]", b=""},
{a="\\pagebreak%s+", b=""},
{a="\\altrfont%s+", b=""},
+ {a="\\mbox%s+{(.-)}", b="%1"},
{a="\\LR%s+{(.-)}", b="%1"},
{a="\\RL%s+{(.-)}", b="%1"}
}
@@ -6890,6 +8253,10 @@ end
-- Get values of attributes
local function get_attr_value(str, attr)
str = str..","
+ str = string.gsub(str, "%b{}", function(body)
+ body = string.gsub(body, attr, attr.."@ekd")
+ return string.format("%s", body)
+ end)
local attrval = string.match(str, "%f[%w]"..attr.."%s?%=%s?%b{}")
or string.match(str, "%f[%w]"..attr.."%s?%=%s?.-%,")
or ""
@@ -6898,6 +8265,7 @@ local function get_attr_value(str, attr)
return string.format("%s", bbraces)
end)
attrval = string.gsub(attrval, attr.."%s?%=%s?(.-)%s?%,", "%1")
+ str = string.gsub(str, attr.."@ekd", attr)
return attrval
end
@@ -6922,16 +8290,21 @@ local function note_totei(str)
if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end
right = get_attr_value(opt, "labelb")
left = get_attr_value(opt, "labele")
- if left ~= ""
- then
- return string.format(
- "<%s%s target=\"#range(right(%s),left(%s))\">%s</%s><anchor xml:id=\"%s\"/>",
- cmd, teitype, right, left, arg, cmd, right)
- elseif left == ""
+ if right == ""
then
- return string.format(
- "<%s%s target=\"#right(%s)\">%s</%s><anchor xml:id=\"%s\"/>",
- cmd, teitype, right, arg, cmd, right)
+ return string.format("<%s>%s</%s>", cmd, arg, cmd)
+ else
+ if left ~= ""
+ then
+ return string.format(
+ "<%s%s target=\"#range(right(%s),left(%s))\">%s</%s><anchor xml:id=\"%s\"/>",
+ cmd, teitype, right, left, arg, cmd, right)
+ elseif left == ""
+ then
+ return string.format(
+ "<%s%s target=\"#right(%s)\">%s</%s><anchor xml:id=\"%s\"/>",
+ cmd, teitype, right, arg, cmd, right)
+ end
end
end)
return str
@@ -6956,6 +8329,31 @@ local function app_totei(str)
return str
end
+local function rdgGrp_totei(str)
+ str = gsub(str,
+ dblbkslash *
+ lpeg.Cs("rdgGrp") *
+ spcenc^-1 *
+ bsqbrackets *
+ bcbraces *
+ spcenc^-1,
+ function(bkslash, cmd, opt, arg)
+ opt = string.sub(opt, 2, -2)
+ arg = string.sub(arg, 2, -2)
+ teitype = get_attr_value(opt, "type")
+ if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end
+ if opt == ""
+ then
+ return rdgGrp_totei(string.format("<%s>%s</%s>",
+ cmd, arg, cmd))
+ else
+ return rdgGrp_totei(string.format("<%s%s>%s</%s>",
+ cmd, teitype, arg, cmd))
+ end
+ end)
+ return str
+end
+
local function lem_rdg_totei(str)
str = gsub(str,
spcenc^-1 *
@@ -6972,6 +8370,10 @@ local function lem_rdg_totei(str)
--
teiwit = get_attr_value(opt, "wit")
if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end
+ teisource = get_attr_value(opt, "source")
+ if teisource ~= "" then teisource = " source=\""..ekdosis.getsiglum(teisource, "tei").."\"" else end
+ teiresp = get_attr_value(opt, "resp")
+ if teiresp ~= "" then teiresp = " resp=\""..ekdosis.getsiglum(teiresp, "tei").."\"" else end
teitype = get_attr_value(opt, "type")
if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end
--
@@ -6981,8 +8383,8 @@ local function lem_rdg_totei(str)
cmd, arg, cmd))
else
-- opt = ekdosis.getsiglum(opt, "tei")
- return lem_rdg_totei(string.format("<%s%s%s>%s</%s>",
- cmd, teiwit, teitype, arg, cmd))
+ return lem_rdg_totei(string.format("<%s%s%s%s%s>%s</%s>",
+ cmd, teiwit, teisource, teiresp, teitype, arg, cmd))
end
end)
str = gsub(str, spcenc^-0 * dblbkslash * lemrdg * spcenc^-1 * bcbraces * spcenc^-1,
@@ -7000,7 +8402,7 @@ end
local function linestotei(str)
-- str = "\n<l>"..str
- str = string.gsub(str, "^%s?(.-)%s?$", "\n<l>%1</l>\n")
+ str = string.gsub(str, "^%s?(.-)\\\\[%!%*]?%s?$", "\n<l>%1</l>\n")
-- str = gsub(str, endpoem, "</l>\n")
str = gsub(str, poemline * spcenc^-1 * lpeg.P("&gt;"), "\n<lb/>")
str = gsub(str, poemline * spcenc^-1, "</l>\n<l>")
@@ -7087,7 +8489,7 @@ local function icitetotei(str)
* bsqbrackets
* bsqbrackets
* bcbraces
- * bsqbrackets^-1,
+ * (bsqbrackets + bcbraces)^-1,
function(cmd, pre, post, body, opt)
pre = string.sub(pre, 2, -2)
post = string.sub(post, 2, -2)
@@ -7108,7 +8510,7 @@ local function icitetotei(str)
* spcenc^-1
* bsqbrackets
* bcbraces
- * bsqbrackets^-1,
+ * (bsqbrackets + bcbraces)^-1,
function(cmd, post, body, opt)
post = string.sub(post, 2, -2)
body = string.sub(body, 2, -2)
@@ -7127,7 +8529,7 @@ local function icitetotei(str)
* citecmds
* spcenc^-1
* bcbraces
- * bsqbrackets^-1,
+ * (bsqbrackets + bcbraces)^-1,
function(cmd, body, opt)
body = string.sub(body, 2, -2)
if not checkxmlid(body)
@@ -7179,6 +8581,19 @@ local function cmdtotei(str)
return string.format("<ref target=\"%s\">%s</ref>",
teisiglum, printsiglum)
end)
+ str = string.gsub(str, "\\(gap)%s?(%b{})",
+ function(cmd, body)
+ body = string.sub(body, 2, -2)
+ teireason = get_attr_value(body, "reason")
+ if teireason ~= "" then teireason = " reason=\""..teireason.."\"" else end
+ teiunit = get_attr_value(body, "unit")
+ if teiunit ~= "" then teiunit = " unit=\""..teiunit.."\"" else end
+ teiquantity = get_attr_value(body, "quantity")
+ if teiquantity ~= "" then teiquantity = " quantity=\""..teiquantity.."\"" else end
+ teiextent = get_attr_value(body, "extent")
+ if teiextent ~= "" then teiextent = " extent=\""..teiextent.."\"" else end
+ return string.format("<gap%s%s%s%s/>", teireason, teiunit, teiquantity, teiextent)
+ end)
str = gsub(str, lpeg.P("\\") * labelrefcmds * spcenc^-1 * bcbraces,
function(cmd, body)
body = string.sub(body, 2, -2)
@@ -7542,6 +8957,7 @@ local function textotei(str)
str = texpatttotei(str)
str = note_totei(str)
str = app_totei(str)
+ str = rdgGrp_totei(str)
str = lem_rdg_totei(str)
str = relocate_notes(str)
str = versetotei(str)
@@ -7587,68 +9003,113 @@ function ekdosis.openteistream()
f:write("<distributor><!-- Distributor name --></distributor>", "\n")
f:write("</publicationStmt>", "\n")
f:write("<sourceDesc>", "\n")
- f:write("<listWit>", "\n")
- for i = 1,#listWit do
- f:write('<witness xml:id=\"', listWit[i].xmlid, "\">", "\n")
- f:write('<abbr type="siglum">', textotei(listWit[i].abbr), "</abbr>", "\n")
- f:write(textotei(listWit[i].detailsDesc), "\n")
- f:write("<msDesc>", "\n")
- if listWit[i].msIdentifier.settlement == ""
- and listWit[i].msIdentifier.institution == ""
- and listWit[i].msIdentifier.repository == ""
- and listWit[i].msIdentifier.collection == ""
- and listWit[i].msIdentifier.idno == ""
- and listWit[i].msIdentifier.msName == ""
+ if next(listWit) == nil and next(listPerson) == nil
+ then
+ f:write("<p>No source, born digital</p>", "\n")
+ else
+ if next(listWit) ~= nil
then
- f:write("<msIdentifier/>", "\n")
- else
- f:write("<msIdentifier>", "\n")
- if listWit[i].msIdentifier.settlement ~= "" then
- f:write("<settlement>", textotei(listWit[i].msIdentifier.settlement), "</settlement>", "\n")
+ f:write("<listWit>", "\n")
+ for i = 1,#listWit do
+ f:write('<witness xml:id=\"', listWit[i].xmlid, "\">", "\n")
+ f:write('<abbr type="siglum">', textotei(listWit[i].abbr), "</abbr>", "\n")
+ f:write(textotei(listWit[i].detailsDesc), "\n")
+ f:write("<msDesc>", "\n")
+ if listWit[i].msIdentifier.settlement == ""
+ and listWit[i].msIdentifier.institution == ""
+ and listWit[i].msIdentifier.repository == ""
+ and listWit[i].msIdentifier.collection == ""
+ and listWit[i].msIdentifier.idno == ""
+ and listWit[i].msIdentifier.msName == ""
+ then
+ f:write("<msIdentifier/>", "\n")
+ else
+ f:write("<msIdentifier>", "\n")
+ if listWit[i].msIdentifier.settlement ~= "" then
+ f:write("<settlement>", textotei(listWit[i].msIdentifier.settlement), "</settlement>", "\n")
else end
- if listWit[i].msIdentifier.institution ~= "" then
- f:write("<institution>", textotei(listWit[i].msIdentifier.institution), "</institution>", "\n")
+ if listWit[i].msIdentifier.institution ~= "" then
+ f:write("<institution>", textotei(listWit[i].msIdentifier.institution), "</institution>", "\n")
else end
- if listWit[i].msIdentifier.repository ~= "" then
- f:write("<repository>", textotei(listWit[i].msIdentifier.repository), "</repository>", "\n")
+ if listWit[i].msIdentifier.repository ~= "" then
+ f:write("<repository>", textotei(listWit[i].msIdentifier.repository), "</repository>", "\n")
else end
- if listWit[i].msIdentifier.collection ~= "" then
- f:write("<collection>", textotei(listWit[i].msIdentifier.collection), "</collection>", "\n")
+ if listWit[i].msIdentifier.collection ~= "" then
+ f:write("<collection>", textotei(listWit[i].msIdentifier.collection), "</collection>", "\n")
else end
- if listWit[i].msIdentifier.idno ~= "" then
- f:write("<idno>", textotei(listWit[i].msIdentifier.idno), "</idno>", "\n")
+ if listWit[i].msIdentifier.idno ~= "" then
+ f:write("<idno>", textotei(listWit[i].msIdentifier.idno), "</idno>", "\n")
else end
- if listWit[i].msIdentifier.msName ~= "" then
- f:write("<msName>", textotei(listWit[i].msIdentifier.msName), "</msName>", "\n")
+ if listWit[i].msIdentifier.msName ~= "" then
+ f:write("<msName>", textotei(listWit[i].msIdentifier.msName), "</msName>", "\n")
else end
- f:write("</msIdentifier>", "\n")
+ f:write("</msIdentifier>", "\n")
+ end
+ if listWit[i].handDesc ~= nil then
+ f:write("<physDesc>", "\n")
+ f:write("<handDesc hands=\"", #listWit[i].handDesc, "\">", "\n")
+ local j = 1
+ while listWit[i].handDesc[j]
+ do
+ f:write("<handNote xml:id=\"", listWit[i].handDesc[j].xmlid, "\">", "\n")
+ f:write('<abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr>", "\n")
+ f:write("<p>", textotei(listWit[i].handDesc[j].detailsDesc), "</p>", "\n")
+ f:write("</handNote>", "\n")
+ j = j + 1
+ end
+ f:write("</handDesc>", "\n")
+ f:write("</physDesc>", "\n")
+ else end
+ if listWit[i].history ~= nil then
+ f:write("<history>", "\n")
+ f:write("<origin>", "\n")
+ f:write("<origDate>", textotei(listWit[i].history.origin.origDate), "</origDate>", "\n")
+ f:write("</origin>", "\n")
+ f:write("</history>", "\n")
+ end
+ f:write("</msDesc>", "\n")
+ f:write("</witness>", "\n")
+ end
+ f:write("</listWit>", "\n")
end
- if listWit[i].handDesc ~= nil then
- f:write("<physDesc>", "\n")
- f:write("<handDesc hands=\"", #listWit[i].handDesc, "\">", "\n")
- local j = 1
- while listWit[i].handDesc[j]
- do
- f:write("<handNote xml:id=\"", listWit[i].handDesc[j].xmlid, "\">", "\n")
- f:write('<abbr type="siglum">', textotei(listWit[i].handDesc[j].abbr), "</abbr>", "\n")
- f:write("<p>", textotei(listWit[i].handDesc[j].detailsDesc), "</p>", "\n")
- f:write("</handNote>", "\n")
- j = j + 1
+ if next(listPerson) ~= nil
+ then
+ f:write("<listPerson xml:id=\"scholars\">", "\n")
+ for i = 1,#listPerson do
+ f:write('<person xml:id=\"', listPerson[i].xmlid, "\">", "\n")
+ f:write('<persName>', "\n")
+ f:write('<abbr type="siglum">', textotei(listPerson[i].abbr), "</abbr>", "\n")
+ if listPerson[i].persName.name ~= nil
+ then
+ f:write(textotei(listPerson[i].persName.name))
+ else
+ if listPerson[i].persName.forename ~= ""
+ then
+ f:write("<forename>", textotei(listPerson[i].persName.forename), "</forename>", "\n")
+ else
+ f:write("<forename><!-- forename --></forename>", "\n")
+ end
+ if textotei(listPerson[i].persName.surname) ~= ""
+ then
+ f:write("<surname>", textotei(listPerson[i].persName.surname), "</surname>", "\n")
+ else
+ f:write("<surname><!-- surname --></surname>", "\n")
+ end
+ if textotei(listPerson[i].persName.addName) ~= ""
+ then
+ f:write("<addName>", textotei(listPerson[i].persName.addName), "</addName>", "\n")
+ end
+ end
+ if listPerson[i].note ~= ""
+ then
+ f:write("<note>", textotei(listPerson[i].note), "</note>", "\n")
+ end
+ f:write('</persName>', "\n")
+ f:write('</person>', "\n")
end
- f:write("</handDesc>", "\n")
- f:write("</physDesc>", "\n")
- else end
- if listWit[i].history ~= nil then
- f:write("<history>", "\n")
- f:write("<origin>", "\n")
- f:write("<origDate>", textotei(listWit[i].history.origin.origDate), "</origDate>", "\n")
- f:write("</origin>", "\n")
- f:write("</history>", "\n")
+ f:write("</listPerson>", "\n")
end
- f:write("</msDesc>", "\n")
- f:write("</witness>", "\n")
end
- f:write("</listWit>", "\n")
f:write("</sourceDesc>", "\n")
f:write("</fileDesc>", "\n")
f:write("<encodingDesc>", "\n")
@@ -8052,10 +9513,10 @@ function ekdosis.get_bagunits(teitype)
return bagunits[teitype]
end
-local function getapplimit(str)
+local function getapplimit(teitype)
for i = 1,#apparatuses
do
- if apparatuses[i].a == str then
+ if apparatuses[i].a == teitype then
limitfound = apparatuses[i].limit
break
end
@@ -8084,6 +9545,14 @@ function ekdosis.limit_bagunits(teitype)
end
end
+function ekdosis.addto_bagunits(teitype, n)
+ if tonumber(getapplimit(teitype)) ~= 0
+ then
+ n = tonumber(n)
+ bagunits[teitype] = bagunits[teitype] - n
+ end
+end
+
function ekdosis.increment_bagunits(teitype)
bagunits[teitype] = (bagunits[teitype] or 0) + 1
end
diff --git a/macros/luatex/latex/ekdosis/ekdosis.pdf b/macros/luatex/latex/ekdosis/ekdosis.pdf
index a13dd5b571..588e219534 100644
--- a/macros/luatex/latex/ekdosis/ekdosis.pdf
+++ b/macros/luatex/latex/ekdosis/ekdosis.pdf
Binary files differ
diff --git a/macros/luatex/latex/ekdosis/samples/Caesar_BG-6-13-1.pdf b/macros/luatex/latex/ekdosis/samples/Caesar_BG-6-13-1.pdf
index 3e394efb86..4ffd23516b 100644
--- a/macros/luatex/latex/ekdosis/samples/Caesar_BG-6-13-1.pdf
+++ b/macros/luatex/latex/ekdosis/samples/Caesar_BG-6-13-1.pdf
Binary files differ