5

With full TeX Live 2014 ucharclasses package no longer works with fontspec. It works with BasicTeX 2014 because BasicTeX 2014 uses old version of font spec from 2013.

Here is an example document which works with fontspec 2013 but no longer works with fontspec from full TeX Live 2014:

\documentclass[12pt]{article}

\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}

\usepackage[Latin, Thai]{ucharclasses}
\setDefaultTransitions{\fontspec{Hoefler Text}}{}
\setTransitionTo{Thai}{\fontspec[Scale=1]{Thonburi}}

\begin{document}

Test  ไทย

\end{document}  

Anybody knows how to fix it?

4

I guess it's a problem due to the new syntax for \fontspec. It's better, anyway, to declare the fonts beforehand:

\documentclass[12pt]{article}

\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Hoefler Text}
\newfontfamily{\thaifont}{Thonburi}[Scale=MatchLowercase]

\usepackage[Latin, Thai]{ucharclasses}
\setTransitionTo{Thai}{\thaifont}
\setTransitionFrom{Thai}{\normalfont}

\begin{document}

Test  ไทย Test

\end{document}

enter image description here

  • Thank you, egreg. The example in the ucharclasses package should be modified then otherwise it will not work with this new version of font spec. – user56595 Jul 5 '14 at 0:11
  • @user56595 See github.com/Pomax/ucharclasses/issues/7 – egreg Jul 5 '14 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.