diff options
-rw-r--r-- | Makefile | 17 | ||||
-rw-r--r-- | ekdosis.el | 56 |
2 files changed, 68 insertions, 5 deletions
@@ -5,6 +5,7 @@ PWD = $(shell pwd) | |||
5 | VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') | 5 | VERS = $(shell ltxfileinfo -v $(NAME).dtx|sed -e 's/^v//') |
6 | LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) | 6 | LOCAL = $(shell kpsewhich --var-value TEXMFLOCAL) |
7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) | 7 | UTREE = $(shell kpsewhich --var-value TEXMFHOME) |
8 | HOMEDIR := $$HOME | ||
8 | all: $(NAME).pdf | 9 | all: $(NAME).pdf |
9 | test -e README.txt && mv README.txt README || exit 0 | 10 | test -e README.txt && mv README.txt README || exit 0 |
10 | $(NAME).pdf: $(NAME).dtx | 11 | $(NAME).pdf: $(NAME).dtx |
@@ -14,23 +15,29 @@ $(NAME).pdf: $(NAME).dtx | |||
14 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 15 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
15 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null | 16 | $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null |
16 | clean: | 17 | clean: |
18 | rm -rf _minted-* | ||
17 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg} | 19 | rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,log,out,toc,pyg} |
18 | rm -f *~ | 20 | rm -f *~ |
19 | rm -rf auto/ | 21 | rm -rf auto/ |
20 | # rm -f $(NAME)_*.{bib,lua} | 22 | # rm -f $(NAME)_*.{bib,lua} |
23 | auctex: | ||
24 | if [ ! -d "$(HOMEDIR)/.emacs.d/auctex/auto" ]; then \ | ||
25 | mkdir -p $(HOMEDIR)/.emacs.d/auctex/auto; \ | ||
26 | fi | ||
27 | cp $(NAME)*.el $(HOMEDIR)/.emacs.d/auctex/auto | ||
21 | distclean: clean uninst | 28 | distclean: clean uninst |
22 | rm -rf _minted-* | ||
23 | rm -f $(NAME).{pdf,sty,lua} README* | 29 | rm -f $(NAME).{pdf,sty,lua} README* |
24 | rm -f *.zip *.tar.gz | 30 | rm -f *.zip *.tar.gz |
25 | uninst: | 31 | uninst: |
26 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) | 32 | rm -rf $(UTREE)/{tex,source,doc}/lualatex/$(NAME) |
27 | inst: uninst all | 33 | rm -rf $(HOMEDIR)/.emacs.d/auctex/auto/$(NAME).{el,elc} |
34 | inst: uninst auctex all | ||
28 | mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) | 35 | mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) |
29 | cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME) | 36 | cp $(NAME).dtx $(UTREE)/source/lualatex/$(NAME) |
30 | cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) | 37 | cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) |
31 | cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) | 38 | cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) |
32 | cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) | 39 | cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) |
33 | local: uninst | 40 | local: uninst auctex |
34 | $(CMP) $(NAME).ins | 41 | $(CMP) $(NAME).ins |
35 | mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) | 42 | mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) |
36 | cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) | 43 | cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) |
@@ -42,7 +49,7 @@ local: uninst | |||
42 | # sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME) | 49 | # sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME) |
43 | zip: all | 50 | zip: all |
44 | ln -sf . $(NAME) | 51 | ln -sf . $(NAME) |
45 | zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua}} | 52 | zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README,$(NAME).{pdf,sty,lua,el}} |
46 | rm $(NAME) | 53 | rm $(NAME) |
47 | package: distclean all | 54 | package: distclean all |
48 | mkdir $(NAME)/ | 55 | mkdir $(NAME)/ |
@@ -50,7 +57,7 @@ package: distclean all | |||
50 | mkdir -p tex/lualatex/$(NAME)/ | 57 | mkdir -p tex/lualatex/$(NAME)/ |
51 | cp *.lua *.sty tex/lualatex/$(NAME)/ | 58 | cp *.lua *.sty tex/lualatex/$(NAME)/ |
52 | mkdir -p doc/lualatex/$(NAME)/ | 59 | mkdir -p doc/lualatex/$(NAME)/ |
53 | cp *.pdf doc/lualatex/$(NAME)/ | 60 | cp *.el *.pdf doc/lualatex/$(NAME)/ |
54 | mkdir -p source/lualatex/$(NAME)/ | 61 | mkdir -p source/lualatex/$(NAME)/ |
55 | cp Makefile *.dtx source/lualatex/$(NAME)/ | 62 | cp Makefile *.dtx source/lualatex/$(NAME)/ |
56 | zip -r $(NAME).tds.zip tex doc source | 63 | zip -r $(NAME).tds.zip tex doc source |
diff --git a/ekdosis.el b/ekdosis.el new file mode 100644 index 0000000..63230a0 --- /dev/null +++ b/ekdosis.el | |||
@@ -0,0 +1,56 @@ | |||
1 | ;;; ekdosis.el --- AUCTeX style for `ekdosis.sty' | ||
2 | ;; This file is part of the `ekdosis' package | ||
3 | |||
4 | ;; ekdosis -- TEI xml compliant critical editions | ||
5 | ;; Copyright (C) 2020 Robert Alessi | ||
6 | |||
7 | ;; Please send error reports and suggestions for improvements to Robert | ||
8 | ;; Alessi <alessi@robertalessi.net> | ||
9 | |||
10 | ;; This program is free software: you can redistribute it and/or modify | ||
11 | ;; it under the terms of the GNU General Public License as published by | ||
12 | ;; the Free Software Foundation, either version 3 of the License, or | ||
13 | ;; (at your option) any later version. | ||
14 | |||
15 | ;; This program is distributed in the hope that it will be useful, but | ||
16 | ;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | ;; General Public License for more details. | ||
19 | |||
20 | ;; You should have received a copy of the GNU General Public License | ||
21 | ;; along with this program. If not, see | ||
22 | ;; <http://www.gnu.org/licenses/>. | ||
23 | |||
24 | (defvar LaTeX-ekdosis-preamble-options | ||
25 | '(;; | ||
26 | ("parnotes" ("true" "false" "roman")) | ||
27 | ("teiexport" ("true" "false" "tidy")) | ||
28 | ("layout" ("float" "footins")) | ||
29 | ) | ||
30 | "Package options for the ekdosis package.") | ||
31 | |||
32 | (defun LaTeX-ekdosis-package-options () | ||
33 | "Prompt for package options for ekdosis package." | ||
34 | (TeX-read-key-val t | ||
35 | (append LaTeX-ekdosis-preamble-options))) | ||
36 | |||
37 | (TeX-add-style-hook | ||
38 | "eksosis" | ||
39 | (lambda () | ||
40 | ;; Folding features: | ||
41 | (add-to-list (make-local-variable 'LaTeX-fold-macro-spec-list) | ||
42 | '("{1}" | ||
43 | ("app")) | ||
44 | '("{7}||{6}||{5}||{4}||{3}||{2}||{1}" | ||
45 | ("lem")) | ||
46 | '("[r]" | ||
47 | ("rdg")) | ||
48 | '("[n]" | ||
49 | ("note")) | ||
50 | t) | ||
51 | ;; This package relies on lualatex, so check for it: | ||
52 | (TeX-check-engine-add-engines 'luatex) | ||
53 | ) | ||
54 | LaTeX-dialect) | ||
55 | |||
56 | ;;; ekdosis.el ends here | ||