MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Text cell formating blues. LineBreakWithin, PageWidth, WordWrapping

I have Adobe Acrobat Professional and when I "Print" a notebook, using the
Menu -> File -> Print command and then print to the Adobe PDF printer, I
have no trouble. I obtain high quality text and graphics in relatively small
PDF files. But other methods of creating PDF files from Mathematica and
AFAIK some built-in software on Mac produce inferior results. I don't know
what the current status of these non-Acrobat-Professional methods are and
perhaps others can give you equally good methods.

I wouldn't mess around with LineWrapping and other options for notebooks and
Text cells. The standard settings should work.

There are things you can do in a style sheet to improve the looks of the
notebook and PDF. Mainly I would make the font size in Text cells match the
font size in Output cells. I would also leave Output cells completely
unadorned, i.e., no background color and no frame lines. You could give
Input cells a slight background to distinguish them. Then if the Input cells
are closed up the textual discussion and output will read uniformly and
smoothly, just like a paper or book.

In a style sheet it is also nice to put group openers on Sections and the
various subsections, but nothing else.

Mathematica notebooks are the most expressive and advanced technical writing
medium there is - by orders of magnitude. It is just a shame that one can't
send a Mathematica notebook to anyone and expect that they could read it -
just as with PDF files. Some day it will happen.

David Park
djmpark at  

From: Nasser M. Abbasi [mailto:nma at] 


V7 on windows XP.

I normally use Mathematica just to do the computation/solving/verification 
part and then use Latex for actually writing my final homework and school 
report (I use Scientific workplace SW).

Today I decided to give Mathematica another try to see if I can write the 
whole thing in one document, i.e. code and report. This way everything is in

one place and no need to copy and paste stuff between Mathematica and SW.

For the last hour and more I have been fighting with Mathematica to make 
Text cells look nice after exporting to PDF. i.e. i'd like lines to be of 
reasonably equal length.

Mathematica break lines in places where I do not want it to, so I end up 
with text paragraphs that looks like the following on the screen and also in

PDF (notice the extra spaces even to the left of some lines)


So, this is what I tried, but I am about to give up, but I thought let me 
post this and may be there is simple solution that I am missing.

First I turned OFF the LineBreakWithin (i.e. set it to false from automatic 
in the option inspector, did this for Global, Notebook and Selection). btw, 
why does an "X" still show up sometime the the left of an option name after 
I change its value?

So, now my lines are very long and they are cut off when printing. I.e. they

are like this


So, I select the text cell again, and did Format->WordWrapping->Wrap at 
paper width, but now it looks like

xxxxxxx| text here not showing
xxxxxxx| ......
xxxxxxx| .....
xxxxxxx| .....

and the rest of each line (if it longer than page width) is not visible on 
the screen and neither in PDF.

Next I went to option inspector and set "PageWidth" to paperWidth (it was 
infinity) I could only change this option in Global and not in notebook or 
Selection (the field was grayed out there). ?

But this did not help either. For lines that are too long, I can see the 
rest of the line on the screen and have to scroll horizontally to see it.

I tried many other things.

Does any one know what is the best combination of options/formatting to use 
so that text cells would looks the best for printing?  and which font to use

for best results?

btw, I try to not hit carriage return when I write text in a text cell. 
Turning off LineBreakWithin seems to be the key option to play with, but I 
think I made things worst.

I tried also to change the cell style  to ItemParagraph from text, but this 
did not seem to help much.

I would love to use Mathematica to typeset my reports, but I still find 
Latex output via SW easier to work with.

ps. I use Report style sheet, but even default style sheet has the same 

I put the current notebook here that I am trying these things on, so you can

see the mess I made with the text cells

thanks for any hints


  • Prev by Date: Re: Text cell formating blues. LineBreakWithin, PageWidth, WordWrapping
  • Next by Date: Re: Code folding and wrapping using the input->code method?
  • Previous by thread: Re: Text cell formating blues. LineBreakWithin, PageWidth, WordWrapping
  • Next by thread: Re: Text cell formating blues. LineBreakWithin, PageWidth, WordWrapping