Pdf generation 对pdflatex的ocaml Unix.system调用

Pdf generation 对pdflatex的ocaml Unix.system调用,pdf-generation,ocaml,pdflatex,Pdf Generation,Ocaml,Pdflatex,从已编译的ocaml应用程序pdflatex调用外部应用程序时遇到问题。我使用正确的字符串作为参数,当我从顶层运行它时,我得到了预期的结果 Unix.system "pdflatex -interaction batchmode -output-directory res ALGO_GEN.tex";; 它产生适当的输出 This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) restricted \write18 e

从已编译的ocaml应用程序pdflatex调用外部应用程序时遇到问题。我使用正确的字符串作为参数,当我从顶层运行它时,我得到了预期的结果

Unix.system "pdflatex -interaction batchmode -output-directory res ALGO_GEN.tex";;
它产生适当的输出

This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
 restricted \write18 enabled.
entering extended mode
(/usr/share/texmf-texlive/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty))
(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty)
(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty))
(/usr/share/texmf-texlive/tex/latex/algorithms/algorithmic.sty
(/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)
(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty))
No file ALGO_GEN.aux.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
(maze.html.res/ALGO_GEN.aux) )</usr/share/texmf-texlive/fonts/type1/public/a
msfonts/cm/cmbx10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/
cmmi10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb><
/usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmsy10.pfb>
Output written on res/ALGO_GEN.pdf (1 page, 36816 bytes).
Transcript written on res/ALGO_GEN.log.
- : Unix.process_status = Unix.WEXITED 0

这让我困惑了一段时间。我使用了来自Unix模块的其他系统调用和其他命令行选项。我想知道是否有人能就如何进行提供一些建议。应用程序生成一些tex文档,需要将它们转换为pdf。从顶层开始,在它们的列表上调用映射可以正确地生成PDF;只有编译的(字节码)不起作用。

我没有关闭先前写入的tex文件的通道,因此可能不会写入任何数据。感谢Gilles建议我在运行时检查文件。

这是完整的日志吗(否
这是pdfTeX
,等等)?我的直觉是,在您的实际程序中,您不知何故没有一个名为
algou_GEN.tex
的文件,或者它不包含您认为它所包含的内容。你当时试过检查Algou_GEN.tex吗?谢谢。我发现我没有关闭tex文件的输出通道,当时没有写入任何内容。谢谢你的帮助。
*** (job aborted, no legal \end found)