Comprehensive TeX Archive Network

Direc­tory tex-archive/macros/latex/contrib/xcjk2uni

The `xCJK2uni` package provides commands to convert CJK character to Unicode in
non-UTF-8 encoding. It provides hooks for `hyperref` to get the correct bookmarks.
It also provides some /ToUnicode mapping file for CJK subfont. They can be used
with `cmap` package and make CJK character searchable and copyable in PDF files
generated by pdfLaTeX.

It may be distributed and/or modified under the conditions of the
LaTeX Project Public License (LPPL), either version 1.3c of this license or
(at your option) any later version. The latest version of this license is in


and version 1.3 or later is part of all distributions of LaTeX version
2005/12/01 or later.

This work has the LPPL maintenance status "maintained".
The Current Maintainer of this work is Qing Lee.

This work consists of the file  xCJK2uni.dtx,
          and the derived files xCJK2uni.pdf,
                                c****.cmap, and
                                README (this file).

Basic Usage
The package provides the following macros:

    Set the current encoding. The default encoding is GBK.

    Convert a single CJK character to its Unicode.
    It requires two steps of expansion.

    Convert the .sfd coordinate to its Unicode.
    It requires two steps of expansion.

You can read the package manual (in Chinese) for more detailed explanations.

Qing Lee
Email: sobenlee@gmail.com

If you are interested in the process of development you may observe


The package is supplied in dtx format and as a pre-extracted zip file,
xCJK2uni.tds.zip. The later is most convenient for most users: simply
unzip this in your local texmf directory and run texhash to update the
database of file locations. If you want to unpack the dtx yourself,
running "luatex xCJK2uni.dtx" will extract the package whereas
"xelatex xCJK2uni.dtx" will typeset the documentation.

The package requires LaTeX3 support as provided in the l3kernel.
It is available on CTAN as ready-to-install zip files.
Suitable versions are available in the latest version of MiKTeX and TeX Live
(updating the relevant packages online may be necessary).

To compile the documentation without error, you will need the xeCJK package
and some specific Chinese Simplified fonts.


Name Size Date Notes
README 2965 2014-06-20 20:19
xCJK2uni.dtx 31172 2014-06-20 17:20
xCJK2uni.ins 4534 2014-06-20 20:19
xCJK2uni.pdf 142776 2014-06-20 20:20

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

xcjk2uni – Con­vert CJK char­ac­ters to Uni­code, in pdfTeX

The pack­age pro­vides com­mands to con­vert CJK char­ac­ters to Uni­code in non-UTF-8 en­cod­ing; it pro­vides hooks to sup­port hy­per­ref in pro­duc­ing cor­rect book­marks.

The bun­dle also pro­vides /ToUni­code map­ping file(s) for a CJK sub­font; these can be used with the cmap pack­age, al­low­ing searches of, and cut-and-paste op­er­a­tions on a PDF file gen­er­ated by pdfTeX..

Pack­age De­tailsxcjk2uni
Ver­sion0.4 2014-06-20
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2013–2014 Qing Lee
Main­tainerQing Lee
TDS archivexcjk2uni.tds.zip
Con­tained inTeXlive as xcjk2uni
MikTeX as xcjk2uni
Topics ac­cess PDF fea­tures
Guest Book Sitemap Contact