diff options
Diffstat (limited to 'ekdosis.el')
-rw-r--r-- | ekdosis.el | 242 |
1 files changed, 236 insertions, 6 deletions
@@ -24,7 +24,11 @@ | |||
24 | (defvar LaTeX-ekdosis-preamble-options | 24 | (defvar LaTeX-ekdosis-preamble-options |
25 | '(("parnotes" ("true" "false" "roman")) | 25 | '(("parnotes" ("true" "false" "roman")) |
26 | ("teiexport" ("true" "false" "tidy")) | 26 | ("teiexport" ("true" "false" "tidy")) |
27 | ("layout" ("float" "footins"))) | 27 | ("layout" ("float" "footins" "keyfloat" "fitapp")) |
28 | ("divs" ("ekdosis" "latex")) | ||
29 | ("poetry" ("verse")) | ||
30 | ("parnotes" ("true" "false" "roman")) | ||
31 | ("teiexport" ("true" "false" "tidy"))) | ||
28 | "Package options for the ekdosis package.") | 32 | "Package options for the ekdosis package.") |
29 | 33 | ||
30 | (defun LaTeX-ekdosis-package-options () | 34 | (defun LaTeX-ekdosis-package-options () |
@@ -42,14 +46,35 @@ | |||
42 | (TeX-read-key-val optional arg) | 46 | (TeX-read-key-val optional arg) |
43 | optional))) | 47 | optional))) |
44 | 48 | ||
49 | (defvar LaTeX-ekdosis-ekdsetup-options | ||
50 | '(("showpagebreaks" ("true" "false")) | ||
51 | ("spbmk") | ||
52 | ("hpbmk")) | ||
53 | "List of local options for ekdsetup macro.") | ||
54 | |||
45 | (defvar LaTeX-ekdosis-declarewitness-options | 55 | (defvar LaTeX-ekdosis-declarewitness-options |
46 | '(("settlement") | 56 | '(("settlement") |
57 | ("institution") | ||
47 | ("repository") | 58 | ("repository") |
59 | ("collection") | ||
60 | ("idno") | ||
48 | ("msName") | 61 | ("msName") |
49 | ("origDate") | 62 | ("origDate") |
50 | ("idno")) | 63 | ("locus")) |
51 | "List of local options for DeclareWitness macro.") | 64 | "List of local options for DeclareWitness macro.") |
52 | 65 | ||
66 | (defvar LaTeX-ekdosis-declarehand-options | ||
67 | '(("note")) | ||
68 | "List of local options for DeclareHand macro.") | ||
69 | |||
70 | (defvar LaTeX-ekdosis-declarescholar-options | ||
71 | '(("rawname") | ||
72 | ("forename") | ||
73 | ("surname") | ||
74 | ("addname") | ||
75 | ("note")) | ||
76 | "List of local options for DeclareScholar macro.") | ||
77 | |||
53 | (defvar LaTeX-ekdosis-app-options | 78 | (defvar LaTeX-ekdosis-app-options |
54 | '(("type")) | 79 | '(("type")) |
55 | "Local option for app|note macro.") | 80 | "Local option for app|note macro.") |
@@ -64,6 +89,9 @@ | |||
64 | ("prewit") | 89 | ("prewit") |
65 | ("postwit") | 90 | ("postwit") |
66 | ("sep") | 91 | ("sep") |
92 | ("type") | ||
93 | ("num") | ||
94 | ("nonum") | ||
67 | ("nolem" ("true" "false")) | 95 | ("nolem" ("true" "false")) |
68 | ("nosep" ("true" "false"))) | 96 | ("nosep" ("true" "false"))) |
69 | "Local options for lem macro") | 97 | "Local options for lem macro") |
@@ -77,6 +105,7 @@ | |||
77 | ("post") | 105 | ("post") |
78 | ("prewit") | 106 | ("prewit") |
79 | ("postwit") | 107 | ("postwit") |
108 | ("type") | ||
80 | ("nordg" ("true" "false"))) | 109 | ("nordg" ("true" "false"))) |
81 | "Local options for rdg macro.") | 110 | "Local options for rdg macro.") |
82 | 111 | ||
@@ -86,6 +115,9 @@ | |||
86 | ("labelb") | 115 | ("labelb") |
87 | ("labele") | 116 | ("labele") |
88 | ("sep") | 117 | ("sep") |
118 | ("nosep") | ||
119 | ("num") | ||
120 | ("nonum") | ||
89 | ("pre") | 121 | ("pre") |
90 | ("post")) | 122 | ("post")) |
91 | "Local options for note macro.") | 123 | "Local options for note macro.") |
@@ -95,6 +127,93 @@ | |||
95 | ("post")) | 127 | ("post")) |
96 | "Local options for note* macro.") | 128 | "Local options for note* macro.") |
97 | 129 | ||
130 | (defvar LaTeX-ekdosis-rdggrp-options | ||
131 | '(("type")) | ||
132 | "Local options for rdgGrp macro.") | ||
133 | |||
134 | (defvar LaTeX-ekdosis-setcritsymbols-options | ||
135 | '(("suppbegin") | ||
136 | ("suppend") | ||
137 | ("delbegin") | ||
138 | ("delend") | ||
139 | ("sicbegin") | ||
140 | ("sicend") | ||
141 | ("gapmark")) | ||
142 | "List of local options for setcritsymbols macro.") | ||
143 | |||
144 | (defvar LaTeX-ekdosis-sethooks-options | ||
145 | '(("appfontsize") | ||
146 | ("refnumstyle") | ||
147 | ("postrefnum") | ||
148 | ("lemmastyle") | ||
149 | ("readingstyle") | ||
150 | ("initialrule") | ||
151 | ("noinitialrule") | ||
152 | ("keyparopts") | ||
153 | ("appheight") | ||
154 | ("fitalgorithm" ("fontsize" "hybrid" "areasize" "squeeze"))) | ||
155 | "List of local options for sethooks macro.") | ||
156 | |||
157 | (defvar LaTeX-ekdosis-gap-options | ||
158 | '(("reason") | ||
159 | ("unit") | ||
160 | ("quantity") | ||
161 | ("extent")) | ||
162 | "List of local options for gap macro.") | ||
163 | |||
164 | (defvar LaTeX-ekdosis-setapparatus-options | ||
165 | '(("direction" ("LR" "RL")) | ||
166 | ("sep") | ||
167 | ("delim") | ||
168 | ("bhook") | ||
169 | ("ehook") | ||
170 | ("rule") | ||
171 | ("norule") | ||
172 | ("lang") | ||
173 | ("notelang")) | ||
174 | "List of local options for setapparatus macro.") | ||
175 | |||
176 | (defvar LaTeX-ekdosis-declareapparatus-options | ||
177 | '(("direction" ("LR" "RL")) | ||
178 | ("sep") | ||
179 | ("delim") | ||
180 | ("bhook") | ||
181 | ("ehook") | ||
182 | ("rule") | ||
183 | ("norule") | ||
184 | ("lang") | ||
185 | ("notelang") | ||
186 | ("maxentries")) | ||
187 | "List of local options for declareapparatus macro.") | ||
188 | |||
189 | (defvar LaTeX-ekdosis-setlineation-options | ||
190 | '(("lineation" ("page" "document" "none")) | ||
191 | ("sep") | ||
192 | ("modulo") | ||
193 | ("modulonum") | ||
194 | ("margin" ("right" "left" "inner" "outer")) | ||
195 | ("numbers" ("elided" "full")) | ||
196 | ("vlineation" ("page" "document")) | ||
197 | ("vmodulo") | ||
198 | ("vmargin" ("right" "left")) | ||
199 | ("continuousvnum")) | ||
200 | "List of local options for setlineation macro.") | ||
201 | |||
202 | (defvar LaTeX-ekdosis-ekddiv-options | ||
203 | '(("type") | ||
204 | ("n") | ||
205 | ("head") | ||
206 | ("barehead") | ||
207 | ("depth" ("1" "2" "3" "4" "5" "6" "7" "8" "9")) | ||
208 | ("toc" ("book" "part" "chapter" "section" "subsection" | ||
209 | "subsubsection" "paragraph" "subparagraph")) | ||
210 | ("mark")) | ||
211 | "List of local options for ekddiv macro.") | ||
212 | |||
213 | (defvar LaTeX-ekdosis-setteixmlexport-options | ||
214 | '(("autopar" ("true" "false"))) | ||
215 | "List of local options for SetTEIxmlExport macro.") | ||
216 | |||
98 | (defvar LaTeX-ekdosis-alignment-key-val-options | 217 | (defvar LaTeX-ekdosis-alignment-key-val-options |
99 | '(("tcols") | 218 | '(("tcols") |
100 | ("lcols") | 219 | ("lcols") |
@@ -102,9 +221,18 @@ | |||
102 | ("apparatus") | 221 | ("apparatus") |
103 | ("flush" ("true" "false")) | 222 | ("flush" ("true" "false")) |
104 | ("paired" ("true" "false")) | 223 | ("paired" ("true" "false")) |
105 | ("pagelineation" ("true" "false"))) | 224 | ("lineation" ("page" "document"))) |
106 | "Local options for alignment env.") | 225 | "Local options for alignment env.") |
107 | 226 | ||
227 | (defvar LaTeX-ekdosis-ekdverse-key-val-options | ||
228 | '(("width") | ||
229 | ("type")) | ||
230 | "Local options for ekdverse env.") | ||
231 | |||
232 | (defvar LaTeX-ekdosis-ekdstanza-key-val-options | ||
233 | '(("type")) | ||
234 | "Local options for ekdstanza env.") | ||
235 | |||
108 | (TeX-add-style-hook | 236 | (TeX-add-style-hook |
109 | "ekdosis" | 237 | "ekdosis" |
110 | (lambda () | 238 | (lambda () |
@@ -131,9 +259,18 @@ | |||
131 | '("<{1}>" ("supplied")) | 259 | '("<{1}>" ("supplied")) |
132 | t) | 260 | t) |
133 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | 261 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) |
262 | '("{1}" ("sic")) | ||
263 | t) | ||
264 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | ||
265 | '("[g]" ("gap")) | ||
266 | t) | ||
267 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | ||
134 | '("{1}" ("mbox")) | 268 | '("{1}" ("mbox")) |
135 | t) | 269 | t) |
136 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | 270 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) |
271 | '("{1}" ("rdgGrp")) | ||
272 | t) | ||
273 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | ||
137 | '("[pb]" ("ekdpb")) | 274 | '("[pb]" ("ekdpb")) |
138 | t) | 275 | t) |
139 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | 276 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) |
@@ -142,9 +279,26 @@ | |||
142 | ;; This package relies on lualatex, so check for it: | 279 | ;; This package relies on lualatex, so check for it: |
143 | (TeX-check-engine-add-engines 'luatex) | 280 | (TeX-check-engine-add-engines 'luatex) |
144 | (TeX-add-symbols | 281 | (TeX-add-symbols |
282 | '("ekdsetup" (TeX-arg-key-val LaTeX-ekdosis-ekdsetup-options)) | ||
145 | '("DeclareWitness" "xml:id" "rendition" "description" | 283 | '("DeclareWitness" "xml:id" "rendition" "description" |
146 | [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarewitness-options ] | 284 | [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarewitness-options ] |
147 | 0) | 285 | 0) |
286 | '("DeclareHand" "xml:id" "base ms." "rendition" | ||
287 | [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarehand-options ] | ||
288 | 0) | ||
289 | '("DeclareSource" "xml:id" "rendition" | ||
290 | 0) | ||
291 | '("DeclareScholar" "xml:id" "rendition" | ||
292 | [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarescholar-options ] | ||
293 | 0) | ||
294 | '("DeclareShorthand" "xml:id" "rendition" "csv-list of ids" | ||
295 | 0) | ||
296 | '("getsiglum" "csv-list" | ||
297 | 0) | ||
298 | '("SigLine" "unique id" | ||
299 | 0) | ||
300 | '("linelabel" "label" | ||
301 | 0) | ||
148 | '("app" [ TeX-arg-key-val LaTeX-ekdosis-app-options ] | 302 | '("app" [ TeX-arg-key-val LaTeX-ekdosis-app-options ] |
149 | t) | 303 | t) |
150 | '("lem" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-lem-options ] | 304 | '("lem" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-lem-options ] |
@@ -155,14 +309,90 @@ | |||
155 | t) | 309 | t) |
156 | '("note*" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-note-star-options ] | 310 | '("note*" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-note-star-options ] |
157 | t) | 311 | t) |
158 | '("SetEkdosisAlignment" | 312 | '("rdgGrp" [ TeX-arg-key-val LaTeX-ekdosis-rdggrp-options ] |
313 | t) | ||
314 | '("SetCritSymbols" (TeX-arg-key-val LaTeX-ekdosis-setcritsymbols-options)) | ||
315 | '("supplied" "supplied text" 0) | ||
316 | '("surplus" "surplus text" 0) | ||
317 | '("gap" (TeX-arg-key-val LaTeX-ekdosis-gap-options)) | ||
318 | '("sic" "sic text" 0) | ||
319 | '("SetAlignment" | ||
159 | (TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options)) | 320 | (TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options)) |
321 | '("columnratio" "fraction(s)" [ "fraction(s)" ] ) | ||
322 | '("setcolumnwidth" "width/gap" [ "width/gap" ] ) | ||
323 | '("marginparthreshold" "number of columns" [ "number of columns" ] ) | ||
324 | '("footnotelayout" | ||
325 | (TeX-arg-eval completing-read | ||
326 | (TeX-argument-prompt nil nil "Layout") | ||
327 | '("c" "m" "p"))) | ||
328 | '("SetHooks" (TeX-arg-key-val LaTeX-ekdosis-sethooks-options)) | ||
329 | '("SetLTRapp" 0) | ||
330 | '("SetRTLapp" 0) | ||
331 | '("SetSeparator" "separator" 0) | ||
332 | '("SetBeginApparatus" "chars|commands" 0) | ||
333 | '("SetEndApparatus" "chars" 0) | ||
334 | '("SetUnitDelimiter" "delimiter" 0) | ||
335 | '("SetDefaultRule" "command" 0) | ||
336 | '("SetApparatusLanguage" "lang name" 0) | ||
337 | '("SetApparatusNoteLanguage" "lang name" 0) | ||
338 | '("SetApparatus" (TeX-arg-key-val LaTeX-ekdosis-setapparatus-options)) | ||
339 | '("footnoteruletrue" 0) | ||
340 | '("footnoterulefalse" 0) | ||
341 | '("SetDefaultApparatus" "apparatus name" 0) | ||
342 | '("DeclareApparatus" "apparatus name" | ||
343 | [ TeX-arg-key-val LaTeX-ekdosis-declareapparatus-options ] 0) | ||
344 | '("indentpattern" "pattern" 0) | ||
345 | '("vin" 0) | ||
346 | '("SetLineation" (TeX-arg-key-val LaTeX-ekdosis-setlineation-options)) | ||
347 | '("innerlinenumbers" 0) | ||
348 | '("outerlinenumbers" 0) | ||
349 | '("modulolinenumbers" [ "number" ] ) | ||
350 | '("resetlinenumber" [ "number" ] ) | ||
351 | '("resetvlinenumber" [ "number" ] ) | ||
352 | '("verselinenumfont" "commands" 0) | ||
353 | '("SetLR" 0) | ||
354 | '("SetRL" 0) | ||
355 | '("MkBodyDivs" "div1" "div2" "div3" "div4" "div5" "div6" 0) | ||
356 | '("ekddiv" (LaTeX-ekdosis-long-key-val LaTeX-ekdosis-ekddiv-options)) | ||
357 | '("FormatDiv" "number" "code before" "code after" 0) | ||
358 | '("ekdmark" 0) | ||
359 | '("endmark" 0) | ||
360 | '("ekdprintmark" | ||
361 | (TeX-arg-eval completing-read | ||
362 | (TeX-argument-prompt nil nil "selector") | ||
363 | '("HEL" "HEC" "HER" "HOL" "HOC" "HOR" | ||
364 | "FEL" "FEC" "FER" "FOL" "FOC" "FOR")) | ||
365 | "signpost" 0 ) | ||
366 | '("ekdnohfmark" 0) | ||
367 | '("ekdresethfmarks" 0) | ||
368 | '("ekdpb" [ "page number" ] "line number" 0) | ||
369 | '("ekdpb*") | ||
370 | '("addentries" [ "layer" ] "number" 0) | ||
371 | '("SetTEIFilename" "base name" 0) | ||
372 | '("SetTEIxmlExport" (TeX-arg-key-val | ||
373 | LaTeX-ekdosis-setteixmlexport-options)) | ||
374 | '("TeXtoTEI" "csname" "TEI element" [ "TEI attributes" ] 0) | ||
375 | '("EnvtoTEI" "env name" "TEI element" [ "TEI attributes" ] 0) | ||
376 | '("EnvtoTEI*" "env name" "TEI element" [ "TEI attributes" ] 0) | ||
377 | '("TeXtoTEIPat" "TeX pattern" "TEI pattern" 0) | ||
378 | '("teidirect" [ "xml attributes" ] "xml element" "code" 0) | ||
379 | '("AddxmlBibResource" "basename or name.xml" 0) | ||
160 | ) | 380 | ) |
161 | (LaTeX-add-environments | 381 | (LaTeX-add-environments |
162 | "ekdosis" | 382 | "ekdosis" |
383 | "edition" | ||
384 | "translation" | ||
385 | "edition*" | ||
386 | "translation*" | ||
387 | "patverse" | ||
388 | "ekdpar" | ||
163 | '("alignment" LaTeX-env-args | 389 | '("alignment" LaTeX-env-args |
164 | [ TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options ] | 390 | [ TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options ] ) |
165 | )) | 391 | '("ekdverse" LaTeX-env-args |
392 | [ TeX-arg-key-val LaTeX-ekdosis-ekdverse-key-val-options ] ) | ||
393 | '("ekdstanza" LaTeX-env-args | ||
394 | [ TeX-arg-key-val LaTeX-ekdosis-ekdstanza-key-val-options ] ) | ||
395 | ) | ||
166 | ) | 396 | ) |
167 | LaTeX-dialect) | 397 | LaTeX-dialect) |
168 | 398 | ||