aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-10-19 18:30:03 +0200
committerRobert Alessi <alessi@robertalessi.net>2016-10-19 18:30:03 +0200
commit254f9a49d8a4dc9c19816e0369bfcfec67ba455e (patch)
tree0d4f6b6d512e36ab989f04a7cef8110a046b745f
parent55a7be70c3bb459c3efb9e2cbace117b9b1bb482 (diff)
downloadekdosis-254f9a49d8a4dc9c19816e0369bfcfec67ba455e.tar.gz
starting optimizing the code before going further
-rw-r--r--Makefile2
-rw-r--r--ekdosis.dtx40
2 files changed, 15 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index f90325c..de40689 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ $(NAME).pdf: $(NAME).dtx
13 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 13 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
14 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null 14 lualatex --recorder --interaction=nonstopmode $(NAME).dtx > /dev/null
15clean: 15clean:
16 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out} 16 rm -f $(NAME).{aux,fls,glo,gls,hd,idx,ilg,ind,ins,log,out,toc}
17 rm -f *~ 17 rm -f *~
18 rm -rf auto/ 18 rm -rf auto/
19# rm -f $(NAME)_*.{bib,lua} 19# rm -f $(NAME)_*.{bib,lua}
diff --git a/ekdosis.dtx b/ekdosis.dtx
index 2a9a864..439ae5f 100644
--- a/ekdosis.dtx
+++ b/ekdosis.dtx
@@ -210,8 +210,10 @@ Running "make install" installs the files in the local TeX tree.
210\documentclass{ltxdoc} 210\documentclass{ltxdoc}
211\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry} 211\usepackage[a4paper,margin=25mm,left=50mm,nohead]{geometry}
212\usepackage[numbered]{hypdoc} 212\usepackage[numbered]{hypdoc}
213\usepackage[toc,lot]{multitoc}
213\usepackage{\jobname} 214\usepackage{\jobname}
214\usepackage{fontspec,luatextra} 215\usepackage{fontspec,luatextra}
216\setmainfont{Old Standard}[RawFeature={+ss05;+ss06}]
215\usepackage{authblk} 217\usepackage{authblk}
216\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}} 218\newcommand{\package}[1]{\textsf{#1}\index{#1=#1 (package)}}
217\EnableCrossrefs 219\EnableCrossrefs
@@ -254,7 +256,10 @@ Running "make install" installs the files in the local TeX tree.
254% \affil{CNRS UMR 8167 (Paris, France)\footnote{\url{robert.alessi@cnrs.fr}}} 256% \affil{CNRS UMR 8167 (Paris, France)\footnote{\url{robert.alessi@cnrs.fr}}}
255% \date{\fileversion\ released \filedate} 257% \date{\fileversion\ released \filedate}
256% 258%
257%\maketitle 259% \maketitle
260% \footnotesize
261% \tableofcontents
262% \normalsize
258% 263%
259%\changes{v1.00}{2016/08/03}{First public release} 264%\changes{v1.00}{2016/08/03}{First public release}
260% 265%
@@ -335,44 +340,27 @@ Running "make install" installs the files in the local TeX tree.
335 \stepcounter{ekd@lab}}{}} 340 \stepcounter{ekd@lab}}{}}
336\NewDocumentCommand{\obappend}{+m}% 341\NewDocumentCommand{\obappend}{+m}%
337 {\luadirect{tex.sprint(mdv(\luastringN{#1}))}} 342 {\luadirect{tex.sprint(mdv(\luastringN{#1}))}}
338\NewDocumentCommand{\myappend}{+m}{%
339 \ifbool{ekdstate}{%
340 \label{\getlab}%
341 \luadirect{appin(\luastring{<\getpagerefnumber{\getlab}>}, "no")}%
342 \luadirect{appin(\luastringN{#1}, "no")}%
343 \luadirect{appin(\luastring{</\getpagerefnumber{\getlab}>}, "yes")}%
344 \mklab}{}}
345\NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}} 343\NewDocumentCommand{\apparatus}{}{\luadirect{tex.sprint(appout())}}
346\NewDocumentCommand{\testapparatus}{}{\luadirect{tex.sprint(testapparatus())}} 344\NewDocumentCommand{\testapparatus}{}{\luadirect{tex.sprint(testapparatus())}}
347\def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext} 345\def\blfootnote{\gdef\@thefnmark{\relax}\@footnotetext}
348\def\addapp{% 346\def\add@@apparatus{%
349 \testapparatus% 347 \testapparatus%
350 \ifbool{isapp}{% 348 \ifbool{isapp}{%
351 \begin{apparat}[b!] 349 \begin{apparat}[b!]
352 \rule{5cm}{0.5pt}\\ 350 \rule{5cm}{0.5pt}\\
353 \footnotesize\textbf{Apparat:} \apparatus 351 \footnotesize\apparatus
354 \end{apparat}}{}% 352 \end{apparat}}{}}
355 % \blfootnote{\apparatus}}{} 353\def\add@apparatus{%
356 \afterpage{\addapp}} 354 \add@@apparatus%
355 \afterpage{\add@apparatus}}
357\NewDocumentCommand{\EkdosisStart}{}{% 356\NewDocumentCommand{\EkdosisStart}{}{%
358 \testapparatus% 357 \add@@apparatus%
359 \ifbool{isapp}{% 358 \afterpage{\add@apparatus}}
360 \begin{apparat}[b!]
361 \rule{5cm}{0.5pt}\\
362 \footnotesize\textbf{Apparat:} \apparatus
363 \end{apparat}}{}%
364 % \blfootnote{\apparatus}}{}%
365 \afterpage{\addapp}}
366\NewDocumentCommand{\EkdosisOn}{}{\setbool{ekdstate}{true}} 359\NewDocumentCommand{\EkdosisOn}{}{\setbool{ekdstate}{true}}
367\NewDocumentCommand{\EkdosisOff}{}{\setbool{ekdstate}{false}} 360\NewDocumentCommand{\EkdosisOff}{}{\setbool{ekdstate}{false}}
368\newenvironment{ekdosis}{% 361\newenvironment{ekdosis}{%
369\ifbool{ekdstarted}{}{\EkdosisStart\global\setbool{ekdstarted}{true}} 362\ifbool{ekdstarted}{}{\EkdosisStart\global\setbool{ekdstarted}{true}}
370\EkdosisOn}{\EkdosisOff} 363\EkdosisOn}{\EkdosisOff}
371\newenvironment{countlines}%
372{\directlua{luatexbase.add_to_callback("post_linebreak_filter",
373 count_lines, "count_lines")}}%
374{\par
375\directlua{luatexbase.remove_from_callback("post_linebreak_filter", "count_lines")}}
376% \end{macrocode} 364% \end{macrocode}
377% That is it. Say goodbye before leaving. 365% That is it. Say goodbye before leaving.
378% \begin{macrocode} 366% \begin{macrocode}