# LaTeX Table View

A very simple table editor is included in TeXlipse, and it can be activated from Window > Show View > Other > Texlipse > LaTeX Table View.

Even though (La)TeX is a very good typesetting system (editing text is easy), editing and modifying LaTeX tables is a bit cumbersome (for instance, adding a column in the middle of a large table is very tedious). The purpose of the LaTeX Table View is to make table editing a bit easier.

## Using the LaTeX Table View

Once a cell has been chosen to be edited, you can navigate trough the cells pressing `ctrl + ARROW_KEY`s. Right clicking the view gives a popup menu with the following operations:

- Insert row (before)
- Delete row
- Clear all rows
- Move row up
- Move row down
- Duplicate row
- Import selected lines from editor

  Select the data lines from the editor (for instance, the lines between `\begin{tabular}{...}` and `\end{tabular}`). The lines are inserted at (and after) the selected line in the editor — new rows are generated if necessary (no rows are overwritten).

  Comments are not imported, i.e. everything after % on a line is ignored, as well as horizontal line commands (\.*line.*) are ignored.

- Export to Clipboard

  The entire contents of the table editor is copied to the clipboard, from which it can be pasted into the document. A few notes about exporting:

  - Empty rows are not exported
  - Empty cells are not exported, except those that are preceding data cells.
    To treat a cell as a real empty cell, insert & to it.
- Raw Export

  The entire contents of the table editor is copied to the clipboard in a raw text format suitable for use in e.g. Gnuplot. The data is separated by tabs and rows by linefeeds. Otherwise, it works like Export to Clipboard above.

A few examples:

1 |  | 3
a | b | c
| exports as |
1 & 3 \\
a & b & c \\
| ,

1 | & | 3
a | b | c
| exports as |
1 & & 3 \\
a & b & c \\
| and

\multicolumn{2}{c}{1 and 2} |  | 3
a | b | c
| exports as |
\multicolumn{2}{c}{1 and 2} & 3 \\
a & b & c \\
| .

- Flip rows and columns, example:

  1 | 2 | 3
  4 | 5 | 6
  | becomes |
  1 | 4
  2 | 5
  3 | 6

- Mirror columns, example:

  1 | 2 | 3
  4 | 5 | 6
  | becomes |
  3 | 2 | 1
  6 | 5 | 4

- Mirror rows, example:

  1 | 2 | 3
  4 | 5 | 6
  | becomes |
  4 | 5 | 6
  1 | 2 | 3

## Tips

1. You can modify columns by first flipping rows and columns and then adding/deleting/inserting rows. After you are ready, then flip the rows and columns again.

2. Use CTRL+KEYPAD_8,_2,_4 and _4 (with numlock on) to calculate the sum of all cells in the same row/column, starting from the cell next to the current. If the cell is not a number, it is ignored. Examples:

   1 | 2 | 3 | last
   first | 5 | 6 |  | 0.5
   1 | 2 | 3 |
   | CTRL+KEYPAD_4 |
   1 | 2 | 3 | last
   first | 5 | 6 | 11 | 0.5
   1 | 2 | 3 |
   | and
   1 | 2 | 3 | last
   first | 6 | 15 | 0.5
   1 | 2 | 3 |
   | CTRL+KEYPAD_6 |
   1 | 2 | 3 | last
   22.5 | 5 | 6 | 11 | 0.5
   1 | 2 | 3 |