summaryrefslogtreecommitdiff
path: root/macros/xetex/latex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-05-08 03:02:15 +0000
committerNorbert Preining <norbert@preining.info>2020-05-08 03:02:15 +0000
commit8b5866024fec68c13a91973cc6cfc2cb5697baba (patch)
tree6abad841dced763b6ee50ae5bb83fc50d8816ca1 /macros/xetex/latex
parent56bd1f5b8377f54b4af39a114362a7762d27f13c (diff)
CTAN sync 202005080302
Diffstat (limited to 'macros/xetex/latex')
-rw-r--r--macros/xetex/latex/xepersian-hm/doc-samples-glyph.pdfbin0 -> 63436 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/doc-samples-hrule.pdfbin0 -> 62967 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/doc-samples-xep.pdfbin0 -> 65545 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-glyph-example.pdfbin91744 -> 91742 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-glyph-example.tex2
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-hrule-example.pdfbin90703 -> 90706 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-hrule-example.tex2
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.pdfbin0 -> 78687 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.tex71
-rw-r--r--macros/xetex/latex/xepersian-hm/xepersian-hm-doc.ltx79
-rw-r--r--macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdfbin46065 -> 240878 bytes
-rw-r--r--macros/xetex/latex/xepersian-hm/xepersian-hm.dtx22
-rw-r--r--macros/xetex/latex/xepersian-hm/xepersian-hm.pdfbin55345 -> 55239 bytes
13 files changed, 163 insertions, 13 deletions
diff --git a/macros/xetex/latex/xepersian-hm/doc-samples-glyph.pdf b/macros/xetex/latex/xepersian-hm/doc-samples-glyph.pdf
new file mode 100644
index 0000000000..35eb72dd7a
--- /dev/null
+++ b/macros/xetex/latex/xepersian-hm/doc-samples-glyph.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/doc-samples-hrule.pdf b/macros/xetex/latex/xepersian-hm/doc-samples-hrule.pdf
new file mode 100644
index 0000000000..783decc2cd
--- /dev/null
+++ b/macros/xetex/latex/xepersian-hm/doc-samples-hrule.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/doc-samples-xep.pdf b/macros/xetex/latex/xepersian-hm/doc-samples-xep.pdf
new file mode 100644
index 0000000000..37ae4f5e1c
--- /dev/null
+++ b/macros/xetex/latex/xepersian-hm/doc-samples-xep.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/kashida-glyph-example.pdf b/macros/xetex/latex/xepersian-hm/kashida-glyph-example.pdf
index 91047f8cec..77033af7c5 100644
--- a/macros/xetex/latex/xepersian-hm/kashida-glyph-example.pdf
+++ b/macros/xetex/latex/xepersian-hm/kashida-glyph-example.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/kashida-glyph-example.tex b/macros/xetex/latex/xepersian-hm/kashida-glyph-example.tex
index 299b605aa7..4bcbcfc66c 100644
--- a/macros/xetex/latex/xepersian-hm/kashida-glyph-example.tex
+++ b/macros/xetex/latex/xepersian-hm/kashida-glyph-example.tex
@@ -1,4 +1,4 @@
-% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} % Load xepersian with a few options
+% \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian} % Load xepersian with a few options
\documentclass{report}
% \textwidth=345.0pt
% \textheight=550.0pt
diff --git a/macros/xetex/latex/xepersian-hm/kashida-hrule-example.pdf b/macros/xetex/latex/xepersian-hm/kashida-hrule-example.pdf
index 865d7a3551..6cf4f8078c 100644
--- a/macros/xetex/latex/xepersian-hm/kashida-hrule-example.pdf
+++ b/macros/xetex/latex/xepersian-hm/kashida-hrule-example.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/kashida-hrule-example.tex b/macros/xetex/latex/xepersian-hm/kashida-hrule-example.tex
index 64926c354a..48894d1413 100644
--- a/macros/xetex/latex/xepersian-hm/kashida-hrule-example.tex
+++ b/macros/xetex/latex/xepersian-hm/kashida-hrule-example.tex
@@ -1,4 +1,4 @@
-% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian} % Load xepersian with a few options
+% \PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian} % Load xepersian with a few options
\documentclass{report}
% \textwidth=345.0pt
% \textheight=550.0pt
diff --git a/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.pdf b/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.pdf
new file mode 100644
index 0000000000..a35eef3bcd
--- /dev/null
+++ b/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.tex b/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.tex
new file mode 100644
index 0000000000..f623cb26e6
--- /dev/null
+++ b/macros/xetex/latex/xepersian-hm/kashida-xep-XB-example.tex
@@ -0,0 +1,71 @@
+\documentclass{report}
+\usepackage[Kashida=on]{xepersian}
+\settextfont[Scale=4.5]{XB Kayhan}
+\setlatintextfont[Scale=1.5,Colour=0000FF]{XB Kayhan}
+
+\defpersianfont\XBKayhanIt[Scale=4.5]{XB Kayhan Italic}
+\defpersianfont\XBKayhanOb[Scale=4.5]{XB Zar Oblique}
+\defpersianfont\XBKayhanOl[Scale=4.5]{XB Kayhan Pook}
+\defpersianfont\XBKayhanSd[Scale=4.5]{XB Kayhan Sayeh}
+
+\def\SampleText{
+ راهی جایی تابی چاپی چاههی تلاشهایی
+ شتابهایی تابی چاپی راهی تلاشهــایی
+ که کتابهایی که کلاههایی که کتابهایی }
+
+\setlength\parindent{0pt}
+\pagestyle{empty}
+
+\begin{document}
+
+\begin{latin}
+\begin{center}
+\Huge\textsf{xepersian}\vspace{20pt}\\ Example of Use\vspace{20pt}\\ \texttt{Kashida=hrule} \vspace{40pt}
+
+{\Large
+\begin{tabular}{ll}
+ \textsf{Font:} & \textsf{XB Kayhan} \\
+ \textsf{Font Scale:} & \texttt{4.5} \\
+\end{tabular}
+}
+\end{center}
+
+\end{latin}
+
+\newpage
+
+\KashidaOff{\hfill\lr{(Kashida Off, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Regular)}\hfill}
+
+\SampleText
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Italic)}\hfill}
+
+{\XBKayhanIt \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Oblique)}\hfill}
+
+{\XBKayhanOb \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Pook)}\hfill}
+
+{\XBKayhanOl \SampleText}
+
+\newpage
+
+\KashidaOn{\hfill\lr{(Kashida On, Sayeh)}\hfill}
+
+{\XBKayhanSd \SampleText}
+
+\end{document}
diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.ltx b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.ltx
index 1a2d88f8aa..ba04fee903 100644
--- a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.ltx
+++ b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.ltx
@@ -8,8 +8,11 @@
%% this license is at: http://www.latex-project.org/lppl.txt
%%
\documentclass{ltxdoc}
+\usepackage{graphicx}
\usepackage{longtable}
\usepackage{hypdoc}
+\usepackage{xepersian-hm}
+\settextfont[Scale=1]{HM XKayhan}
\title{
The \textsf{xepersian-hm} package\\Fixing kashida in xepersian\\User Documentation
@@ -24,9 +27,12 @@
}
}
-\date{Released \quad 2020-05-01 \quad v0.5c}
+\date{Released \quad 2020-05-07 \quad v0.5d}
+\let\tmpthepage\thepage
+\renewcommand{\thepage}{\lr{\Large\textbf\tmpthepage}}
\begin{document}
+\begin{latin}
\maketitle
@@ -49,6 +55,61 @@ I will do my best to fix all the bugs you report, but, unfortunately,
time is a big hurdle to overcome; so, my apologies in advance for those
which I cannot make time to fix.
+\section{Brief outline of the issues}
+
+Kashida is one of the most important features that must be included in any
+Persian typesetter. In xepersian this feature is implemented but with some
+problems. These problems along withe fixes in xepersian-hm are briefly:
+
+\newcounter{bean}
+ \begin{list}{P-\Roman{bean}}{\usecounter{bean}\setlength{\rightmargin}{\leftmargin}}
+ \item In \textsf{xepersian} overlapping of glyphs occurs in letter
+ combinations such as "\rl{‏ب‍ + ‍ی‏}", "\rl{‏ت‍ + ‍ی‏}", and
+ "\rl{‏پ‍ + ‍ی‏}" because the character
+ \textsf{U+FEF0 (ARABIC LETTER FARSI YEH FINAL FORM)} is replaced with
+ another character. This is fixed by modifying the fixed part of the
+ glue inserted between the consecutive characters. Furthermore, both,
+ the fixed and the stretchable parts of the glue can be changed by the
+ user.
+ \item In letter combinations such as "\rl{‏ه‍ + ‍ی‏}", in \textsf{xepersian},
+ the character \textsf{U+FEEB (ARABIC LETTER HEH INITIAL FORM)} is
+ replaced with \textsf{U+06BE (ARABIC LETTER HEH DOACHASHEMEE)}. This
+ is fixed by inserting the character \textsf{U+200E} before the
+ combination "\textsf{U+200D + hrule + U+200D}" which is used as
+ stretching item.
+ \item In \textsf{xepersian} when outline or shadow fonts are used, the gaps
+ filled by horizontal rule appears as a solid box. This is fixed by
+ using the \textsf{kashida} glyph instead of the horizontal rule in
+ \textsf{xepersian-hm}.
+ \item If italic or oblique style of some fonts such as \textsf{X Series 2}
+ is used in \textsf{xepersian}, an extra gap is left between the
+ stretched characters. This is fixed in \textsf{HM Series} fonts.
+\end{list}
+
+For comparing the outputs of \textsf{xepersian} and \textsf{xepersian-hm} with
+a variety of options available to these packages, please see the
+\mbox{Figure \ref{fig:xepersian-XB}},
+\mbox{Figure \ref{fig:xepersian-hm-hrule}}, and
+\mbox{Figure \ref{fig:xepersian-hm-glyph}}.
+
+\begin{figure}
+ \centerline{\includegraphics[scale=1]{doc-samples-xep.pdf}}
+ \caption{Package: \textsf{xeprsian}, Font: \textsf{XB Kayhan}, \textsf{Scale=4.5}, \textsf{Kashida=0n}}
+ \label{fig:xepersian-XB}
+\end{figure}
+
+\begin{figure}
+ \centerline{\includegraphics[scale=1]{doc-samples-hrule.pdf}}
+ \caption{Package: \textsf{xeprsian-hm}, Font: \textsf{HM XKayhan}, \textsf{Scale=4.5}, \textsf{Kashida=hrule}}
+ \label{fig:xepersian-hm-hrule}
+\end{figure}
+
+\begin{figure}
+ \centerline{\includegraphics[scale=1]{doc-samples-glyph.pdf}}
+ \caption{Package: \textsf{xeprsian-hm}, Font: \textsf{HM XKayhan}, \textsf{Scale=4.5}, \textsf{Kashida=glyph}}
+ \label{fig:xepersian-hm-glyph}
+\end{figure}
+
\section{Package loading and options}
Please note that \textsf{xepersian-hm} loads \textsf{xepersian} automatically,
@@ -56,7 +117,7 @@ so you may only pass options to the package using the command
\verb|\PassOptionsToPackage| before \verb|\documentclass|. For example:
\begin{verbatim}
-\PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian}
+\PassOptionsToPackage{debugfootnotedirection=off,localise=off}{xepersian}
\documentclass{report}
\usepackage{xcolor}
\usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}
@@ -77,7 +138,8 @@ The options available in \textsf{xepersian-hm} are:
xelatex kashida-example.tex}
Please note that this feature is still experimental and is not regarded as stable.
- If you are going to use this option be ready for unpredictable results.
+ If you are going to use this option be ready for unpredictable results. Note that
+ the value of \texttt{Kashida} is mandatory.
\item \texttt{hrule}: \\
which uses a horizontal rule (\verb|\hrule|) to stretch the text.
@@ -154,6 +216,17 @@ The options available in \textsf{xepersian-hm} are:
\texttt{\bslash discouragebadlinebreaks[9][0.12 em plus 0.5 em]\{\dots\}}
\end{description}
+
+\section{Important notes}
+
+\begin{description}
+ \item Kashida and ligatures:
+
+ The method used to implement kashida feature breaks a ligature if it is applied to the letters which are joined to form
+ the ligature.
+\end{description}
+
+\end{latin}
\end{document}
%%
%%
diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf
index cc80a88443..f1f5e0dad2 100644
--- a/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf
+++ b/macros/xetex/latex/xepersian-hm/xepersian-hm-doc.pdf
Binary files differ
diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx b/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx
index 0cf960fe36..5e2ac7ef40 100644
--- a/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx
+++ b/macros/xetex/latex/xepersian-hm/xepersian-hm.dtx
@@ -67,7 +67,7 @@ make time to fix.
% }^^A
% }
%
-% \date{Released \quad 2020-05-01 \quad v0.5c}
+% \date{Released \quad 2020-05-07 \quad v0.5d}
%
% \maketitle
%
@@ -96,7 +96,7 @@ make time to fix.
\RequirePackage{zref-savepos}[2020-03-03]
\RequirePackage{xepersian}
\ExplSyntaxOn
-\ProvidesExplPackage {xepersian-hm} {2020-05-01} {0.5c} { Fixes~issues~in~xepersian~package }
+\ProvidesExplPackage {xepersian-hm} {2020-05-07} {0.5d} { Fixes~issues~in~xepersian~package }
\int_const:Nn \c_xephm_ksh_int {"0640} % kashida
\int_const:Nn \c_xephm_lrm_int {"200E} % left-right-mark
@@ -175,14 +175,19 @@ make time to fix.
\tl_set:Nn \l_xephm_default_tl { default }
\tl_set:Nn \l_xephm_noskip_tl { noskip }
-\msg_new:nnx { xepersian-hm } { kashida-character-is-not-available-in-the-main-font }
+\msg_new:nnn { xepersian-hm } { kashida-character-is-not-available-in-the-main-font }
{
Sorry,~ kashida~ character~ is~ not~ available~ in~ the~ main~ font~!
}
-\msg_new:nnx { xepersian-hm } { value-not-available-for-kashida-option }
+\msg_new:nnn { xepersian-hm } { value-not-available-for-kashida-option }
{
- Sorry,~ value~ `\l_xephm_gap_filler_tl'~ is~ not~ available~ for~ kashida~ option~ yet~!
+ Sorry,~ value~ `#1'~ is~ not~ available~ for~ `Kashida'~ option~ yet~!
+ }
+
+\msg_new:nnn { xepersian-hm } { specify-value-for-kashida-option }
+ {
+ Sorry,~ you~ must~ specify~ a~ value~ for~ `Kashida'~ option~ yet~!
}
\keys_define:nn { xepersian-hm }
@@ -211,7 +216,8 @@ make time to fix.
{
\tl_set:Nn \l_xephm_gap_filler_tl { \l_xephm_stretch_hrule_tl }
}
- } { } { \tl_set:Nn \l_xephm_filler_default_tl { #1 } }
+ } { } { \tl_set:Nx \l_xephm_gap_filler_tl { #1 } }
+ \tl_if_empty:NT \l_xephm_gap_filler_tl { \msg_error:nn { xepersian-hm } { specify-value-for-kashida-option } }
\bool_set_true:N \l_xephm_kashida_hm_fix_bool
\tex_input:D { kashida-xepersian-hm.def }
} ,
@@ -282,7 +288,7 @@ make time to fix.
% \begin{macrocode}
%<*kashida-xepersian-hm-def>
\ExplSyntaxOn
-\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-01} {0.5c} { Fixes~implementation~of~Kashida~in~xepersian~package }
+\ProvidesExplFile {kashida-xepersian-hm.def} {2020-05-07} {0.5d} { Fixes~implementation~of~Kashida~in~xepersian~package }
\newXeTeXintercharclass \c_xephm_d_charclass % dual-joiner class
\newXeTeXintercharclass \c_xephm_l_charclass % lam
@@ -499,7 +505,7 @@ make time to fix.
\XeTeXinterchartoks \c_xephm_l_charclass \c_xephm_a_charclass =
{ }
}
- } { } { \msg_error:nn { xepersian-hm } { value-not-available-for-kashida-option } }
+ } { } { \msg_error:nnx { xepersian-hm } { value-not-available-for-kashida-option } { \l_xephm_gap_filler_tl } }
\NewDocumentCommand \KashidaHMFixOn {} { \bool_set_true:N \l_xephm_kashida_hm_fix_bool }
\NewDocumentCommand \KashidaHMFixOff {} { \bool_set_false:N \l_xephm_kashida_hm_fix_bool }
diff --git a/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf b/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf
index b460f20455..fd7f043992 100644
--- a/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf
+++ b/macros/xetex/latex/xepersian-hm/xepersian-hm.pdf
Binary files differ