有没有办法使用 latexmk 结合 pdfx 包来生成 pdf-A 文档,这是一种非常好的生成 latex-pdf 的方法?
当我在 Mac Texlive2013 (TexShop Editor) 上使用 Latexmk 4.31 运行以下简单代码时,我遇到了麻烦。当我使用 Latex 简单处理它时没有问题。这是我的示例:
\documentclass{article}
\usepackage[a-1b]{pdfx} % PDFA-Type A
\begin{document}
This is a test
\end{document}
这里的错误:
> Latexmk: applying rule 'latex'... This is pdfTeX, Version
> 3.1415926-2.5-1.40.14 (TeX Live 2013) restricted \write18 enabled. entering extended mode (./Test2.tex LaTeX2e <2011/06/27> Babel <3.9f>
> and hyphenation patterns for 78 languages loaded.
> (/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))
> (/usr/local/texlive/2013/texmf-dist/tex/latex/pdfx/pdfx.sty
> (./Test2.xmpdata)
> (/usr/local/texlive/2013/texmf-dist/tex/latex/xmpincl/xmpincl.sty
> (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
>
> Package xmpincl Warning: Only pdflatex is supported by the xmpincl
> package.
>
> ) /usr/local/texlive/2013/texmf-dist/tex/latex/pdfx/pdfx.sty:137:
> pdfTeX error (\ pdfobj): not allowed in DVI mode (\pdfoutput <= 0).
> l.137 \immediate\pdfobj
> stream attr{/N 4} file{sRGBIEC1966-2.1.icm} No pages of output. Transcript written on Test2.log. Latexmk: Log file
> says no output from latex Latexmk: For rule 'latex', no output was
> made Failure to make 'Test2.dvi' Collected error summary (may
> duplicate other messages): latex: Command for 'latex' gave return
> code 256 Latexmk: Use the -f option to force complete processing.
> Latexmk: Errors, so I did not complete making targets
有什么建议可以解决这个问题吗?
答案1
确实,我缺少 pdflatexmk 引擎。问题解决了!
对于 Mac,可以按照以下说明进行安装:无法让 latexmk 在 TeXShop 中工作