Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Is there any way to print out to pdf file, in sequence, all cells independently? I have literally hundreds of cells that need to be printed in that way. Selecting each cell and "Print Selections" takes me ages before I finish.

share|improve this question
add comment

1 Answer 1

A simple suggestion, assuming you want each cell in a separate file:

cellCounter = 1;
Map[
 Export[
   StringJoin["cell-", ToString[cellCounter++], ".pdf"],
   NotebookRead[#]] &, 
 Cells[]];

and the resulting file corresponding to this cell:

cell export

share|improve this answer
    
Awesome, thank you very much. It's possible to print out cells "In" and "Out" together (including labels). Now, each of them is printed to separated file. –  Thomas Jul 14 '13 at 12:56
    
@thomas perhaps add these requirements to your question? I'm not much of a notebook programmer... –  cormullion Jul 14 '13 at 13:23
    
@thomas Consider Split[Cells[], MemberQ[Cells[CellStyle -> {"Input"}], #1] && MemberQ[Cells[CellStyle -> {"Output"}], #2] &] and "CellLabelsToTags" –  Michael E2 Jul 14 '13 at 19:46
add 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.