I want to make a list of functions like this:

functionList = 
  {{Style["Function", Larger, Bold], Style["Notes", Larger, Bold], 
 Style["Source", Larger, Bold]}, 
  {"f[n]=a", "Long long long long description - I'd like it to wrap within the cell", "Wikipedia"}, 
  {"g[n]=b", "I'd like to be able to select this function and copy-and-paste", 
  {"\[VerticalEllipsis]", "\[VerticalEllipsis]", "\[VerticalEllipsis]"}}; 

Grid[functionList, Alignment -> {Left, Top}, Spacings -> {2, 2}, Frame -> All]

enter image description here

I have two questions:

  1. I need a way of setting the cell-widths, and then instructing text to wrap within that width. Is this possible? I don't think this answer is quite what I'm after - at least, I can't see how to apply it.
  2. I'd like to be able to select a function from the outputted Grid and copy it so I can paste it elsewhere. Is there a way to do this, without actually forcing Mathematica to evaluate the expression? I could write f[n]==a instead of "f[n]=a", for example, and it would appear in copy-and-pastable form; but then Mathematica would evaluate it, which I want to avoid.

Thanks in advance for your suggestions.


1 Answer 1


You can use TextGrid with the ItemSize option:

 Alignment -> {Left, Top},
 Spacings -> {2, 2},
 Frame -> All,
 ItemSize -> {{5, 30, 10}, Automatic}

You could also use the ItemSize option with Grid, but TextGrid looks a bit better, and also it takes care of the copy-and-paste problem that you encountered.


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.