Org-table mode Introduction

表格的基本操作

这里介绍在org-mode和orgtbl-mode中使用数据表的操作

表格初始化

  1. 第一种方法:

要开始表格操作,首先设计好表头:

|姓名|年龄|电话|
|-

然后按<TAB>键自动补齐操作:

| 姓名 | 年龄 | 电话 |
|------+------+------|
|      |      |      |
  1. 第二种方式:

首先开始表格区域:

|

然后按"C-c |", 在minibuffer中显示提示输入 列数×行数,自动生成表格区域,下面声称了一个5×2 的表格区域,注意算上表头是三行。

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

在表格中移动和输入数据

<TAB>
然后输入每一个数据单元中的内容后 按<TAB>键跳转到下一个单元,或者跳转到下面一行 当数据输入过程中,整个表格的单元格会自动调整 大小和宽度。
S-<TAB>
调整大小,移动到上一个单元格
<RET>
调整大小,移动到该列的下一行
C-c C-c
不移动光标,调整大小

对行、列、单元格的修改

`M-<left>'
`M-<right>'
      Move the current column left/right.

`M-S-<left>'
      Kill the current column.

`M-S-<right>'
      Insert a new column to the left of the cursor position.

`M-<up>'
`M-<down>'
      Move the current row up/down.

`M-S-<up>'
      Kill the current row or horizontal line.

`M-S-<down>'
      Insert a new row above the current row. With a prefix argument,
      the line is created below the current one.

`C-c -'
      Insert a horizontal line below current row. With a prefix
      argument, the line is created above the current line.

输入数据

隐藏较宽的数据域

简单计算和排序

Student Prob 1 Prob 2 Prob 3 Total Note
! P1 P2 P3 Tot
! Maximum 10 15 25 48 1.0
^ m1 m2 m3 mt
# Peter 10 8 23 41 8.2
# Sara 6 14 19 39 7.8
# Sam 2 4 3 9 1.8
Average 29.7
^ at
$ max=52

#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

Wiki comments powered by Disqus