4

I regularly have to type documents with a mix of English for the main body of the text and Chinese characters for headers, footnotes and similar parts of the document. Until a few days ago this was never a problem, but now I am trying to run latex on the following example:

    \documentclass{article}
\usepackage{CJKutf8}

\begin{document}

\begin{CJK*}{UTF8}{zhkai}
代数几何 

\textbf{Latin text}
\clearpage
\end{CJK*}
\end{document} 

and the text OUTSIDE CJK environments in latin characters always shows up as normal text. The same happens when I switch to italic, small caps or anything similar.

  • I guess one approach would be to use ctex. – Davislor May 03 '22 at 00:33
  • Does \textnormal{\bfseries ...} solve the problem, though? – Davislor May 03 '22 at 00:34
  • @Davislor Unfortunately I am forced to use CJK by the publisher. I checked your suggestion and the problem persists when using \textnormal{\bfseries ...}. – Micha42440 May 03 '22 at 06:21
  • I unfortunately cannot seem to get this MWE to compile on TeX Live 2022 using PDFLaTeX. In LuaLaTeX or XeLaTeX, I could not reproduce your bug. Does updating fix it? One workaround you might try is to wrap only your Chinese titles and footnotes in the CJK environment. – Davislor May 03 '22 at 17:37
  • I could get it to work with XeLaTex by swapping to ctex as suggested. Although this is not a permanent solution, at least I can see how it should look. I guess I will try reinstalling the latex distribution and see if that helps. – Micha42440 May 04 '22 at 21:17
  • I don't have the zhkai fonts, but if I change it to min, the text is in the expected bold face. – egreg Dec 19 '22 at 13:49
  • As I run this (Alpine Linux, TeXLive 2022, fully updated), it does not compile, and the problem does not appear in lualatex, as noted by Davislor. Voting to close. – dgoodmaniii Dec 19 '22 at 22:19

1 Answers1

3

TL;DR

Reinstall TexLive with the offcial script. You can follow these steps https://puttym.github.io/update-texlive

This may be a problem with TexLive installed by Ubuntu apt.

Details

I am experiencing the same issue since I upgraded my Ubuntu. I build the following code with "pdflatex example.tex"

\documentclass{article}

\usepackage{CJKutf8}

\begin{document}

\begin{CJK*}{UTF8}{min} 代数几何

\textbf{Bold text} \clearpage \end{CJK*} \end{document}

And the text does not appear in bold. If I remove the CJK stuff, and build again, then the text is bold. The problem does not appear when I compile it on Overleaf, so it is probably a problem with local TexLive or whatever installation

After reinstalling TexLive with the official guidance (no apt install), this is fixed.

Fabien
  • 131
  • 3
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. – Community Jul 23 '22 at 09:39
  • I can confirm that this fix works. The official package must have some issues, but nothing to do with the font, so it is hard to diagnose. – astroboylrx Feb 07 '24 at 18:46