diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-08-28 17:58:12 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-08-28 17:58:12 +0200 |
commit | b788d7f1155c13a52f286d2d64fa7106f5d8ba4d (patch) | |
tree | c31ec24e727a44b5416b305e7f2b8b2869638962 | |
parent | 0906d0466f7ac7a936bcc61cb9deaf199ed5204c (diff) | |
download | arabluatex-b788d7f1155c13a52f286d2d64fa7106f5d8ba4d.tar.gz |
include only source code in samples/exporting.tex
-rw-r--r-- | samples/exporting.tex | 112 |
1 files changed, 44 insertions, 68 deletions
diff --git a/samples/exporting.tex b/samples/exporting.tex index 0d2424b..ad2b3e5 100644 --- a/samples/exporting.tex +++ b/samples/exporting.tex | |||
@@ -13,51 +13,34 @@ | |||
13 | {\textquotedblright}{\textquotedblleft} | 13 | {\textquotedblright}{\textquotedblleft} |
14 | {\textquoteright}{\textquoteleft} | 14 | {\textquoteright}{\textquoteleft} |
15 | 15 | ||
16 | \PassOptionsToPackage{pdfa}{hyperref} | ||
17 | \usepackage{hyperxmp} | ||
18 | \usepackage{hyperref} | ||
19 | \hypersetup{colorlinks, linkcolor=blue, pdfauthor={Robert | ||
20 | Alessi}} | ||
21 | \title{\large Exporting Unicode Arabic to an external .tex | ||
22 | source file} | ||
23 | |||
24 | \author{} | ||
25 | \date{} | ||
26 | |||
27 | \usepackage{xcolor} | ||
28 | \usepackage[outputdir=TMP]{minted} | ||
29 | \definecolor{bg}{rgb}{0.95,0.95,0.95} | ||
30 | |||
31 | \usepackage{ccicons} | ||
32 | \usepackage{paralist} | ||
33 | |||
34 | % \renewcommand{\txarb}[1]{#1} | 16 | % \renewcommand{\txarb}[1]{#1} |
35 | % \renewcommand{\txtrans}[1]{\emph{#1}} | 17 | % \renewcommand{\txtrans}[1]{\emph{#1}} |
36 | % \renewcommand{\aemph}[1]{#1} | 18 | % \renewcommand{\aemph}[1]{#1} |
37 | % \renewcommand{\arbup}[1]{\textsuperscript{#1}} | 19 | % \renewcommand{\arbup}[1]{\textsuperscript{#1}} |
38 | \end{filecontents*} | 20 | \end{filecontents*} |
39 | \begin{filecontents*}{exporting-dajaja.tex} | 21 | \begin{filecontents*}{exporting-dajaja.tex} |
22 | \begin{arabexport} | ||
40 | \section*{Unicode Arabic} | 23 | \section*{Unicode Arabic} |
41 | \setquotestyle{arabic} | 24 | \setquotestyle{arabic} |
42 | \begin{arab} | 25 | \begin{arab} |
43 | kAna \uc{'a}bU 'l-\uc{h}u_dayli 'ahd_A 'il_A | 26 | kAna \uc{'a}bU 'l-\uc{h}u_dayli 'ahd_A 'il_A |
44 | \uc{m}uwaysiN dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI | 27 | \uc{m}uwaysiN dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI |
45 | 'ahdA-hA dUna mA kAna yuttaxa_du | 28 | 'ahdA-hA dUna mA kAna yuttaxa_du |
46 | li-\uc{m}uwaysiN. wa-l_akinna-hu bi-karami-hi | 29 | li-\uc{m}uwaysiN. wa-l_akinna-hu bi-karami-hi |
47 | wa-bi-.husni _hu\-luqi-hi 'a.zhara 'l-ta`ajjuba min | 30 | wa-bi-.husni _hu\-luqi-hi 'a.zhara 'l-ta`ajjuba min |
48 | simani-hA wa-.tIbi la.hmi-hA. wa-kAna <\uc{'a}bU | 31 | simani-hA wa-.tIbi la.hmi-hA. wa-kAna <\uc{'a}bU |
49 | 'l-\uc{h}u_dayli> yu`rafu bi-'l-'imsAki | 32 | 'l-\uc{h}u_dayli> yu`rafu bi-'l-'imsAki |
50 | 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA | 33 | 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA |
51 | \uc{'a}bA \uc{`i}mrAna tilka 'l-dajA\-jaTa?} qAla: | 34 | \uc{'a}bA \uc{`i}mrAna tilka 'l-dajA\-jaTa?} qAla: |
52 | \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: | 35 | \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: |
53 | \enquote{wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? | 36 | \enquote{wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? |
54 | fa-'inna 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi | 37 | fa-'inna 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi |
55 | wa-'l-sinni. wa-tadrI bi-'ayyi ^say'iN kunnA | 38 | wa-'l-sinni. wa-tadrI bi-'ayyi ^say'iN kunnA |
56 | nusamminu-hA? wa-fI 'ayyi makAniN kunnA | 39 | nusamminu-hA? wa-fI 'ayyi makAniN kunnA na`lifu-hA?} |
57 | na`lifu-hA?} fa-lA yazAlu fI h_a_dA wa-'l-'A_haru | 40 | fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN |
58 | ya.d.haku .da.hkaN na`rifu-hu na.hnu wa-lA ya`rifu-hu | 41 | na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'a}bU |
59 | \uc{'a}bU 'l-\uc{h}u_dayli. | 42 | 'l-\uc{h}u_dayli. |
60 | \end{arab} | 43 | \end{arab} |
61 | 44 | ||
62 | \begin{arab} | 45 | \begin{arab} |
63 | wa-kAna \uc{'a}bU 'l-\uc{h}u_dayli 'aslama 'l-nAsi | 46 | wa-kAna \uc{'a}bU 'l-\uc{h}u_dayli 'aslama 'l-nAsi |
@@ -74,8 +57,8 @@ | |||
74 | 'l-^sa.hmi, qAla: \enquote{`u_dUbaTu 'l-^sa.hmi fI | 57 | 'l-^sa.hmi, qAla: \enquote{`u_dUbaTu 'l-^sa.hmi fI |
75 | 'l-baqari wa-'l-ba.t.ti wa-bu.tUni 'l-samaki | 58 | 'l-baqari wa-'l-ba.t.ti wa-bu.tUni 'l-samaki |
76 | wa-'l-dajAji, wa-lA siyyamA _d_alika 'l-jinsu mina | 59 | wa-'l-dajAji, wa-lA siyyamA _d_alika 'l-jinsu mina |
77 | 'l-dajAji.} wa-'in _dakarUA mIlAda ^say'iN 'aw qudUma | 60 | 'l-dajAji.} wa-'in _dakarUA mIlAda ^say'iN 'aw |
78 | 'insAniN, qAla: \enquote{kAna _d_alika ba`da 'an | 61 | qudUma 'insAniN, qAla: \enquote{kAna _d_alika ba`da 'an |
79 | 'ahdaytu-hA la-ka bi-sanaTiN, wa-mA kAna bayna qudUmi | 62 | 'ahdaytu-hA la-ka bi-sanaTiN, wa-mA kAna bayna qudUmi |
80 | fulAniN wa-bayna 'l-ba`_taTi bi-tilka 'l-dajAjaTi | 63 | fulAniN wa-bayna 'l-ba`_taTi bi-tilka 'l-dajAjaTi |
81 | 'illA yawmuN.} wa-kAnat ma_ta\-laN fI kulli ^say'iN | 64 | 'illA yawmuN.} wa-kAnat ma_ta\-laN fI kulli ^say'iN |
@@ -90,25 +73,25 @@ | |||
90 | 73 | ||
91 | \section*{Romanized Arabic} | 74 | \section*{Romanized Arabic} |
92 | \setquotestyle{english} | 75 | \setquotestyle{english} |
93 | \begin{arab}[trans] | 76 | \begin{arab}[trans] |
94 | kAna \uc{'a}bU 'l-\uc{h}u_dayli 'ahd_A 'il_A | 77 | kAna \uc{'a}bU 'l-\uc{h}u_dayli 'ahd_A 'il_A |
95 | \uc{m}uwaysiN dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI | 78 | \uc{m}uwaysiN dajAjaTaN. wa-kAnat dajAjatu-hu 'llatI |
96 | 'ahdA-hA dUna mA kAna yuttaxa_du | 79 | 'ahdA-hA dUna mA kAna yuttaxa_du |
97 | li-\uc{m}uwaysiN. wa-l_akinna-hu bi-karami-hi | 80 | li-\uc{m}uwaysiN. wa-l_akinna-hu bi-karami-hi |
98 | wa-bi-.husni _hu\-luqi-hi 'a.zhara 'l-ta`ajjuba min | 81 | wa-bi-.husni _hu\-luqi-hi 'a.zhara 'l-ta`ajjuba min |
99 | simani-hA wa-.tIbi la.hmi-hA. wa-kAna <\uc{'a}bU | 82 | simani-hA wa-.tIbi la.hmi-hA. wa-kAna <\uc{'a}bU |
100 | 'l-\uc{h}u_dayli> yu`rafu bi-'l-'imsAki | 83 | 'l-\uc{h}u_dayli> yu`rafu bi-'l-'imsAki |
101 | 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA | 84 | 'l-^sadIdi. fa-qAla: \enquote{wa-kayfa ra'ayta yA |
102 | \uc{'a}bA \uc{`i}mrAna tilka 'l-dajA\-jaTa?} qAla: | 85 | \uc{'a}bA \uc{`i}mrAna tilka 'l-dajA\-jaTa?} qAla: |
103 | \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: | 86 | \enquote{kAnat `ajabaN mina 'l-`ajabi!} fa-yaqUlu: |
104 | \enquote{wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? | 87 | \enquote{wa-tadrI mA jinsu-hA? wa-tadrI mA sinnu-hA? |
105 | fa-'inna 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi | 88 | fa-'inna 'l-dajAjaTa 'inna-mA ta.tIbu bi-'l-jinsi |
106 | wa-'l-sinni. wa-tadrI bi-'ayyi ^say'iN kunnA | 89 | wa-'l-sinni. wa-tadrI bi-'ayyi ^say'iN kunnA |
107 | nusamminu-hA? wa-fI 'ayyi makAniN kunnA | 90 | nusamminu-hA? wa-fI 'ayyi makAniN kunnA na`lifu-hA?} |
108 | na`lifu-hA?} fa-lA yazAlu fI h_a_dA wa-'l-'A_haru | 91 | fa-lA yazAlu fI h_a_dA wa-'l-'A_haru ya.d.haku .da.hkaN |
109 | ya.d.haku .da.hkaN na`rifu-hu na.hnu wa-lA ya`rifu-hu | 92 | na`rifu-hu na.hnu wa-lA ya`rifu-hu \uc{'a}bU |
110 | \uc{'a}bU 'l-\uc{h}u_dayli. | 93 | 'l-\uc{h}u_dayli. |
111 | \end{arab} | 94 | \end{arab} |
112 | 95 | ||
113 | \begin{arab}[trans] | 96 | \begin{arab}[trans] |
114 | wa-kAna \uc{'a}bU 'l-\uc{h}u_dayli 'aslama 'l-nAsi | 97 | wa-kAna \uc{'a}bU 'l-\uc{h}u_dayli 'aslama 'l-nAsi |
@@ -138,6 +121,7 @@ | |||
138 | \begin{arab}[trans] | 121 | \begin{arab}[trans] |
139 | \uc{al-jA.hi.zu}, \aemph{\uc{k}itAbu 'l-\uc{b}u_halA'i} | 122 | \uc{al-jA.hi.zu}, \aemph{\uc{k}itAbu 'l-\uc{b}u_halA'i} |
140 | \end{arab} | 123 | \end{arab} |
124 | \end{arabexport} | ||
141 | \end{filecontents*} | 125 | \end{filecontents*} |
142 | \documentclass[12pt]{article} | 126 | \documentclass[12pt]{article} |
143 | 127 | ||
@@ -179,9 +163,8 @@ | |||
179 | file is public domain | 163 | file is public domain |
180 | 164 | ||
181 | \begin{compactenum} | 165 | \begin{compactenum} |
182 | \item Copy the source code of this file from pages | 166 | \item Copy the source code below, paste it into your |
183 | \pageref{ref:source-begin}--\pageref{ref:source-end}, | 167 | favorite tex editor and save it as |
184 | paste it into your favorite tex editor and save it as | ||
185 | \verb|exporting.tex|. | 168 | \verb|exporting.tex|. |
186 | \item In the preamble, set \verb|export=true| in | 169 | \item In the preamble, set \verb|export=true| in |
187 | \textsf{arabluatex} global options (line 3). | 170 | \textsf{arabluatex} global options (line 3). |
@@ -204,13 +187,6 @@ pandoc exporting_out_out.tex -s -o exporting.odt | |||
204 | and open the resulting \verb|exporting.odt| file with LibreOffice. | 187 | and open the resulting \verb|exporting.odt| file with LibreOffice. |
205 | \end{compactenum} | 188 | \end{compactenum} |
206 | 189 | ||
207 | |||
208 | \begin{arabexport} | ||
209 | |||
210 | \input{exporting-dajaja} | ||
211 | |||
212 | \end{arabexport} | ||
213 | |||
214 | \phantomsection | 190 | \phantomsection |
215 | \section*{Source code} | 191 | \section*{Source code} |
216 | \label{ref:source-begin} | 192 | \label{ref:source-begin} |