The ucs package provides advanced support for using UTF-8 as the input encoding of LaTeX files. It goes much beyond the standard UTF-8 support of LaTeX. In particular, it enables you to use non-ASCII characters in the LaTeX input of mathematical formulas. This feature is particularly important for Agda programmers that use lhs2TeX to typeset their code. The lhs2TeX preprocessor relies on ucs for typesetting all those mathematical symbols and greek letters that you typically find in Agda code.
The ucs package was originally developed by Dominique Unruh. Dominique had stopped working on ucs several years ago. In 2011, I took over the maintainer role. Now, I have made a new release – which is the first ucs release since 7.5 years. The current version is 2.0. At the time of writing, it is available on CTAN and in TeXLive.
Note that ucs has previously been called unicode on CTAN and is still called unicode in MiKTeX. However, the main style file has been called
ucs.sty for a long time. Therefore, I propose to call this package ucs everywhere. On CTAN, this name change has already been performed.
These are the most important changes since the last release of ucs:
- More mathematical symbols are supported, for example, ⟦, ⟧, ↦, ⅋, and several kinds of arrows.
- Double-struck letters (𝔸, 𝔹, etc.) are now typeset using
- The handling of small greek letters in math mode has been improved.
The last point concerns the fact that some greek small letters have two different forms, a standard form and a variant form. For example, the letter phi has the standard form φ and the variant form ϕ. Different Unicode codepoints exist for the different forms. The previous version of ucs supported only the standard forms, except for the letter sigma, where it supported both forms. For some letters, ucs produced the variant form despite the fact that the codepoint of the standard form was used. These deficiencies are fixed now. All existing standard and variant forms are supported, and the correct glyph is produced in every case.
Note that the authors of Unicode and the author of TeX had different ideas about what is the standard and what is the variant form of a letter. For example, Unicode considers φ to be the standard form of the letter phi and ϕ to be the variant form, while TeX’s
\phi macro produces ϕ, and
\varphi produces φ. The ucs package conforms to Unicode now, so that it may realize a standard letter using a
\varletter macro, and a variant letter using a
\letter macro. The following table lists all greek small letters with two variants together with their Unicode codepoints and the TeX macros that produce them:
|Standard form||Variant form|
\varkappa requires the import of amssymb, txfonts, or pxfonts.
I hope you enjoy this new release of ucs. If you have any ideas for improvements, please get in touch with me.