pandoc/test/command/3706.md
Albert Krewinkel 75dc013036
Org reader: add table labels to caption if both are present
The table `#+NAME:` or `#+LABEL:` is added to the table's caption in the
form of an empty span with the label set as the span's ID.

Closes: #5984
2019-12-13 16:22:04 +01:00

803 B

Results marker can be hidden in block attributes (#3706)

pandoc -f org -t native
#+BEGIN_SRC R :exports results :colnames yes
   data.frame(Id = 1:3, Desc = rep("La",3))
#+END_SRC

#+CAPTION: Lalelu.
#+LABEL: tab
#+RESULTS:
| Id | Desc |
|----+------|
|  1 | La   |
|  2 | La   |
|  3 | La   |
^D
[Table [Span ("tab",[],[]) [],Str "Lalelu."] [AlignDefault,AlignDefault] [0.0,0.0]
 [[Plain [Str "Id"]]
 ,[Plain [Str "Desc"]]]
 [[[Plain [Str "1"]]
  ,[Plain [Str "La"]]]
 ,[[Plain [Str "2"]]
  ,[Plain [Str "La"]]]
 ,[[Plain [Str "3"]]
  ,[Plain [Str "La"]]]]]
pandoc -f org -t native
#+BEGIN_SRC R :exports none :colnames yes
   data.frame(Id = 1:2, Desc = rep("La",2))
#+END_SRC

#+CAPTION: Lalelu.
#+LABEL: tab
#+RESULTS:
| Id | Desc |
|----+------|
|  1 | La   |
|  2 | La   |
^D
[]