In the process of creating my resume in Mathematica, I needed to adjust the margins of the default stylesheet so that section headers would take up less whitespace. After modifying the stylesheet using the instructions mentioned here, the changes clearly show up in my document in Mathematica.

Before printing

However, after I export the document to a PDF, either by saving or by printing, my work is undone.

After printing document

So I've resorted to copying and pasting screen captures of my resume into MSPaint and then printing from there. This is a huge pain.

What am I doing wrong? Is there a setting I have to modify to get my stylesheet margins to stick in the PDF version?

  • 4
    $\begingroup$ When printing (or saving to PDF), it uses the Printout screen environment, whereas what you see (by default) in the notebook is the Working screen environment. The changes to the style definitions that you've made are only for the working environment, whereas you need to modify it for the printout env. I don't have time to write an answer now, but this might give you a lead as to where to look (or someone else can write up an answer). Try exploring the Default.nb and Core.nb stylesheets to see how the styles for Printout are defined. If no one answers by this evening, I'll write one. $\endgroup$
    – rm -rf
    Commented Oct 12, 2012 at 19:13
  • $\begingroup$ @rm-rf: I had similar issue, but when I change the PrintingStyleEnvironment to Working, I have issues with Margins and zoomed out document. I changed stuff in my notebook by using a stylesheet like you mentioned in one of your answers. How do I make the same changes to the Printout option privately only for that notebook? $\endgroup$
    – preeti
    Commented Feb 7, 2014 at 20:54
  • 1
    $\begingroup$ @preeti Add the following to your stylesheet: Cell[StyleData[All, "Printout"], CellLabelMargins->Inherited, Magnification->1] $\endgroup$
    – rm -rf
    Commented Feb 7, 2014 at 20:58
  • $\begingroup$ @rm-rf That doesn't seem to do anything..My requirement : Printout should be having the same fontcolor etc as mentioned in my stylesheet. How do I do that? $\endgroup$
    – preeti
    Commented Feb 7, 2014 at 21:16
  • 1
    $\begingroup$ @preeti You only mentioned margins and zoomout in your previous comment, so that's all I addressed. You should ask the right question with all details to get the right answer... :) Try adding ShowAutoStyles->True and ShowSyntaxStyles->True to the snippet I wrote above to display the colors. The idea here is that any change you want to make, you make it to the StyleData[All, "Printout"] style. $\endgroup$
    – rm -rf
    Commented Feb 7, 2014 at 21:30

1 Answer 1


As rm -rf wrote the looks of the printout are by default determined by the Printout style definitions in the stylesheet, and you could try to change those.

However, if you don't feel like that, you could also try to change the printing environment from "Printout" to "Working", so that it uses the changes you already made for your screen layout. You can do that in File > Printing Settings > Printing Environment or by executing

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

for a permanent change or

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

for a change that lasts as long as you session lasts.

  • $\begingroup$ Wound up changing the Printout style definitions. Thanks! $\endgroup$
    – Mana
    Commented Oct 13, 2012 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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