错误消息不明确的问题(使用 LaTeXmk[fls 文件] 和 XeLaTeX[坏文件描述符])

错误消息不明确的问题(使用 LaTeXmk[fls 文件] 和 XeLaTeX[坏文件描述符])

或多或少出乎意料的是,我得到了以下信息:

xelatex: Bad file descriptor
Latexmk: fls file doesn't appear to have been made

我对第一个文件一无所知,第二个文件令人困惑,因为相应的 .fls 文件是在latexmk运行过程中创建的。由于我的文本主要\input基于此,我将其缩小到两个文件。其中一个文件发生了重大变化,因此根据调试规则,它可能是调查的目标任何改变都是问题但另一个只是简单地包含参考书目,很长时间以来都没有改变。我做了latexmk -C filename几次,但没有任何改进。它创建了 .pdf 文件,但仍然失败:

Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 256

另外,Latexmk 把发现并“收集”的错误放在哪里?我似乎也找不到“代码 256”的实际含义。

此时欢迎所有建议、批评和指点。

更新:这是一个重复了该问题的 MWE(至少对我来说):

首先是 test.tex 文件:

\documentclass{memoir}
\begin{document}
\input{bibliography}
\end{document}

\input然后是如上的bibliography.tex 文件

\nocite{*}
\bibliographystyle{plain}
\bibliography{test}

然后是实际的 test.bib 文件:

@book{Bateman.1906,
 author = {Bateman, Newton and Selby, Paul and Short, William F.},
 year = {1906},
 title = {Historical encyclopedia of Illinois},
 address = {Chicago},
 publisher = {Munsell Pub. Co.}
}

@book{Beckett.1966,
 author = {Beckett, J. C.},
 year = {1966},
 title = {The making of modern Ireland, 1603-1623},
 address = {London},
publisher = {Faber}
}

更新二:以防万一,这是latexmkrc我使用的文件:

$pdf_mode = $preview_mode = 1;
$dvi_mode = $postscript_mode = 0;
$pdflatex = "xelatex %O %S";
$hash_calc_ignore_pattern{'dat'} = '^.*$';
$pdf_previewer = 'start "c:/Program Files/SumatraPDF/SumatraPDF.exe" %O %S';

我能想到的唯一奇怪之处是它$hash_calc_ignore_pattern{'dat'}跳过了我用于版本控制的 .dat 文件。

更新三屏幕转储包括“清理”和运行:

+C:\>latexmk -C test
Latexmk: This is Latexmk, John Collins, 11 Nov. 2012, version: 4.35.
**** Report bugs etc to John Collins <collins at phys.psu.edu>. ****
Latexmk: Examining fdb file 'test.fdb_latexmk' for rules ...

+C:\>latexmk test
Latexmk: This is Latexmk, John Collins, 11 Nov. 2012, version: 4.35.
**** Report bugs etc to John Collins <collins at phys.psu.edu>. ****
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': Rules & subrules not known to be previously run:
   pdflatex
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'xelatex  -recorder  "test.tex"'
------------
This is XeTeX, Version 3.1415926-2.4-0.9998 (MiKTeX 2.9)
entering extended mode
(C:\Users\hsmyers\Desktop\Jourdan\test\test.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar
abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,
croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga
lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland
ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,
 lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n
german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman
ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm
an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl
ishmax, welsh, loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\memoir.cls"
Document Class: memoir 2011/03/06 v3.6j configurable book, report, article docu
ment class
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\ifetex\ifetex.sty"
("C:\Program Files\MiKTeX 2.9\tex\plain\ifetex\ifetex.tex"))
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\misc\etex.sty")
("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mem10.clo")
("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mempatch.sty"))
(C:\Users\hsmyers\Desktop\Jourdan\test\test.aux)
(C:\Users\hsmyers\Desktop\Jourdan\test\bibliography.tex
(C:\Users\hsmyers\Desktop\Jourdan\test\test.bbl
bibitemlist
)) [1] (C:\Users\hsmyers\Desktop\Jourdan\test\test.aux)

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

 )
Output written on test.pdf (1 page).
Transcript written on test.log.
Latexmk: Found input bbl file 'test.bbl'
Latexmk: References changed.
Latexmk: Log file says output to 'test.pdf'
Latexmk: Found bibliography file(s) [test.bib]
Latexmk: applying rule 'bibtex test'...
Rule 'bibtex test': The following rules & subrules became out-of-date:
      'bibtex test'
------------
Run number 1 of rule 'bibtex test'
------------
For rule 'bibtex test', running '&run_bibtex(  )' ...
------------
Running 'bibtex  "test"'
------------
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': File changes, etc:
   Changed files, or newly in use since previous run(s):
      'test.aux'
------------
Run number 2 of rule 'pdflatex'
------------
------------
Running 'xelatex  -recorder  "test.tex"'
------------
xelatex: Bad file descriptor
Latexmk: fls file doesn't appear to have been made
Latexmk: Found input bbl file 'test.bbl'
Latexmk: References changed.
Latexmk: Log file says output to 'test.pdf'
Latexmk: Found bibliography file(s) [test.bib]
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs of latex/pdflatex.

抱歉,尽管 MWE 很短,但它运行的时间相当长。

解决??:当我尝试各种方法时,我偶然发现了一个使固定。请注意,我说的是“一个”修复,而不是“那个”修复,因为虽然这有效,但它并没有告诉我到底哪里出了问题 :( 我所做的就是运行,TexWorks令我惊讶的是,它运行完成了,没有错误。然后因为我既好奇又偏执,我做了一点改变,然后latexmk再次运行。同样完成没有错误。所以你看---工作做得很好---不是!另一方面,我又恢复了运行,虽然仍然有些无知。

相关内容