emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Luis Anaya <papoanaya@hotmail.com>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: Exporting to groff, now in org-export.el ...
Date: Fri, 06 Jul 2012 09:14:27 +0200	[thread overview]
Message-ID: <87obntqs30.fsf@gmail.com> (raw)
In-Reply-To: <BLU0-SMTP38E0B5F7154578711AC464B7EF0@phx.gbl> (Luis Anaya's message of "Thu, 5 Jul 2012 18:46:36 -0400")

Hello,

Luis Anaya <papoanaya@hotmail.com> 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

  reply	other threads:[~2012-07-06  7:17 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  3:36 Exporting to groff Luis Anaya
2012-06-26 11:33 ` Nick Dokos
2012-06-26 14:09   ` Luis Anaya
2012-06-26 14:55     ` Nicolas Goaziou
2012-06-29 23:58       ` Exporting to groff, now in org-export.el Luis Anaya
2012-06-30  6:42         ` Nicolas Goaziou
2012-06-30 11:56           ` Nicolas Goaziou
2012-07-03  1:18             ` Luis Anaya
2012-07-03  9:51               ` Nicolas Goaziou
2012-07-05 22:46                 ` Luis Anaya
2012-07-06  7:14                   ` Nicolas Goaziou [this message]
2012-07-07 14:25                     ` #+CAPTION: Not being protected when they are used with #+begin_src Luis Anaya
2012-07-07 17:15                       ` Eric Schulte
2012-07-07 19:00                         ` Luis Anaya
2012-07-07 19:01                           ` Nicolas Goaziou
2012-07-07 19:33                             ` Luis Anaya
2012-07-07 20:28                     ` Exporting to groff, now in org-export.el Luis Anaya
2012-07-07 20:31                     ` Luis Anaya
2012-07-07 22:59                       ` suvayu ali
2012-07-08  1:49                         ` Luis Anaya
2012-07-08  1:56                           ` suvayu ali
2012-07-08 13:14                             ` Luis Anaya
2012-07-08 14:07                               ` Suvayu Ali
2012-07-09  0:29                                 ` Luis Anaya
2012-07-09 20:32                                 ` Luis Anaya
2012-07-09 21:23                                   ` suvayu ali
2012-07-09 21:55                                     ` Luis Anaya
2012-07-09 22:01                                       ` suvayu ali
2012-07-10  0:00                                         ` Luis Anaya
2012-07-10  0:21                                           ` suvayu ali
2012-07-10  1:09                                             ` Luis Anaya
2012-07-10  1:20                                               ` suvayu ali
2012-07-10 13:30                                                 ` Luis Anaya
2012-06-30 22:36           ` Luis Anaya
2012-07-13 18:51           ` Luis Anaya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obntqs30.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --cc=papoanaya@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).