5

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.

Bernard
  • 271,350
  • 3
    Before trying to convert everything to the latex+dvips route, better ask at the conference if they accept also pdf - insisting on dvi/ps is rather odd nowadays. – Ulrike Fischer Sep 04 '19 at 08:24
  • 1
    Are all your images already in .eps format? You can download the .dvi file via https://www.overleaf.com/learn/how-to/View_generated_files . And if it's really confirmed that you really do need a .ps file as well I'll post a more complete answer later – imnothere Sep 04 '19 at 08:41
  • @LianTzeLim my images are actually pdf files: \includegraphics[width=0.77\textwidth,natwidth=580,natheight=887]{per10.pdf} Now you tell me convert them to .eps ? :/ – stack me Sep 04 '19 at 08:42
  • Wellll yes the latex+dvipdf compiler can only handle .eps images. – imnothere Sep 04 '19 at 08:48
  • @LianTzeLim thanks bro, I converted them to eps and I downloaded the .dvi file. Now I need the .ps file. I search on web but can't see any clear answer. Maybe it is because of my stupidity, I don't know... – stack me Sep 04 '19 at 08:59
  • 1
    Don't use the natwidth and natheight keys, they make no sense and can even harm. – Ulrike Fischer Sep 04 '19 at 09:01
  • @UlrikeFischer well, they did indeed so I removed them, now it works like a charm, except creating a .ps file... Still looking for it. – stack me Sep 04 '19 at 09:03
  • well the ps-file is an intermediary file, so you should tell overleaf to run the latex-dvips-ps2pdf route and then it should be in the output files. @LianTzeLim can probably tell you how to do it. – Ulrike Fischer Sep 04 '19 at 09:19
  • Now I found a tool named pdftops.exe and it converts somethings but gives error like Config Error: No display font for 'Symbol'. Also, I converted that .ps file to .pdf file with an online tool, it returns a pdf file with only the first page of my paper. – stack me Sep 04 '19 at 09:23
  • @stackme try the command dvips -Ppdf filename.dvi through MS-DOS prompt, and you will get a .ps file – MadyYuvi Sep 04 '19 at 09:57
  • @MadyYuvi where can I download this dvips's executable file? It seems like a package when I search for it. – stack me Sep 04 '19 at 11:07
  • @stackme It comes along with MikTeX setup, if you go for LaTeX->dvips->PS2PDF, then MikTeX is recommendable... – MadyYuvi Sep 04 '19 at 11:12
  • In your Overleaf project add a file named latexmkrc (without extension), and add this line in it: END { system ('dvips -Ppdf output.dvi'); } then recompile. ($pdf_mode=2 doesn't work) You can also use https://cloudconvert.com/ to convert dvi -> ps – imnothere Sep 04 '19 at 12:37
  • @LianTzeLim Thank you so much. – stack me Sep 04 '19 at 12:38

1 Answers1

5

[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.

imnothere
  • 14,215