From c9af7edd0f17df1c495669227256bfe947736685 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Tue, 7 Jul 2020 20:01:29 +0200 Subject: added samples directory --- Makefile | 39 ++++++++++---- ekdosis.dtx | 42 +++------------ ekdosis.ins | 4 +- samples/Caesar_BG-6-13-1.tex | 118 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 154 insertions(+), 49 deletions(-) create mode 100644 samples/Caesar_BG-6-13-1.tex diff --git a/Makefile b/Makefile index 3e83202..4ae326e 100644 --- a/Makefile +++ b/Makefile @@ -8,17 +8,31 @@ UTREE = $(shell kpsewhich --var-value TEXMFHOME) HOMEDIR := $$HOME exts := md html ins dtx el +texsamples := $(basename $(wildcard $(PWD)/samples/*.tex)) +texsamplesout := $(notdir $(basename $(wildcard $(PWD)/samples/*.tex))) findopts := $(foreach ext,$(exts),-or -iname "*.$(ext)") +define dosamples + $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null + $(CMP) --output-dir=$(PWD)/TMP --shell-escape $1 >/dev/null +endef + all: sty $(NAME).pdf sty: clean - $(CMP) $(NAME).ins + $(CMP) $(NAME).ins >/dev/null $(NAME).pdf: $(NAME).dtx -# $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME)-ex.tex >/dev/null + @ echo "Make the sample files first..." + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + $(foreach file,$(texsamples), $(call dosamples, $(file))) + mv TMP/*.pdf samples/ + mv $(texsamplesout)-tei.xml samples/ + @ echo "Build the documentation of $(NAME)..." $(CMP) --shell-escape -recorder -interaction=batchmode $(NAME).dtx >/dev/null - biber $(NAME) + biber $(NAME) >/dev/null if [ -f $(NAME).glo ]; then makeindex -q -s gglo.ist -o $(NAME).gls $(NAME).glo; fi if [ -f $(NAME).idx ]; then makeindex -q -s gind.ist -o $(NAME).ind $(NAME).idx; fi $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null @@ -26,13 +40,18 @@ $(NAME).pdf: $(NAME).dtx $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null $(CMP) --shell-escape --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null +samples: clean sty + if [ ! -d $(PWD)/TMP ]; then mkdir $(PWD)/TMP; fi + $(foreach file,$(texsamples), $(call dosamples, $(file))) + mv TMP/*{\.pdf,-tei\.xml} samples/ + clean: rm -rf auto rm -f $(NAME).bib $(PWD)/TMP/*.bib rm -rf .backup find -iname "*~" -or -iname "*.pdf" | xargs rm -rf find ./* -type f -iname "Makefile" $(findopts) > ls-R -# find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R + find ./* -type f -iname "*.tex" | grep '/samples/' >> ls-R rsync -avPr --files-from=ls-R . .backup rm -rf * cp -p -r .backup/* . @@ -57,30 +76,28 @@ inst: uninst auctex all cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).pdf $(UTREE)/doc/lualatex/$(NAME) + cp -r samples/ $(UTREE)/doc/latex/$(NAME) local: uninst auctex $(CMP) $(NAME).ins mkdir -p $(UTREE)/{tex,source,doc}/lualatex/$(NAME) cp $(NAME).sty $(UTREE)/tex/lualatex/$(NAME) cp $(NAME).lua $(UTREE)/tex/lualatex/$(NAME) -#install: all -# sudo mkdir -p $(LOCAL)/{tex,source,doc}/lualatex/$(NAME) -# sudo cp $(NAME).dtx $(LOCAL)/source/lualatex/$(NAME) -# sudo cp $(NAME).sty $(LOCAL)/tex/lualatex/$(NAME) -# sudo cp $(NAME).pdf $(LOCAL)/doc/lualatex/$(NAME) zip: all ln -sf . $(NAME) - zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{README.md,$(NAME).{pdf,sty,lua,el}} + zip -Drq $(PWD)/$(NAME)-$(VERS).zip $(NAME)/{samples,README.md,$(NAME).{pdf,sty,lua,el}} rm $(NAME) package: distclean all mkdir $(NAME)/ - cp README.md *.ins *.dtx *.pdf $(NAME)/ + cp Makefile README.md $(NAME).{ins,dtx,pdf} $(NAME)/ + cp -r samples/ $(NAME)/ mkdir -p tex/lualatex/$(NAME)/ cp *.lua *.sty tex/lualatex/$(NAME)/ mkdir -p doc/lualatex/$(NAME)/ cp README.md *.el *.pdf doc/lualatex/$(NAME)/ + cp -r samples/ doc/lualatex/$(NAME)/ mkdir -p source/lualatex/$(NAME)/ cp Makefile *.ins *.dtx source/lualatex/$(NAME)/ 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 % \iffalse % % \fi +% +% \section{Sample Files} +% \subsection{C. J. Caesar, \emph{Gallic War}, VI, XIII.1} +% \label{sec:caesar-gw-6-1-13} +% \inputminted[linenos=false]{latex}{samples/Caesar_BG-6-13-1.tex} +% \inputminted[linenos=false]{xml}{samples/Caesar_BG-6-13-1-tei.xml} % -% \iffalse -%<*examples> -% \fi -% \begin{comment} -% \begin{minted}{latex} -\documentclass[12pt]{article} -\usepackage{fontspec} -\usepackage[english]{babel} -\babelfont{rm}{Old Standard} -\babelfont{sf}{NewComputerModern Sans} -\babelfont{tt}{NewComputerModern Mono} - -\usepackage[teiexport=tidy]{ekdosis} -\SetEkdosisAlignment{ - tcols=1, - lcols=1, - texts=specimen[xml:lang="fr"], - apparatus=specimen} - -\begin{document} - -\begin{alignment}[flush] - \begin{specimen} - I saw my friend \app{ - \lem{Peter} - \rdg{John}} - at the station yesterday. - \end{specimen} -\end{alignment} - -\end{document} -% \end{minted} -% \end{comment} -% \iffalse -% -% \fi \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. \egroup % \usedir{doc/lualatex/ekdosis} % \generate{ -% \file{ekdosis-ex.tex}{ -% \from{\jobname.dtx}{examples} +% \file{ekdosis-ex01.tex}{ +% \from{\jobname.dtx}{example01} % } % } \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 @@ +\documentclass[12pt]{article} +\usepackage{fontspec} +\usepackage[latin.classic,french,english]{babel} +\babelfont{rm}{Old Standard} +\babelfont{sf}{NewComputerModern Sans} +\babelfont{tt}{NewComputerModern Mono} + +\usepackage{nextpage} +\usepackage{xltabular} + +\usepackage[teiexport=tidy]{ekdosis} +\DeclareApparatus{default}[ + delim=\hskip0.75em, + ehook=.] + +\ekdfmtdiv{2}{}{.} + +\SetEkdosisAlignment{ + tcols=3, + lcols=1, + texts=latin[xml:lang="la"]; + english[xml:lang="en"]; + french[xml:lang="fr"], + apparatus=latin, + segmentation=auto} + +\AtBeginEnvironment{latin}{\selectlanguage{latin}} +\AtBeginEnvironment{english}{\sloppy\selectlanguage{english}} +\AtBeginEnvironment{french}{\sloppy\selectlanguage{french}} + +\DeclareWitness{A}{A}{\emph{Bongarsianus} 81}[ + msName=\emph{Bongarsianus}, + settlement=Amsterdam, + idno=81, + institution=University Library, + origDate=s. IX--X] +\DeclareHand{A1}{A}{A\textsuperscript{1}}[\emph{Emendationes + scribae ipsius}] +\DeclareWitness{M}{M}{\emph{Parisinus Lat.} 5056}[ + origDate={s. XII}] +\DeclareWitness{B}{B}{\emph{Parisinus Lat.} 5763}[ + origDate={s. IX--X}] +\DeclareWitness{R}{R}{\emph{Vaticanus Lat.} 3864}[ + origDate={s. X}] +\DeclareWitness{S}{S}{\emph{Laurentianus} R 33}[ + origDate={s. X}] +\DeclareWitness{L}{L}{\emph{Londinensis} Br. Mus. 10084}[ + origDate={s. XI}] +\DeclareWitness{N}{N}{\emph{Neapolitanus} IV, c. 11}[ + origDate={s. XII}] +\DeclareWitness{T}{T}{\emph{Parisinus Lat.} 5764}[ + origDate={s. XI}] +\DeclareWitness{f}{\emph{f}}{\emph{Vindobonensis} 95}[ + origDate={s. XII}] +\DeclareWitness{U}{U}{\emph{Vaticanus Lat.} 3324}[ + origDate={s. XI}] +\DeclareWitness{l}{\emph{l}}{\emph{Laurentianus} Riccard. 541}[ + origDate={s. XI--XII}] +\DeclareShorthand{a}{α}{A,cM,cB,cR,cS,cL,cN} +\DeclareShorthand{b}{β}{T,cf,cU,cl} + +\begin{document} + +\begin{xltabular}[c]{0.75\linewidth}{lXl} + \caption*{\textbf{Conspectus siglorum}\label{tab:conspectus-siglorum}}\\ + \multicolumn{3}{c}{\emph{Familia} \getsiglum{a}}\\ + \SigLine{A}\\ + & \getsiglum{A1} \emph{Emendationes scribae ipsius} & \\ + \SigLine{M}\\ + \SigLine{B}\\ + \SigLine{R}\\ + \SigLine{S}\\ + \SigLine{L}\\ + \SigLine{N}\\ + \multicolumn{3}{c}{\emph{Familia} \getsiglum{b}}\\ + \SigLine{T}\\ + \SigLine{f}\\ + \SigLine{U}\\ + \SigLine{l}\\ +\end{xltabular} + +\cleartoevenpage + +\begin{alignment} + \begin{latin} + \ekddiv{head=XIII, depth=2, n=6.13, type=section} + In omni Gallia eorum hominum qui \app{ + \lem[wit=a]{aliquo} + \rdg[wit=b, alt=in al-]{in aliquo}} + sunt numero atque honore genera sunt duo. Nam plebes paene + seruorum habetur loco, quae \app{ + \lem[wit={A,M}, alt={nihil audet (aut et \getsiglum{A1}) + per se}]{nihil audet per se} + \rdg[wit=A1,nordg]{nihil aut et per se} + \rdg[wit={R,S,L,N}]{nihil habet per se} + \rdg[wit=b]{per se nihil audet}}, \app{ + \lem[wit=a]{nullo} + \rdg[wit=b]{nulli}} adhibetur \app{ + \lem{consilio} + \rdg[wit={T, U}, alt=conc-]{concilio}}. + \end{latin} + \begin{english} + \ekddiv{head=XIII, depth=2, n=6.13, type=section} + Throughout all Gaul there are two orders of those men who are of + any rank and dignity: for the commonality is held almost in the + condition of slaves, and dares to undertake nothing of itself, + and is admitted to no deliberation. + \end{english} + \begin{french} + \ekddiv{head=XIII, depth=2, n=6.13, type=section} + Partout en Gaule il y a deux classes d'hommes qui comptent et qui + sont considérés. Quant aux gens du peuple, ils ne sont guère + traités autrement que des esclaves, ne pouvant se permettre aucune + initiative, n'étant consultés sur rien. + \end{french} +\end{alignment} + +\end{document} -- cgit v1.2.3