djsutherland / arxiv-collector

A little Python script to collect LaTeX sources for upload to the arXiv.
BSD 3-Clause "New" or "Revised" License
334 stars 23 forks source link

Error after adding the overleaf hook to latexmk #16

Closed janhajer closed 4 years ago

janhajer commented 4 years ago

I am running python ./arxiv_collector.py from master which works well. My latexmk version is 4.69a and works also well on its own. When I add the lines

$dependents_list = 1;
$deps_file = ".deps";

END {
  system("python arxiv_collector.py --latexmk-deps $deps_file");
}

to my empty .latexmkrc I get the following error message.

Latexmk: All targets (draft.pdf) are up-to-date
Gathering outputs...
Traceback (most recent call last):
  File "arxiv_collector.py", line 500, in <module>
    main()
  File "arxiv_collector.py", line 482, in main
    collect(
  File "arxiv_collector.py", line 223, in collect
    expect(
  File "arxiv_collector.py", line 54, in expect
    raise ValueError(msg)
ValueError: deps file .deps seems broken: expected the line
draft.pdf :\
  to be one of:
draft.tex.pdf :\
draft.tex.pdf .deps :\

Any idea what goes wrong here? I started to investigate this problem after noticing that overleaf set up according to the README generates only an empty zip file.

janhajer commented 4 years ago

I managed to fix my local setup by adding

@default_files = ('draft');

to my latexmkrc. But this still doesn't fix the overleaf compilation. As overleaf is generating the /compile/output.pdf file that arxiv-collector seems to not expect, as indicated by this overleaf error message

Running 'pdflatex  -synctex=1 -interaction=batchmode -recorder -output-directory="/compile" --jobname="output"  "draft.tex"'
------------
Latexmk: Found input bbl file 'output.bbl'
Latexmk: Log file says output to 'output.pdf'
Latexmk: Found biber source file(s) [references.bib output.bcf]
Latexmk: Undoing directory change
Traceback (most recent call last):
  File "arxiv_collector.py", line 500, in <module>
    main()
  File "arxiv_collector.py", line 482, in main
    collect(
  File "arxiv_collector.py", line 223, in collect
    expect(
  File "arxiv_collector.py", line 54, in expect
    raise ValueError(msg)
ValueError: deps file .deps seems broken: expected the line
/compile/output.pdf :\
  to be one of:
draft.tex.pdf :\
draft.tex.pdf .deps :\
djsutherland commented 4 years ago

Sorry about not seeing this sooner, @janhajer - my github notifications are messed up right now.

There were some issues with overleaf's usual setup in terms of compile_dir and jobname; I honestly don't know why my testing worked earlier. But this should be fixed now in 0.4.1 (hit "refresh" on your file in Overleaf) - please let me know if it's still not working for you!

janhajer commented 3 years ago

Thanks, works like a charm