I have a number of lecture notebooks that I publish to Dropbox in PDF format. It's been working great for years, but something seems to have gone wrong in the latest version of Mathematica. My code for printing my notebooks to PDFs is something similar to the following.
Table[
NotebookOpen[NotebookDirectory[] <> ToString[i] <> ".nb"];
NotebookPrint[InputNotebook[],
"/Users/michaelmccain/Desktop/" <> ToString[i] <> ".pdf"];
, {i, 1, 10}]
Note: I have ten notebooks named 1.nb, 2.nb, ...10.nb in the current directly when I execute this function.
This function works as it is suppose to so long as my notebooks contain no or little graphics. If more than a couple graphics are in one of the notebooks then the loop stops at that notebook and no more PDFs are printed. Interestingly, Mathematica does not freeze and I do not get a spinning wheel. Mathematica continue to work.
This problem is easily solved by removing the graphics from the notebook. Then the loop finishes and all files are published in PDF format. But I would like the graphics to stay in my PDF lectures. If I NotebookPrint[]
each notebook individually... it also works, but this highly inefficient. Especially with 100 lecture notebooks that need to be published at once.
Is anyone else having this issue in Mathematica 11.1? I'd like to report it as a bug. But would like confirmation.
I am using MacOS 10.12
Export
instead ofNotebookPrint
? $\endgroup$Table
never generate aborts! Probably abort is generated outside ofTable
. I suggest you to report this as possible bug. $\endgroup$