7
$\begingroup$

I want to print a notebook that owns syntax color,I use the Szabolcs's method

SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Working"]

Then I can achieve a PDF file shown as below:

Working Environment

However,when I change the PrintingStyleEnvironment to "Printout"

SetOptions[$FrontEndSession, PrintingStyleEnvironment -> "Printout"]

Printout Environment

I feel the fontsize in the Working Environment is more large than Printout Environment.

So my question is:

How to make the fontsize in Working Environment be same with Printout Environment.

I feel the fontsize in Printout Environment is very suitable.

$\endgroup$
2
$\begingroup$

Based on this answer. Add the following to the private style sheet:

Cell[StyleData[All, "Working"],
 Magnification -> 0.8
]

Adjust the Magnification setting according your needs.

$\endgroup$
4
$\begingroup$

For those like me who were confused even after reading Alexey Popkov's answer, let me provide more detail:

Click Format -> Edit stylesheet

A window will open that says "Private stylesheet for your_notebook's_name"

Copy-paste the following code below where it says "local definitions for style all: all"

Cell[StyleData[All, "Working"], Magnification -> 0.8]

A dialog box will appear that says "the text you are pasting corresponds to a cell expression..." Click YES

The text it adds now reads "local definitions for all styles in style environment 'working'". Note that it doesn't say anything about magnification anymore. THIS IS NORMAL. Close the window and your changes have been saved. Print your PDF (in "working" printing environment) and it works.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.