emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Oleh Krehel <ohwoeowho@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Need some help in customizing ox-texinfo
Date: Fri, 18 Dec 2015 14:53:13 +0100	[thread overview]
Message-ID: <87bn9nn9rq.fsf@gmail.com> (raw)

Hello,

I'm exporting an Org-mode document to Texinfo currently, but I'm having
an inconvenience with production of @subsubheading items.

What I'm doing right now:

    #+BEGIN_TEXINFO
    @subsubheading <Title>
    #+END_TEXINFO
    <Content>

What I would like to have instead:

    * <Title>        :@subsubheading
    <Content>

And have it export to the same thing. I didn't find an easy way to do
it, since this requires embedding the content of a headline into the
parent headline. What I've got so far is adding this code to
`org-texinfo--normalize-headlines':

    (org-element-map tree 'headline
        (lambda (hl)
          (when (member "@subsubheading" (org-element-property :tags hl))
            (setcar (nthcdr (cl-position hl (org-element-property :parent hl))
                            (org-element-property :parent hl))
                    (cons `(paragraph
                            ()
                            ,(format
                              "@subsubheading %s"
                              (org-element-property
                               :raw-value hl)))
                          (org-element-contents hl)))))
        info)

It almost works, the only issue is that "@" is escaped later on and I
get "@@subsubheading" in the end. How can I fix that? Is there an easier
way to do this in general?

regards,
Oleh

             reply	other threads:[~2015-12-18 13:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-18 13:53 Oleh Krehel [this message]
2015-12-18 21:37 ` Need some help in customizing ox-texinfo Nicolas Goaziou

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=87bn9nn9rq.fsf@gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).