manpagez: man pages & more
info emacs
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

30.13.1 What is a Text-based Table?

Keep the following examples of valid tables in mind as a reference while you read this section:

 
              +--+----+---+     +-+     +--+-----+
              |  |    |   |     | |     |  |     |
              +--+----+---+     +-+     |  +--+--+
              |  |    |   |             |  |  |  |
              +--+----+---+             +--+--+  |
                                        |     |  |
                                        +-----+--+

A table consists of a rectangular frame whose inside is divided into cells. Each cell must be at least one character wide and one character high, not counting its border lines. A cell can be subdivided into multiple rectangular cells, but cells cannot overlap.

The table frame and cell border lines are made of three special characters. These variables specify those characters:

table-cell-vertical-char

Holds the character used for vertical lines. The default value is ‘|’.

table-cell-horizontal-char

Holds the character used for horizontal lines. The default value is ‘-’.

table-cell-intersection-char

Holds the character used at where horizontal line and vertical line meet. The default value is ‘+’.

Based on this definition, the following five tables are examples of invalid tables:

 
   +-----+    +-----+       +--+    +-++--+    ++
   |     |    |     |       |  |    | ||  |    ++
   | +-+ |    |     |       |  |    | ||  |
   | | | |    +--+  |    +--+--+    +-++--+
   | +-+ |    |  |  |    |  |  |    +-++--+
   |     |    |  |  |    |  |  |    | ||  |
   +-----+    +--+--+    +--+--+    +-++--+
     a           b          c          d        e

From left to right:

  1. Overlapped cells or non-rectangular cells are not allowed.
  2. Same as a.
  3. The border must be rectangular.
  4. Cells must have a minimum width/height of one character.
  5. Same as d.

© manpagez.com 2000-2017
Individual documents may contain additional copyright information.