From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Exporting to groff, now in org-export.el ... Date: Fri, 06 Jul 2012 09:14:27 +0200 Message-ID: <87obntqs30.fsf@gmail.com> References: <22257.1340710426@alphaville> <87fw9i15sq.fsf@gmail.com> <87k3yp1esj.fsf@gmail.com> <87bok1108y.fsf@gmail.com> <87y5n1fa08.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:44175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn2nT-000456-LU for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 03:17:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn2nR-0007vy-Sm for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 03:17:47 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:50060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn2nR-0007vn-Jx for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 03:17:45 -0400 Received: by werl57 with SMTP id l57so1357602wer.0 for ; Fri, 06 Jul 2012 00:17:43 -0700 (PDT) In-Reply-To: (Luis Anaya's message of "Thu, 5 Jul 2012 18:46:36 -0400") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Luis Anaya Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Hello, Luis Anaya writes: > 1. Automated caption support. I need to figure out how to get the > caption text (via CAPTION? via ATTR ? ). Right now generic ones are > added which they show up in the table of content. This is done through :caption property: (org-element-property :caption some-element) Note that when non nil, the value of this property is a list of two secondary strings: CAR is the regular caption while CDR in the (optional) short caption. Also, don't forget to send them through `org-export-data'. Here's a snippet illustrating this: #+begin_src emacs-lisp (let ((caption (org-element-property :caption element))) ;; This how you get the long caption. (org-export-data (car caption) info) ;; This is how you get the short caption or the empty string. (org-export-data (cdr caption) info)) #+end_src > I have a general question though. Equation and Picture creation > support in Groff is done with the use of the "eqn" and "pic" programs. > I've been debating if these should be included in org-babel, > for executing these the same way plantuml is executed through the use > of #+begin_src #+end_src > > However considering that these are Groff only I'm not sure if these > would be better served by using special attributes to add pic/eqn > code. This is because the output of these commands are Groff statements > that only make sense in Groff. You can also write raw Groff code within #+begin_groff...#+end_groff, provided that you modify `org-element-block-name-alist' accordingly and define a transcoder for export blocks like the following: #+begin_src emacs-lisp (defun org-e-groff-export-block (export-block contents info) "Transcode a EXPORT-BLOCK element from Org to GROFF. CONTENTS is nil. INFO is a plist holding contextual information." (when (equal (org-element-property :type export-block) "GROFF") (org-remove-indentation (org-element-property :value export-block)))) #+end_src Regards, -- Nicolas Goaziou