# Chinese (ctex) TeX Live 2015 on Ubuntu

After update from TeX Live 2013 to TeX Live 2015 on Ubuntu Linux I am getting following error message:

CTeX fontset 'fandol' is unavailable in current mode.


When trying to use:

pdflatex --shell-escape --synctex=1 document.tex


on Chinese document, starting with:

\documentclass[UTF8,a4paper, 11pt]{ctexart}
\begin{document}

\end{document}


TeX Live 2013 was using simhei.ttf fonts, but I could live with fandol if necessary... How could I make it work again?

Any help will be highly appreciated (I have spent 6 hours on this with no luck at all...)

• Don't you need xelatex for this? If I try with pdflatex I get the same error, but this is clear, since fandol fonts are OpenType fonts
– user31729
Dec 27 '15 at 22:12
• Would you know how could I switch back to simhei.ttf then? Thanks! Dec 27 '15 at 22:15
• simhei.ttf is another true type font, which can't have worked with pdflatex unless there are very special settings in ctex
– user31729
Dec 27 '15 at 22:18
• No, I have not used ctex before. I suspect something with \usepackage{fontspec}\setmainfont{simhei.ttf} if xelatex is used, however
– user31729
Dec 27 '15 at 22:24
• The problem is I cannot change structure of .tex files. They are created on-the-fly by compiler Wiki/LaTeX. They were working with TeX Live 2013, thus I expected they will be with 2015 as well... I might be forced to simply roll back to 2013 then :( Thank you anyway! Dec 27 '15 at 22:29

Disclaimer: I can't read the documentation, I looked in the code and tried to guess what it is meant to do.

You can change the "fontset" loaded by ctexart with an option:

\documentclass[fontset=ubuntu,UTF8,a4paper, 11pt]{ctexart}

There is a ctexopts.cfg which looks as if it is meant for local configurations. You could make a copy in a local tree and then add a line like

 \keys_set:nn { ctex / option } { fontset = ubuntu}.


But imho there is an error either in the fandol fontset (the code shows that it is currently not meant for to be used in pdf-mode) or in the code which choose the default fontset, so a bug report should be made.

• Yes, that is exactly what I have been looking for. Thank you, works as a charm! Dec 28 '15 at 11:12
• I wouldn't call this 'a Linux problem'. I can't see that it is the OS's - let alone the kernel's (which is all 'Linux's' can mean as it isn't an OS) - fault if software tries to use stuff which isn't installed or is buggy or whatever. (Unless the bugginess is itself the fault of the OS.) The problem may be specific to ctex's behaviour on Linux-based OSes but that's a different matter. As you say here, it is either the fonts or the package which uses it. (It is trying to use fonts which aren't installed or it thinks aren't - not for pdfTeX, presumably.)
– cfr
Feb 26 '16 at 23:53
• @cfr I don't quite understand why you put this comment here. In the other question I wrote "linux" only to indicate that the behaviour is os dependant and thar your errors don't affect (and so cam't be seen on) windows.. Feb 27 '16 at 12:07