在 Texlive 文件再打开编译时遇到 'ctex.sty' not found - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
loadhe
V2EX    问与答

在 Texlive 文件再打开编译时遇到 'ctex.sty' not found

 
  •   loadhe 2021-01-11 20:01:05 +08:00 2407 次点击
    这是一个创建于 1739 天前的主题,其中的信息可能已经有所发展或是发生改变。

    如题,今天第一次使用 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 条附言    2021-01-11 20:40:01 +08:00
    编译时引用了 tinytex 的路径,在设置里去掉就好了
    xlzpx
        1
    xlzpx  
       2021-01-11 20:06:42 +08:00
    看起来像是文件编码问题

    声明 utf-8 试下?
    loadhe
        2
    loadhe  
    OP
       2021-01-11 20:10:05 +08:00
    @xlzpx 我也试过,但是没用
    loadhe
        3
    loadhe  
    OP
       2021-01-11 20:17:19 +08:00
    难道是和 R studio 的 tinytex 冲突了?如果是那样的话要怎么解决呢
    zvl0reqglvd
        4
    zvl0reqglvd  
       2021-01-11 20:25:53 +08:00
    应该是第二句的问题,不行重装哈试试。
    yzbythesea
        5
    yzbythesea  
       2021-01-11 20:30:29 +08:00 via iPhone
    编译用的是 tinytex,不是 texlive 。修改 PATH 让你的 pdflatex 用 texlive 的
    loadhe
        6
    loadhe  
    OP
       2021-01-11 20:36:39 +08:00
    @yzbythesea 谢大佬解惑!在设置里直接把 tinytex 的 path 删除掉就搞定了。
    loadhe
        7
    loadhe  
    OP
       2021-01-11 20:36:49 +08:00
    @zvl0reqglvd 下面已经解决了
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2868 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 26ms UTC 14:09 PVG 22:09 LAX 07:09 JFK 10:09
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86