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{[email protected]}
\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?

3
  • 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 3, 2023 at 9:52
  • Related (but with another package): tex.stackexchange.com/q/28627/277964
    – cabohah
    Jun 3, 2023 at 10:01
  • I Installed followed the official document tug.org/texlive/quickinstall.html
    – Dolphin
    Jun 3, 2023 at 11:41

2 Answers 2

0

Finally I run this command and fixed this issue:

sudo apt install latex-cjk-all
1
  • 2
    this answer does not match your comment under the question. 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 Jun 3, 2023 at 18:03
0

If your OS is ubuntu:

sudo apt install texlive-full

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .