44

arXiv is smart enough to detect whether your PDF is generated by LaTeX. If it is, arXiv asks for the sources of the PDF instead of the PDF file itself. This is really annoying and inconvenient.

I ask a way to fool the arXiv and avoid PDFs being detected as generated by LaTeX (even if they were indeed).

I have tried this: http://www.hrstc.org/node/62: "create a pdf from word and then simply insert pages from your article, and delete the word's page".

And it did not work.

  • 11
    What's wrong with uploading the sources? It's much better from an archival point of view. – Alex Jun 22 '14 at 18:40
  • 9
    @Alex The arXiv doesn't always have the most up to date versions of packages, meaning that a document using new features might not compile. So it's not necessarily about not uploading the sources, but ensuring that the arXiv doesn't actually try to compile those sources. – Loop Space Jun 22 '14 at 19:34
  • 3
    @LoopSpace I would never use the latest features for writing a paper. Publishers use even older versions of LaTeX than arXiv. – Alex Jun 22 '14 at 20:34
  • 17
    @Alex Some of us think that publishers are as outdated as LaTeX 2.09 ... Seriously, once a publisher agrees to publish my paper then I'll downgrade it (and I have done this: I downgraded one paper from TikZ to xy). Before that, I'm not going to anticipate something that might not happen and so I'll take advantage of the latest features to make my paper as nice to read as possible. – Loop Space Jun 22 '14 at 21:28
  • 4
    Unfortunately, arXiv building is just fckd up. They insist on you uploading auxiliary files like .bbl that should be auto-generated appropriately. And if there is a version mismatch between your LaTeX version and the arXiv version, it does not work. This makes for example the popular biblatex package unusable with arXiv. It's so stupid that they do not allow you to choose to run bibtex or biber. – Erich Schubert Oct 12 '18 at 19:17
34

Update 2018-11-26: According to the comment from Andrew MacFie, this method no longer works: the arXiv have put in place a check specifically for this. Whether or not they have solved the underlying problem, I have no idea. Whether or not a variation of this solution would work, I have no idea.


I strongly advise uploading the source code to the arXiv for archival purposes. Once the document itself is made public, there is no reason I can think of for not making the source code public. That said, there can be reasons for avoiding the arXiv's own compiler if it doesn't have up to date versions of packages that you use and, for example, uploading the entirety of TikZ/PGF with your document seems a little excessive. (NB For TikZ/PGF specifically, the external library is a big help here.)

Include a PDF copy of the article with your submission (with a slightly modified filename), and at the top of the document put the following (suitably edited):

