emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* where to place caption so babel results include caption?
@ 2019-11-06  9:55 Ken Mankoff
  2019-11-06 16:05 ` Berry, Charles
  0 siblings, 1 reply; 4+ messages in thread
From: Ken Mankoff @ 2019-11-06  9:55 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-09 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-06  9:55 where to place caption so babel results include caption? Ken Mankoff
2019-11-06 16:05 ` Berry, Charles
2019-11-06 16:53   ` Ken Mankoff
2019-11-09 22:28     ` Ken Mankoff

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).