0

Using xelatex, I generate a large PDF file (in terms of size and number of pages) by combining a quite high number of files with pdfpages plus other text in Latex. It takes considerable time to generate the file each time I make changes and besides I have to run xelatex multiple times until all the references and TOC entries are correctly resolved and updated. Therefore, I looked at "latexmk -xelated myfile" as a possible solution to ease the process, but sometimes I get an error when latexmk converts itself the xdv file into a pdf file (this is strange because the error is not shown if I manually convert the xdv file to a pdf file myself by calling xdvipdfmx myself). Maybe it is a temporary random error, but it is quite annoying as I have to re-start the process afterwards, and this is time consuming.

-Any ideas about why this may happen? -Are there better alternatives than latexmk? (I considered rubber, but it does not seem to work in Windows).

Thank you for any suggestion.

  • To understand what is happening, we'll need to see more details. Show the output from latexmk including the error message from xdvipdfmx (and its context). – John Collins Jun 7 at 13:11
  • Usual error: Can't spawn "xdvipdfmx -o "myfile.pdf" "myfile.xdv"": No error at c:\texlive\2018\texmf-dist\scripts\latexmk\latexmk.pl line 8722. Latexmk: Errors, so I did not complete making targets Collected error summary (may duplicate other messages): xdvipdfmx: Command for 'xdvipdfmx' gave return code 65280 Latexmk: Use the -f option to force complete processing, unless error was exceeding maximum runs of latex/pdflatex. C:\texlive\2018\bin\win32\runscript.tlu:790: command failed with exit code 12: perl.exe c:\texlive\2018\texmf-dist\scripts\latexmk\latexmk.pl -xelatex myfile – user173026 Jun 7 at 16:10
  • As I commented before, sometimes the PDF file is generated and sometimes there is an error, so the error does not always arise. Besides, I sometimes get messages such as: "xdvipdfmx:warning: Cannot parse document. Broken PDF file? xdvipdfmx:warning: pdf: image inclusion failed for..." , "xdvipdfmx:warning: Could not find image resource... xdvipdfmx:warning: Interpreting special command image (pdf:) failed." However, these seem to be warnings, as I can see the final PDF file generated even when these messages appear. I also tried with the -f option, with similar results. – user173026 Jun 7 at 16:12
  • @user173026 Could you contact me directly, at the e-mail address in the latexmk documentation. There are too many possibilities, some quite exotic, to be easily sorted out in comments. – John Collins Jun 7 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.