[XeTeX] Performance of ucharclasses
Vafa Khalighi
vafaklg at gmail.com
Sun Oct 23 09:16:08 CEST 2011
No, the license of the package in not LPPL. In fact, it is non-free and that
is why it is not included in TeXLive. The README in "License" section says:
You
may freely use this package, but you are discouraged from
modifying this package and then redistributing it. Instead,
please contact me (ideally on the XeTeX mailing list) and
we can discuss the changes you wish to make. If they
benefit everyone, they will be worked in as a new version.
Instead, you can create your own package which can be loaded on top of
uchar.....sty or you can put your changes at the preamble of your
document.
On Sun, Oct 23, 2011 at 6:14 AM, Bruno Le Floch <blflatex at gmail.com> wrote:
> Hello all,
>
> Loading the ucharclasses package with no option is extremely slow (>
> 2min on my installation), because it loads every Unicode block (as
> documented).
>
> The performance can be significantly improved by using lower-level
> code for the loops. For instance, using the following helper macro
> (not quite optimized for speed, because I wanted to remain reasonably
> close to the original \forloop syntax):
>
> \newcommand{\@ucc at forloop}[1]
> {\expandafter\@ucc at forloop@\csname c@#1\endcsname}
> \newcommand{\@ucc at forloop@}[4]{%
> #1=#2\relax
> \loop
> #4\relax
> \ifnum#1<#3\relax
> \advance#1 by \@ne
> \repeat
> }
>
> we can replace the definition of `\@defineUnicodeClass` by
>
> \newcounter{glyphcounter}
> \newcommand{\@defineUnicodeClass}[3]{%
> \newXeTeXintercharclass#1
> \@ucc at forloop {glyphcounter}{#2}{#3}
> {\XeTeXcharclass\value{glyphcounter}=#1}
> }
>
> (in other words, change the \forloop line). All other \forloop can be
> replaced in a similar way, giving rise to a 10 fold speed improvement
> at least.
>
> This post stems from an [answer I gave on the TeX.stackexchange
> network](
> http://tex.stackexchange.com/questions/32351/is-there-a-way-to-speed-up-the-use-of-ucharclasses/32379#32379
> ).
> Is that answer "legal", given the license of the package, or should I
> delete it?
>
> Regards,
> Bruno
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20111023/a89d7495/attachment.html>
More information about the XeTeX
mailing list