\documentclass[a4paper]{article}
\pdfoutput=1
\usepackage{hyperref}
\hypersetup{
  pdfinfo={
    Title={Your Title Here},
    Author={Your Name Here},
    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]{the_real_article.pdf}
\end{document}

<rest of source code goes here>

I think that to comply with the spirit of the arXiv, in that you're making stuff generally available, then if you are doing this then you should go the extra mile and include something like the list of packages used with their versions so that someone who downloads the source will know what they need in order to compile it.

I can attest to the fact that this has worked in the past.

  • 1
    This didn't work for me -- the processing proclaimed success but I ended up with a blank one-page document. Still trying to get my submission working... – Andrew D. King Feb 6 '15 at 23:49
  • 5
    add \pdfoutput=1 in the second line – Grzegorz Chrupała Jun 11 '15 at 14:53
  • 3
    Note that you lose all hyperref (linking) information when using this approach. PAX is a program designed to help with this, but it didn't work for me. – David Spivak Aug 4 '15 at 16:03
  • 4
    @JoshuaGrochow Simple: remove all comments before uploading. You can do that with a straightforward script - assuming you haven't changed the catcode of %. After all, comments don't affect the output so it is completely safe to remove them. (To forestall nitpickers: the script should do s/%.*/%/gm if I have my modifiers right.) – Loop Space Nov 26 '15 at 18:31
  • 2
    @LoopSpace: I knew that. The point is that this requires you to add another step to your workflow ("Ah, shoot, I forgot to remove comments before uploading! Let me do that now and re-upload..." - or worse, figure it out after it's already appeared on the arXiv). And if it's not you but collaborators, you may have to help your collaborator setup that script. You'd really rather just upload the PDF and not have to worry about comments in your source. – Joshua Grochow Nov 26 '15 at 18:50
10

The solution is simple. Open your PDF using some PDF viewer/editor. For instance using Foxit Reader. Then print the file using a virtual printer, for example Foxit PDF printer. The printed version of your PDF would be image-based. However, to increase the quality you can choose a higher resolution, such as 300 dpi. The printed PDF file can be easily uploaded into arXiv.org.

  • 1
    For some reason most pdf readers don't allow you to print to pdf anymore. – dorien Dec 1 '18 at 3:30
  • There are a lot of free Print2PDF software you can install that integrate with your computer as a virtual printer. For example, CutePDF, Win2PDF, CUPs-PDF and a lot more. – NKN Dec 7 '18 at 15:50
  • I have tried this technique, but am getting the message that my submission is on hold because the output from pdf to text conversion was too small to allow further processing. I have printed to PDF virtually, but seems to be some issue with the resolution? – Tom Jul 19 at 5:28
4

Arxiv detected my PDF (made using MS Word!) to be sourced from a TEX file and kept asking me to upload the source file and kept rejecting my PDF submission. Eventually I figured out that MS Word 2016 uses a number of TEX identifiers in their equation editor which gets flagged by Arxiv. After scouring the internet for fixes with no success, I serendipitously found out that if you save your Word manuscript in 'Word 97-2003' format, it removes those TEX identifiers and converts all equations to images. You can then safely Save As PDF and upload to Arxiv without any red flags.

  • 2
    Excuse me. Is it a comment or an answer? – Sebastiano Jan 4 at 22:13
  • 2
    @Sebastiano To me this sounds like a valid answer. – user121799 Jan 4 at 22:45
  • @marmot My question was only to understand as to apply the answer of the OP. My best regards. – Sebastiano Jan 5 at 12:57
3

Since several other methods didn't work (e.g. resetting the PDF producer metadata via hyperref or a PDF editor, or trying a Print As PDF hack through a web browser or Google Drive), here's a simple one that's worked for me in Nov 2019. It's specific to command-line users, though, but that also means that it can be conveniently automated as part of your document build process.

Just process your PDF to Postscript with pdf2ps, and then back again with ps2pdf:

pdf2ps mydoc.pdf
ps2pdf mydoc.ps

That's it.

This seems to reset enough that arXiv doesn't detect the TeX origin of the document, but I don't see any significant detriment to the output. In particular I wanted to upload in this form for a special document -- not a paper, but of interest to the arXiv community -- where I was using custom fonts and XeLaTeX, and those fonts were preserved by the PDF/PS/PDF round-trip.

Here's a sample Makefile to automate this along with the rest of the build (for a simple 2-pass, standalone XeLaTeX compilation):

.PHONY = all clean
BASENAME = mydoc

all: $(BASENAME).pdf $(BASENAME)-arxiv.pdf

clean:
    rm -f $(BASENAME).pdf $(BASENAME).aux $(BASENAME).log $(BASENAME).out $(BASENAME)-arxiv.*

$(BASENAME).pdf: $(BASENAME).tex
    xelatex $< && xelatex $<

$(BASENAME)-arxiv.pdf: $(BASENAME).pdf
    cp $< $@ && pdf2ps $@ && ps2pdf $(@:.pdf=.ps) && rm *.ps

Needless to say -- I hope -- this is to be used for exceptional cases where you really want/need features unsupported by arXiv's AutoTeX processing.

It would be nice if it were possible to also provide the source without it being compiled, but my attempt to include the .tex file in the anc subdirectory for ancillary material itself led to a processing error, because currently "Please note that ancillary files are not supported with PDF submissions at this time." on https://arxiv.org/help/ancillary_files . This may be fixed by the time you're reading this.

1

The best way to do is to upload PDF to the google docs and then issue print command and then save the file as PDF. Then upload this new PDF on the arxiv. This works as on 7 august 2019 and if you want to know more, read the documentation on https://arxiv.org/help/submit_pdf

  • 2
    If you want to feed google with all datas do it; I think it is better to omit this doing as possible as you can do ... And there are other answers with valid ways to this question. – Mensch Aug 7 at 17:14
  • I tried this, but the import to GDocs resets the custom fonts etc. which was my reason for wanting to exceptionally submit this (not a normal paper) as PDF rather than TeX sources. Trying a print-as-PDF from the original as viewed in a browser doesn't seem to overwrite enough information to bypass arXiv's tests. – andybuckley Nov 7 at 11:48
1

This worked for me 06 November 2019.

For people who do not have access to the paying Adobe Acrobat functions:

  1. Convert your pdf to a .docx or similar. I used this one, maybe there are some better options.
  2. Use MS Word or equivalent and check the file (I noticed this conversion wreaks havoc on .eps images) and replace them with .png or similar where necessary.
  3. Export as .pdf with MS Word or the program you are using.

I really hope they at some point either make their auto-compiler more user-friendly or at least make the generated error messages more informative. I tried all the tips I could find on this site and really wanted to upload it as .tex but nothing seemed to work. The help desk was also no help at all.

0

The Arxiv LaTeX compiler is a pain in the ass and never compiled my paper correctly. That is the reason why I wanted to upload my own PDF w/o source.

Arxiv is identifying the LaTeX pdf based on some meta information and based on the embedded fonts.

Following these steps, I tricked the pdf check:

1) Create an empty pdf, such as with Word. Insert your Latex PDF into the Word-generated PDF. I used Mac Preview. Any other software such as Adobe Acrobat would work too.

2) Open your generated pdf with Adobe Acrobat. Go to: File > Save > Save as Other > Optimized PDF... > Fonts > unembed the troubling fonts (CMR10 & rsfs10). If this did not work, try to also remove other fonts.

(worked on 18th of August 2019)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.