From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: where to place caption so babel results include caption? Date: Wed, 06 Nov 2019 10:55:15 +0100 Message-ID: <871ruls518.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35013) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSI24-0000UP-1f for emacs-orgmode@gnu.org; Wed, 06 Nov 2019 04:55:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSI23-0005sI-3f for emacs-orgmode@gnu.org; Wed, 06 Nov 2019 04:55:19 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:44483) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSI22-0005rB-T4 for emacs-orgmode@gnu.org; Wed, 06 Nov 2019 04:55:19 -0500 Received: by mail-wr1-x42e.google.com with SMTP id f2so16033681wrs.11 for ; Wed, 06 Nov 2019 01:55:18 -0800 (PST) Received: from geus3064linuxwsm ([152.115.61.183]) by smtp.gmail.com with ESMTPSA id y67sm3024738wmb.38.2019.11.06.01.55.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 01:55:15 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" 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.