gpt4 book ai didi

c# - 从 C# 运行 Latex

转载 作者:太空宇宙 更新时间:2023-11-03 11:42:48 25 4
gpt4 key购买 nike

当使用 Process.Start 从 C# 运行 latex 时,我收到此错误:“latex:无法检索所需的文件系统路径。”它从命令行运行良好,所以我不确定为什么它不从 Process.Start 运行。有人遇到过这个问题吗?

编辑:此外,这是来自 ASP.NET 的!

谢谢!

最佳答案

在没有看到更多代码的情况下,我最好的猜测是将 StartInfo 类的 WorkingDirectory 设置为它在命令行中工作的任何目录。

ProcessStartInfo startInfo = new ProcessStartInfo(@"\path\to\latex\latex.exe");
startInfo.WorkingDirectory = @"\path\to\latex";

我以前在使用其他 EXE 时遇到过这个问题,这似乎是解决办法。

关于c# - 从 C# 运行 Latex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4289928/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com