1

When I use XeLaTeX to compile TeX in Ubuntu 22.04, it shows this error:

(/usr/share/texlive/texmf-dist/tex/latex/moderncv/moderncvcolorblue.sty
Package: moderncvcolorblue 2021-12-16 v2.3.0 modern curriculum vitae and letter
 color scheme: blue
)

! LaTeX Error: File `ctex.sty' not found.

Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty)

Enter file name: ! Emergency stop. <read *>

l.7 \usepackage [scale=0.75]{geometry}^^M End of file on the terminal!

This is the tex file:

\documentclass[11pt,a4paper,sans]{moderncv}

\moderncvstyle{classic} \moderncvcolor{blue}

\usepackage{ctex} \usepackage[scale=0.75]{geometry}

\setlength{\footskip}{149.60005pt} \setlength{\hintscolumnwidth}{3cm}

\name{张}{强} \title{Java开发} \phone[mobile]{152344567} \email{zhang@gmail.com} \social[stackoverflow]{https://stackoverflow.com/users/26343868/john} \social[github]{https://github.com/zhang} \begin{document}

\makecvtitle

\section{教育经历}

\cventry{2009.09--2009.09}{本科}{XX大学}{}{}{} \section{工作经历}

\cventry{2023.06--2023.06}{Java开发}{上海XX信息科技有限公司}{上海}{}{} \end{document}

what should I do to fixed this issue?

JamesT
  • 3,169
Dolphin
  • 843
  • 2
    If ctex.sty is not found, it is not installed. Depending on how you've installed TeX Live you either have to install it using tlmgr or the Linux package manager. With the linux package manage you need at least sudo apt-get install texlive-lang-chinese, but I would recommend to use sudo apt-get install texlive-full to install all of TeX Live provides by Ubuntu. – cabohah Jun 03 '23 at 09:52
  • Related (but with another package): https://tex.stackexchange.com/q/28627/277964 – cabohah Jun 03 '23 at 10:01
  • I Installed followed the official document https://www.tug.org/texlive/quickinstall.html – Dolphin Jun 03 '23 at 11:41

2 Answers2

0

Finally I run this command and fixed this issue:

sudo apt install latex-cjk-all
Dolphin
  • 843
  • 2
    this answer does not match your comment under the question. https://www.tug.org/texlive/quickinstall.html would install an upstream texlive not managed by apt. This updates the debian/ubuntu system texlive apt package. Your log /usr/share/texlive/ in the question does show you are using the system tex not texlive from tug.org – David Carlisle Jun 03 '23 at 18:03
0

If your OS is ubuntu:

sudo apt install texlive-full

sun
  • 1