Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove \fontspec from the examples #7

Closed
eg9 opened this issue Jul 5, 2014 · 3 comments
Closed

Remove \fontspec from the examples #7

eg9 opened this issue Jul 5, 2014 · 3 comments

Comments

@eg9
Copy link

eg9 commented Jul 5, 2014

With the latest release of fontspec, an example such as

\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}  

will make XeTeX into an endless loop (see ucharclasses package does not work with TeX Live 2014's fontspec.

I believe it's advisable to declare fonts beforehand in any case and that the documentation should be accordingly modified; besides making the examples work, this has also the advantage of not inducing users into thinking that \fontspec should be used in the code.

@Pomax
Copy link
Owner

Pomax commented Jul 5, 2014

I've not done anything with XeLaTeX for a while, so I've been out of the loop on fotspec development; would you have any suggestions for the docs to make sense with the new fontspec that you might be able to file a pull request for? (which can be done through github itself these days, without needing to fork and clone first)

@ickc
Copy link

ickc commented Apr 9, 2016

I encountered the same problem as well.

One solution is this:

\documentclass{article} 

\usepackage[Latin, Greek, CJK, Hebrew]{ucharclasses}
\usepackage{fontspec}

\newfontfamily\greekfont{CMU Serif}
\newfontfamily\hebrewfont{Tahoma}
\newfontfamily\CJKfont{KaiTi}

\newcommand{\latinfont}{\renewcommand\rmdefault{lmr}\renewcommand\sfdefault{lmss}\renewcommand\ttdefault{lmtt}\defaultfontfeatures[\rmfamily,\sffamily]{Ligatures=TeX}}

\setTransitionsForLatin{\latinfont}{}
\setTransitionsForGreek{\greekfont}{}
\setTransitionsFor{Hebrew}{\hebrewfont\setRTL}{\setLTR}
\setTransitionsForCJK{\CJKfont}{}

\usepackage{bidi}

\begin{document}

but my righteous one shall live by faith

ὁ δὲ δίκαιός μου ἐκ πίστεως ζήσεται

只是義人必因信得生。

בֶּאֱמוּנָת֥וֹ יִחְיֶֽה׃

\end{document}

@Pomax
Copy link
Owner

Pomax commented Apr 21, 2016

I've released 2.1 based on work in #14, and the documented use of fontspec in the updated .pdf doc should work quite well (advocating syntax similar to @ickc's solution)

@Pomax Pomax closed this as completed Apr 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants