Created attachment 7844 [details] TeX file that isn't producing the correct PDF. OK. I know a little about computers but I'm not savvy enough to sort this one out myself, so it seems. I have tried a few things and I'll outline that here. Basically, I'm producing a report using LaTeX (MiKTeX 2.9 & TeXMaker). I'm new and loving it, but I've been learning as I go along. I'm trying to plot some dot graphs using the postscript package graphics and the stuff that comes with it. The issue is that I seem to be able to load one graph, but not the other one. I have attached two (shortened) copies to show the problem. When I run the first graph function, it compiles but with an error, and then the PDF file only contains the pages before I tried to include that plot. If I exclude the first plot, but include the second one, it runs fine and everything works out. The attached files have the .tex versions that both work and don't work where I have just commented out the offending line in the version that works. When I compile I am running LaTeX -> dvips -> ps2pdf Ghostscript 9.04 & 9.02 (i tried updating gs to see if it helped, it didn't) I have tried updating ghostscript and using other compilation techniques (such as dvipdfm, pdflatex etc). Only changing one thing at a time to see if it fixed the problem. The other compilation processes produce different results (understandably). I have also tried other plotting functions within LaTeX (such as data plot) using the same set of numbers and it produces the same error. I have also attached the relevant PDF files so you can see the output that each comilation produces, as well as the files I am trying to plot from. The first graph should ideally like the second one does in the correct pdf. I fully realise that it is probably a very simple solution and that I'm likely being quite naive about the situation, but I've spent the last couple of days trying to sort it out myself and I can't find a solution. EDIT: Apparently I can only add 1 attachment at a time
Created attachment 7845 [details] Incorrect PDF
Created attachment 7846 [details] TeX with faulty line commented out
Created attachment 7847 [details] Correct PDF without Plot 1
Created attachment 7848 [details] Plot1
Created attachment 7849 [details] Plot 2
(In reply to comment #0) > Created an attachment (id=7844) [details] > TeX file that isn't producing the correct PDF. I'm afraid I cannot use a TeX file. In order to investigate the problem I will need a PostScript or PDF file, and the command line being used to invoke Ghostscript. I also can't help you get the files, or the command line, I don't use these tools at all. > I have also attached the relevant PDF files so you can see the output I'm afraid that doesn't help, other than illustrating the problem. It is useful to see what the problem is, but it doesn't help in investigating it. > EDIT: Apparently I can only add 1 attachment at a time Correct.
> I'm afraid I cannot use a TeX file. In order to investigate the problem I will > need a PostScript or PDF file, and the command line being used to invoke > Ghostscript. OK. PS File uploaded for each one. > > I also can't help you get the files, or the command line, I don't use these > tools at all. I realise that the tools variable, it was just further information that may/may not be useful. > > I have also attached the relevant PDF files so you can see the output > > I'm afraid that doesn't help, other than illustrating the problem. It is useful > to see what the problem is, but it doesn't help in investigating it. Understood. The reason to upload them was only for information. I understand that showing only the final file isn't that helpful, I just thought it would be good for context. > > EDIT: Apparently I can only add 1 attachment at a time > > Correct. Cheers
Created attachment 7850 [details] Post Script File notworking case
Created attachment 7851 [details] Post Script File working case
(In reply to comment #7) > > I'm afraid I cannot use a TeX file. In order to investigate the problem I will > > need a PostScript or PDF file, and the command line being used to invoke > > Ghostscript. > > OK. PS File uploaded for each one. The 'notworking' PostScript file contains a PostScript grammatical error. The file contains: D 8 D 4.84 D 6 D 3.53 D 4 D 2.21 D 2 D 0.98 D 0 D 0 D -2 D -0.94 D -4 D -2.16 D -6 D =3.41 D -8 D -4.62 D the '=' symbol doesn't make any sense there, and Ghostscript throws a syntax error ("/undefined in =3.41") on page 2 while processing it. If I change the'=' to a '-' then the file runs to completion. I would guess (and it is a guess) that this is a problem with dvips, since that it what is creating the PostScript program. You might like to try a newer version of dvips, if there is one, or reporting the problem to the maintainers. I'm afraid that this is not a Ghostscript bug.
(In reply to comment #10) > (In reply to comment #7) > > > I'm afraid I cannot use a TeX file. In order to investigate the problem I will > > > need a PostScript or PDF file, and the command line being used to invoke > > > Ghostscript. > > > > OK. PS File uploaded for each one. > > The 'notworking' PostScript file contains a PostScript grammatical error. The > file contains: > > D 8 D 4.84 D 6 D 3.53 D 4 D 2.21 D 2 D 0.98 D 0 D 0 D -2 D -0.94 > D -4 D -2.16 D -6 D =3.41 D -8 D -4.62 D > > the '=' symbol doesn't make any sense there, and Ghostscript throws a syntax > error ("/undefined in =3.41") on page 2 while processing it. If I change the'=' > to a '-' then the file runs to completion. > > I would guess (and it is a guess) that this is a problem with dvips, since that > it what is creating the PostScript program. You might like to try a newer > version of dvips, if there is one, or reporting the problem to the maintainers. > > I'm afraid that this is not a Ghostscript bug. You are absolutely right. I sincerely apologise for taking up your valuable time.