0

I am fighting with a logical problem. I have a program listing, which has some highlighted lines. Those lines are represented with a ballon, which ballon is created in the same macro, which creates program listing as well. I want to add a remark (another balloon) to the highlight ballon, also in the same macro. The lines making the remark say that the highlight ballon does not exist; which is right in the first pass, but not in the second pass. In IDE, it is fine: I know the reason, and start compilation also the second time, and that time with no error.

Now I am using UseLATEX, i.e. it makes a Makefile and invokes pdflatex. pdflatex prepares the file correctly, writes messages like

Output written on MyFile.pdf (53 pages, 518340 bytes).
Transcript written on MyFile.log.
CMakeFiles/MyFile_pdf.dir/build.make:75: recipe for target 'MyFile.pdf' failed

The output file is perfect, except that the remark points to some undefined position. It would not be a problem, UseLatex Makefile compiles anyhow multiple times, and from the second pass on, the error message goes away, and the .pdf is correct. However, 'make' notices the error, aborts the whole batch processing and even deletes the .pdf file; i.e. a repeated 'make' is hopeless. Finally, I have an aborted compilation, a deleted .pdf file, and a log file showing no error.

Is it possible, at any level, to convince any of those actors, to take this error not too serious?

percusse
  • 157,807
katang
  • 1,429

1 Answers1

1

Finally, mainly starting from comment by John Kormylo, using the macro
How can I know if a node is already defined?, I could bypass my problem. I define the dependent node only, when (during the first pass) the referenced node was defined. Independently of that, I keep my opinion, that an undefined node is not worse, than a missing ToC, bibentry or reference, and so it should not be flagged as error (a warning would be more appropriate).

katang
  • 1,429
  • 3
    That's certainly not true. In your case it might be not important but otherwise quite a big deal if a certain node is missing and the bounding box is reported differently and the whole pagination of the document changes, then in the second run it is corrected and the paging needs to be redone etc. All these open a can of worms – percusse Sep 25 '16 at 08:10
  • All what you say is correct. Please, however, consider a ToC placed at the begininng of the document; an initally missing reference, a tikz-positioning beamer frame, etc. They all change the pagination. It is known, and this is why multiple passes required. – katang Sep 25 '16 at 13:12
  • Multiple pass requirement without an error is one thing ignoring an error is something else. – percusse Sep 25 '16 at 13:34