Magnifying the Help documents without magnifying the images therein
If you look at the BoxForm of the rasterized output in the Documentation Center by selecting it and pressing Ctrl+Shift+E, you'll see that GraphicsBox
containing the rasterized plot has the option DefaultBaseStyle -> "ImageGraphics"
. So we can control magnification of such elements by adding to the Notebook's private stylesheet the following definition for the style "ImageGraphics"
:
Cell[StyleData["ImageGraphics"], Magnification->1]
This works great for any ordinary Notebook but applying this option to the Documentation Notebooks is tricky since they have the option Editable -> False
and it isn't recommended to edit them. By default they have set StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb", CharacterEncoding -> "UTF-8"]
and hence their styles are defined in the stylesheet "Reference.nb" located in the folder
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd", "StyleSheets", "Wolfram"}]
You can make a copy of this stylesheet, remove the Editable -> False
and Saveable -> False
options and then edit the "ImageGraphics"
style (located in the "FormatType and Automatic Styles" section). Then you can copy this file to the following folder and then restart Mathematica:
FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets", "Wolfram"}]
Stylesheets from this folder have higher priority than from the previous because it is located earlier in the StyleSheetPath
global FrontEnd setting:
AbsoluteOptions[$FrontEnd, StyleSheetPath]
{StyleSheetPath -> {FrontEnd`FileName[{$UserBaseDirectory, "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$UserBaseDirectory, "Applications", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$BaseDirectory, "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$BaseDirectory, "Applications", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$InstallationDirectory, "AddOns", "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$InstallationDirectory, "AddOns", "Applications", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$BaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$InstallationDirectory, "Configuration", "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$InstallationDirectory, "SystemFiles", "Components", _, "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{$InstallationDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FrontEnd`FileName[{"C:\\Program Files\\Wolfram Research\\Mathematica\\10.4\ \\SystemFiles\\Components\\MUnit\\FrontEnd", "StyleSheets"}, "PacletManager" -> True]}}
All the above operations can be completely automatized:
CreateDirectory[
FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets",
"Wolfram"}]];
CopyFile @@ (FileNameJoin[{#, "SystemFiles", "FrontEnd", "StyleSheets",
"Wolfram",
"Reference.nb"}] & /@ {$InstallationDirectory, $UserBaseDirectory});
nb = NotebookOpen[
FileNameJoin[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets",
"Wolfram", "Reference.nb"}]];
SetOptions[nb, {Editable -> True, Saveable -> True}];
NotebookFind[nb, "ImageGraphics"];
cell = NotebookRead[nb];
If[TrueQ[First@cell === StyleData["ImageGraphics"]],
NotebookWrite[nb, Append[cell, Magnification -> 1], All]; NotebookSave[nb], $Failed]
(then restart Mathematica).
I have tested the above and it works! Screenshot: