首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >MiKTeX,LaTeX:用\newwrite输出文件出错,用\ with编写错误-- Windows错误2:系统找不到指定的文件

MiKTeX,LaTeX:用\newwrite输出文件出错,用\ with编写错误-- Windows错误2:系统找不到指定的文件
EN

Stack Overflow用户
提问于 2020-09-07 00:15:30
回答 1查看 1.1K关注 0票数 0

使用Windows10Home上的TeXworks v0.6.5 (MiKTeX 20.7),我试图将一行写到文本文件中。

排版此代码时

代码语言:javascript
运行
复制
\documentclass{article}

\newwrite\justafile

\begin{document}

% Write to text file:

\immediate\openout\justafile=exam.txt

\immediate\write\justafile{Chosen questions: bla, bla and bla.}

\immediate\closeout\justafile

\end{document}

控制台输出以下消息(编译日志的最后5行):

代码语言:javascript
运行
复制
No pages of output.
Transcript written on example.log.

Sorry, but "MiKTeX Compiler Driver" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Miriam Briskman\AppData\Local\MiKTeX\2.9\miktex\log\texify.log

日志文件包含以下错误消息:

代码语言:javascript
运行
复制
2020-09-06 19:47:38,817-0400 INFO  texify - this process (4764) started by 'miktex-texworks' with   command line: "C:\Users\Miriam Briskman\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\texify.exe" --pdf --synctex=1 --clean example.tex
2020-09-06 19:47:38,880-0400 INFO  texify.core - start process: pdflatex --synctex=1 "C:/Users/Miriam Briskman/OneDrive/Desktop/Brooklyn College/Fall 2020/CISC 1050/Tests/Test Pool/New folder\example.tex"
2020-09-06 19:47:39,249-0400 INFO  texify.core - start process: pdflatex --synctex=1 "C:/Users/Miriam Briskman/OneDrive/Desktop/Brooklyn College/Fall 2020/CISC 1050/Tests/Test Pool/New folder\example.tex"
2020-09-06 19:47:39,587-0400 ERROR texify.core - The system cannot find the file specified.

2020-09-06 19:47:39,587-0400 ERROR texify.core - Function: CopyFileW
2020-09-06 19:47:39,587-0400 ERROR texify.core - Result: 2
2020-09-06 19:47:39,587-0400 ERROR texify.core - Data: existing="C:/Users/MIRIAM~1/AppData/Local/Temp/mik68959/_src\example.pdf", path="C:/Users/Miriam Briskman/OneDrive/Desktop/Brooklyn College/Fall 2020/CISC 1050/Tests/Test Pool/New folder\example.pdf"
2020-09-06 19:47:39,587-0400 ERROR texify.core - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp:383
2020-09-06 19:47:39,592-0400 FATAL texify - Windows API error 2: The system cannot find the file specified.

2020-09-06 19:47:39,592-0400 FATAL texify - Info: existing="C:/Users/MIRIAM~1/AppData/Local/Temp/mik68959/_src\example.pdf", path="C:/Users/Miriam Briskman/OneDrive/Desktop/Brooklyn College/Fall 2020/CISC 1050/Tests/Test Pool/New folder\example.pdf"
2020-09-06 19:47:39,592-0400 FATAL texify - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2020-09-06 19:47:39,592-0400 FATAL texify - Line: 383

下面链接到TeXworks控制台的屏幕截图和代码:

带有问题代码的TeXworks控制台

我使用MiKTeX控制台安装了最近的所有更新,但这并没有解决问题。

错误的来源是什么,我应该如何修复它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-07 08:54:44

尽可能远离texify

  • 你永远不知道文本化到底在做什么
  • texify以丢弃所有有帮助的输出而臭名昭著,这些输出允许用户实际调试他们的问题。

相反,我建议

  • 如果您有一个简单的文档,而没有额外的内容,如书目等,则直接使用pdflatex进行编译。
  • 对于更复杂的文档,可以使用自动化工具(如latexmk )进行编译。这将自动确定所需的tex运行数,将调用bibtex/biber或文档可能需要的任何其他工具。
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63769993

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档