diff options
author | Robert Alessi <alessi@robertalessi.net> | 2022-01-16 17:19:25 +0100 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2022-01-16 17:19:25 +0100 |
commit | 863ad49de9f09ea0a567ac800725c2e56244967e (patch) | |
tree | d164893e58e51e9e08670355cf948bf182788f86 | |
parent | c10daf3695c4eb889c3831e0687aef2acf09db76 (diff) | |
download | ekdosis-863ad49de9f09ea0a567ac800725c2e56244967e.tar.gz |
Allow xml:ids to start with chars above #127 (eg. Greek letters). Fixed unwanted space after empty \rdg.
-rw-r--r-- | ekdosis.dtx | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index c8f3850..a5d40be 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -61,7 +61,7 @@ along with this program. If not, see | |||
61 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] | 61 | %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
62 | %<package>\ProvidesPackage{ekdosis} | 62 | %<package>\ProvidesPackage{ekdosis} |
63 | %<*package> | 63 | %<*package> |
64 | [2022/01/15 v1.5-dev Typesetting TEI xml-compliant critical editions] | 64 | [2022/01/16 v1.5-dev Typesetting TEI xml-compliant critical editions] |
65 | %</package> | 65 | %</package> |
66 | %<*driver> | 66 | %<*driver> |
67 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} | 67 | \begin{filecontents}[noheader,overwrite]{bibdata.xml} |
@@ -7943,11 +7943,11 @@ Sample text with a \textcolor{red}{word} in red. | |||
7943 | % | 7943 | % |
7944 | % \section{Implementation} | 7944 | % \section{Implementation} |
7945 | % \label{sec:implementation} | 7945 | % \label{sec:implementation} |
7946 | % | 7946 | % |
7947 | % \iffalse | 7947 | % \iffalse |
7948 | %<*package> | 7948 | %<*package> |
7949 | % \fi | 7949 | % \fi |
7950 | % | 7950 | % |
7951 | % \pkg{ekdosis} relies on Lua functions and tables. Read the | 7951 | % \pkg{ekdosis} relies on Lua functions and tables. Read the |
7952 | % |.lua| files that accompany \pkg{ekdosis} for more | 7952 | % |.lua| files that accompany \pkg{ekdosis} for more |
7953 | % information. | 7953 | % information. |
@@ -8063,7 +8063,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8063 | % \end{macrocode} | 8063 | % \end{macrocode} |
8064 | % \paragraph{\textsf{ekdosis} Symbol} | 8064 | % \paragraph{\textsf{ekdosis} Symbol} |
8065 | % \begin{macro}{\eKd} | 8065 | % \begin{macro}{\eKd} |
8066 | % \changes{v1.5}{2022/01/15}{Prints \textsf{ekdosis} indentifying | 8066 | % \changes{v1.5}{2022/01/16}{Prints \textsf{ekdosis} indentifying |
8067 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying | 8067 | % symbol} As of v1.5, \pkg{ekdosis} has its own identifying |
8068 | % symbol. It is produced by \cs{eKd} and best printed with the Old | 8068 | % symbol. It is produced by \cs{eKd} and best printed with the Old |
8069 | % Standard Greek font. | 8069 | % Standard Greek font. |
@@ -8324,7 +8324,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8324 | % \begin{macro}{\teidirectE} | 8324 | % \begin{macro}{\teidirectE} |
8325 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the | 8325 | % \changes{v1.3}{2021/08/18}{direct insertion of elements in the |
8326 | % \texttt{TEI xml} file} | 8326 | % \texttt{TEI xml} file} |
8327 | % \changes{v1.5}{2022/01/15}{direct insertion of empty elements in the | 8327 | % \changes{v1.5}{2022/01/16}{direct insertion of empty elements in the |
8328 | % \texttt{TEI xml} file} | 8328 | % \texttt{TEI xml} file} |
8329 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} | 8329 | % \cs{teidirect}\oarg{xml attributes}\marg{xml element}\marg{code} |
8330 | % does nothing in \LaTeX. It is only used to insert elements in the | 8330 | % does nothing in \LaTeX. It is only used to insert elements in the |
@@ -8339,7 +8339,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
8339 | % \end{macro} | 8339 | % \end{macro} |
8340 | % \end{macro} | 8340 | % \end{macro} |
8341 | % \begin{macro}{\getTEIxmlid} | 8341 | % \begin{macro}{\getTEIxmlid} |
8342 | % \changes{v1.5}{2022/01/15}{returns \texttt{TEI xml:ids} from a | 8342 | % \changes{v1.5}{2022/01/16}{returns \texttt{TEI xml:ids} from a |
8343 | % csv-list of ids} This command returns from a csv-list of unique | 8343 | % csv-list of ids} This command returns from a csv-list of unique |
8344 | % identifiers declared in commands such as \cs{DeclareWitness} and the | 8344 | % identifiers declared in commands such as \cs{DeclareWitness} and the |
8345 | % like a space-separated list of their corresponding |xml:id|s, each | 8345 | % like a space-separated list of their corresponding |xml:id|s, each |
@@ -9523,13 +9523,13 @@ Sample text with a \textcolor{red}{word} in red. | |||
9523 | % \ifekdr@nordg\append@app{}\else% do we need \append@app{} here? If | 9523 | % \ifekdr@nordg\append@app{}\else% do we need \append@app{} here? If |
9524 | % % so, keep in mind \ifekd@mapps, | 9524 | % % so, keep in mind \ifekd@mapps, |
9525 | % like so: | 9525 | % like so: |
9526 | \ifekdr@nordg% | 9526 | \ifekdr@nordg |
9527 | \ifekd@mapps% | 9527 | \ifekd@mapps |
9528 | \append@app[\ekdan@type]{}% | 9528 | \append@app[\ekdan@type]{\ekdunspace}% |
9529 | \else% | 9529 | \else |
9530 | \append@app{}% | 9530 | \append@app{\ekdunspace}% |
9531 | \fi% | 9531 | \fi |
9532 | \else% | 9532 | \else |
9533 | \ifbool{al@rlmode}{% | 9533 | \ifbool{al@rlmode}{% |
9534 | \edef\rdg@app{% | 9534 | \edef\rdg@app{% |
9535 | \ifekd@subsq@rdg | 9535 | \ifekd@subsq@rdg |
@@ -9915,7 +9915,7 @@ Sample text with a \textcolor{red}{word} in red. | |||
9915 | % \end{macro} | 9915 | % \end{macro} |
9916 | % \paragraph{Lacunae} | 9916 | % \paragraph{Lacunae} |
9917 | % \begin{macro}{\ilabel} | 9917 | % \begin{macro}{\ilabel} |
9918 | % \changes{v1.5}{2022/01/15}{recalls and sets the ending label of | 9918 | % \changes{v1.5}{2022/01/16}{recalls and sets the ending label of |
9919 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been | 9919 | % lemmas used to mark lacunae in witnesses} When \cs{lem} has been |
9920 | % used with the optional argument |ilabel=<label>|, | 9920 | % used with the optional argument |ilabel=<label>|, |
9921 | % \cs{ilabel}\marg{label} must be used to mark the point where the | 9921 | % \cs{ilabel}\marg{label} must be used to mark the point where the |
@@ -10878,6 +10878,7 @@ function ekdosis.getsiglum(str, opt) | |||
10878 | str = str.."," | 10878 | str = str.."," |
10879 | str = string.gsub(str, "%s-(%,)", "%1") | 10879 | str = string.gsub(str, "%s-(%,)", "%1") |
10880 | ctrl = str | 10880 | ctrl = str |
10881 | str = ","..str | ||
10881 | if opt == "tei" then | 10882 | if opt == "tei" then |
10882 | for i = 1,#shorthands do | 10883 | for i = 1,#shorthands do |
10883 | local tempa = string.gsub(shorthands[i].a, "([%-%.%_])", "%%%1") | 10884 | local tempa = string.gsub(shorthands[i].a, "([%-%.%_])", "%%%1") |
@@ -10885,10 +10886,11 @@ function ekdosis.getsiglum(str, opt) | |||
10885 | end | 10886 | end |
10886 | for i = 1,#idsRend do | 10887 | for i = 1,#idsRend do |
10887 | local tempb = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") | 10888 | local tempb = string.gsub(idsRend[i].xmlid, "([%-%.%_])", "%%%1") |
10888 | str = string.gsub(str, "(%f[%w%-%.%_])"..tempb.."(%,)", | 10889 | str = string.gsub(str, "(%,%s?)"..tempb.."(%,)", |
10889 | "%1#"..idsRend[i].xmlid.."%2") | 10890 | "%1#"..idsRend[i].xmlid.."%2") |
10890 | ctrl = string.gsub(ctrl, tempb.."%,", "") | 10891 | ctrl = string.gsub(ctrl, tempb.."%,", "") |
10891 | end | 10892 | end |
10893 | str = string.gsub(str, "^%,", "") | ||
10892 | str = string.gsub(str, "%,(%s-)([%#])", " %2") | 10894 | str = string.gsub(str, "%,(%s-)([%#])", " %2") |
10893 | str = string.gsub(str, "%,$", "") | 10895 | str = string.gsub(str, "%,$", "") |
10894 | else | 10896 | else |
@@ -10897,6 +10899,7 @@ function ekdosis.getsiglum(str, opt) | |||
10897 | str = string.gsub(str, tempc.."%,", idsRend[i].abbr) | 10899 | str = string.gsub(str, tempc.."%,", idsRend[i].abbr) |
10898 | ctrl = string.gsub(ctrl, tempc.."%,", "") | 10900 | ctrl = string.gsub(ctrl, tempc.."%,", "") |
10899 | end | 10901 | end |
10902 | str = string.gsub(str, "^%,", "") | ||
10900 | if familysep ~= nil | 10903 | if familysep ~= nil |
10901 | then | 10904 | then |
10902 | str = string.gsub(str, "%s+", familysep) | 10905 | str = string.gsub(str, "%s+", familysep) |