Menu
CTAN
Comprehensive TeX Archive Network
Cover Upload Browse

Direc­tory tex-archive/macros/xetex/latex/ucharclasses

              ucharclasses package for XeLaTex
              --------------------------------
              Michiel Kamermans, October 2011

The brief
---------

 Sometimes you don't want to have to bother with font
 switching just because you're using languages that are
 distinct enough to use different unicode blocks, but
 aren't covered by the polyglossia package. Where normal
 word processing packages such as Microsoft Word or
 OpenOffice Writer handle this for you, LATEX (because it
 needs you to tell it what to do) has no default behaviour
 for this, and so we arrive at a need for a package that
 does this for us. You probably already discovered that
 regular LATEX has no understanding of unicode, and ended
 up going for Xe(La)TeX as your TeX compiler of choice,
 which means you now have two excellent resources available:
 fontspec, and ucharclasses.

 The first of these lets you pick fonts based on what your
 system calls them, without needing to do anything special
 such as turning them into metafonts. This is convenient,
 user friendly, and the way of the future (at least, it
 should be).

 The second lets you define what should happen when your
 text changes from a character in one unicode block, to a
 character in another. This is also convenient, and paired
 with fontspec it offers automatic font switching in the
 same way that normal Office applications perform, with
 one big difference: you stay in control. If at some point
 you need the switch rule to do something different,
 you will be out of luck using an Office application.
 In Xe(La)TeX, you stay on top of things and still get to
 say exactly what happens, and when.

So what is it?
--------------

 This package sets up XeTeX character classes based on
 which  unicode block a character is found in. It then
 allows transition rules to be defined when entering or
 leaving particular unicode blocks, the code of which
 gets inserted automatically when a transition from a
 character from one unicode block to a character from
 another unicode block is encountered by XeTeX

 Current compatibility should be Unicode 6.0, although
 I may have missed one or more blocks that were added
 between 5 and 6.

Credits?
--------

 v1.0: Mike "Pomax" Kamermans
 v2.0: rewritten by Enrico Gregorio

License?
--------

 Public Domain
 http://www.tex.ac.uk/CTAN/help/Catalogue/licenses.pd.html


Repository?
-----------

 https://github.com/Pomax/ucharclasses

Files

Name Size Date Notes
README 2445 2012-09-25 12:42
ucharclasses.pdf 161734 2012-09-25 07:11
ucharclasses.sty 22135 2012-09-25 07:09
ucharclasses.tex 20772 2012-09-25 07:11

Down­load the con­tents of this pack­age in one zip archive (154.8k).

uchar­classes – Font ac­tions in XTeX ac­cord­ing to what is be­ing pro­cessed

The pack­age takes care of switch­ing fonts when you switch from one Uni­code block to an­other in the text of a doc­u­ment. This way, you can write a doc­u­ment with no ex­plicit font se­lec­tion, but a se­ries of rules of the form “when en­ter­ing block …, switch font to use …”.

Pack­age De­tailsuchar­classes
Ver­sion2.0
Li­censePublic Do­main Soft­ware
Copy­right2010 Michiel Kamer­mans
Main­tainerMike Kamer­mans
Con­tained inTeXlive as uchar­classes
MikTeX as uchar­classes
Topics met­rics, macro in­can­ta­tions and other font sup­port
XTeX, ma­te­rial sup­port­ing it, and pack­ages re­quir­ing it
Guest Book Sitemap Contact