1

I just installed MacTex2018 (because I was having trouble with TexLive2016).

My issue is related to chinese chars. May I ask for a simple example?

In the end I would like to have just some chinese words in the document which will mostly be in english.

I tried this:

\documentclass[UTF8]{ctexart}
\begin{document}
你好
\end{document}

Then got:

$ pdflatex report.tex 
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./report.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/ctexart.cls
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/expl3-code.tex)
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3kernel/l3pdfmode.def))
Document Class: ctexart 2018/01/28 v2.4.12 Chinese adapter for class article (C
TEX)
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/ctexhook.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/ctexpatch.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/fix-cm.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/ts1enc.def
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/ts1enc.dfu)))
(/usr/local/texlive/2018/texmf-dist/tex/latex/ms/everysel.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/config/ctexopts.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.de
f (/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJKutf8.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJK.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/mule/MULEenc.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJK.enc))
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/fontenc.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjkpunct/CJKpunct.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjkpunct/CJKpunct.spa))
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJKspace.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/ctexspa.def)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJKfntef.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/CJKulem.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/ulem/ulem.sty))))
(/usr/local/texlive/2018/texmf-dist/tex/latex/zhnumber/zhnumber.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/zhnumber/zhnumber-utf8.cfg))
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-a
rticle.def
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg))
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/ctex-c5size.clo)
(/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Critical ctex error: "fontset-unavailable"
! 
! CTeX fontset `mac' is unavailable in current mode.
! 
! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.47   }

? 
)) (/usr/local/texlive/2018/texmf-dist/tex/latex/ctex/config/ctex.cfg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.bdg)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.enc)
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.chr)
(./report.aux) ABD: EverySelectfont initializing macros
(/usr/local/texlive/2018/texmf-dist/tex/latex/cjk/texinput/UTF8/c70song.fd)
[1{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./report.aux)
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+32/600 --dpi 632 cyberb59
mktexpk: don't know how to create bitmap font for cyberb59.
mktexpk: perhaps cyberb59 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.
 )
!pdfTeX error: pdflatex (file cyberb59): Font cyberb59 at 632 not found
 ==> Fatal error occurred, no output PDF file produced!

Perhaps I should try to solve the critical error part Critical ctex error: "fontset-unavailable", but it points me to a chinese document, http://ctan.math.illinois.edu/language/chinese/ctex/ctex.pdf, (Wouldn't make sense to have a english version of it?).

3

You may use xelatex or lualatex to compile, rather than pdflatex. On macOS, the default Chinese fonts used by ctex are OpenType fonts, which cannot be (easily) used by pdfLaTeX.

The developers of ctex have considered to provide an English version of document, but they haven't done it for some reasons. However, you may ask them directly via GitHub.

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.