2

Apologies that I can't post a properly minimal working example. However, I've trimmed it down to a two page document, with only a section title, a TikZ figure (actually, four subfigures) and a chemical diagram, processed from .eps by Chemcheme/auto-pst-pdf. And, regrettably, a lengthy preamble, copied in entirety from my Thesis. Removal of the TikZ figures, or any one of a number of seemingly unrelated lines seems to resolve the bug, but not in any clear, transparent way that I can reproduce in my full document. Other solutions, like wrapping \usepackage{tikz} in \ifpdf...\fi works here, but also does not work in my full document.

Compiling my example (with shell escape enabled and auto-pst-pdf set to [runs=2]) with things tweaked so as to eliminate the bug, we get a beautiful, correct, two page document:

Two page, correct document, with one section title and two figures

Compiling (same compile settings settings) but with the bug occuring, Figure 2 (the chemical structure, processed from eps) becomes replaced with a copy of the entire document's first page: Three page document, with one section title, one figure, and a second figure which reproduces the entire first page

The processing generates a document which should contain PDFs of any eps input: here, for the LaTeX file "NewMWE.tex" and final PDF output "NewMWE.pdf", this document of processed eps figures is called NewMWE-pics.pdf.

In example one, production of NewMWE-pics.pdf this happens without problems. In the second example, however, NewMWE-pics.pdf instead contains a (cropped) copy of the first page. so the error is presumably happening during/before generation of that file.

Running a diff on the logs of the two files, the only differences are:

Bug free:

<NewMWE-pics.pdf, id=50, page=1, 365.365pt x 142.5325pt>  
...  
(pdftex.def)             Requested size: 365.3641pt x 142.53214pt.
...
...
Package atenddvi Info: Last page = 2.
[2 <./NewMWE-pics.pdf>]  

With bug:

<NewMWE-pics.pdf, id=50, page=1, 362.35374pt x 695.59875pt>  
...  
(pdftex.def)             Requested size: 362.35286pt x 695.59706pt.  
...  
LaTeX Warning: Float too large for page by 73.31949pt on input line 281.  
...  
Package pst-pdf Warning: `NewMWE-pics.pdf' contains 2 pages         
(pst-pdf)                but 1 pages are requested:         
(pst-pdf)                File `NewMWE-pics.pdf' is no more valid!        
(pst-pdf)                Recreate it .  
...
[2]     
Package atenddvi Info: Last page = 3.       
[3 <./NewMWE-pics.pdf>]
  • I've posted as much information as seems reasonable, without just dumping everything into a pastebin. Any pointers would be greatly appreciated; any requests/pointers on more useful information I could provide will be gladly obliged. – owjburnham Sep 12 '18 at 10:18
  • Where is the code? – Ulrike Fischer Sep 12 '18 at 10:26
  • @UlrikeFischer I didn't think it was really postable, given the length of my preamble, and seeming sensitivity of the bug to 'random' things. However, I'll have another shot at trimming it down and post it. – owjburnham Sep 12 '18 at 10:33
  • We need code. It looks like a subtle page break problem and without files to test it one can't debug it. It doesn't matter if it is not small - you obviously made quite an effort to minimize and that's quite enough. You could try to replace the internal graphics by rules of the same size, but if it is not possible than it is okay too. It is only important that the test files are complete and can be compiled. – Ulrike Fischer Sep 12 '18 at 10:37
  • @UlrikeFischer Right, thanks. It being page break related would fit with my experience of its sensitivity, I guess! I'm always keen to make any information in questions/answers persistent, rather than just linking to pastebin, but for the sake of diagnosis I'll throw my code up there, and dig out an easily accessible .eps file – owjburnham Sep 12 '18 at 10:42

Your Answer

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

Browse other questions tagged or ask your own question.