[Tex/LaTex] Create .dvi and .ps file with Overleaf

compilingoverleafps

I need to submit the final version of my paper to a conference but they request a .zip file that including .ps and .dvi file of my .tex document. Since my whole project is on Overleaf, I want to know how can I accomplish it?

Here, what I have done so far:

  • First I learned that I have to change compiler from pdflatex to latex… Done!
  • Then when I compile, it returned errors that request natural size of figures. And I used the answer given here:

  • Cannot determine size of graphic

Now it doesn't yell out me, compiles with no error, however still can't see the figures in the output. I don't even know if it is normal or not. Also, can't download a .div file, still gives .pdf file to me.

About .ps file, I haven't there yet, didn't try. But if you know what to do, please inform me. Thanks in advance.

Best Answer

[Disclaimer: I'm a support personnel at Overleaf.] So to recap/summarise the comments:

  1. Set your Overleaf project's compiler to "LaTeX" using the steps here.
  2. You'll need to make sure all your images are in .eps format, because that's what latex can handle. There's no need to use natwidth nor natheight with \includegraphics; in some situations they may even cause errors.
  3. Add a latexmkrc file to your Overleaf project; place it in the project's top level. Add the following line in it:
END { system ('dvips -Ppdf output.dvi'); }

(Usually $pdf_mode=2 would make sure that a .dvi and a .ps is generated, but this doesn't work on Overleaf.)

  1. Recompile, and then download the .dvi and .ps files using the steps here.

If you prefer not to add a latexmkrc file, you can skip step 3 and use step 4 to download just the .dvi file. You can then run dvips -Ppdf yourfile.dvi on a local computer; or use https://cloudconvert.com to convert it to .ps.

Related Question