When building documentation using the Workbench, some of the output cells get fully rasterized. I assume this is done to save space.
Can I turn this off, either globally, or on a per-cell basis? I want to keep certain output as vector graphics.
Answer
I don't know any option that would control this behavior, but there are hacks that can completely prevent this rasterization.
Rasterization is performed by ConvertGraphicsToBitmaps function from DocumentationBuild`Common` package. This function performs rasterization of output cells from given NotebookObject and returns Null, that's all it does, so we can safely override it with function that only returns Null.
For this override to take effect during documentation build, governed by docbuild.xml file, we can add following code, right before
If[Not@MemberQ[$Path, #], PrependTo[$Path, #]]&@AntProperty["appPath"]
Needs@"DocumentationBuild`"
ConvertGraphicsToBitmaps = Null&
]]>
First line adds directory containing documentation building packages to $Path (this directory is stored in Ant "appPath" property), second line loads DocumentationBuild` package, third overrides relevant function.

Comments
Post a Comment