From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
Cc: "François Pinard" <pinard@iro.umontreal.ca>,
"Org Mode Mailing List" <emacs-orgmode@gnu.org>
Subject: Re: Export to Texinfo
Date: Fri, 20 Jul 2012 11:32:58 +0200 [thread overview]
Message-ID: <87y5meaib9.fsf@gmail.com> (raw)
In-Reply-To: <CAEWDx5dDoqXOmxKRWqc=w2DUB0bVA4qrD=9=Rwaj3fv7A2H+dQ@mail.gmail.com> (Jonathan Leech-Pepin's message of "Thu, 19 Jul 2012 20:29:00 -0400")
Hello,
Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com> writes:
> Over the last few days I've been working on implementing an Org ->
> Texinfo exporter based on the new e-latex exporter.
Argh. While your idea is nice, starting from `e-latex' exporter is
almost certainly a bad move. Indeed, it is a quite convoluted back-end
which may not help to understand how the generic exporter can be used.
At some point I will have to write a tutorial on how to start a back-end
from scratch...
> It is not yet able to generate all the expected contents for export
> towards an Info file, however it does create enough to successfully
> export and read through Info.
You may want to get in touch with François Pinard (CC'ed), who had
started a similar project a few weeks ago.
> - There is no provision for indices, limiting usefulness in
> cross-referencing.
Org export has some tools to handle cross-referencing even when the
back-end doesn't (ASCII exporter has it).
> - There is no #+attr_texinfo or #+TEXINFO: for arbitrary snippets or
> for passing features to tables/blocks. I'm not sure exactly how to
> hook these in and would need a pointer in the right direction to do
> so.
If you add #+ATTR_TEXINFO above an element, you can access its contents
with (org-element-property :attr_texinfo element).
Ideally parameters should be passed as a plist. I.e.
--8<---------------cut here---------------start------------->8---
#+ATTR_TEXINFO: :width 5 :key "some value"
Some element
--8<---------------cut here---------------end--------------->8---
In that case, you can use `org-export-read-attribute' to
parse :attr_texinfo. I.e.
(org-export-read-attribute :attr_texinfo element)
will return
'(:width 5 :key "some value")
You can then pick the property you want with `plist-get'... Seeing this,
I think I should add an optional argument to directly access a given
property. I.e.
(org-export-read-attribute :attr_texinfo element :width) => 5
#+TEXINFO: keywords are automatically recognized as keywords. There is
nothing special to do. I.e.
(defun org-e-texinfo-keyword (keyword contents info)
(let ((key (org-element-property :key keyword))
(value (org-element-property :value keyword)))
(cond
...
((equal key "TEXINFO") value) ; Return value as-is
...)))
Though, if you want to add support for #+BEGIN_TEXINFO/#+END_TEXINFO
blocks, you will have to add:
(add-to-list 'org-element-block-name-alist
'("TEXINFO" . org-element-export-block-parser))
> - The largest issue perhaps: There is no method to create @kbd{} and
> @key{} commands on export. If anyone has any suggestions how these
> might be achieved (perhaps looking for a prefix in =code=?) I would
> greatly appreciate it.
You can probably use export-snippets:
An important key: @@e-info:@kbd{C-c C-c}@@.
> There are a few limitations to what will successfully be exported:
> - Headlines cannot contain any of the following symbols: periods,
> commas, colons or parentheses. This is a limitation of texinfo and
> will result in errors when running makeinfo. Semi-colons will
> export however.
Can't you protect these chars?
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2012-07-20 9:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 0:29 Export to Texinfo Jonathan Leech-Pepin
2012-07-20 9:32 ` Nicolas Goaziou [this message]
2012-07-20 13:34 ` Jonathan Leech-Pepin
2012-07-20 13:42 ` Nicolas Goaziou
2012-07-31 21:03 ` Jonathan Leech-Pepin
2012-07-31 21:18 ` Nicolas Goaziou
2012-07-31 22:35 ` Jonathan Leech-Pepin
2012-07-31 23:45 ` Jonathan Leech-Pepin
2012-08-02 15:34 ` Bastien
[not found] ` <CAHRqSkQTzE-OYmTFs+BRjrER=jgS3=2BE5Yi4A6v8ipaZ1kWQA@mail.gmail.com>
2012-08-02 22:24 ` Fwd: " Jonathan Leech-Pepin
2012-08-03 7:29 ` Bastien
2012-08-03 8:41 ` Nicolas Goaziou
2012-08-03 13:30 ` Jonathan Leech-Pepin
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=87y5meaib9.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jonathan.leechpepin@gmail.com \
--cc=pinard@iro.umontreal.ca \
/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).