Comments (8)
十一长假期间,曾远程桌面排查类似问题,最终也没有找到直接原因。后来对方反馈,安装发行版 proTeXt 后,问题消失。
(具体的聊天和浏览器记录已部分删除,以下叙述包含回忆部分。)
当时这个用户在终端也无法编译,甚至使用 tlmgr 也会报类似
Use of uninitialized value $ver in scalar chomp at .../TeXLive/TLWinGoo.pm line 204.
的错误。当时猜测系统环境变量有问题,因夜深而中断。该用户之前装过 CTeX 套装,新装了 TeX Live,就遇到了无法编译的问题。后来他通过再安装一个发行版绕过了问题,也就没有继续跟进。
搜到一个类似问题(1,2),是 R 用户在使用 TinyTeX 时遇到的。
解决方法很简单: windows 操作系统的环境变量里添加 PATH:c:\Windows\System32
from forum.
可能的原因,大概分为两类。
- TeXstudio 找不到 TeX 相关可执行文件的路径;
- TeXstudio 找不到适合编译的
.tex
源文件。
前者可能的原因有:
- 没有安装 TeX 发行版,只安装了
MiKTeXTeXstudio 等编辑器。 - 安装 MiKTeX 后,环境变量
PATH
没有更新。这两种情况,让用户在cmd
里执行tex --version
观察其输出即可判断。 - TeXstudio 内,相关路径设置错误。例如 #5 (comment) 中截图所示的
txs
。
后者可能的原因有:
.tex
源文件名字中,含有wchar
。
其他可能的疑难杂症包括:
- ls-R 数据库挂了。这种情况以适当的权限执行
mktexlsr
即可。 - format 文件挂了。这种情况重新 dump
.fmt
文件即可:fmtutil-sys --all
。
from forum.
也遇到过,用户为了「把编译方式从 pdflatex 改成 xelatex」而改错了 texstudio 的设置。例如
from forum.
之前遇到的一位用的是 miktex,命令行可以编译,但在 texstudio 中却不行,检查了一下 build 设置也没有问题。后面基本放弃,希望他可以重装解决。
from forum.
再贴一个完整的错误 log:
Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode "document".tex
Use of uninitialized value $ver in scalar chomp at D:/texlive/2018/tlpkg/TeXLive/TLWinGoo.pm line 206. Use of uninitialized value $ver in substitution (s///) at D:/texlive/2018/tlpkg/TeXLive/TLWinGoo.pm line 207. Use of uninitialized value $ver in substitution (s///) at D:/texlive/2018/tlpkg/TeXLive/TLWinGoo.pm line 207.
fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order): fmtutil: d:/texlive/2018/texmf-dist/web2c/fmtutil.cnf fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes: fmtutil: c:/users/73994/.texlive2018/texmf-config/web2c/fmtutil.cnf fmtutil [INFO]: writing formats under c:/users/73994/.texlive2018/texmf-var/web2c fmtutil [INFO]: --- remaking pdflatex with pdftex
Can't spawn "cmd.exe": No such file or directory at d:\texlive\2018\texmf-dist\scripts\texlive\fmtutil.pl line 598. fmtutil [WARNING]: inifile pdflatex.ini for pdflatex/pdftex not found. fmtutil [INFO]: Disabled formats: 6 fmtutil [INFO]: Not selected formats: 43 fmtutil [INFO]: Failed to build: 1 (pdftex/pdflatex) fmtutil [INFO]: Total formats: 50 fmtutil [INFO]: exiting with status 1
D:\texlive\2018\bin\win32\runscript.tlu:790: command failed with exit code 1: perl.exe d:\texlive\2018\texmf-dist\scripts\texlive\fmtutil.pl --user --byfmt pdflatex
Running the command D:\texlive\2018\bin\win32\fmtutil-user.exe
kpathsea: Running mktexfmt pdflatex.fmt The command name is D:\texlive\2018\bin\win32\mktexfmt
Process exited with error(s)
前面指出的解决方法「添加 C:\Windows\System32 到 PATH 环境变量」确实有效。
from forum.
十一长假期间,曾远程桌面排查类似问题,最终也没有找到直接原因。后来对方反馈,安装发行版 proTeXt 后,问题消失。
(具体的聊天和浏览器记录已部分删除,以下叙述包含回忆部分。)
当时这个用户在终端也无法编译,甚至使用 tlmgr 也会报类似
Use of uninitialized value $ver in scalar chomp at .../TeXLive/TLWinGoo.pm line 204.
的错误。当时猜测系统环境变量有问题,因夜深而中断。该用户之前装过 CTeX 套装,新装了 TeX Live,就遇到了无法编译的问题。后来他通过再安装一个发行版绕过了问题,也就没有继续跟进。
搜到一个类似问题(1,2),是 R 用户在使用 TinyTeX 时遇到的。
解决方法很简单: windows 操作系统的环境变量里添加 PATH:c:\Windows\System32
解决就我的问题,感谢老哥!
from forum.
texstudio有两种报错,一种在消息窗口
https://github.com/texstudio-org/texstudio/blob/e85190d8d0837bedad6636586b986dc088d93e29/src/buildmanager.cpp#L2506-L2517
弹窗说明可执行文件能找到、运行失败、没有文件名对应的log
from forum.
texstudio有两种报错,一种在消息窗口 https://github.com/texstudio-org/texstudio/blob/e85190d8d0837bedad6636586b986dc088d93e29/src/buildmanager.cpp#L2506-L2517
弹窗说明可执行文件能找到、运行失败、没有文件名对应的log
排查的话要求提问者texstudio全窗口截图(包括消息窗口的错误)、命令行编译并查看是否有log产生。
如果命令行与texstudio窗口编译结果不同,可能是texstudio进程启动后更改了环境变量,重启texstudio可解决。
另外可临时将texstudio编译命令设为cmd /c "where pdflatex"与命令行运行where pdflatex结果对比。
不产生log的情况,总结了一下大概有:
- 文件路径含有特殊字符,导致编译出的log文件路径跟texstudio拼装出的log文件路径不同,根据 https://github.com/texstudio-org/texstudio/blob/8c898844d87d4ba640f5c7684c0180cc463c49af/src/latexdocument.cpp#L2016-L2026 magic comment 也有影响
- fmt不匹配,导致没有产生log就直接报错退出,这种情况命令行编译可排查出问题
- texstudio自身问题,同时打开已保存的文件跟临时文件以及root comment之类,可能导致识别错当前文件名
- 编译成 cls 或 sty 文件,全窗口截图可从标签页发现错误。
from forum.
Related Issues (20)
- 讨论范围:CTeX套装问题or中文TeX问题? HOT 6
- Error: Undefined control sequence HOT 17
- 汉字直排行间标点下冒号(及分号)的问题 HOT 4
- xeCJK宏包文档中3.2.1节需要增补 HOT 4
- xeCJKfntef 和 ulem 联用时影响 \textbf 的作用范围 HOT 3
- 使用XeLatex构建中文文档源码时报错: xdvipdfmx:fatal: Unknown coverage format HOT 7
- 如何在article中调整所有caption为楷体 HOT 1
- linux和windows下伪粗效果不统一 HOT 6
- 中英文之间空格不习惯,如何去掉? HOT 11
- CJKfntef 是否具有 xeCJKfntef 的 subtract 功能?
- CTeX 3.0.212.1 xelatex编译通过,但无法生成pdf。dvipdfmx:fatal: typecheck: Invalid object type: -1 7 (line 2378)] HOT 6
- 关于LaTeX2e中文档类使用l3keys键对值的问题 HOT 8
- 当minipage环境和enumerate配合使用时,引入hyperref宏包会导致minipage顶部对齐失效 HOT 2
- 选项 leqno 与 fleqn 的缩写 HOT 13
- 我想将某些内容固定排版在偶数页的页面底部,但使用\ifodd\value{page}进行判断时在某些情形下会失效 HOT 4
- `jiazhu` 宏包是否能实现 `linespread < 1` 的排版效果?
- 如何将附录放在backmatter后同时对附录进行编号? HOT 6
- 能否实现英语句子中自动使用非中文字体的标点符号 HOT 3
- How to draw an specific feynman diagram with TikZ (LaTeX) HOT 4
- [NFSS] 关于使表示字体的控制序列等于\relax的作用(的问题) HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forum.