如题,今天第一次使用 Texlive 选择了完整安装。
谁知所有的文件在第一次新建打开编译的时候没问题,关闭再打开编译的时候就会报错如下:
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex) restricted \write18 enabled. entering extended mode (./ps2_sol.tex LaTeX2e <2020-10-01> patch level 2 L3 programming layer <2020-10-27> xparse <2020-03-03> (c:/Users/19122/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/article.cls Document Class: article 2020/04/10 v1.4m Standard LaTeX document class (c:/Users/19122/AppData/Roaming/TinyTeX/texmf-dist/tex/latex/base/size10.clo)) ! 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: Process interrupted by user
\documentclass{article} \usepackage[space]{ctex} \begin{document} \section{Insurance} \paragraph{1.} Expected income is $$\bar{Y} = pY_H + (1-p)Y_L = 7$$ Expected Utility is $$u(\bar{Y}) = 7^{0.5}$$ Expected utility: $$Y_0 = pu(Y_H)+(1-p)u(Y_L) = 2.5 \leq u(\bar{Y}) = 7^{0.5} = u(\bar{Y} - q)$$ $$\bar{M} = q = 0.75$$ 你好,こんにちは、LaTeX \end{document}
Package Manager 中也能搜索到确认有 ctex 这个包,不知道有没有朋友也遇到这样的问题,求解。
![]() | 1 xlzpx 2021-01-11 20:06:42 +08:00 看起来像是文件编码问题 声明 utf-8 试下? |
![]() | 3 loadhe OP 难道是和 R studio 的 tinytex 冲突了?如果是那样的话要怎么解决呢 |
![]() | 4 zvl0reqglvd 2021-01-11 20:25:53 +08:00 应该是第二句的问题,不行重装哈试试。 |
![]() | 5 yzbythesea 2021-01-11 20:30:29 +08:00 via iPhone 编译用的是 tinytex,不是 texlive 。修改 PATH 让你的 pdflatex 用 texlive 的 |
![]() | 6 loadhe OP @yzbythesea 谢大佬解惑!在设置里直接把 tinytex 的 path 删除掉就搞定了。 |
![]() | 7 loadhe OP @zvl0reqglvd 下面已经解决了 |