diff options
author | Robert Alessi <alessi@robertalessi.net> | 2020-10-05 19:53:33 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2020-10-05 19:53:33 +0200 |
commit | 5f0be4a846c6df990032c3a7f8e0f9a845127963 (patch) | |
tree | 50ef532f7547bf2cc9ed653499d112437c424555 | |
parent | 5f1454b63f4087c75656d103d78214e859354c7f (diff) | |
download | ekdosis-5f0be4a846c6df990032c3a7f8e0f9a845127963.tar.gz |
documenting subvariation
-rw-r--r-- | ekdosis.dtx | 103 |
1 files changed, 94 insertions, 9 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 20fbdb3..7531487 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -254,6 +254,7 @@ along with this program. If not, see | |||
254 | % Peter and John Story: | 254 | % Peter and John Story: |
255 | \DeclareWitness{pjA}{A}{Manuscript A Call No 123} | 255 | \DeclareWitness{pjA}{A}{Manuscript A Call No 123} |
256 | \DeclareWitness{pjB}{B}{Manuscript B Call No 456} | 256 | \DeclareWitness{pjB}{B}{Manuscript B Call No 456} |
257 | \DeclareWitness{pjC}{C}{Manuscript C Call No 789} | ||
257 | % Caesar's Gallic War: | 258 | % Caesar's Gallic War: |
258 | \DeclareWitness{cA}{A}{\emph{Bongarsianus} 81}[ | 259 | \DeclareWitness{cA}{A}{\emph{Bongarsianus} 81}[ |
259 | msName=Bongarsianus, | 260 | msName=Bongarsianus, |
@@ -1723,6 +1724,84 @@ yesterday. | |||
1723 | %</example> | 1724 | %</example> |
1724 | % \fi | 1725 | % \fi |
1725 | % | 1726 | % |
1727 | % \subsection{Indicating Subvariation in Apparatus Entries} | ||
1728 | % \label{sec:indic-subv-appar} | ||
1729 | % It must be noted that grouping readings so as to keep emphasis on | ||
1730 | % subvariation, regardless of its cause, is entirely optional. | ||
1731 | % Furthermore, the applicability of this technique is limited to the | ||
1732 | % \texttt{TEI xml} output as it helps the machines to understand a | ||
1733 | % grouping otherwise immediately accessible to human mind from the | ||
1734 | % information that is available in well-written | ||
1735 | % apparatus. \pkg{ekdosis} provides two ways of expressing | ||
1736 | % subvariation. | ||
1737 | % | ||
1738 | % \subsubsection{Implicit Grouping by Nesting Entries} | ||
1739 | % \label{sec:impl-group-nest} | ||
1740 | % Because apparatus entries may nest recursively, the \cs{app} command | ||
1741 | % may be used to group similar readings. | ||
1742 | % | ||
1743 | % \danger However, for nesting to work, the |alt| optional argument | ||
1744 | % must be used in every \cs{lem} and \cs{rdg} command involved in the | ||
1745 | % nesting. This rule applies to both parent and child commands, as | ||
1746 | % demonstrated in the following example:--- | ||
1747 | % | ||
1748 | % \iffalse | ||
1749 | %<*example> | ||
1750 | % \fi | ||
1751 | \begin{minted}[linenos=false]{latex} | ||
1752 | As I was walking home through Times Square, I saw my friend | ||
1753 | \app{ | ||
1754 | \lem[wit={A,B}, alt={Peter\---yesterday}]{Peter at the | ||
1755 | \app{ | ||
1756 | \lem[wit=A, alt=station]{station} | ||
1757 | \rdg[wit=B, alt=pub]{bookstore}} | ||
1758 | yesterday} | ||
1759 | \rdg[wit=C, alt={John at the bookstore this evening}]{John at the | ||
1760 | bookstore this evening}}. | ||
1761 | \end{minted} | ||
1762 | % \iffalse | ||
1763 | %</example> | ||
1764 | % \fi | ||
1765 | % | ||
1766 | % PDF output:--- | ||
1767 | % \medskip | ||
1768 | % | ||
1769 | % \needspace{7\baselineskip} | ||
1770 | % \resetlinenumber | ||
1771 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] | ||
1772 | % \begin{specimen} | ||
1773 | % As I was walking home through Times Square, I saw my friend | ||
1774 | % \app{ | ||
1775 | % \lem[wit={pjA,pjB}, alt={Peter\---yesterday}]{Peter at the | ||
1776 | % \app{ | ||
1777 | % \lem[wit=pjA, alt=station]{station} | ||
1778 | % \rdg[wit=pjB, alt=pub]{bookstore}} | ||
1779 | % yesterday} | ||
1780 | % \rdg[wit=pjC, alt={John at the bookstore this evening}]{John at | ||
1781 | % the bookstore this evening}}. | ||
1782 | % \end{specimen} | ||
1783 | % \end{alignment} | ||
1784 | % | ||
1785 | % \texttt{TEI xml} output:--- | ||
1786 | % | ||
1787 | % \iffalse | ||
1788 | %<*example> | ||
1789 | % \fi | ||
1790 | \begin{minted}[linenos=false]{xml} | ||
1791 | <p>As I was walking home through Times Square, I saw my | ||
1792 | friend | ||
1793 | <app> | ||
1794 | <lem wit="#A #B">Peter at the | ||
1795 | <app> | ||
1796 | <lem wit="#A">station</lem> | ||
1797 | <rdg wit="#B">bookstore</rdg> | ||
1798 | </app>yesterday</lem> | ||
1799 | <rdg wit="#C">John at the bookstore this evening</rdg> | ||
1800 | </app>.</p> | ||
1801 | \end{minted} | ||
1802 | % \iffalse | ||
1803 | %</example> | ||
1804 | % \fi | ||
1726 | % \section{Emendations and Conjectures} | 1805 | % \section{Emendations and Conjectures} |
1727 | % \label{sec:emendations-conjectures} | 1806 | % \label{sec:emendations-conjectures} |
1728 | % From a technical standpoint, \enquote{conjectures} are readings that | 1807 | % From a technical standpoint, \enquote{conjectures} are readings that |
@@ -6579,7 +6658,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
6579 | } | 6658 | } |
6580 | % \end{macrocode} | 6659 | % \end{macrocode} |
6581 | % \begin{macro}{\rdgGrp} | 6660 | % \begin{macro}{\rdgGrp} |
6582 | % \changes{v1.1}{2020/10/03}{new command for subvariation} | 6661 | % \changes{v1.1}{2020/10/03}{new macro for grouping readings} |
6662 | % \cs{rdgGrp}\oarg{option}\marg{lemma and/or readings} may be used to | ||
6663 | % group readings so as to indicate subvariation in apparatus | ||
6664 | % entries. This command is expected inside \cs{app}|{}|, and takes as | ||
6665 | % argument readings to be grouped introduced by means of \cs{lem} | ||
6666 | % and/or \cs{rdg} commands. It further accepts |type| as an optional | ||
6667 | % key-value argument to describe the type of grouping. | ||
6583 | % \begin{macrocode} | 6668 | % \begin{macrocode} |
6584 | \NewDocumentCommand{\rdgGrp}{O{} > {\TrimSpaces } m}{% | 6669 | \NewDocumentCommand{\rdgGrp}{O{} > {\TrimSpaces } m}{% |
6585 | \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}% | 6670 | \luadirect{tex.sprint(ekdosis.removesp(\luastringN{#2}))}% |
@@ -7902,12 +7987,12 @@ local function rdgGrp_totei(str) | |||
7902 | function(bkslash, cmd, opt, arg) | 7987 | function(bkslash, cmd, opt, arg) |
7903 | opt = string.sub(opt, 2, -2) | 7988 | opt = string.sub(opt, 2, -2) |
7904 | arg = string.sub(arg, 2, -2) | 7989 | arg = string.sub(arg, 2, -2) |
7905 | -- teiwit = get_attr_value(opt, "wit") | 7990 | teiwit = get_attr_value(opt, "wit") |
7906 | -- if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end | 7991 | if teiwit ~= "" then teiwit = " wit=\""..ekdosis.getsiglum(teiwit, "tei").."\"" else end |
7907 | -- teisource = get_attr_value(opt, "source") | 7992 | teisource = get_attr_value(opt, "source") |
7908 | -- if teisource ~= "" then teisource = " source=\""..ekdosis.getsiglum(teisource, "tei").."\"" else end | 7993 | if teisource ~= "" then teisource = " source=\""..ekdosis.getsiglum(teisource, "tei").."\"" else end |
7909 | -- teiresp = get_attr_value(opt, "resp") | 7994 | teiresp = get_attr_value(opt, "resp") |
7910 | -- if teiresp ~= "" then teiresp = " resp=\""..ekdosis.getsiglum(teiresp, "tei").."\"" else end | 7995 | if teiresp ~= "" then teiresp = " resp=\""..ekdosis.getsiglum(teiresp, "tei").."\"" else end |
7911 | teitype = get_attr_value(opt, "type") | 7996 | teitype = get_attr_value(opt, "type") |
7912 | if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end | 7997 | if teitype ~= "" then teitype = " type=\""..teitype.."\"" else end |
7913 | if opt == "" | 7998 | if opt == "" |
@@ -7915,8 +8000,8 @@ local function rdgGrp_totei(str) | |||
7915 | return rdgGrp_totei(string.format("<%s>%s</%s>", | 8000 | return rdgGrp_totei(string.format("<%s>%s</%s>", |
7916 | cmd, arg, cmd)) | 8001 | cmd, arg, cmd)) |
7917 | else | 8002 | else |
7918 | return rdgGrp_totei(string.format("<%s%s>%s</%s>", | 8003 | return rdgGrp_totei(string.format("<%s%s%s%s%s>%s</%s>", |
7919 | cmd, teitype, arg, cmd)) | 8004 | cmd, teiwit, teisource, teiresp, teitype, arg, cmd)) |
7920 | end | 8005 | end |
7921 | end) | 8006 | end) |
7922 | return str | 8007 | return str |