go-org-orgwiki/org/testdata/tables.org
Niklas Fasching e076412b29 html: Implement fat table rows (use tbodies to represent separators)
html does not support table separator rows as Org mode does. Emacs org export
simulates rows as defined by separators by wrapping all the rows between 2
separators into a separate tbody. The html spec is fine with that [0] so we
follow.

[0] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody
2020-06-26 20:11:14 +02:00

48 lines
1.3 KiB
Org Mode
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+CAPTION: table with separator before and after header
|---+---+---|
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table with separator after header
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table with unicode characters
| Character | Org | Rendered HTML |
|-----------+-----------+---------------|
| Hyphen | =a - b= | a - b |
| Ndash | =a -- b= | a b |
| Mdash | =a --- b= | a — b |
| Ellipsis | =a ... b= | a … b |
#+CAPTION: table without header (but separator before)
|---+---+---|
| 1 | 2 | 3 |
#+CAPTION: table without header
| 1 | 2 | 3 |
#+CAPTION: table with aligned and sized columns
| left aligned | right aligned | center aligned |
|--------------+---------------+----------------|
| <l> | <r> | <c5> |
| | <1> | |
| 42 | 42 | 42 |
| foobar | foobar | foobar |
#+CAPTION: table with right aligned columns (because numbers)
| long column a | long column b | long column c |
|---------------+---------------+---------------|
| 1 | 2 | 3 |
#+CAPTION: table with multiple separators (~ multiple tbodies)
| a | b | c |
|---+---+---|
| 1 | 2 | 3 |
| . | . | . |
|---+---+---|
| 1 | 2 | 3 |
|---+---+---|
| 1 | 2 | 3 |