# Magnifying the Help documents without magnifying the images therein

In Mathematica's Option Inspector I set the notebook magnification factor to be larger than 1, for example 1.12 ("Notebook Options"->"Display Options"). Accordingly contents of the Documentation Center are all magnified including the images which now look like this:

As shown above the lines in the images after magnification are in a zigzag fashion and ugly to look at.

So is there a way to set the notebook magnification factor above 1, without affecting the images (that is, without magnifying the images)?

• I thought that would be enough SetOptions[ EvaluationNotebook[], {Magnification -> 1, GraphicsBoxOptions -> {BaseStyle -> Magnification -> 1} } ] but it seems I missed something. – Kuba Mar 11 '16 at 12:48
• @Kuba Your solution works very well for me (with OS X, mma 10.3.1) – SquareOne Mar 11 '16 at 13:14
• Yep, that was meant to be done by this example. You have to edit Reference Stylesheet Notebook styles similarly to: mathematica.stackexchange.com/a/81016/5478 – Kuba Mar 11 '16 at 13:31
• @User18 yes, same here, images are wrapped with GraphicsBox too so I thought it will work it doesn't. Maybe because they are handled separately by FE: What governs images resizing in the FrontEnd environment – Kuba Mar 13 '16 at 8:49
• The solution of @Kuba works for me this way, too: SetOptions[ $FrontEndSession, GraphicsBoxOptions -> {BaseStyle -> Magnification -> 1}], but, of course, that affects all notebooks throughout the session. It does have the advantage of persistence whenever you change the doc page. (OSX 10.11.5, M V10.4.1.) – Michael E2 Jul 9 '16 at 23:43 ## 2 Answers 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 -> FrontEndFileName[{"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 -> {FrontEndFileName[{$UserBaseDirectory, "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEndFileName[{$UserBaseDirectory, "Applications", _, "FrontEnd",
"StyleSheets"}],
FrontEndFileName[{$BaseDirectory, "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEndFileName[{$BaseDirectory, "Applications", _, "FrontEnd",
"StyleSheets"}],
FrontEndFileName[{$InstallationDirectory, "AddOns", "Autoload", _, "FrontEnd", "StyleSheets"}], FrontEndFileName[{$InstallationDirectory, "AddOns", "Applications", _,
"FrontEnd", "StyleSheets"}],
FrontEndFileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FrontEndFileName[{$BaseDirectory, "SystemFiles", "FrontEnd",
"StyleSheets"}],
FrontEndFileName[{$InstallationDirectory, "Configuration", "FrontEnd", "StyleSheets"}], FrontEndFileName[{$InstallationDirectory, "SystemFiles", "Components", _,
"FrontEnd", "StyleSheets"}],
FrontEndFileName[{$InstallationDirectory, "SystemFiles", "FrontEnd", "StyleSheets"}], FrontEndFileName[{"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:

• This answer is a pleasant surprise to me; I thought that this problem did not have a solution, but now, after trying your method, I have really solved it. Thank you! – User18 Aug 10 '16 at 9:24
• @User18 Have you restarted Mathematica after copying modified "Reference.nb" into the subdirectory of $UserBaseDirectory? I checked my solution with version 10.4.1 on Windows 7 x64 and it works perfectly, no need to replace the original file in the $InstallationDirectory. – Alexey Popkov Aug 10 '16 at 9:50
• Ah, everything worked fine after the second time I did it according to your instruction; so I deleted that error report as soon as I succeeded, which you still saw nevertheless. (I did restart Mathematica in my first attempt, so why I did not get the right result then - it is now a mystery to me.) Thank you again; the ugly zigzag lines in the magnified images are finally gone! – User18 Aug 10 '16 at 17:02

The solution suggested in the comments works too:

SetOptions[$FrontEnd, GraphicsBoxOptions -> {BaseStyle -> Magnification -> 1}]  But of course this affects all Notebooks, not only the Documentation Notebooks. And moreover it affects not only raster graphics but all 2D graphics in the Notebooks... For reverting to the defaults one should evaluate SetOptions[$FrontEnd, GraphicsBoxOptions -> {BaseStyle -> Inherited}]
`
• Oh, I see. So we have two alternatives. Thank you. – User18 Aug 23 '16 at 9:21