From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harri Kiiskinen Subject: Publishing documents body-only Date: Thu, 19 Aug 2010 10:25:07 +0300 Message-ID: <4C6CDC53.2010403@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=53719 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OlzUu-00039j-E1 for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 03:25:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OlzUt-00053m-6M for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 03:25:12 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:45949) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OlzUt-00053e-19 for emacs-orgmode@gnu.org; Thu, 19 Aug 2010 03:25:11 -0400 Received: by ewy28 with SMTP id 28so1060479ewy.0 for ; Thu, 19 Aug 2010 00:25:10 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hello, I'm preparing some LaTeX documents using org-babel and R, and I'd like to export/publish these documents as body-only, so that they can be directly included by the master document. (I don't want to convert the whole book into org-mode). The org-export-as-latex function has the argument to allow export body-only, but it can not be easily accessed in any way. There is some mention on the mailing list of a :body-only project publishing property, but it does not seem to have any effect. When looking at org-publish-org-to in org-publish.el, there are the lines: ------------------ (setq export-buf-or-file (funcall (intern (concat "org-export-as-" format)) (plist-get plist :headline-levels) nil plist nil nil pub-dir)) ------------------ And from org-html.el, for example, we see, that the second-to-last argument could convey this body-only information to the individual export functions (same works for org-export-as-latex): ------------------ org-export-as-html is an interactive compiled Lisp function in `org-html.el'. (org-export-as-html arg &optional hidden ext-plist to-buffer body-only pub-dir) ----------------- I wonder if anyone out there capable of actually writing elisp code (myself being able to read it only), would care to implement some kind of access to this feature, that already seems to exist in the code? For completeness' worth, it would be nice to have it both in the publishing system as well as in the export options for individual files. (Perfect would be an in-file option...) Of course, if there already is a way to access this functionality, I'd be delighted to hear. Best, Harri Kiiskinen