aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2020-07-07 20:01:29 +0200
committerRobert Alessi <alessi@robertalessi.net>2020-07-07 20:01:29 +0200
commitc9af7edd0f17df1c495669227256bfe947736685 (patch)
treed3de6aefb7a635d19a8e53da381e4bae99a284ce
parente18561ecc00ac0336507daedd2d7e9e352a04251 (diff)
downloadekdosis-c9af7edd0f17df1c495669227256bfe947736685.tar.gz
added samples directory
-rw-r--r--Makefile39
-rw-r--r--ekdosis.dtx42
-rw-r--r--ekdosis.ins4
-rw-r--r--samples/Caesar_BG-6-13-1.tex118
4 files changed, 154 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index 3e83202..4ae326e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,17 +8,31 @@ UTREE = $(shell kpsewhich --var-value TEXMFHOME)
8HOMEDIR := $$HOME 8HOMEDIR := $$HOME
9 9
10exts := md html ins dtx el 10exts := md html ins dtx el
11texsamples := $(basename $(wildcard $(PWD)/samples/*.tex))
12texsamplesout := $(notdir $(basename $(wildcard $(PWD)/samples/*.tex)))
11findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") 13findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)")
12 14
15define dosamples
16 $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
17 $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
18 $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
19 $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null
20endef
21
13all: sty $(NAME).pdf 22all: sty $(NAME).pdf
14 23
15sty: clean 24sty: clean
16 $(CMP) $(NAME).ins 25 $(CMP) $(NAME).ins >/dev/null
17 26
18$(NAME).pdf: $(NAME).dtx 27$(NAME).pdf: $(NAME).dtx
19# $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME)-ex.tex >/dev/null 28 @ echo "Make the sample files first..."
29 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
30 $(foreach file,$(texsamples), $(call dosamples, $(file)))
31 mv TMP/*.pdf samples/
32 mv $(texsamplesout)-tei.xml samples/
33 @ echo "Build the documentation of $(NAME)..."
20 $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null 34 $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null
21 biber $(NAME) 35 biber $(NAME) >/dev/null
22 if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi 36 if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi
23 if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi 37 if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi
24 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 38 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
@@ -26,13 +40,18 @@ $(NAME).pdf: $(NAME).dtx
26 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 40 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
27 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 41 $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
28 42
43samples: clean sty
44 if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi
45 $(foreach file,$(texsamples), $(call dosamples, $(file)))
46 mv TMP/*{\.pdf,-tei\.xml} samples/
47
29clean: 48clean:
30 rm -rf auto 49 rm -rf auto
31 rm -f $(NAME).bib $(PWD)/TMP/*.bib 50 rm -f $(NAME).bib $(PWD)/TMP/*.bib
32 rm -rf .backup 51 rm -rf .backup
33 find -iname "*~" -or -iname "*.pdf" | xargs rm -rf 52 find -iname "*~" -or -iname "*.pdf" | xargs rm -rf
34 find ./* -type f -iname "Makefile" $(findopts) > ls-R 53 find ./* -type f -iname "Makefile" $(findopts) > ls-R
35# find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R 54 find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R
36 rsync -avPr --files-from=ls-R . .backup 55 rsync -avPr --files-from=ls-R . .backup
37 rm -rf * 56 rm -rf *
38 cp -p -r .backup/* . 57 cp -p -r .backup/* .
@@ -57,30 +76,28 @@ inst: uninst auctex all
57 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) 76 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME)
58 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) 77 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME)
59 cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) 78 cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME)
79 cp -r samples/ $(UTREE)/doc/latex/$(NAME)
60 80
61local: uninst auctex 81local: uninst auctex
62 $(CMP) $(NAME).ins 82 $(CMP) $(NAME).ins
63 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) 83 mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME)
64 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) 84 cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME)
65 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) 85 cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME)
66#install: all
67# sudo mkdir -p $(LOCAL)/{tex,source,doc}/lualatex/$(NAME)
68# sudo cp $(NAME).dtx $(LOCAL)/source/lualatex/$(NAME)
69# sudo cp $(NAME).sty $(LOCAL)/tex/lualatex/$(NAME)
70# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME)
71 86
72zip: all 87zip: all
73 ln -sf . $(NAME) 88 ln -sf . $(NAME)
74 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,sty,lua,el}} 89 zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{samples,README.md,$(NAME).{pdf,sty,lua,el}}
75 rm $(NAME) 90 rm $(NAME)
76 91
77package: distclean all 92package: distclean all
78 mkdir $(NAME)/ 93 mkdir $(NAME)/
79 cp README.md *.ins *.dtx *.pdf $(NAME)/ 94 cp Makefile README.md $(NAME).{ins,dtx,pdf} $(NAME)/
95 cp -r samples/ $(NAME)/
80 mkdir -p tex/lualatex/$(NAME)/ 96 mkdir -p tex/lualatex/$(NAME)/
81 cp *.lua *.sty tex/lualatex/$(NAME)/ 97 cp *.lua *.sty tex/lualatex/$(NAME)/
82 mkdir -p doc/lualatex/$(NAME)/ 98 mkdir -p doc/lualatex/$(NAME)/
83 cp README.md *.el *.pdf doc/lualatex/$(NAME)/ 99 cp README.md *.el *.pdf doc/lualatex/$(NAME)/
100 cp -r samples/ doc/lualatex/$(NAME)/
84 mkdir -p source/lualatex/$(NAME)/ 101 mkdir -p source/lualatex/$(NAME)/
85 cp Makefile *.ins *.dtx source/lualatex/$(NAME)/ 102 cp Makefile *.ins *.dtx source/lualatex/$(NAME)/
86 zip -r $(NAME).tds.zip tex doc source 103 zip -r $(NAME).tds.zip tex doc source
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 3ea05ca..0833217 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -5349,41 +5349,11 @@ end
5349% \iffalse 5349% \iffalse
5350%</lua> 5350%</lua>
5351% \fi 5351% \fi
5352%
5353% \section{Sample Files}
5354% \subsection{C. J. Caesar, \emph{Gallic War}, VI, XIII.1}
5355% \label{sec:caesar-gw-6-1-13}
5356% \inputminted[linenos=false]{latex}{samples/Caesar_BG-6-13-1.tex}
5357% \inputminted[linenos=false]{xml}{samples/Caesar_BG-6-13-1-tei.xml}
5352% 5358%
5353% \iffalse
5354%<*examples>
5355% \fi
5356% \begin{comment}
5357% \begin{minted}{latex}
5358\documentclass[12pt]{article}
5359\usepackage{fontspec}
5360\usepackage[english]{babel}
5361\babelfont{rm}{Old Standard}
5362\babelfont{sf}{NewComputerModern Sans}
5363\babelfont{tt}{NewComputerModern Mono}
5364
5365\usepackage[teiexport=tidy]{ekdosis}
5366\SetEkdosisAlignment{
5367 tcols=1,
5368 lcols=1,
5369 texts=specimen[xml:lang="fr"],
5370 apparatus=specimen}
5371
5372\begin{document}
5373
5374\begin{alignment}[flush]
5375 \begin{specimen}
5376 I saw my friend \app{
5377 \lem{Peter}
5378 \rdg{John}}
5379 at the station yesterday.
5380 \end{specimen}
5381\end{alignment}
5382
5383\end{document}
5384% \end{minted}
5385% \end{comment}
5386% \iffalse
5387%</examples>
5388% \fi
5389\endinput 5359\endinput
diff --git a/ekdosis.ins b/ekdosis.ins
index f1558f2..0f80333 100644
--- a/ekdosis.ins
+++ b/ekdosis.ins
@@ -54,8 +54,8 @@ Running "make install" installs the files in the local TeX tree.
54\egroup 54\egroup
55% \usedir{doc/lualatex/ekdosis} 55% \usedir{doc/lualatex/ekdosis}
56% \generate{ 56% \generate{
57% \file{ekdosis-ex.tex}{ 57% \file{ekdosis-ex01.tex}{
58% \from{\jobname.dtx}{examples} 58% \from{\jobname.dtx}{example01}
59% } 59% }
60% } 60% }
61\endbatchfile 61\endbatchfile
diff --git a/samples/Caesar_BG-6-13-1.tex b/samples/Caesar_BG-6-13-1.tex
new file mode 100644
index 0000000..ab53db5
--- /dev/null
+++ b/samples/Caesar_BG-6-13-1.tex
@@ -0,0 +1,118 @@
1\documentclass[12pt]{article}
2\usepackage{fontspec}
3\usepackage[latin.classic,french,english]{babel}
4\babelfont{rm}{Old Standard}
5\babelfont{sf}{NewComputerModern Sans}
6\babelfont{tt}{NewComputerModern Mono}
7
8\usepackage{nextpage}
9\usepackage{xltabular}
10
11\usepackage[teiexport=tidy]{ekdosis}
12\DeclareApparatus{default}[
13 delim=\hskip0.75em,
14 ehook=.]
15
16\ekdfmtdiv{2}{}{.}
17
18\SetEkdosisAlignment{
19 tcols=3,
20 lcols=1,
21 texts=latin[xml:lang="la"];
22 english[xml:lang="en"];
23 french[xml:lang="fr"],
24 apparatus=latin,
25 segmentation=auto}
26
27\AtBeginEnvironment{latin}{\selectlanguage{latin}}
28\AtBeginEnvironment{english}{\sloppy\selectlanguage{english}}
29\AtBeginEnvironment{french}{\sloppy\selectlanguage{french}}
30
31\DeclareWitness{A}{A}{\emph{Bongarsianus} 81}[
32 msName=\emph{Bongarsianus},
33 settlement=Amsterdam,
34 idno=81,
35 institution=University Library,
36 origDate=s. IX--X]
37\DeclareHand{A1}{A}{A\textsuperscript{1}}[\emph{Emendationes
38 scribae ipsius}]
39\DeclareWitness{M}{M}{\emph{Parisinus Lat.} 5056}[
40 origDate={s. XII}]
41\DeclareWitness{B}{B}{\emph{Parisinus Lat.} 5763}[
42 origDate={s. IX--X}]
43\DeclareWitness{R}{R}{\emph{Vaticanus Lat.} 3864}[
44 origDate={s. X}]
45\DeclareWitness{S}{S}{\emph{Laurentianus} R 33}[
46 origDate={s. X}]
47\DeclareWitness{L}{L}{\emph{Londinensis} Br. Mus. 10084}[
48 origDate={s. XI}]
49\DeclareWitness{N}{N}{\emph{Neapolitanus} IV, c. 11}[
50 origDate={s. XII}]
51\DeclareWitness{T}{T}{\emph{Parisinus Lat.} 5764}[
52 origDate={s. XI}]
53\DeclareWitness{f}{\emph{f}}{\emph{Vindobonensis} 95}[
54 origDate={s. XII}]
55\DeclareWitness{U}{U}{\emph{Vaticanus Lat.} 3324}[
56 origDate={s. XI}]
57\DeclareWitness{l}{\emph{l}}{\emph{Laurentianus} Riccard. 541}[
58 origDate={s. XI--XII}]
59\DeclareShorthand{a}{α}{A,cM,cB,cR,cS,cL,cN}
60\DeclareShorthand{b}{β}{T,cf,cU,cl}
61
62\begin{document}
63
64\begin{xltabular}[c]{0.75\linewidth}{lXl}
65 \caption*{\textbf{Conspectus siglorum}\label{tab:conspectus-siglorum}}\\
66 \multicolumn{3}{c}{\emph{Familia} \getsiglum{a}}\\
67 \SigLine{A}\\
68 & \getsiglum{A1} \emph{Emendationes scribae ipsius} & \\
69 \SigLine{M}\\
70 \SigLine{B}\\
71 \SigLine{R}\\
72 \SigLine{S}\\
73 \SigLine{L}\\
74 \SigLine{N}\\
75 \multicolumn{3}{c}{\emph{Familia} \getsiglum{b}}\\
76 \SigLine{T}\\
77 \SigLine{f}\\
78 \SigLine{U}\\
79 \SigLine{l}\\
80\end{xltabular}
81
82\cleartoevenpage
83
84\begin{alignment}
85 \begin{latin}
86 \ekddiv{head=XIII, depth=2, n=6.13, type=section}
87 In omni Gallia eorum hominum qui \app{
88 \lem[wit=a]{aliquo}
89 \rdg[wit=b, alt=in al-]{in aliquo}}
90 sunt numero atque honore genera sunt duo. Nam plebes paene
91 seruorum habetur loco, quae \app{
92 \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1})
93 per se}]{nihil audet per se}
94 \rdg[wit=A1,nordg]{nihil aut et per se}
95 \rdg[wit={R,S,L,N}]{nihil habet per se}
96 \rdg[wit=b]{per se nihil audet}}, \app{
97 \lem[wit=a]{nullo}
98 \rdg[wit=b]{nulli}} adhibetur \app{
99 \lem{consilio}
100 \rdg[wit={T, U}, alt=conc-]{concilio}}.
101 \end{latin}
102 \begin{english}
103 \ekddiv{head=XIII, depth=2, n=6.13, type=section}
104 Throughout all Gaul there are two orders of those men who are of
105 any rank and dignity: for the commonality is held almost in the
106 condition of slaves, and dares to undertake nothing of itself,
107 and is admitted to no deliberation.
108 \end{english}
109 \begin{french}
110 \ekddiv{head=XIII, depth=2, n=6.13, type=section}
111 Partout en Gaule il y a deux classes d'hommes qui comptent et qui
112 sont considérés. Quant aux gens du peuple, ils ne sont guère
113 traités autrement que des esclaves, ne pouvant se permettre aucune
114 initiative, n'étant consultés sur rien.
115 \end{french}
116\end{alignment}
117
118\end{document}