aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2020-07-15 19:38:23 +0200
committerRobert Alessi <alessi@robertalessi.net>2020-07-15 19:38:23 +0200
commit61b96868e1b00ffb825cc3b9799976289c1fc81b (patch)
treeb7b712942efeba2ee87d549ba8110744a0b73267
parentd9615fc4f6da759d0a9cdeefd50378ca04ac82c6 (diff)
downloadekdosis-61b96868e1b00ffb825cc3b9799976289c1fc81b.tar.gz
added bhook to \SetApparatus
-rw-r--r--ekdosis.dtx23
1 files changed, 18 insertions, 5 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 3d490ed..e34dc71 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -2723,6 +2723,8 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
2723 unknown-choice direction = \PackageError{ekdosis}{unknown 2723 unknown-choice direction = \PackageError{ekdosis}{unknown
2724 direction=#1}{`direction' must be either `LR' or `RL'.}, 2724 direction=#1}{`direction' must be either `LR' or `RL'.},
2725 code sep = \edef\ekdsep{#1}, 2725 code sep = \edef\ekdsep{#1},
2726 store bhook = \ekd@begin@apparatus,
2727 initial bhook = {},
2726 store ehook = \ekd@end@apparatus, 2728 store ehook = \ekd@end@apparatus,
2727 initial ehook = {}, 2729 initial ehook = {},
2728 store delim = \ekd@unit@delim, 2730 store delim = \ekd@unit@delim,
@@ -2760,6 +2762,14 @@ texts=latin[xml:lang="la"]+\textcolor{red}{;}+
2760\NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}} 2762\NewDocumentCommand{\SetSeparator}{m}{\edef\ekdsep{#1}}
2761% \end{macrocode} 2763% \end{macrocode}
2762% \end{macro} 2764% \end{macro}
2765% \begin{macro}{\SetBeginApparatus}
2766% \cs{SetBeginApparatus}\marg{characters} can be used to append
2767% characters at the beginning of the apparatus block. By default,
2768% nothing is appended:---
2769% \begin{macrocode}
2770\NewDocumentCommand{\SetBeginApparatus}{m}{\edef\ekd@begin@apparatus{#1}}
2771% \end{macrocode}
2772% \end{macro}
2763% \begin{macro}{\SetEndApparatus} 2773% \begin{macro}{\SetEndApparatus}
2764% \cs{SetEndApparatus}\marg{characters} can be used to append 2774% \cs{SetEndApparatus}\marg{characters} can be used to append
2765% characters at the end of the apparatus block\---such as a full stop, 2775% characters at the end of the apparatus block\---such as a full stop,
@@ -3988,10 +3998,12 @@ local texpatttotags = {
3988 {a="\\icite%s?%[(.-)%]%[(.-)%]{(.-)}", b="%1 <ref target=\"#%3\">%2</ref>"}, 3998 {a="\\icite%s?%[(.-)%]%[(.-)%]{(.-)}", b="%1 <ref target=\"#%3\">%2</ref>"},
3989 {a="\\icite%s?%[(.-)%]{(.-)}", b="<ref target=\"#%2\">%1</ref>"}, 3999 {a="\\icite%s?%[(.-)%]{(.-)}", b="<ref target=\"#%2\">%1</ref>"},
3990 {a="\\icite%s?{(.-)}", b="<ptr target=\"#%1\"/>"}, 4000 {a="\\icite%s?{(.-)}", b="<ptr target=\"#%1\"/>"},
3991 {a="\\linelabel%s?{(.-)}", b="<anchor xml:id=\"%1\"/>"}, 4001 {a="\\linelabel%s?{(.-)}", b="<anchor xml:id=\"#%1\"/>"},
3992 {a="\\label%s?{(.-)}", b="<anchor xml:id=\"%1\"/>"}, 4002 {a="\\label%s?{(.-)}", b="<anchor xml:id=\"#%1\"/>"},
3993 {a="\\v?pageref%s?{(.-)}", b="<ptr target=\"#%1\"/>"}, 4003 {a="\\v?pageref%s?{(.-)}", b="<ptr target=\"#%1\"/>"},
3994 {a="\\v?ref%s?{(.-)}", b="<ptr target=\"#%1\"/>"} 4004 {a="\\v?ref%s?{(.-)}", b="<ptr target=\"#%1\"/>"},
4005 {a="\\LR%s+{(.-)}", b="%1"},
4006 {a="\\RL%s+{(.-)}", b="%1"}
3995} 4007}
3996 4008
3997local envtotags = { 4009local envtotags = {
@@ -5175,6 +5187,7 @@ function ekdosis.appout()
5175 if next(apparatuses) == nil then 5187 if next(apparatuses) == nil then
5176 -- table.insert(output, "BEGIN") 5188 -- table.insert(output, "BEGIN")
5177 table.insert(output, "\\noindent\\csname ekd@default@rule\\endcsname\\NLS{}") 5189 table.insert(output, "\\noindent\\csname ekd@default@rule\\endcsname\\NLS{}")
5190 table.insert(output, "\\csname ekd@begin@apparatus\\endcsname{}")
5178-- table.insert(output, "\\noindent ") 5191-- table.insert(output, "\\noindent ")
5179 for i in string.gmatch(t, 5192 for i in string.gmatch(t,
5180 "<"..cur_abs_pg 5193 "<"..cur_abs_pg
@@ -5191,8 +5204,8 @@ function ekdosis.appout()
5191 local n = 1 5204 local n = 1
5192 while apparatuses[n] 5205 while apparatuses[n]
5193 do 5206 do
5194 if string.match(t, "<"..cur_abs_pg.. 5207 if string.match(t, "<"..cur_abs_pg
5195 cur_alignment_patt 5208 ..cur_alignment_patt
5196 ..curcol.."%-"..n..">.-</" 5209 ..curcol.."%-"..n..">.-</"
5197 ..cur_abs_pg 5210 ..cur_abs_pg
5198 ..cur_alignment_patt 5211 ..cur_alignment_patt