diff options
author | Robert Alessi <alessi@robertalessi.net> | 2020-08-01 21:42:45 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2020-08-01 21:42:45 +0200 |
commit | b985ad19f4f15d7240a767cfeb2c985cff3d7c53 (patch) | |
tree | 4220c6fe86bb2d3265d112cd2ac0efd38084bf7e /ekdosis.dtx | |
parent | 28a7327ec93e05eb46a718517427e3e12806e9ea (diff) | |
download | ekdosis-b985ad19f4f15d7240a767cfeb2c985cff3d7c53.tar.gz |
added Makefile in samples/
Diffstat (limited to 'ekdosis.dtx')
-rw-r--r-- | ekdosis.dtx | 209 |
1 files changed, 184 insertions, 25 deletions
diff --git a/ekdosis.dtx b/ekdosis.dtx index 09c1503..702e27b 100644 --- a/ekdosis.dtx +++ b/ekdosis.dtx | |||
@@ -148,6 +148,25 @@ along with this program. If not, see | |||
148 | date = {2020-07-13}, | 148 | date = {2020-07-13}, |
149 | version = {3.47} | 149 | version = {3.47} |
150 | } | 150 | } |
151 | |||
152 | @Software{arabluatex, | ||
153 | title = {The Arabluatex package}, | ||
154 | titleaddon = {ArabTeX for LuaLaTeX}, | ||
155 | author = {Alessi, Robert}, | ||
156 | url = {http://ctan.org/pkg/arabluatex}, | ||
157 | date = {2020-03-23}, | ||
158 | version = {1.20} | ||
159 | } | ||
160 | |||
161 | @Software{arabtex, | ||
162 | title = {The Arabtex package}, | ||
163 | titleaddon = {Macros and fonts for typesetting Arabic}, | ||
164 | author = {Lagally, Klaus}, | ||
165 | url = | ||
166 | {http://baobab.informatik.uni-stuttgart.de/ifi/bs/research/arab_e.html}, | ||
167 | date = {2004-03-11}, | ||
168 | version = {4.00} | ||
169 | } | ||
151 | \end{filecontents} | 170 | \end{filecontents} |
152 | \begin{filecontents}[overwrite]{\jobname-cfg.tex} | 171 | \begin{filecontents}[overwrite]{\jobname-cfg.tex} |
153 | \footnotelayout{m} | 172 | \footnotelayout{m} |
@@ -492,17 +511,19 @@ along with this program. If not, see | |||
492 | % \metapick[print]{titletext} | 511 | % \metapick[print]{titletext} |
493 | % \end{tcolorbox} | 512 | % \end{tcolorbox} |
494 | % | 513 | % |
495 | % \begin{tcolorbox}[title=Notice to the Gentle Reader] | 514 | % \begin{comment} |
496 | % The current state of this documentation covers the basics of | 515 | % \begin{tcolorbox}[title=Notice to the Gentle Reader] |
497 | % \pkg{ekdosis}, namely what should be enough to start a new | 516 | % The current state of this documentation covers the basics of |
498 | % document and see how it works. v1.0 with a full documentation | 517 | % \pkg{ekdosis}, namely what should be enough to start a new |
499 | % should be out by the end of July. Until then, there is a web page | 518 | % document and see how it works. v1.0 with a full documentation |
500 | % that can be accessed,\footnote{% | 519 | % should be out by the end of July. Until then, there is a web |
501 | % \url{http://www.robertalessi.net/ekdosis}} with a mailing list | 520 | % page that can be accessed,\footnote{% |
502 | % that one can subscribe to and a section entitled | 521 | % \url{http://www.robertalessi.net/ekdosis}} with a mailing list |
503 | % \enquote{Literature} where one will find some slides and a paper | 522 | % that one can subscribe to and a section entitled |
504 | % submitted to a journal. | 523 | % \enquote{Literature} where one will find some slides and a paper |
505 | % \end{tcolorbox} | 524 | % submitted to a journal. |
525 | % \end{tcolorbox} | ||
526 | % \end{comment} | ||
506 | % | 527 | % |
507 | % \tableofcontents | 528 | % \tableofcontents |
508 | % \listoflistings | 529 | % \listoflistings |
@@ -2540,7 +2561,7 @@ argument of the | |||
2540 | % for languages that are written and read from right to left, like | 2561 | % for languages that are written and read from right to left, like |
2541 | % Arabic, Hebrew or Syriac. However, as \pkg{babel} is supported and | 2562 | % Arabic, Hebrew or Syriac. However, as \pkg{babel} is supported and |
2542 | % can be loaded concurrently with \pkg{polyglossia}, an easy way is to | 2563 | % can be loaded concurrently with \pkg{polyglossia}, an easy way is to |
2543 | % always use \pkg{babel} to print such languages. | 2564 | % use \pkg{babel} to print such languages. |
2544 | % | 2565 | % |
2545 | % \danger The reader is invited to refer to and become acquainted with | 2566 | % \danger The reader is invited to refer to and become acquainted with |
2546 | % the relevant parts of the documentation of the \pkg{babel} | 2567 | % the relevant parts of the documentation of the \pkg{babel} |
@@ -2580,13 +2601,13 @@ argument of the | |||
2580 | % when \cs{babelfont} is used. | 2601 | % when \cs{babelfont} is used. |
2581 | % \item Line~3 loads \pkg{babel} and instructs it to use English as | 2602 | % \item Line~3 loads \pkg{babel} and instructs it to use English as |
2582 | % the default language and ancient Greek as a second optional | 2603 | % the default language and ancient Greek as a second optional |
2583 | % language. As can be seen, the built-in |bidi| mechanism provided | 2604 | % language. The built-in |bidi| mechanism provided by \pkg{babel} is |
2584 | % by \pkg{babel} is not enabled. As a result, specific language | 2605 | % not enabled. As a result, specific language switching commands for |
2585 | % switching commands for Arabic must be defined just as it must be | 2606 | % Arabic must be defined just as it must be for every other |
2586 | % for every other language. | 2607 | % language. |
2587 | % \item Line~4 does not load any Arabic, but instructs \pkg{babel} | 2608 | % \item Line~4 does not load any Arabic, but instructs \pkg{babel} |
2588 | % that it should use the Arabic font that is set with \cs{babelfont} | 2609 | % that it should use the Arabic font that is set below with |
2589 | % whenever an Arabic letter is encountered. | 2610 | % \cs{babelfont} whenever an Arabic letter is encountered. |
2590 | % \item Lines~6--8 select the fonts: |Old Standard| is the default | 2611 | % \item Lines~6--8 select the fonts: |Old Standard| is the default |
2591 | % font to be used for Roman shape (l.~6); the same font is used for | 2612 | % font to be used for Roman shape (l.~6); the same font is used for |
2592 | % Greek, with some additional Open Type features enabled; finally, | 2613 | % Greek, with some additional Open Type features enabled; finally, |
@@ -2600,10 +2621,10 @@ argument of the | |||
2600 | % \item Finally, lines~13--14 define simple language switching | 2621 | % \item Finally, lines~13--14 define simple language switching |
2601 | % commands for Arabic. As can be seen, no commands other than the | 2622 | % commands for Arabic. As can be seen, no commands other than the |
2602 | % \LuaTeX\ primitives \cs{pardir} and \cs{textdir} have been used | 2623 | % \LuaTeX\ primitives \cs{pardir} and \cs{textdir} have been used |
2603 | % for \pkg{babel} takes care of selecting the Arabic font. \cs{RL} | 2624 | % for \pkg{babel} already takes care of selecting the Arabic |
2604 | % is for short insertions of Arabic words in English paragraphs | 2625 | % font. \cs{RL} is for short insertions of Arabic words in English |
2605 | % while \cs{begin}|{Arabic}| \dots\ \cs{end}|{Arabic}| is for | 2626 | % paragraphs while \cs{begin}|{Arabic}| \dots\ \cs{end}|{Arabic}| is |
2606 | % running paragraphs of Arabic text. | 2627 | % for running paragraphs of Arabic text. |
2607 | % \end{remarks} | 2628 | % \end{remarks} |
2608 | % | 2629 | % |
2609 | % \paragraph{Changing the Writing Direction} | 2630 | % \paragraph{Changing the Writing Direction} |
@@ -2681,7 +2702,7 @@ argument of the | |||
2681 | % | 2702 | % |
2682 | % It should be reminded that the writing direction of the apparatus | 2703 | % It should be reminded that the writing direction of the apparatus |
2683 | % criticus itself is independent of that of the edition text and must | 2704 | % criticus itself is independent of that of the edition text and must |
2684 | % be set either with \cs{Set(LTR{\textbar}RTL)app}, with the | 2705 | % be set either with \cs{Set(LTR{\textbar}RTL)app} or with the |
2685 | % |direction| optional argument of \cs{SetApparatus} for single-layer | 2706 | % |direction| optional argument of \cs{SetApparatus} for single-layer |
2686 | % apparatus criticus, or by means of \cs{DeclareApparatus} for | 2707 | % apparatus criticus, or by means of \cs{DeclareApparatus} for |
2687 | % multiple-layer apparatus criticus.\footnote{See above | 2708 | % multiple-layer apparatus criticus.\footnote{See above |
@@ -2689,7 +2710,7 @@ argument of the | |||
2689 | % \vref{sec:multilayer-apparatus} (multiple-layer apparatus | 2710 | % \vref{sec:multilayer-apparatus} (multiple-layer apparatus |
2690 | % criticus).} | 2711 | % criticus).} |
2691 | % | 2712 | % |
2692 | % PDF output with left-to-right apparatus criticus:--- | 2713 | % The PDF output with left-to-right apparatus criticus follows:--- |
2693 | % \medskip | 2714 | % \medskip |
2694 | % \resetlinenumber | 2715 | % \resetlinenumber |
2695 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] | 2716 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] |
@@ -2703,7 +2724,7 @@ argument of the | |||
2703 | % \end{specimen} | 2724 | % \end{specimen} |
2704 | % \end{alignment} | 2725 | % \end{alignment} |
2705 | % | 2726 | % |
2706 | % PDF output with right-to-left apparatus criticus:--- | 2727 | % And here is the PDF output with right-to-left apparatus criticus:--- |
2707 | % \medskip | 2728 | % \medskip |
2708 | % \resetlinenumber | 2729 | % \resetlinenumber |
2709 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] | 2730 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] |
@@ -2720,6 +2741,94 @@ argument of the | |||
2720 | % | 2741 | % |
2721 | % \subsection{Using \pkg{arabluatex}} | 2742 | % \subsection{Using \pkg{arabluatex}} |
2722 | % \label{sec:using-arabluatex} | 2743 | % \label{sec:using-arabluatex} |
2744 | % \pkg{arabluatex} is a \hologo{LuaLaTeX} package that provides | ||
2745 | % commands and environments which return Arabic writing from an ASCII | ||
2746 | % transliteration (either Arab\TeX\ or Buckwalter | ||
2747 | % schemes).\footcite{arabluatex} It is particularly well-suited for | ||
2748 | % complex documents such as critical editions where a lot of commands | ||
2749 | % intertwine with Arabic writing. \pkg{arabluatex} can output Unicode | ||
2750 | % Arabic in the same modes as \pkg{arabtex}\footcite{arabtex} or in | ||
2751 | % different accepted standards of romanization. It is also able to | ||
2752 | % produce a duplicate of the original |.tex| source file in which all | ||
2753 | % |arabtex| or |buckwalter| strings will have been replaced with | ||
2754 | % Unicode equivalents, either in Arabic script or in any accepted | ||
2755 | % standard of transliteration.\footcite[See][\mkbibquote{Exporting | ||
2756 | % Unicode Arabic to an External File}]{arabluatex} | ||
2757 | % | ||
2758 | % \pkg{arabluatex} is fully supported by \pkg{ekdosis}. The following | ||
2759 | % example illustrates how \pkg{arabluatex} and \pkg{ekdosis} interact | ||
2760 | % with each other to produce distinct \texttt{TEI xml} outputs from a | ||
2761 | % single |.tex| source file:--- | ||
2762 | % | ||
2763 | % \captof{\pkg{ekdosis} and \pkg{arabluatex}}[\label{lst:arabluatex-ekd}] | ||
2764 | % \iffalse | ||
2765 | %<*example> | ||
2766 | % \fi | ||
2767 | \begin{minted}{latex} | ||
2768 | % Preamble: | ||
2769 | % load ekdosis and ask for TEI xml output: | ||
2770 | \usepackage[teiexport]{ekdosis} | ||
2771 | % load arabluatex and ask for LaTeX ouput with Unicode Arabic: | ||
2772 | \usepackage[export,fullvoc]{arabluatex} | ||
2773 | |||
2774 | % document: | ||
2775 | \begin{arabexport} % export arabtex strings to Unicode Arabic | ||
2776 | \begin{ekdosis} | ||
2777 | \begin{arab} | ||
2778 | 'inna 'abI kAna mina | ||
2779 | \app{ | ||
2780 | \lem{'l-muqAtilaTi} | ||
2781 | \rdg{'l-muqAtilIna} | ||
2782 | } | ||
2783 | wa-kAnat 'ummI min `u.zamA'i buyUti 'l-zamAzimaTi. | ||
2784 | \end{arab} | ||
2785 | \end{ekdosis} | ||
2786 | \end{arabexport} | ||
2787 | \end{minted} | ||
2788 | % \iffalse | ||
2789 | %</example> | ||
2790 | % \fi | ||
2791 | % | ||
2792 | % The PDF output with left-to-right apparatus criticus is of course | ||
2793 | % the same as above:--- | ||
2794 | % \resetlinenumber | ||
2795 | % \begin{alignment}[flush,tcols=1,texts=specimen,apparatus=specimen] | ||
2796 | % \begin{specimen} | ||
2797 | % \begin{arab}[fullvoc] | ||
2798 | % 'inna 'abI kAna mina \app[type=ltr]{ | ||
2799 | % \lem{'l-muqAtilaTi} | ||
2800 | % \rdg{'l-muqAtilIna}} | ||
2801 | % wa-kAnat 'ummI min `u.zamA'i buyUti 'l-zamAzimaTi. | ||
2802 | % \end{arab} | ||
2803 | % \end{specimen} | ||
2804 | % \end{alignment} | ||
2805 | % | ||
2806 | % However, assuming that the source file is called |source.tex|, | ||
2807 | % \pkg{ekdosis} produces as instructed from this file an additional | ||
2808 | % |source-tei.xml| as follows:--- | ||
2809 | % | ||
2810 | % \iffalse | ||
2811 | %<*example> | ||
2812 | % \fi | ||
2813 | \begin{minted}[linenos=false]{xml} | ||
2814 | <p xml:lang="ar-Latn" type="transliterated" | ||
2815 | subtype="arabtex">'inna 'abI kAna mina | ||
2816 | <app> | ||
2817 | <lem>'l-muqAtilaTi</lem> | ||
2818 | <rdg>'l-muqAtilIna</rdg> | ||
2819 | </app>wa-kAnat 'ummI min `u.zamA'i buyUti | ||
2820 | 'l-zamAzimaTi.</p> | ||
2821 | \end{minted} | ||
2822 | % \iffalse | ||
2823 | %</example> | ||
2824 | % \fi | ||
2825 | % | ||
2826 | % While \pkg{arabluatex} is instructed to produce on his own from the | ||
2827 | % same |source.tex| an additional |source_out.tex| in which all | ||
2828 | % |arabtex| strings found within \cs{begin}|{arabexport}| \dots\ | ||
2829 | % \cs{end}|{arabexport}| (see \vref{lst:arabluatex-ekd}, ll.~9--19) | ||
2830 | % are replaced with full-vocalized Arabic Unicode strings. | ||
2831 | % | ||
2723 | % | 2832 | % |
2724 | % | 2833 | % |
2725 | % \section{To Be Continued...} | 2834 | % \section{To Be Continued...} |
@@ -6546,4 +6655,54 @@ end | |||
6546 | % \label{sec:caesar-gw-tei} | 6655 | % \label{sec:caesar-gw-tei} |
6547 | % \inputminted[linenos=false]{xml}{samples/Caesar_BG-6-13-1-tei.xml} | 6656 | % \inputminted[linenos=false]{xml}{samples/Caesar_BG-6-13-1-tei.xml} |
6548 | % | 6657 | % |
6658 | % \section{Arabic Sample File} | ||
6659 | % \label{sec:arabic-sample} | ||
6660 | % |arabic-sample.tex|:--- | ||
6661 | % \iffalse | ||
6662 | %<*example> | ||
6663 | % \fi | ||
6664 | \begin{minted}[linenos=false]{latex} | ||
6665 | % Instructions: | ||
6666 | % 1. Compile this file three times. | ||
6667 | % - Open arabic-sample.pdf and arabic-sample-tei.xml and see the | ||
6668 | % result. | ||
6669 | % 2. Compile arabic-sample_out.tex three times. | ||
6670 | % - Open arabic-sample_out.pdf and arabic-sample-out-tei.xml and | ||
6671 | % see the result. | ||
6672 | % | ||
6673 | \documentclass{article} | ||
6674 | |||
6675 | % The following three lines is only needed by the | ||
6676 | % 'arabic-sample_out.tex' that arabluatex is instructed to produce: | ||
6677 | \usepackage{babel} | ||
6678 | \babelprovide[onchar=fonts]{arabic} | ||
6679 | \babelfont[*arabic]{rm}{Amiri} | ||
6680 | |||
6681 | % instruct ekdosis to output TEI xml (arabic-sample-tei.xml): | ||
6682 | \usepackage[teiexport=tidy]{ekdosis} | ||
6683 | |||
6684 | % instruct arabluatex to ouput sample-arabic_out.tex with Unicode | ||
6685 | % Arabic strings in place of arabtex ASCII scheme: | ||
6686 | \usepackage[fullvoc,export]{arabluatex} | ||
6687 | |||
6688 | \begin{document} | ||
6689 | |||
6690 | \begin{arabexport} % export arabtex strings to Unicode Arabic | ||
6691 | \begin{ekdosis} | ||
6692 | \begin{arab} | ||
6693 | 'inna 'abI kAna mina | ||
6694 | \app{ | ||
6695 | \lem{'l-muqAtilaTi} | ||
6696 | \rdg{'l-muqAtilIna} | ||
6697 | } | ||
6698 | wa-kAnat 'ummI min `u.zamA'i buyUti 'l-zamAzimaTi. | ||
6699 | \end{arab} | ||
6700 | \end{ekdosis} | ||
6701 | \end{arabexport} | ||
6702 | \end{document} | ||
6703 | \end{minted} | ||
6704 | % \iffalse | ||
6705 | %</example> | ||
6706 | % \fi | ||
6707 | % | ||
6549 | \endinput | 6708 | \endinput |