emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] where to place caption so babel results include caption?


From: Ken Mankoff
Subject: [O] where to place caption so babel results include caption?
Date: Wed, 06 Nov 2019 10:55:15 +0100
User-agent: mu4e 0.9.18; emacs 26.3

Hello,

If I have a babel block that generates a table and I'd like latex attributes 
associated with that table, it seems to work well if I do this:

#+NAME: foo
#+BEGIN_SRC bash :results table
echo "${RANDOM}|${RANDOM}|"
echo "${RANDOM}|${RANDOM}|"
#+END_SRC

#+caption: foo
#+latex_attr: :placement [!h]
#+RESULTS: foo
| 17326 | 29919 |
| 30565 |  9548 |


And I can re-run the babel block and CAPTION and ATTR_LATEX remain.

But if I want to clean with =[C-u] C-c C-v k= or 
(org-babel-remove-result-one-or-many) and regenerate =C-c C-v C-b= or 
(org-babel-execute-buffer), then this happens:


#+RESULTS: foo
| 17225 | 29253 |
| 18433 | 27388 |

#+caption: foo
#+latex_attr: :placement [!h]

If I place CAPTION and LATEX_ATTR above the babel block it isn't exported 
correctly. Is there some way to have this work?

Thanks,

  -k.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]