当我在 Ubuntu 22.04 中使用 XeLaTeX 编译 TeX 时显示此错误:
(/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!
这是 tex 文件:
\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}
我该怎么做才能解决这个问题?
答案1
最后我运行这个命令并解决了这个问题:
sudo apt install latex-cjk-all
答案2
如果你的操作系统是 ubuntu:
sudo apt install texlive-full