diff options
| author | Chong Yidong | 2011-12-04 13:55:36 +0800 |
|---|---|---|
| committer | Chong Yidong | 2011-12-04 13:55:36 +0800 |
| commit | a24bf23e0f6e5cea917b77cc455314cdcc31be5b (patch) | |
| tree | b9e3c91a4d24c3ea84b2310af01f5c04945d34aa | |
| parent | a92f50ad7eb6137d050b7e2d1d2a92ee140759fb (diff) | |
| download | emacs-a24bf23e0f6e5cea917b77cc455314cdcc31be5b.tar.gz emacs-a24bf23e0f6e5cea917b77cc455314cdcc31be5b.zip | |
More updates to Text chapter of Emacs manual.
* text.texi (Nroff Mode): Mention what nroff is.
(Text Based Tables, Table Recognition): Don't say "Table mode"
since it's not a major or minor mode.
(Text Based Tables): Reduce the size of the example.
(Table Definition): Clarify definitions.
(Table Creation): Add key table.
(Cell Commands): Use kbd for commands.
(Table Rows and Columns): Combine nodes Row Commands and Column
Commands.
(Fixed Width Mode): Node deleted; contents moved to parent.
(Table Conversion): Shorten example.
(Measuring Tables): Merge into Table Misc.
| -rw-r--r-- | doc/emacs/ChangeLog | 15 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 7 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 572 |
3 files changed, 249 insertions, 345 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index d16443ccf31..e55c1026786 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2011-12-04 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * text.texi (Nroff Mode): Mention what nroff is. | ||
| 4 | (Text Based Tables, Table Recognition): Don't say "Table mode" | ||
| 5 | since it's not a major or minor mode. | ||
| 6 | (Text Based Tables): Reduce the size of the example. | ||
| 7 | (Table Definition): Clarify definitions. | ||
| 8 | (Table Creation): Add key table. | ||
| 9 | (Cell Commands): Use kbd for commands. | ||
| 10 | (Table Rows and Columns): Combine nodes Row Commands and Column | ||
| 11 | Commands. | ||
| 12 | (Fixed Width Mode): Node deleted; contents moved to parent. | ||
| 13 | (Table Conversion): Shorten example. | ||
| 14 | (Measuring Tables): Merge into Table Misc. | ||
| 15 | |||
| 1 | 2011-12-03 Chong Yidong <cyd@gnu.org> | 16 | 2011-12-03 Chong Yidong <cyd@gnu.org> |
| 2 | 17 | ||
| 3 | * text.texi (TeX Mode): Mention AUCTeX package. | 18 | * text.texi (TeX Mode): Mention AUCTeX package. |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index aca3735ff03..5905c7a65b2 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -39,7 +39,7 @@ developing GNU and promoting software freedom.'' | |||
| 39 | @c in general, keep the following line commented out, unless doing a | 39 | @c in general, keep the following line commented out, unless doing a |
| 40 | @c copy of this manual that will be published. The manual should go | 40 | @c copy of this manual that will be published. The manual should go |
| 41 | @c onto the distribution in the full, 8.5 x 11" size. | 41 | @c onto the distribution in the full, 8.5 x 11" size. |
| 42 | @c @smallbook | 42 | @smallbook |
| 43 | 43 | ||
| 44 | @ifset smallbook | 44 | @ifset smallbook |
| 45 | @smallbook | 45 | @smallbook |
| @@ -602,11 +602,8 @@ Editing Text-based Tables | |||
| 602 | * Table Recognition:: How to activate and deactivate tables. | 602 | * Table Recognition:: How to activate and deactivate tables. |
| 603 | * Cell Commands:: Cell-oriented commands in a table. | 603 | * Cell Commands:: Cell-oriented commands in a table. |
| 604 | * Cell Justification:: Justifying cell contents. | 604 | * Cell Justification:: Justifying cell contents. |
| 605 | * Row Commands:: Manipulating rows of table cell. | 605 | * Table Rows and Columns:: Inserting and deleting rows and columns. |
| 606 | * Column Commands:: Manipulating columns of table cell. | ||
| 607 | * Fixed Width Mode:: Fixing cell width. | ||
| 608 | * Table Conversion:: Converting between plain text and tables. | 606 | * Table Conversion:: Converting between plain text and tables. |
| 609 | * Measuring Tables:: Analyzing table dimension. | ||
| 610 | * Table Misc:: Table miscellany. | 607 | * Table Misc:: Table miscellany. |
| 611 | 608 | ||
| 612 | Editing Programs | 609 | Editing Programs |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 8f353961afb..72b793246f1 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -1298,8 +1298,8 @@ more information, see the documentation string for the command | |||
| 1298 | @code{bibtex-mode}. | 1298 | @code{bibtex-mode}. |
| 1299 | 1299 | ||
| 1300 | @item | 1300 | @item |
| 1301 | The Ref@TeX{} package provides a minor mode which can be used in | 1301 | The Ref@TeX{} package provides a minor mode which can be used with |
| 1302 | conjunction with La@TeX{} mode to manage bibliographic references. | 1302 | La@TeX{} mode to manage bibliographic references. |
| 1303 | @ifinfo | 1303 | @ifinfo |
| 1304 | @xref{Top,The Ref@TeX{} Manual,,reftex}. | 1304 | @xref{Top,The Ref@TeX{} Manual,,reftex}. |
| 1305 | @end ifinfo | 1305 | @end ifinfo |
| @@ -1781,13 +1781,16 @@ always insert explicit closing tags as well. | |||
| 1781 | 1781 | ||
| 1782 | @cindex nroff | 1782 | @cindex nroff |
| 1783 | @findex nroff-mode | 1783 | @findex nroff-mode |
| 1784 | Nroff mode is a mode like Text mode but modified to handle nroff commands | 1784 | @vindex nroff-mode-hook |
| 1785 | present in the text. Invoke @kbd{M-x nroff-mode} to enter this mode. It | 1785 | Nroff mode is a major mode derived from Text mode, which is |
| 1786 | differs from Text mode in only a few ways. All nroff command lines are | 1786 | specialized for editing nroff files (e.g.@: Unix man pages). Type |
| 1787 | considered paragraph separators, so that filling will never garble the | 1787 | @kbd{M-x nroff-mode} to enter this mode. Entering Nroff mode runs the |
| 1788 | nroff commands. Pages are separated by @samp{.bp} commands. Comments | 1788 | hook @code{text-mode-hook}, followed by @code{nroff-mode-hook} |
| 1789 | start with backslash-doublequote. Also, three special commands are | 1789 | (@pxref{Hooks}). |
| 1790 | provided that are not in Text mode: | 1790 | |
| 1791 | In Nroff mode, nroff command lines are treated as paragraph | ||
| 1792 | separators, pages are separated by @samp{.bp} commands, and comments | ||
| 1793 | start with backslash-doublequote. It also defines these commands: | ||
| 1791 | 1794 | ||
| 1792 | @findex forward-text-line | 1795 | @findex forward-text-line |
| 1793 | @findex backward-text-line | 1796 | @findex backward-text-line |
| @@ -1807,23 +1810,16 @@ nroff commands) in the region (@code{count-text-lines}). | |||
| 1807 | @end table | 1810 | @end table |
| 1808 | 1811 | ||
| 1809 | @findex electric-nroff-mode | 1812 | @findex electric-nroff-mode |
| 1810 | The other feature of Nroff mode is that you can turn on Electric Nroff | 1813 | Electric Nroff mode is a buffer-local minor mode that can be used |
| 1811 | mode. This is a minor mode that you can turn on or off with @kbd{M-x | 1814 | with Nroff mode. To toggle this minor mode, type @kbd{M-x |
| 1812 | electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each | 1815 | electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each |
| 1813 | time you use @key{RET} to end a line that contains an nroff command that | 1816 | time you type @key{RET} to end a line containing an nroff command that |
| 1814 | opens a kind of grouping, the matching nroff command to close that | 1817 | opens a kind of grouping, the nroff command to close that grouping is |
| 1815 | grouping is automatically inserted on the following line. For example, | 1818 | automatically inserted on the following line. |
| 1816 | if you are at the beginning of a line and type @kbd{.@: ( b @key{RET}}, | ||
| 1817 | this inserts the matching command @samp{.)b} on a new line following | ||
| 1818 | point. | ||
| 1819 | 1819 | ||
| 1820 | If you use Outline minor mode with Nroff mode (@pxref{Outline Mode}), | 1820 | If you use Outline minor mode with Nroff mode (@pxref{Outline |
| 1821 | heading lines are lines of the form @samp{.H} followed by a number (the | 1821 | Mode}), heading lines are lines of the form @samp{.H} followed by a |
| 1822 | header level). | 1822 | number (the header level). |
| 1823 | |||
| 1824 | @vindex nroff-mode-hook | ||
| 1825 | Entering Nroff mode runs the hook @code{text-mode-hook}, followed by | ||
| 1826 | the hook @code{nroff-mode-hook} (@pxref{Hooks}). | ||
| 1827 | 1823 | ||
| 1828 | @node Enriched Text | 1824 | @node Enriched Text |
| 1829 | @section Enriched Text | 1825 | @section Enriched Text |
| @@ -2149,18 +2145,16 @@ hides text), and @code{intangible} (which disallows moving point | |||
| 2149 | within the text). The @samp{Remove Special} menu item removes all of | 2145 | within the text). The @samp{Remove Special} menu item removes all of |
| 2150 | these special properties from the text in the region. | 2146 | these special properties from the text in the region. |
| 2151 | 2147 | ||
| 2152 | The @code{invisible} and @code{intangible} properties are @emph{not} | 2148 | The @code{invisible} and @code{intangible} properties are not saved |
| 2153 | saved in the text/enriched format. The @code{read-only} property is | 2149 | in the @samp{text/enriched} format. |
| 2154 | saved, but it is not a standard part of the text/enriched format, so | ||
| 2155 | other editors may not respect it. | ||
| 2156 | 2150 | ||
| 2157 | @node Text Based Tables | 2151 | @node Text Based Tables |
| 2158 | @section Editing Text-based Tables | 2152 | @section Editing Text-based Tables |
| 2159 | @cindex table mode | 2153 | @cindex table mode |
| 2160 | @cindex text-based tables | 2154 | @cindex text-based tables |
| 2161 | 2155 | ||
| 2162 | Table mode provides an easy and intuitive way to create and edit | 2156 | The @code{table} package provides commands to easily edit text-based |
| 2163 | text-based tables. Here is an example of such a table: | 2157 | tables. Here is an example of what such a table looks like: |
| 2164 | 2158 | ||
| 2165 | @smallexample | 2159 | @smallexample |
| 2166 | @group | 2160 | @group |
| @@ -2170,27 +2164,23 @@ text-based tables. Here is an example of such a table: | |||
| 2170 | | forward-char |Move point right N characters | C-f | | 2164 | | forward-char |Move point right N characters | C-f | |
| 2171 | | |(left if N is negative). | | | 2165 | | |(left if N is negative). | | |
| 2172 | | | | | | 2166 | | | | | |
| 2173 | | |On reaching end of buffer, stop | | | ||
| 2174 | | |and signal error. | | | ||
| 2175 | +-----------------+--------------------------------+-----------------+ | 2167 | +-----------------+--------------------------------+-----------------+ |
| 2176 | | backward-char |Move point left N characters | C-b | | 2168 | | backward-char |Move point left N characters | C-b | |
| 2177 | | |(right if N is negative). | | | 2169 | | |(right if N is negative). | | |
| 2178 | | | | | | 2170 | | | | | |
| 2179 | | |On attempt to pass beginning or | | | ||
| 2180 | | |end of buffer, stop and signal | | | ||
| 2181 | | |error. | | | ||
| 2182 | +-----------------+--------------------------------+-----------------+ | 2171 | +-----------------+--------------------------------+-----------------+ |
| 2183 | @end group | 2172 | @end group |
| 2184 | @end smallexample | 2173 | @end smallexample |
| 2185 | 2174 | ||
| 2186 | Table mode allows the contents of the table such as this one to be | 2175 | When Emacs recognizes such a stretch of text as a table |
| 2187 | easily manipulated by inserting or deleting characters inside a cell. | 2176 | (@pxref{Table Recognition}), editing the contents of each table cell |
| 2188 | A cell is effectively a localized rectangular edit region and edits to | 2177 | will automatically resize the table, whenever the contents become too |
| 2189 | a cell do not affect the contents of the surrounding cells. If the | 2178 | large to fit in the cell. You can use the commands defined in the |
| 2190 | contents do not fit into a cell, then the cell is automatically | 2179 | following sections for navigating and editing the table layout. |
| 2191 | expanded in the vertical and/or horizontal directions and the rest of | 2180 | |
| 2192 | the table is restructured and reformatted in accordance with the | 2181 | @findex table-fixed-width-mode |
| 2193 | growth of the cell. | 2182 | To toggle the automatic table resizing feature, type @kbd{M-x |
| 2183 | table-fixed-width-mode}. | ||
| 2194 | 2184 | ||
| 2195 | @menu | 2185 | @menu |
| 2196 | * Table Definition:: What is a text based table. | 2186 | * Table Definition:: What is a text based table. |
| @@ -2198,102 +2188,87 @@ growth of the cell. | |||
| 2198 | * Table Recognition:: How to activate and deactivate tables. | 2188 | * Table Recognition:: How to activate and deactivate tables. |
| 2199 | * Cell Commands:: Cell-oriented commands in a table. | 2189 | * Cell Commands:: Cell-oriented commands in a table. |
| 2200 | * Cell Justification:: Justifying cell contents. | 2190 | * Cell Justification:: Justifying cell contents. |
| 2201 | * Row Commands:: Manipulating rows of table cell. | 2191 | * Table Rows and Columns:: Inserting and deleting rows and columns. |
| 2202 | * Column Commands:: Manipulating columns of table cell. | ||
| 2203 | * Fixed Width Mode:: Fixing cell width. | ||
| 2204 | * Table Conversion:: Converting between plain text and tables. | 2192 | * Table Conversion:: Converting between plain text and tables. |
| 2205 | * Measuring Tables:: Analyzing table dimension. | ||
| 2206 | * Table Misc:: Table miscellany. | 2193 | * Table Misc:: Table miscellany. |
| 2207 | @end menu | 2194 | @end menu |
| 2208 | 2195 | ||
| 2209 | @node Table Definition | 2196 | @node Table Definition |
| 2210 | @subsection What is a Text-based Table? | 2197 | @subsection What is a Text-based Table? |
| 2198 | @cindex cells, for text-based tables | ||
| 2211 | 2199 | ||
| 2212 | Keep the following examples of valid tables in mind as a reference | 2200 | A @dfn{table} consists of a rectangular text area which is divided |
| 2213 | while you read this section: | 2201 | into @dfn{cells}. Each cell must be at least one character wide and |
| 2214 | 2202 | one character high, not counting its border lines. A cell can be | |
| 2215 | @example | 2203 | subdivided into more cells, but they cannot overlap. |
| 2216 | +--+----+---+ +-+ +--+-----+ | ||
| 2217 | | | | | | | | | | | ||
| 2218 | +--+----+---+ +-+ | +--+--+ | ||
| 2219 | | | | | | | | | | ||
| 2220 | +--+----+---+ +--+--+ | | ||
| 2221 | | | | | ||
| 2222 | +-----+--+ | ||
| 2223 | @end example | ||
| 2224 | |||
| 2225 | A table consists of a rectangular frame whose inside is divided into | ||
| 2226 | cells. Each cell must be at least one character wide and one | ||
| 2227 | character high, not counting its border lines. A cell can be | ||
| 2228 | subdivided into multiple rectangular cells, but cells cannot overlap. | ||
| 2229 | 2204 | ||
| 2230 | The table frame and cell border lines are made of three special | 2205 | Cell border lines are drawn with three special characters, specified |
| 2231 | characters. These variables specify those characters: | 2206 | by the following variables: |
| 2232 | 2207 | ||
| 2233 | @table @code | 2208 | @table @code |
| 2234 | @vindex table-cell-vertical-char | 2209 | @vindex table-cell-vertical-char |
| 2235 | @item table-cell-vertical-char | 2210 | @item table-cell-vertical-char |
| 2236 | Holds the character used for vertical lines. The default value is | 2211 | The character used for vertical lines. The default is @samp{|}. |
| 2237 | @samp{|}. | ||
| 2238 | 2212 | ||
| 2239 | @vindex table-cell-horizontal-chars | 2213 | @vindex table-cell-horizontal-chars |
| 2240 | @item table-cell-horizontal-chars | 2214 | @item table-cell-horizontal-chars |
| 2241 | Holds the characters used for horizontal lines. The default value is | 2215 | The characters used for horizontal lines. The default is @samp{"-="}. |
| 2242 | @samp{"-="}. | ||
| 2243 | 2216 | ||
| 2244 | @vindex table-cell-intersection-char | 2217 | @vindex table-cell-intersection-char |
| 2245 | @item table-cell-intersection-char | 2218 | @item table-cell-intersection-char |
| 2246 | Holds the character used at where horizontal line and vertical line | 2219 | The character used for the intersection of horizontal and vertical |
| 2247 | meet. The default value is @samp{+}. | 2220 | lines. The default is @samp{+}. |
| 2248 | @end table | 2221 | @end table |
| 2249 | 2222 | ||
| 2250 | @noindent | 2223 | @noindent |
| 2251 | Based on this definition, the following five tables are examples of invalid | 2224 | The following are examples of @emph{invalid} tables: |
| 2252 | tables: | ||
| 2253 | 2225 | ||
| 2254 | @example | 2226 | @example |
| 2255 | +-----+ +-----+ +--+ +-++--+ ++ | 2227 | +-----+ +--+ +-++--+ |
| 2256 | | | | | | | | || | ++ | 2228 | | | | | | || | |
| 2257 | | +-+ | | | | | | || | | 2229 | | | | | | || | |
| 2258 | | | | | +--+ | +--+--+ +-++--+ | 2230 | +--+ | +--+--+ +-++--+ |
| 2259 | | +-+ | | | | | | | +-++--+ | 2231 | | | | | | | +-++--+ |
| 2260 | | | | | | | | | | || | | 2232 | | | | | | | | || | |
| 2261 | +-----+ +--+--+ +--+--+ +-++--+ | 2233 | +--+--+ +--+--+ +-++--+ |
| 2262 | a b c d e | 2234 | a b c |
| 2263 | @end example | 2235 | @end example |
| 2264 | 2236 | ||
| 2237 | @noindent | ||
| 2265 | From left to right: | 2238 | From left to right: |
| 2266 | 2239 | ||
| 2267 | @enumerate a | 2240 | @enumerate a |
| 2268 | @item | 2241 | @item |
| 2269 | Overlapped cells or non-rectangular cells are not allowed. | 2242 | Overlapped cells or non-rectangular cells are not allowed. |
| 2270 | @item | 2243 | @item |
| 2271 | Same as a. | ||
| 2272 | @item | ||
| 2273 | The border must be rectangular. | 2244 | The border must be rectangular. |
| 2274 | @item | 2245 | @item |
| 2275 | Cells must have a minimum width/height of one character. | 2246 | Cells must have a minimum width/height of one character. |
| 2276 | @item | ||
| 2277 | Same as d. | ||
| 2278 | @end enumerate | 2247 | @end enumerate |
| 2279 | 2248 | ||
| 2280 | @node Table Creation | 2249 | @node Table Creation |
| 2281 | @subsection How to Create a Table? | 2250 | @subsection Creating a Table |
| 2282 | @cindex create a text-based table | 2251 | @cindex create a text-based table |
| 2283 | @cindex table creation | 2252 | @cindex table creation |
| 2284 | 2253 | ||
| 2285 | @findex table-insert | 2254 | @findex table-insert |
| 2286 | The command to create a table is @code{table-insert}. When called | 2255 | To create a text-based table from scratch, type @kbd{M-x |
| 2287 | interactively, it asks for the number of columns, number of rows, cell | 2256 | table-insert}. This command prompts for the number of table columns, |
| 2288 | width and cell height. The number of columns is the number of cells | 2257 | the number of table rows, cell width and cell height. The cell width |
| 2289 | horizontally side by side. The number of rows is the number of cells | 2258 | and cell height do not include the cell borders; each can be specified |
| 2290 | vertically within the table's height. The cell width is a number of | 2259 | as a single integer (which means each cell is given the same |
| 2291 | characters that each cell holds, left to right. The cell height is a | 2260 | width/height), or as a sequence of integers separated by spaces or |
| 2292 | number of lines each cell holds. The cell width and the cell height | 2261 | commas (which specify the width/height of the individual table |
| 2293 | can be either an integer (when the value is constant across the table) | 2262 | columns/rows, counting from left to right for table columns and from |
| 2294 | or a series of integer, separated by spaces or commas, where each | 2263 | top to bottom for table rows). The specified table is then inserted |
| 2295 | number corresponds to the next cell within a row from left to right, | 2264 | at point. |
| 2296 | or the next cell within a column from top to bottom. | 2265 | |
| 2266 | The table inserted by @kbd{M-x table-insert} contains special text | ||
| 2267 | properties, which tell Emacs to treat it specially as a text-based | ||
| 2268 | table. If you save the buffer to a file and visit it again later, | ||
| 2269 | those properties are lost, and the table appears to Emacs as an | ||
| 2270 | ordinary piece of text. See the next section, for how to convert it | ||
| 2271 | back into a table. | ||
| 2297 | 2272 | ||
| 2298 | @node Table Recognition | 2273 | @node Table Recognition |
| 2299 | @subsection Table Recognition | 2274 | @subsection Table Recognition |
| @@ -2301,103 +2276,97 @@ or the next cell within a column from top to bottom. | |||
| 2301 | 2276 | ||
| 2302 | @findex table-recognize | 2277 | @findex table-recognize |
| 2303 | @findex table-unrecognize | 2278 | @findex table-unrecognize |
| 2304 | Table mode maintains special text properties in the buffer to allow | 2279 | Existing text-based tables in a buffer, which lack the special text |
| 2305 | editing in a convenient fashion. When a buffer with tables is saved | 2280 | properties applied by @kbd{M-x table-insert}, are not treated |
| 2306 | to its file, these text properties are lost, so when you visit this | 2281 | specially as tables. To apply those text properties, type @kbd{M-x |
| 2307 | file again later, Emacs does not see a table, but just formatted text. | 2282 | table-recognize}. This command scans the current buffer, |
| 2308 | To resurrect the table text properties, issue the @kbd{M-x | 2283 | @dfn{recognizes} valid table cells, and applies the relevant text |
| 2309 | table-recognize} command. It scans the current buffer, recognizes | 2284 | properties. Conversely, type @kbd{M-x table-unrecognize} to |
| 2310 | valid table cells, and attaches appropriate text properties to allow | 2285 | @dfn{unrecognize} all tables in the current buffer, removing the |
| 2311 | for table editing. The converse command, @code{table-unrecognize}, is | 2286 | special text properties and converting tables back to plain text. |
| 2312 | used to remove the special text properties and convert the buffer back | 2287 | |
| 2313 | to plain text. | 2288 | You can also use the following commands to selectively recognize or |
| 2314 | 2289 | unrecognize tables: | |
| 2315 | Special commands exist to enable or disable tables within a region, | ||
| 2316 | enable or disable individual tables, and enable/disable individual | ||
| 2317 | cells. These commands are: | ||
| 2318 | 2290 | ||
| 2319 | @table @kbd | 2291 | @table @kbd |
| 2320 | @findex table-recognize-region | 2292 | @findex table-recognize-region |
| 2321 | @item M-x table-recognize-region | 2293 | @item M-x table-recognize-region |
| 2322 | Recognize tables within the current region and activate them. | 2294 | Recognize tables within the current region. |
| 2295 | |||
| 2323 | @findex table-unrecognize-region | 2296 | @findex table-unrecognize-region |
| 2324 | @item M-x table-unrecognize-region | 2297 | @item M-x table-unrecognize-region |
| 2325 | Deactivate tables within the current region. | 2298 | Unrecognize tables within the current region. |
| 2299 | |||
| 2326 | @findex table-recognize-table | 2300 | @findex table-recognize-table |
| 2327 | @item M-x table-recognize-table | 2301 | @item M-x table-recognize-table |
| 2328 | Recognize the table at point and activate it. | 2302 | Recognize the table at point and activate it. |
| 2303 | |||
| 2329 | @findex table-unrecognize-table | 2304 | @findex table-unrecognize-table |
| 2330 | @item M-x table-unrecognize-table | 2305 | @item M-x table-unrecognize-table |
| 2331 | Deactivate the table at point. | 2306 | Deactivate the table at point. |
| 2307 | |||
| 2332 | @findex table-recognize-cell | 2308 | @findex table-recognize-cell |
| 2333 | @item M-x table-recognize-cell | 2309 | @item M-x table-recognize-cell |
| 2334 | Recognize the cell at point and activate it. | 2310 | Recognize the cell at point and activate it. |
| 2311 | |||
| 2335 | @findex table-unrecognize-cell | 2312 | @findex table-unrecognize-cell |
| 2336 | @item M-x table-unrecognize-cell | 2313 | @item M-x table-unrecognize-cell |
| 2337 | Deactivate the cell at point. | 2314 | Deactivate the cell at point. |
| 2338 | @end table | 2315 | @end table |
| 2339 | 2316 | ||
| 2340 | For another way of converting text into tables, see @ref{Table | 2317 | @xref{Table Conversion}, for another way to recognize a table. |
| 2341 | Conversion}. | ||
| 2342 | 2318 | ||
| 2343 | @node Cell Commands | 2319 | @node Cell Commands |
| 2344 | @subsection Commands for Table Cells | 2320 | @subsection Commands for Table Cells |
| 2345 | 2321 | ||
| 2346 | @findex table-forward-cell | 2322 | @findex table-forward-cell |
| 2347 | @findex table-backward-cell | 2323 | @findex table-backward-cell |
| 2348 | The commands @code{table-forward-cell} and | 2324 | The commands @kbd{M-x table-forward-cell} and @kbd{M-x |
| 2349 | @code{table-backward-cell} move point from the current cell to an | 2325 | table-backward-cell} move point from the current cell to an adjacent |
| 2350 | adjacent cell forward and backward respectively. The order of the | 2326 | cell. The order is cyclic: when point is in the last cell of a table, |
| 2351 | cells is cyclic: when point is in the last cell of a table, typing | 2327 | @kbd{M-x table-forward-cell} moves to the first cell. Likewise, when |
| 2352 | @kbd{M-x table-forward-cell} moves to the first cell in the table. | 2328 | point is on the first cell, @kbd{M-x table-backward-cell} moves to the |
| 2353 | Likewise @kbd{M-x table-backward-cell} from the first cell in a table | 2329 | last cell. |
| 2354 | moves to the last cell. | ||
| 2355 | 2330 | ||
| 2356 | @findex table-span-cell | 2331 | @findex table-span-cell |
| 2357 | The command @code{table-span-cell} merges the current cell with the | 2332 | @kbd{M-x table-span-cell} prompts for a direction---right, left, |
| 2358 | adjacent cell in a specified direction---right, left, above or below. | 2333 | above, or below---and merges the current cell with the adjacent cell |
| 2359 | You specify the direction with the minibuffer. It does not allow | 2334 | in that direction. This command signals an error if the merge would |
| 2360 | merges which don't result in a legitimate cell layout. | 2335 | result in an illegitimate cell layout. |
| 2361 | 2336 | ||
| 2362 | @findex table-split-cell | 2337 | @findex table-split-cell |
| 2363 | @cindex text-based tables, split a cell | ||
| 2364 | @cindex split table cell | ||
| 2365 | The command @code{table-split-cell} splits the current cell | ||
| 2366 | vertically or horizontally. This command is a wrapper to the | ||
| 2367 | direction specific commands @code{table-split-cell-vertically} and | ||
| 2368 | @code{table-split-cell-horizontally}. You specify the direction with | ||
| 2369 | a minibuffer argument. | ||
| 2370 | |||
| 2371 | @findex table-split-cell-vertically | 2338 | @findex table-split-cell-vertically |
| 2372 | The command @code{table-split-cell-vertically} splits the current | ||
| 2373 | cell vertically and creates a pair of cells above and below where | ||
| 2374 | point is located. The content in the original cell is split as well. | ||
| 2375 | |||
| 2376 | @findex table-split-cell-horizontally | 2339 | @findex table-split-cell-horizontally |
| 2377 | The command @code{table-split-cell-horizontally} splits the current | 2340 | @cindex text-based tables, splitting cells |
| 2378 | cell horizontally and creates a pair of cells right and left of where | 2341 | @cindex splitting table cells |
| 2379 | point is located. If the cell being split is not empty, this asks you | 2342 | @kbd{M-x table-split-cell} splits the current cell vertically or |
| 2380 | how to handle the cell contents. The three options are: @code{split}, | 2343 | horizontally, prompting for the direction with the minibuffer. The |
| 2381 | @code{left}, or @code{right}. @code{split} splits the contents at | 2344 | commands @kbd{M-x table-split-cell-vertically} and @kbd{M-x |
| 2382 | point literally, while the @code{left} and @code{right} options move | 2345 | table-split-cell-horizontally} split in a specific direction. When |
| 2383 | the entire contents into the left or right cell respectively. | 2346 | splitting vertically, the old cell contents are automatically split |
| 2384 | 2347 | between the two new cells. When splitting horizontally, you are | |
| 2385 | @cindex enlarge a table cell | 2348 | prompted for how to divide the cell contents, if the cell is |
| 2386 | @cindex shrink a table cell | 2349 | non-empty; the options are @samp{split} (divide the contents at |
| 2387 | The next four commands enlarge or shrink a cell. They use numeric | 2350 | point), @samp{left} (put all the contents in the left cell), and |
| 2388 | arguments (@pxref{Arguments}) to specify how many columns or rows to | 2351 | @samp{right} (put all the contents in the right cell). |
| 2389 | enlarge or shrink a particular table. | 2352 | |
| 2353 | The following commands enlarge or shrink a cell. By default, they | ||
| 2354 | resize by one row or column; if a numeric argument is supplied, that | ||
| 2355 | specifies the number of rows or columns to resize by. | ||
| 2390 | 2356 | ||
| 2391 | @table @kbd | 2357 | @table @kbd |
| 2392 | @findex table-heighten-cell | 2358 | @findex table-heighten-cell |
| 2393 | @item M-x table-heighten-cell | 2359 | @item M-x table-heighten-cell |
| 2394 | Enlarge the current cell vertically. | 2360 | Enlarge the current cell vertically. |
| 2361 | |||
| 2395 | @findex table-shorten-cell | 2362 | @findex table-shorten-cell |
| 2396 | @item M-x table-shorten-cell | 2363 | @item M-x table-shorten-cell |
| 2397 | Shrink the current cell vertically. | 2364 | Shrink the current cell vertically. |
| 2365 | |||
| 2398 | @findex table-widen-cell | 2366 | @findex table-widen-cell |
| 2399 | @item M-x table-widen-cell | 2367 | @item M-x table-widen-cell |
| 2400 | Enlarge the current cell horizontally. | 2368 | Enlarge the current cell horizontally. |
| 2369 | |||
| 2401 | @findex table-narrow-cell | 2370 | @findex table-narrow-cell |
| 2402 | @item M-x table-narrow-cell | 2371 | @item M-x table-narrow-cell |
| 2403 | Shrink the current cell horizontally. | 2372 | Shrink the current cell horizontally. |
| @@ -2405,107 +2374,76 @@ Shrink the current cell horizontally. | |||
| 2405 | 2374 | ||
| 2406 | @node Cell Justification | 2375 | @node Cell Justification |
| 2407 | @subsection Cell Justification | 2376 | @subsection Cell Justification |
| 2408 | @cindex cell text justification | 2377 | @cindex justification in text-based tables |
| 2409 | 2378 | ||
| 2410 | You can specify text justification for each cell. The justification | 2379 | The command @kbd{M-x table-justify} imposes @dfn{justification} on |
| 2411 | is remembered independently for each cell and the subsequent editing | 2380 | one or more cells in a text-based table. Justification determines how |
| 2412 | of cell contents is subject to the specified justification. | 2381 | the text in the cell is aligned, relative to the edges of the cell. |
| 2382 | Each cell in a table can be separately justified. | ||
| 2413 | 2383 | ||
| 2414 | @findex table-justify | 2384 | @findex table-justify |
| 2415 | The command @code{table-justify} ask you to specify what to justify: | 2385 | @kbd{M-x table-justify} first prompts for what to justify; the |
| 2416 | a cell, a column, or a row. If you select cell justification, this | 2386 | options are @samp{cell} (just the current cell), @samp{column} (all |
| 2417 | command sets the justification only for the current cell. Selecting | 2387 | cells in the current table column) and @samp{row} (all cells in the |
| 2418 | column or row justification sets the justification for all the cells | 2388 | current table row). The command then prompts for the justification |
| 2419 | within a column or row respectively. The command then ask you which | 2389 | style; the options are @code{left}, @code{center}, @code{right}, |
| 2420 | kind of justification to apply: @code{left}, @code{center}, | 2390 | @code{top}, @code{middle}, @code{bottom}, or @code{none} (meaning no |
| 2421 | @code{right}, @code{top}, @code{middle}, @code{bottom}, or | 2391 | vertical justification). |
| 2422 | @code{none}. Horizontal justification and vertical justification are | 2392 | |
| 2423 | specified independently. The options @code{left}, @code{center}, and | 2393 | Horizontal and vertical justification styles are specified |
| 2424 | @code{right} specify horizontal justification while the options | 2394 | independently, and both types can be in effect simultaneously; for |
| 2425 | @code{top}, @code{middle}, @code{bottom}, and @code{none} specify | 2395 | instance, you can call @kbd{M-x table-justify} twice, once to specify |
| 2426 | vertical justification. The vertical justification @code{none} | 2396 | @code{right} justification and once to specify @code{bottom} |
| 2427 | effectively removes vertical justification. Horizontal justification | 2397 | justification, to align the contents of a cell to the bottom right. |
| 2428 | must be one of @code{left}, @code{center}, or @code{right}. | ||
| 2429 | 2398 | ||
| 2430 | @vindex table-detect-cell-alignment | 2399 | @vindex table-detect-cell-alignment |
| 2431 | Justification information is stored in the buffer as a part of text | 2400 | The justification style is stored in the buffer as a text property, |
| 2432 | property. Therefore, this information is ephemeral and does not | 2401 | and is lost when you kill the buffer or exit Emacs. However, the |
| 2433 | survive through the loss of the buffer (closing the buffer and | 2402 | table recognition commands, such as @kbd{M-x table-recognize} |
| 2434 | revisiting the buffer erase any previous text properties). To | 2403 | (@pxref{Table Recognition}), attempt to determine and re-apply each |
| 2435 | countermand for this, the command @code{table-recognize} and other | 2404 | cell's justification style, by examining its contents. To disable |
| 2436 | recognition commands (@pxref{Table Recognition}) are equipped with a | 2405 | this feature, change the variable @code{table-detect-cell-alignment} |
| 2437 | convenience feature (turned on by default). During table recognition, | 2406 | to @code{nil}. |
| 2438 | the contents of a cell are examined to determine which justification | 2407 | |
| 2439 | was originally applied to the cell and then applies this justification | 2408 | @node Table Rows and Columns |
| 2440 | to the cell. This is a speculative algorithm and is therefore not | 2409 | @subsection Table Rows and Columns |
| 2441 | perfect, however, the justification is deduced correctly most of the | 2410 | @cindex inserting rows and columns in text-based tables |
| 2442 | time. To disable this feature, customize the variable | 2411 | |
| 2443 | @code{table-detect-cell-alignment} and set it to @code{nil}. | ||
| 2444 | |||
| 2445 | @node Row Commands | ||
| 2446 | @subsection Commands for Table Rows | ||
| 2447 | @cindex table row commands | ||
| 2448 | |||
| 2449 | @cindex insert row in table | ||
| 2450 | @findex table-insert-row | 2412 | @findex table-insert-row |
| 2451 | The command @code{table-insert-row} inserts a row of cells before | 2413 | @kbd{M-x table-insert-row} inserts a row of cells before the current |
| 2452 | the current row in a table. The current row where point is located is | 2414 | table row. The current row, together with point, is pushed down past |
| 2453 | pushed down after the newly inserted row. A numeric prefix argument | 2415 | the new row. To insert rows after the last row at the bottom of a |
| 2454 | specifies the number of rows to insert. Note that in order to insert | 2416 | table, invoke this command with point below the table, just below the |
| 2455 | rows @emph{after} the last row at the bottom of a table, you must | 2417 | bottom edge. A numeric prefix argument specifies the number of rows |
| 2456 | place point below the table---that is, outside the table---prior to | 2418 | to insert. |
| 2457 | invoking this command. | ||
| 2458 | |||
| 2459 | @cindex delete row in table | ||
| 2460 | @findex table-delete-row | ||
| 2461 | The command @code{table-delete-row} deletes a row of cells at point. | ||
| 2462 | A numeric prefix argument specifies the number of rows to delete. | ||
| 2463 | |||
| 2464 | @node Column Commands | ||
| 2465 | @subsection Commands for Table Columns | ||
| 2466 | @cindex table column commands | ||
| 2467 | |||
| 2468 | @cindex insert column in table | ||
| 2469 | @findex table-insert-column | ||
| 2470 | The command @code{table-insert-column} inserts a column of cells to | ||
| 2471 | the left of the current row in a table. This pushes the current | ||
| 2472 | column to the right. To insert a column to the right side of the | ||
| 2473 | rightmost column, place point to the right of the rightmost column, | ||
| 2474 | which is outside of the table, prior to invoking this command. A | ||
| 2475 | numeric prefix argument specifies the number of columns to insert. | ||
| 2476 | |||
| 2477 | @cindex delete column in table | ||
| 2478 | A command @code{table-delete-column} deletes a column of cells at | ||
| 2479 | point. A numeric prefix argument specifies the number of columns to | ||
| 2480 | delete. | ||
| 2481 | |||
| 2482 | @node Fixed Width Mode | ||
| 2483 | @subsection Fix Width of Cells | ||
| 2484 | @cindex fix width of table cells | ||
| 2485 | 2419 | ||
| 2486 | @findex table-fixed-width-mode | 2420 | @findex table-insert-column |
| 2487 | The command @code{table-fixed-width-mode} toggles fixed width mode | 2421 | Similarly, @kbd{M-x table-insert-column} inserts a column of cells |
| 2488 | on and off. When fixed width mode is turned on, editing inside a | 2422 | to the left of the current table column. To insert a column to the |
| 2489 | cell never changes the cell width; when it is off, the cell width | 2423 | right side of the rightmost column, invoke this command with point to |
| 2490 | expands automatically in order to prevent a word from being folded | 2424 | the right of the rightmost column, outside the table. A numeric |
| 2491 | into multiple lines. By default, fixed width mode is disabled. | 2425 | prefix argument specifies the number of columns to insert. |
| 2426 | |||
| 2427 | @cindex deleting rows and column in text-based tables | ||
| 2428 | @kbd{M-x table-delete-column} deletes the column of cells at point. | ||
| 2429 | Similarly, @kbd{M-x table-delete-row} deletes the row of cells at | ||
| 2430 | point. A numeric prefix argument to either command specifies the | ||
| 2431 | number of columns or rows to delete. | ||
| 2492 | 2432 | ||
| 2493 | @node Table Conversion | 2433 | @node Table Conversion |
| 2494 | @subsection Conversion Between Plain Text and Tables | 2434 | @subsection Converting Between Plain Text and Tables |
| 2495 | @cindex text to table | 2435 | @cindex text to table |
| 2496 | @cindex table to text | 2436 | @cindex table to text |
| 2497 | 2437 | ||
| 2498 | @findex table-capture | 2438 | @findex table-capture |
| 2499 | The command @code{table-capture} captures plain text in a region and | 2439 | The command @kbd{M-x table-capture} captures plain text in a region |
| 2500 | turns it into a table. Unlike @code{table-recognize} (@pxref{Table | 2440 | and turns it into a table. Unlike @kbd{M-x table-recognize} |
| 2501 | Recognition}), the original text does not have a table appearance but | 2441 | (@pxref{Table Recognition}), the original text does not need to have a |
| 2502 | may hold a logical table structure. For example, some elements | 2442 | table appearance; it only needs to have a logical table-like |
| 2503 | separated by known patterns form a two dimensional structure which can | 2443 | structure. |
| 2504 | be turned into a table. | ||
| 2505 | 2444 | ||
| 2506 | Here's an example of data that @code{table-capture} can operate on. | 2445 | For example, suppose we have the following numbers, which are |
| 2507 | The numbers are horizontally separated by a comma and vertically | 2446 | divided into three lines and separated horizontally by commas: |
| 2508 | separated by a newline character. | ||
| 2509 | 2447 | ||
| 2510 | @example | 2448 | @example |
| 2511 | 1, 2, 3, 4 | 2449 | 1, 2, 3, 4 |
| @@ -2526,136 +2464,92 @@ Invoking @kbd{M-x table-capture} on that text produces this table: | |||
| 2526 | +-----+-----+-----+-----+ | 2464 | +-----+-----+-----+-----+ |
| 2527 | @end example | 2465 | @end example |
| 2528 | 2466 | ||
| 2529 | @noindent | ||
| 2530 | The conversion uses @samp{,} for the column delimiter and newline for | ||
| 2531 | a row delimiter, cells are left justified, and minimum cell width is | ||
| 2532 | 5. | ||
| 2533 | |||
| 2534 | @findex table-release | 2467 | @findex table-release |
| 2535 | The command @code{table-release} does the opposite of | 2468 | @kbd{M-x table-release} does the opposite: it converts a table back |
| 2536 | @code{table-capture}. It releases a table by removing the table frame | 2469 | to plain text, removing its cell borders. |
| 2537 | and cell borders. This leaves the table contents as plain text. One | 2470 | |
| 2538 | of the useful applications of @code{table-capture} and | 2471 | One application of this pair of commands is to edit a text in |
| 2539 | @code{table-release} is to edit a text in layout. Look at the | 2472 | layout. Look at the following three paragraphs (the latter two are |
| 2540 | following three paragraphs (the latter two are indented with header | 2473 | indented with header lines): |
| 2541 | lines): | ||
| 2542 | 2474 | ||
| 2543 | @example | 2475 | @example |
| 2544 | table-capture is a powerful command. | 2476 | table-capture is a powerful command. |
| 2545 | Here are some things it can do: | 2477 | Here are some things it can do: |
| 2546 | 2478 | ||
| 2547 | Parse Cell Items By using column delimiter regular | 2479 | Parse Cell Items Using row and column delimiter regexps, |
| 2548 | expression and raw delimiter regular | 2480 | it parses the specified text area and |
| 2549 | expression, it parses the specified text | 2481 | extracts cell items into a table. |
| 2550 | area and extracts cell items from | ||
| 2551 | non-table text and then forms a table out | ||
| 2552 | of them. | ||
| 2553 | |||
| 2554 | Capture Text Area When no delimiters are specified it | ||
| 2555 | creates a single cell table. The text in | ||
| 2556 | the specified region is placed in that | ||
| 2557 | cell. | ||
| 2558 | @end example | 2482 | @end example |
| 2559 | 2483 | ||
| 2560 | @noindent | 2484 | @noindent |
| 2561 | Applying @code{table-capture} to a region containing the above three | 2485 | Applying @code{table-capture} to a region containing the above text, |
| 2562 | paragraphs, with empty strings for column delimiter regexp and row | 2486 | with empty strings for the column and row delimiter regexps, creates a |
| 2563 | delimiter regexp, creates a table with a single cell like the | 2487 | table with a single cell like the following one. |
| 2564 | following one. | 2488 | |
| 2565 | |||
| 2566 | @c The first line's right-hand frame in the following two examples | ||
| 2567 | @c sticks out to accommodate for the removal of @samp in the | ||
| 2568 | @c produced output!! | ||
| 2569 | @smallexample | 2489 | @smallexample |
| 2570 | @group | 2490 | @group |
| 2571 | +-------------------------------------------------------------+ | 2491 | +----------------------------------------------------------+ |
| 2572 | |table-capture is a powerful command. | | 2492 | |table-capture is a powerful command. | |
| 2573 | |Here are some things it can do: | | 2493 | |Here are some things it can do: | |
| 2574 | | | | 2494 | | | |
| 2575 | |Parse Cell Items By using column delimiter regular | | 2495 | |Parse Cell Items Using row and column delimiter regexps,| |
| 2576 | | expression and raw delimiter regular | | 2496 | | it parses the specified text area and | |
| 2577 | | expression, it parses the specified text | | 2497 | | extracts cell items into a table. | |
| 2578 | | area and extracts cell items from | | 2498 | +----------------------------------------------------------+ |
| 2579 | | non-table text and then forms a table out | | ||
| 2580 | | of them. | | ||
| 2581 | | | | ||
| 2582 | |Capture Text Area When no delimiters are specified it | | ||
| 2583 | | creates a single cell table. The text in | | ||
| 2584 | | the specified region is placed in that | | ||
| 2585 | | cell. | | ||
| 2586 | +-------------------------------------------------------------+ | ||
| 2587 | @end group | 2499 | @end group |
| 2588 | @end smallexample | 2500 | @end smallexample |
| 2589 | 2501 | ||
| 2590 | @noindent | 2502 | @noindent |
| 2591 | By splitting the cell appropriately we now have a table consisting of | 2503 | We can then use the cell splitting commands (@pxref{Cell Commands}) to |
| 2592 | paragraphs occupying its own cell. Each cell can now be edited | 2504 | subdivide the table so that each paragraph occupies a cell: |
| 2593 | independently without affecting the layout of other cells. | ||
| 2594 | 2505 | ||
| 2595 | @smallexample | 2506 | @smallexample |
| 2596 | +--------------------------------------------------------------+ | 2507 | +----------------------------------------------------------+ |
| 2597 | |table-capture is a powerful command. | | 2508 | |table-capture is a powerful command. | |
| 2598 | |Here are some things it can do: | | 2509 | |Here are some things it can do: | |
| 2599 | +------------------+-------------------------------------------+ | 2510 | +-----------------+----------------------------------------+ |
| 2600 | |Parse Cell Items |By using column delimiter regular | | 2511 | |Parse Cell Items | Using row and column delimiter regexps,| |
| 2601 | | |expression and raw delimiter regular | | 2512 | | | it parses the specified text area and | |
| 2602 | | |expression, it parses the specified text | | 2513 | | | extracts cell items into a table. | |
| 2603 | | |area and extracts cell items from | | 2514 | +-----------------+----------------------------------------+ |
| 2604 | | |non-table text and then forms a table out | | ||
| 2605 | | |of them. | | ||
| 2606 | +------------------+-------------------------------------------+ | ||
| 2607 | |Capture Text Area |When no delimiters are specified it | | ||
| 2608 | | |creates a single cell table. The text in | | ||
| 2609 | | |the specified region is placed in that | | ||
| 2610 | | |cell. | | ||
| 2611 | +------------------+-------------------------------------------+ | ||
| 2612 | @end smallexample | 2515 | @end smallexample |
| 2613 | 2516 | ||
| 2614 | @noindent | 2517 | @noindent |
| 2615 | By applying @code{table-release}, which does the opposite process, the | 2518 | Each cell can now be edited independently without affecting the layout |
| 2616 | contents become once again plain text. @code{table-release} works as | 2519 | of other cells. When finished, we can invoke @kbd{M-x table-release} |
| 2617 | a companion command to @code{table-capture}. | 2520 | to convert the table back to plain text. |
| 2618 | 2521 | ||
| 2619 | @node Measuring Tables | 2522 | @node Table Misc |
| 2620 | @subsection Analyzing Table Dimensions | 2523 | @subsection Table Miscellany |
| 2621 | @cindex table dimensions | ||
| 2622 | 2524 | ||
| 2525 | @cindex table dimensions | ||
| 2623 | @findex table-query-dimension | 2526 | @findex table-query-dimension |
| 2624 | The command @code{table-query-dimension} analyzes a table structure | 2527 | The command @code{table-query-dimension} reports the layout of the |
| 2625 | and reports information regarding its dimensions. In case of the | 2528 | table and table cell at point. Here is an example of its output: |
| 2626 | above example table, the @code{table-query-dimension} command displays | ||
| 2627 | in echo area: | ||
| 2628 | 2529 | ||
| 2629 | @smallexample | 2530 | @smallexample |
| 2630 | Cell: (21w, 6h), Table: (67w, 16h), Dim: (2c, 3r), Total Cells: 5 | 2531 | Cell: (21w, 6h), Table: (67w, 16h), Dim: (2c, 3r), Total Cells: 5 |
| 2631 | @end smallexample | 2532 | @end smallexample |
| 2632 | 2533 | ||
| 2633 | @noindent | 2534 | @noindent |
| 2634 | This indicates that the current cell is 21 character wide and 6 lines | 2535 | This indicates that the current cell is 21 characters wide and 6 lines |
| 2635 | high, the entire table is 67 characters wide and 16 lines high. The | 2536 | high, the table is 67 characters wide and 16 lines high with 2 columns |
| 2636 | table has 2 columns and 3 rows. It has a total of 5 cells, since the | 2537 | and 3 rows, and a total of 5 cells. |
| 2637 | first row has a spanned cell. | ||
| 2638 | 2538 | ||
| 2639 | @node Table Misc | ||
| 2640 | @subsection Table Miscellany | ||
| 2641 | |||
| 2642 | @cindex insert string into table cells | ||
| 2643 | @findex table-insert-sequence | 2539 | @findex table-insert-sequence |
| 2644 | The command @code{table-insert-sequence} inserts a string into each | 2540 | @kbd{M-x table-insert-sequence} inserts a string into each cell. |
| 2645 | cell. Each string is a part of a sequence i.e.@: a series of | 2541 | Each string is a part of a sequence i.e.@: a series of increasing |
| 2646 | increasing integer numbers. | 2542 | integer numbers. |
| 2647 | 2543 | ||
| 2648 | @cindex table in language format | ||
| 2649 | @cindex table for HTML and LaTeX | 2544 | @cindex table for HTML and LaTeX |
| 2650 | @findex table-generate-source | 2545 | @findex table-generate-source |
| 2651 | The command @code{table-generate-source} generates a table formatted | 2546 | @kbd{M-x table-generate-source} generates a table formatted for a |
| 2652 | for a specific markup language. It asks for a language (which must be | 2547 | specific markup language. It asks for a language (which must be one |
| 2653 | one of @code{html}, @code{latex}, or @code{cals}), a destination | 2548 | of @code{html}, @code{latex}, or @code{cals}), a destination buffer in |
| 2654 | buffer where to put the result, and the table caption (a string), and | 2549 | which to put the result, and a table caption, and then inserts the |
| 2655 | then inserts the generated table in the proper syntax into the | 2550 | generated table into the specified buffer. The default destination |
| 2656 | destination buffer. The default destination buffer is | 2551 | buffer is @code{table.@var{lang}}, where @var{lang} is the language |
| 2657 | @code{table.@var{lang}}, where @var{lang} is the language you | 2552 | you specified. |
| 2658 | specified. | ||
| 2659 | 2553 | ||
| 2660 | @node Two-Column | 2554 | @node Two-Column |
| 2661 | @section Two-Column Editing | 2555 | @section Two-Column Editing |
| @@ -2663,11 +2557,9 @@ specified. | |||
| 2663 | @cindex splitting columns | 2557 | @cindex splitting columns |
| 2664 | @cindex columns, splitting | 2558 | @cindex columns, splitting |
| 2665 | 2559 | ||
| 2666 | Two-column mode lets you conveniently edit two side-by-side columns of | 2560 | Two-column mode lets you conveniently edit two side-by-side columns |
| 2667 | text. It uses two side-by-side windows, each showing its own | 2561 | of text. It uses two side-by-side windows, each showing its own |
| 2668 | buffer. | 2562 | buffer. There are three ways to enter two-column mode: |
| 2669 | |||
| 2670 | There are three ways to enter two-column mode: | ||
| 2671 | 2563 | ||
| 2672 | @table @asis | 2564 | @table @asis |
| 2673 | @item @kbd{@key{F2} 2} or @kbd{C-x 6 2} | 2565 | @item @kbd{@key{F2} 2} or @kbd{C-x 6 2} |