Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Wolfram Blog uses PNG images to display input and output cells in a notebook. For example, the following is an image from Samuel Chen's post:

enter image description here

I should be able to produce a similar image by selecting a group of cells and selecting File -> Save Selection from the pull-down menu. When I tried that on the cell

In[1]:= Series[Log[1+x],{x,0,6}]
Out[1]= x-x^2/2+x^3/3-x^4/4+x^5/5-x^6/6+O[x]^7

I get the garbled image

enter image description here

This does not happen when I save selection to PDF or BMP. In the case of BMP, the In[1] and Out[1] goes missing:

enter image description here

Do you know of a way to fix the problem with PNG export and/or include the In[1] in BMP export? I am running Mathematica 8.0.4.0 on Linux x86 (64-bit), which I think is part of the problem.

share|improve this question
How do you know they didn't take a screenshot? – rm -rf Jun 3 '12 at 7:17
This works correctly for me with v7 on Win7: i.stack.imgur.com/dzJJ1.png – Mr.Wizard Jun 3 '12 at 7:21
1  
Since I am not seeing this problem, please check your setting for "PageWidth" in the Option Inspector, especially the one for ExportMultipleCellsOptions. Mine is set for Infinity. – Mr.Wizard Jun 3 '12 at 7:26
1  
@Mr.Wizard The image Szabolcs's uploader produces looks great: i.stack.imgur.com/jRg2e.png. I will look at his code. Thanks! – Michael Wijaya Jun 3 '12 at 7:38
2  
I ran into a similar problem when making the uploader. The system was using the palette's width to rasterize the selection, not the width of the notebook where the expression was. It's still not completely clear to me how the width is determined. You can google this site for ExportPacket and see this too for some hints. ("The front end can be unpredictable about what line width it uses to compute breaks, so it is usually wise to specify an explicit value for the PageWidth option." – Szabolcs Jun 3 '12 at 8:18
show 8 more comments

1 Answer

Perhaps you can adapt Szabolcs's image uploader to your needs.

share|improve this answer
4  
This should only be a comment... – rm -rf Jun 3 '12 at 8:18
@R.M well, I started with it as a comment but as it appears to at least partially solve the OP's question I promoted it to an answer. If Szabolcs posted a proper method I will delete this. Otherwise, I think it's better to have an answer be an answer, even if it's a poor one. – Mr.Wizard Jun 3 '12 at 8:38
Well here we are, four and a half months later, and still only my crummy answer, while Szabolcs has apparently left StackExchange for the married life. – Mr.Wizard Oct 17 '12 at 0:48
My views haven't changed though :) – rm -rf Oct 17 '12 at 7:08
@rm-rf I'd be disappointed if they had, my verbal sparing partner. :o) – Mr.Wizard Oct 17 '12 at 7:11
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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