# how to set ctex font size to \lishu

log file I probably should spend more time getting to read the documentation but I must admit it is too advanced and I have a hard time comprehending what its tring to say.I am on a deadline and need some urgent help. What I want to achieve is to change the title style(font?) to \lishu as described in ctex package page 8

This is my code

\documentclass[fontset=none]{article}
\usepackage{ctex}
\ctexset{fontset=macnew}
\begin{document}
\lishu
\title{颠覆传统教学模式，打造中国双师品牌}
\date{}
\maketitle
\end{document}


But it results in an error saying "undefined control sequence." Please tell me what went wrong here.This is the cnosole feedback

Edit: new log file after updating it to texlive 2020enter link description here edit2:uploaded the result of xetex compile. the link is the same.

• I'm very upset with CTeX that advertises “fontset=macnew”, which should work in macOS, if I interpret correctly the name. But it doesn't. If I use fontset=windows, then I get an error because simli.ttf is not found. Jun 1 '20 at 9:42
• I don't have a mac but based on the code the command should be defined. Is your ctex/tex system up-to-date? Can you show the log-file? Jun 1 '20 at 9:44
• The command \lishu is not defined with fontset=macnew until ctex v2.5. From the attached log file, you are using ctex v2.4.15. Prior to v2.5, \lishu is defined with fontset=windows|founder only. See related issues (in Chinese): github.com/CTeX-org/ctex-kit/issues/360 and github.com/CTeX-org/ctex-kit/issues/412 Jun 1 '20 at 12:22
• Use xelatex, not pdflatex Jun 1 '20 at 14:01

I can ensure you I'm on a Mac, running the latest version of macOS.

If I try your code, I get

! Critical Package ctex Error: CTeX fontset mac' is unavailable in current
(ctex)                         mode.


which is quite strange. If I change fontset=windows, that error disappears, but pdftex complains that simli.ttf is not found.

So I downloaded simli.ttf from https://github.com/dudongtai2002/Font/blob/master/Fonts/SIMLI.TTF and retried.

\documentclass[fontset=windows]{article}
\usepackage{ctex}
\begin{document}
\title{\lishu 这是一个标题}
\date{}
\maketitle

\end{document}


I used \lishu only inside the title, which is probably what you really want.

Now that you added the information that you're running XeLaTeX, the code above runs also with fontset=macnew (no download necessary). Also your code runs with no issue on TeX Live 2020.

I get the error is with TeX Live 2019, for the simple reason that \lishu is only available in ctex-fontset-macnew.def version 2.5.1 or later. See

http://tug.org/svn/texlive/trunk/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-macnew.def?r1=51262&r2=54976

• Would you be kind enough to tell me how to check my texlive version. I clicked the texlive utility page and it says Version 1.35 Jun 1 '20 at 12:18
• @jxhyc Install the new MacTeX. You can see that the log file lists files as belonging to the tree /usr/local/texlive/2019 Jun 1 '20 at 12:22
• Thanks! I will choose the answer after I test your recommendation. It is a very large download:( Jun 1 '20 at 12:29
• sorry doesn't work. :( Jun 1 '20 at 13:54
• @jxhyc Which engine do you want to use? The first log shows xelatex, but the second log shows pdflatex. Jun 1 '20 at 14:00
• With fontset=macnew, \lishu is not defined until ctex v2.5.
• To install ctex v2.5, TeX Live 2020 is required, but from the attached log you are using TeX Live 2019.
• Hence you can either install TeX Live 2020, or manually define \lishu as following:
\NewDocumentCommand \lishu {} {\CJKfamily{zhli}}
\setCJKfamilyfont {zhli} {Baoli SC}
`