how to insert “|” in org-mode table

2019-02-09 02:48发布

I have some trouble in using org-mode. I want create a table in org-mode like this:

| operator | use         |
|----------+-------------|
|   |      | expr | expr |

but when I press TAB, the table changed like this:

| operator | use |      |      |
|----------+-----+------+------|
|          |     | expr | expr |.

How to avoid it?

3条回答
女痞
2楼-- · 2019-02-09 03:06

If you just want to insert a new column, just type 'M-S right'.

查看更多
祖国的老花朵
3楼-- · 2019-02-09 03:08

Using some unicode seems to work relatively well. I got these 2 characters to work: ¦ ǀ There is also this one: which just gave a unicode box. Your milage will vary.

sindikat's answer above is more correct, but if you want a vertical bar that looks pretty in your org source file, and you use UTF-8 (or similar) then this is an option.

查看更多
唯我独甜
4楼-- · 2019-02-09 03:24

To insert a vertical bar into a table field, use \vert or, inside a word abc\vert{}def.

Source: Org-mode manual: The built-in table editor.

If \vert is not automatically converted to |, call org-toggle-pretty-entities, per:

C-c C-x \

Toggle display of entities as UTF-8 characters. This does not change the buffer content which remains plain ASCII, but it overlays the UTF-8 character for display purposes only.

Source: Org-mode manual: Special symbols

The function org-toggle-pretty-entities was introduced in version 7.01. Call org-version and upgrade Org-mode if necessary.

查看更多
登录 后发表回答