Arxiv Latex 上传错误

Arxiv Latex 上传错误

我尝试将我的 PDF 文件(由 Latex 生成)上传到 Arxiv,但没有成功(arxiv 要求其作者上传源代码)。在 StackOverFlow 上寻找答案时,我发现了这个解决方案

\documentclass[a4paper]{article}
\usepackage{hyperref}
\hypersetup{
  pdfinfo={
    Title={Blah Blah Blah},
    Author={Blah Blah Blah },
    Subject={If you want to put something here, do so},
    Keywords={Add some keywords if you feel so inclined}
  }
}
\usepackage{pdfpages}

\begin{document}
\includepdf[pages=1-last]{icailcameraready.pdf}
\end{document}

但是,当我尝试上传 .tex 文件(如上所示)和 PDF 时,我从 arxiv 获得了下面显示的日志文件。

    TeX log 

[verbose]: Creating arXiv submission AutoTeX object
[verbose]: Calling arXiv submission AutoTeX process
[verbose]: TeX/AutoTeX.pm: admin_timeout = minion
[verbose]: <icailcameraready.pdf>   is of type 'PDF'.
[verbose]: <arXiv_Paper.tex>    is of type 'LATEX2e'.
[verbose]: ~~~~~~~~~~~ Processing file 'arXiv_Paper.tex'
[verbose]: TEXMFCNF is unset.
[verbose]: ~~~~~~~~~~~ Running hlatex for the first time ~~~~~~~~
[verbose]: Running: "(export HOME=/tmp PATH=/texlive/2011/bin/arch:/bin; cd /submissions/1297906/ && latex 'arXiv_Paper.tex' < /dev/null)" 2>&1
[verbose]: This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)
restricted \write18 enabled.
entering extended mode
(./arXiv_Paper.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven
ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded
.
(/texlive/2011/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/texlive/2011/texmf-dist/tex/latex/base/size10.clo))
(/texlive/2011/texmf-dist/tex/latex/hyperref/hyperref.sty
(/texlive/2011/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/texlive/2011/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/texlive/2011/texmf-dist/tex/latex/graphics/keyval.sty)
(/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/texlive/2011/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/texlive/2011/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/texlive/2011/texmf-config/tex/latex/latexconfig/hyperref.cfg)
(/texlive/2011/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (default): hdvips.

(/texlive/2011/texmf-dist/tex/latex/hyperref/hdvips.def
(/texlive/2011/texmf-dist/tex/latex/hyperref/pdfmark.def
(/texlive/2011/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)))
(/texlive/2011/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/texlive/2011/texmf-dist/tex/latex/base/ifthen.sty)
(/texlive/2011/texmf-dist/tex/latex/tools/calc.sty)
(/texlive/2011/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/texlive/2011/texmf-dist/tex/latex/xcolor/xcolor.sty
(/texlive/2011/texmf-dist/tex/latex/latexconfig/color.cfg)
(/texlive/2011/texmf-dist/tex/latex/graphics/dvips.def)))
(/texlive/2011/texmf-dist/tex/latex/graphics/graphicx.sty
(/texlive/2011/texmf-dist/tex/latex/graphics/graphics.sty
(/texlive/2011/texmf-dist/tex/latex/graphics/trig.sty)
(/texlive/2011/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/texlive/2011/texmf-dist/tex/latex/pdfpages/pppdftex.def
(/texlive/2011/texmf-dist/tex/latex/pdfpages/ppnull.def

Package pdfpages Warning: I will use a dummy \includepdf command
(pdfpages) which will NOT insert any pages, because
(pdfpages) you are producing DVI output.

)))

! LaTeX Error: Option clash for package hyperref.

See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
... 

l.14 \begin
{document}
? 
! Emergency stop.
... 

l.14 \begin
{document}
No pages of output.
Transcript written on arXiv_Paper.log.

[verbose]: latex 'arXiv_Paper.tex' failed.
[verbose]: TEXMFCNF is unset.
[verbose]: ~~~~~~~~~~~ Running latex for the first time ~~~~~~~~
[verbose]: Running: "(export HOME=/tmp PATH=/texlive/2011/bin/arch:/bin; cd /submissions/1297906/ && latex 'arXiv_Paper.tex' < /dev/null)" 2>&1
[verbose]: This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011)
restricted \write18 enabled.
entering extended mode
(./arXiv_Paper.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,
icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or
iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,
lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol
ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven
ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded
.
(/texlive/2011/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/texlive/2011/texmf-dist/tex/latex/base/size10.clo))
(/texlive/2011/texmf-dist/tex/latex/hyperref/hyperref.sty
(/texlive/2011/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
(/texlive/2011/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))
(/texlive/2011/texmf-dist/tex/latex/graphics/keyval.sty)
(/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/texlive/2011/texmf-dist/tex/latex/oberdiek/kvoptions.sty)
(/texlive/2011/texmf-dist/tex/latex/hyperref/pd1enc.def)
(/texlive/2011/texmf-config/tex/latex/latexconfig/hyperref.cfg)
(/texlive/2011/texmf-dist/tex/latex/url/url.sty))

Package hyperref Message: Driver (default): hdvips.

(/texlive/2011/texmf-dist/tex/latex/hyperref/hdvips.def
(/texlive/2011/texmf-dist/tex/latex/hyperref/pdfmark.def
(/texlive/2011/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)))
(/texlive/2011/texmf-dist/tex/latex/pdfpages/pdfpages.sty
(/texlive/2011/texmf-dist/tex/latex/base/ifthen.sty)
(/texlive/2011/texmf-dist/tex/latex/tools/calc.sty)
(/texlive/2011/texmf-dist/tex/latex/eso-pic/eso-pic.sty
(/texlive/2011/texmf-dist/tex/latex/xcolor/xcolor.sty
(/texlive/2011/texmf-dist/tex/latex/latexconfig/color.cfg)
(/texlive/2011/texmf-dist/tex/latex/graphics/dvips.def)))
(/texlive/2011/texmf-dist/tex/latex/graphics/graphicx.sty
(/texlive/2011/texmf-dist/tex/latex/graphics/graphics.sty
(/texlive/2011/texmf-dist/tex/latex/graphics/trig.sty)
(/texlive/2011/texmf-dist/tex/latex/latexconfig/graphics.cfg)))
(/texlive/2011/texmf-dist/tex/latex/pdfpages/pppdftex.def
(/texlive/2011/texmf-dist/tex/latex/pdfpages/ppnull.def

Package pdfpages Warning: I will use a dummy \includepdf command
(pdfpages) which will NOT insert any pages, because
(pdfpages) you are producing DVI output.

)))
No file arXiv_Paper.aux.
(/texlive/2011/texmf-dist/tex/latex/hyperref/nameref.sty
(/texlive/2011/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.


Package pdfpages Warning: I cannot determine the number of pages of the
(pdfpages) included document, while being in DVI mode. You
(pdfpages) can use the option `lastpage' to give me a hint.

[1] (./arXiv_Paper.aux)

Package rerunfilecheck Warning: File `arXiv_Paper.out' has changed.
(rerunfilecheck) Rerun to get outlines right
(rerunfilecheck) or use package `bookmark'.

)
Output written on arXiv_Paper.dvi (1 page, 2388 bytes).
Transcript written on arXiv_Paper.log

虽然,它说成功了,但生成的 pdf 只有一页(这也是我阅读日志文件时所说的内容)。

答案1

您获得的日志文件说明了一切:

Package pdfpages Warning: I will use a dummy \includepdf command
(pdfpages) which will NOT insert any pages, because
(pdfpages) you are producing DVI output.

您需要使用 来处理您的提交pdflatex,而不是latex使用 arXiv 默认使用的引擎。

从 arXiv 的帮助页面来看,http://arxiv.org/help/submit_tex

PDFLaTeX 提交的注意事项

arXiv 完全支持并识别 PDFLaTeX。您可以通过\pdfoutput=1在主 pdflatex 文件前言的前 5 行内进行设置来确保 pdflatex 处理。您不需要任何其他特殊标志。但是,由于这是一个相对较新的功能,我们建议您仔细验证 arXiv 生成的 PDF 并报告可能出现的任何问题。

  • 如果您需要在源代码中使用条件分支,请使用该ifpdf包。不要重新发明轮子。ifpdf提供了一种强大且经过充分测试的机制来区分 pdf 模式下的 pdflatex 和其他模式或引擎。
  • 某些软件包可能需要特定的后端驱动程序,以软件包选项的形式出现,例如\usepackage[pdftex]{...}。但是,graphicshyperref软件包会自动确定正确的驱动程序;您不必做出此明确选择,也不应该这样做以避免冲突。
  • 您可以使用所有 pdf 特定的超文本选项来增强 PDF 文件中的元数据,例如\hypersetup{pdfauthor={some author},pdftitle={eye-catching title}}
  • 可以使用标准图形包将图形以 JPEG、PNG 或 PDF 格式包含在内。出于安全原因,arXiv 不允许自动格式转换,因此您的图形必须已经采用正确的格式。
  • 与原生 LaTeX 不同,PDFLaTeX 的默认输出格式为 PDF,没有中间 DVI 或 PostScript。因此,这些格式不适用于 PDFLaTeX 提交的下载。

因此,解决您的问题的最佳方法是使用

\pdfoutput=1

\documentclass[...]{...}

答案2

根据建议,我将下面显示的行添加到 .tex 文件中,并且它可以工作:)。

  \pdfoutput=1

相关内容