Re: how to select all graphics in a notebook?
- To: mathgroup at smc.vnet.net
- Subject: [mg89017] Re: [mg89003] how to select all graphics in a notebook?
- From: John Fultz <jfultz at wolfram.com>
- Date: Sat, 24 May 2008 03:50:37 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
On Fri, 23 May 2008 03:09:05 -0400 (EDT), GS wrote: > In version 5 of Mathematica I used a pallete SelectAll.nb (http:// > support.wolfram.com/mathematica/interface/customize/selectall.en.html) > to select all graphics cells in an open notebook. The selection is > implemented via command NotebookFind[SelectedNotebook[ ], "Graphics", > All, CellStyle]. Unfotunately, it does not work any more with version > 6 of Mathematica. > > Does anybody know how to select all graphics in a notebook at once? I > do not want to go through menu and click on each cell. I have many > plots in my notebooks, and to save space I would like to select them > all, and then convert into bitmap. > > Thank you. > GS Interestingly, we had a similar problem when generating our help notebooks. With thousands of notebook files, we wanted to reduce space without fundamentally changing the notebook format or introducing intermediate steps, so that customers could reasonably download a product image from the Wolfram store with full documentation. To resolve this, I created a method for converting cells to bitmaps conditionally based upon whether doing so would actually reduce the byte count of the file. As a part of the documentation build process, this is applied to all output cells. This means that some graphical output cells are not bitmaps (because the underlying expression was smaller than the bitmap), and also that some textual outputs are bitmaps (because the bitmap compressed even better than the textual representation). Additionally, the conditional conversion will refuse to convert any cell with a Dynamic[] inside of it, so that interfaces will continue to function. To invoke this functionality, do... NotebookFind[InputNotebook[], "Output", All, CellStyle]; FrontEndTokenExecute[ InputNotebook[], "SelectionConvert", "BitmapConditional"]; Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.