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.

In Microsoft Office OneNote 2010, creating and editing tables is easy. There are simple toolbar controls for creating tables:

Creating a table,

and editing them once they exist:

Editing a table.

My question is, what's an easy way to get the same functionality for a Mathematica notebook?

I would like to be able to create tables containing text, images, or inline math writing. Editing a cell in a table should be just like editing the contents of a text cell. Ideally, the appearance of the table would be customizable, e.g. cell border and background colors.

Maybe a palette would help.

share|improve this question
    
Currently the easiest option I know of is using tab characters (\t) to align things. OneNote even has the handy feature of automatically creating a table when the tab key is pressed. –  Andrew MacFie Feb 3 '12 at 3:36

3 Answers 3

up vote 12 down vote accepted

Mathematica already has some of these features: e.g

enter image description here

enter image description here

Regarding your comment about the appearance when you do this in a text cell. Here is what it looks like for me on a Mac:

enter image description here

So the font is Courier which, unless you have reconfigured your system, is not the default font for text cells. You can fix this by changing the grid box options: To do this -- in a menu driven way -- click on the cell bracket and go to Format > Option Inspector and type gridbox in the search field then when presented with the options edit the BaseStyle

enter image description here

Here I've changed the font to Times and you can see the change in the input cell. Note that you have also commented about alignments. You can set the grid alignments the same way. I'd suggest that you read up on various alignment points in the Grid documentation.

You are probably already thinking that this is inconvenient to do regularly so instead you can set up your own Grid style in a style sheet. The downside to that is that this will style Grid the same in all cells. So in fact what you need to do is create a stylesheet with a modified Text style:

enter image description here

Stylesheeting is beyond the scope if this Q&A but if you search you will find information about how to go about this. I'd suggest this is your best option for regular routine use.

Finally, to style tables and output a set of rules for later use a demo can be seen here from which a slightly reduced set of features can be downloaded.

share|improve this answer
1  
When I make a table using this method in a text cell, the cells in the table are not like text cells, e.g. the font is different. –  Andrew MacFie Feb 3 '12 at 3:53
    
Do inline math cells have to be copied in? –  Andrew MacFie Mar 7 '12 at 14:40
    
No, they are created automatically when you create the table via the menu. –  Mike Honeychurch Mar 7 '12 at 20:17

If presentation / formatting is a priority then I would use a program that excels in that and export / import the Mathematica results I need.

See this Wolfram note: http://library.wolfram.com/howtos/exporting/

share|improve this answer

This is not documented but I hope it gets better supported in future versions:

TableView[]

enter image description here

Since the use of TableView is not immediately apparent:

Mathematica graphics

share|improve this answer
2  
+1 -- I also added an example. –  Mr.Wizard Feb 4 '12 at 6:46
1  
@spartacus thank you for adding the example to my answer. –  Gustavo Delfino Feb 4 '12 at 21:14

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.