News for hackers. Stuff that matters.
Re:Einstein award going to Paul Ginsparg for creating arXiv.org by cozzyd on Friday November 26, 2021 @01:47PM (#29352868)
Yes, arXiv generally doesn't accept PDF's, preferring instead the tex source (which is amusing when people don't realize their comments show up. It uses something called autotex which has a few quirks (e.g. all images have to be in the same dir, etc.).

Here is the makefile I use that also generates a .tar.gz for the arxiv (obviously won't help with Overleaf without cloning first, but)

    FIGURES=$(wildcard figs/*) 
    TEXFILES=main.tex included.tex included2.tex ...

    main.pdf: $(TEXFILES) $(FIGURES) main.bib 
         latexmk -pdf -g $< 

    .PHONY: clean show

    clean:
        latexmk -C 
        rm -rf forarxiv* 

    forarxiv.tar.gz: forarxiv/main.tex forarxiv.pdf 
        rm -f forarxiv.tar.gz 
        cd forarxiv &&  tar --exclude=*.bib -cvzf ../forarxiv.tar.gz *

    forarxiv: 
       mkdir -p $@

    forarxiv/main.tex: main.tex main.bib | forarxiv
       latexpand --empty-comments $< | sed -e 's#figs/##g' > $@

    forarxiv/main.bib: main.bib
       cp $< $@

    forarxiv.pdf: forarxiv/main.tex $(FIGURES) forarxiv/main.bib
       ln -f $(FIGURES) forarxiv/
       ln -f foo.sty forarxiv/
       ln -f foo.bst forarxiv/
       latexmk -cd -pdf forarxiv/main.tex 
       latexmk -cd -c forarxiv/main.tex 
       mv forarxiv/main.pdf $@



    show: main.pdf 
        xdg-open main.pdf

There are no comments on this comment yet.