From bb117c1604154c6b341b4499ccef84e1f575ca0b Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 17 Aug 2021 17:12:18 +0200 Subject: updated ekdosis.el: all commands are now supported --- ekdosis.el | 242 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 236 insertions(+), 6 deletions(-) diff --git a/ekdosis.el b/ekdosis.el index 004cc3f..845c004 100644 --- a/ekdosis.el +++ b/ekdosis.el @@ -24,7 +24,11 @@ (defvar LaTeX-ekdosis-preamble-options '(("parnotes" ("true" "false" "roman")) ("teiexport" ("true" "false" "tidy")) - ("layout" ("float" "footins"))) + ("layout" ("float" "footins" "keyfloat" "fitapp")) + ("divs" ("ekdosis" "latex")) + ("poetry" ("verse")) + ("parnotes" ("true" "false" "roman")) + ("teiexport" ("true" "false" "tidy"))) "Package options for the ekdosis package.") (defun LaTeX-ekdosis-package-options () @@ -42,14 +46,35 @@ (TeX-read-key-val optional arg) optional))) +(defvar LaTeX-ekdosis-ekdsetup-options + '(("showpagebreaks" ("true" "false")) + ("spbmk") + ("hpbmk")) + "List of local options for ekdsetup macro.") + (defvar LaTeX-ekdosis-declarewitness-options '(("settlement") + ("institution") ("repository") + ("collection") + ("idno") ("msName") ("origDate") - ("idno")) + ("locus")) "List of local options for DeclareWitness macro.") +(defvar LaTeX-ekdosis-declarehand-options + '(("note")) + "List of local options for DeclareHand macro.") + +(defvar LaTeX-ekdosis-declarescholar-options + '(("rawname") + ("forename") + ("surname") + ("addname") + ("note")) + "List of local options for DeclareScholar macro.") + (defvar LaTeX-ekdosis-app-options '(("type")) "Local option for app|note macro.") @@ -64,6 +89,9 @@ ("prewit") ("postwit") ("sep") + ("type") + ("num") + ("nonum") ("nolem" ("true" "false")) ("nosep" ("true" "false"))) "Local options for lem macro") @@ -77,6 +105,7 @@ ("post") ("prewit") ("postwit") + ("type") ("nordg" ("true" "false"))) "Local options for rdg macro.") @@ -86,6 +115,9 @@ ("labelb") ("labele") ("sep") + ("nosep") + ("num") + ("nonum") ("pre") ("post")) "Local options for note macro.") @@ -95,6 +127,93 @@ ("post")) "Local options for note* macro.") +(defvar LaTeX-ekdosis-rdggrp-options + '(("type")) + "Local options for rdgGrp macro.") + +(defvar LaTeX-ekdosis-setcritsymbols-options + '(("suppbegin") + ("suppend") + ("delbegin") + ("delend") + ("sicbegin") + ("sicend") + ("gapmark")) + "List of local options for setcritsymbols macro.") + +(defvar LaTeX-ekdosis-sethooks-options + '(("appfontsize") + ("refnumstyle") + ("postrefnum") + ("lemmastyle") + ("readingstyle") + ("initialrule") + ("noinitialrule") + ("keyparopts") + ("appheight") + ("fitalgorithm" ("fontsize" "hybrid" "areasize" "squeeze"))) + "List of local options for sethooks macro.") + +(defvar LaTeX-ekdosis-gap-options + '(("reason") + ("unit") + ("quantity") + ("extent")) + "List of local options for gap macro.") + +(defvar LaTeX-ekdosis-setapparatus-options + '(("direction" ("LR" "RL")) + ("sep") + ("delim") + ("bhook") + ("ehook") + ("rule") + ("norule") + ("lang") + ("notelang")) + "List of local options for setapparatus macro.") + +(defvar LaTeX-ekdosis-declareapparatus-options + '(("direction" ("LR" "RL")) + ("sep") + ("delim") + ("bhook") + ("ehook") + ("rule") + ("norule") + ("lang") + ("notelang") + ("maxentries")) + "List of local options for declareapparatus macro.") + +(defvar LaTeX-ekdosis-setlineation-options + '(("lineation" ("page" "document" "none")) + ("sep") + ("modulo") + ("modulonum") + ("margin" ("right" "left" "inner" "outer")) + ("numbers" ("elided" "full")) + ("vlineation" ("page" "document")) + ("vmodulo") + ("vmargin" ("right" "left")) + ("continuousvnum")) + "List of local options for setlineation macro.") + +(defvar LaTeX-ekdosis-ekddiv-options + '(("type") + ("n") + ("head") + ("barehead") + ("depth" ("1" "2" "3" "4" "5" "6" "7" "8" "9")) + ("toc" ("book" "part" "chapter" "section" "subsection" + "subsubsection" "paragraph" "subparagraph")) + ("mark")) + "List of local options for ekddiv macro.") + +(defvar LaTeX-ekdosis-setteixmlexport-options + '(("autopar" ("true" "false"))) + "List of local options for SetTEIxmlExport macro.") + (defvar LaTeX-ekdosis-alignment-key-val-options '(("tcols") ("lcols") @@ -102,9 +221,18 @@ ("apparatus") ("flush" ("true" "false")) ("paired" ("true" "false")) - ("pagelineation" ("true" "false"))) + ("lineation" ("page" "document"))) "Local options for alignment env.") +(defvar LaTeX-ekdosis-ekdverse-key-val-options + '(("width") + ("type")) + "Local options for ekdverse env.") + +(defvar LaTeX-ekdosis-ekdstanza-key-val-options + '(("type")) + "Local options for ekdstanza env.") + (TeX-add-style-hook "ekdosis" (lambda () @@ -130,9 +258,18 @@ (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) '("<{1}>" ("supplied")) t) + (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) + '("{1}" ("sic")) + t) + (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) + '("[g]" ("gap")) + t) (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) '("{1}" ("mbox")) t) + (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) + '("{1}" ("rdgGrp")) + t) (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) '("[pb]" ("ekdpb")) t) @@ -142,9 +279,26 @@ ;; This package relies on lualatex, so check for it: (TeX-check-engine-add-engines 'luatex) (TeX-add-symbols + '("ekdsetup" (TeX-arg-key-val LaTeX-ekdosis-ekdsetup-options)) '("DeclareWitness" "xml:id" "rendition" "description" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarewitness-options ] 0) + '("DeclareHand" "xml:id" "base ms." "rendition" + [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarehand-options ] + 0) + '("DeclareSource" "xml:id" "rendition" + 0) + '("DeclareScholar" "xml:id" "rendition" + [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-declarescholar-options ] + 0) + '("DeclareShorthand" "xml:id" "rendition" "csv-list of ids" + 0) + '("getsiglum" "csv-list" + 0) + '("SigLine" "unique id" + 0) + '("linelabel" "label" + 0) '("app" [ TeX-arg-key-val LaTeX-ekdosis-app-options ] t) '("lem" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-lem-options ] @@ -155,14 +309,90 @@ t) '("note*" [ LaTeX-ekdosis-long-key-val LaTeX-ekdosis-note-star-options ] t) - '("SetEkdosisAlignment" + '("rdgGrp" [ TeX-arg-key-val LaTeX-ekdosis-rdggrp-options ] + t) + '("SetCritSymbols" (TeX-arg-key-val LaTeX-ekdosis-setcritsymbols-options)) + '("supplied" "supplied text" 0) + '("surplus" "surplus text" 0) + '("gap" (TeX-arg-key-val LaTeX-ekdosis-gap-options)) + '("sic" "sic text" 0) + '("SetAlignment" (TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options)) + '("columnratio" "fraction(s)" [ "fraction(s)" ] ) + '("setcolumnwidth" "width/gap" [ "width/gap" ] ) + '("marginparthreshold" "number of columns" [ "number of columns" ] ) + '("footnotelayout" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "Layout") + '("c" "m" "p"))) + '("SetHooks" (TeX-arg-key-val LaTeX-ekdosis-sethooks-options)) + '("SetLTRapp" 0) + '("SetRTLapp" 0) + '("SetSeparator" "separator" 0) + '("SetBeginApparatus" "chars|commands" 0) + '("SetEndApparatus" "chars" 0) + '("SetUnitDelimiter" "delimiter" 0) + '("SetDefaultRule" "command" 0) + '("SetApparatusLanguage" "lang name" 0) + '("SetApparatusNoteLanguage" "lang name" 0) + '("SetApparatus" (TeX-arg-key-val LaTeX-ekdosis-setapparatus-options)) + '("footnoteruletrue" 0) + '("footnoterulefalse" 0) + '("SetDefaultApparatus" "apparatus name" 0) + '("DeclareApparatus" "apparatus name" + [ TeX-arg-key-val LaTeX-ekdosis-declareapparatus-options ] 0) + '("indentpattern" "pattern" 0) + '("vin" 0) + '("SetLineation" (TeX-arg-key-val LaTeX-ekdosis-setlineation-options)) + '("innerlinenumbers" 0) + '("outerlinenumbers" 0) + '("modulolinenumbers" [ "number" ] ) + '("resetlinenumber" [ "number" ] ) + '("resetvlinenumber" [ "number" ] ) + '("verselinenumfont" "commands" 0) + '("SetLR" 0) + '("SetRL" 0) + '("MkBodyDivs" "div1" "div2" "div3" "div4" "div5" "div6" 0) + '("ekddiv" (LaTeX-ekdosis-long-key-val LaTeX-ekdosis-ekddiv-options)) + '("FormatDiv" "number" "code before" "code after" 0) + '("ekdmark" 0) + '("endmark" 0) + '("ekdprintmark" + (TeX-arg-eval completing-read + (TeX-argument-prompt nil nil "selector") + '("HEL" "HEC" "HER" "HOL" "HOC" "HOR" + "FEL" "FEC" "FER" "FOL" "FOC" "FOR")) + "signpost" 0 ) + '("ekdnohfmark" 0) + '("ekdresethfmarks" 0) + '("ekdpb" [ "page number" ] "line number" 0) + '("ekdpb*") + '("addentries" [ "layer" ] "number" 0) + '("SetTEIFilename" "base name" 0) + '("SetTEIxmlExport" (TeX-arg-key-val + LaTeX-ekdosis-setteixmlexport-options)) + '("TeXtoTEI" "csname" "TEI element" [ "TEI attributes" ] 0) + '("EnvtoTEI" "env name" "TEI element" [ "TEI attributes" ] 0) + '("EnvtoTEI*" "env name" "TEI element" [ "TEI attributes" ] 0) + '("TeXtoTEIPat" "TeX pattern" "TEI pattern" 0) + '("teidirect" [ "xml attributes" ] "xml element" "code" 0) + '("AddxmlBibResource" "basename or name.xml" 0) ) (LaTeX-add-environments "ekdosis" + "edition" + "translation" + "edition*" + "translation*" + "patverse" + "ekdpar" '("alignment" LaTeX-env-args - [ TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options ] - )) + [ TeX-arg-key-val LaTeX-ekdosis-alignment-key-val-options ] ) + '("ekdverse" LaTeX-env-args + [ TeX-arg-key-val LaTeX-ekdosis-ekdverse-key-val-options ] ) + '("ekdstanza" LaTeX-env-args + [ TeX-arg-key-val LaTeX-ekdosis-ekdstanza-key-val-options ] ) + ) ) LaTeX-dialect) -- cgit v1.2.3