emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Export to Texinfo


From: Jonathan Leech-Pepin
Subject: Re: [O] Export to Texinfo
Date: Tue, 31 Jul 2012 17:03:58 -0400

Hello,

I've done some further work on the org-e-texinfo exporter and have
gotten it to a point where it should be usable with only a few
shortcomings.

Features:
- The copying section is created from the first headline containing
  the property :copying:.  Headlines with this property will not be
  exported except in the @copying block.
- Indexes will be created using unnumbered headings from headlines
  containing an :index: property.  If the property has a value
  corresponding to a texinfo index ("cp" "fn" "ky" "pg" "tp" "vr") it
  will be generated using @printindex.  Otherwise only the text will
  be exported and index printing will only be done if explicitly
  indicated.
- The following export-snippets are recognized by the exporter:
  info, e-info and e-texinfo.
- Header arguments can be added using ~#+TEXINFO_HEADER~
- Info directory information is provided by:
  #+TEXINFO_DIR_CATEGORY (e.g: "Emacs")
  #+TEXINFO_DIR_TITLE (e.g: "Org Mode Guide: (orgguide)")
  #+TEXINFO_DIR_DESC (e.g: "Abbreviated Org-mode Manual")
- The info filename is determined by ~#+TEXINFO_FILENAME~, or by
  appending .info to the .org filename.
- Additional title and author information (beyond a single line) can
  be included using #+SUBTITLE and #+SUBAUTHOR respectively.
- The menu and detailed menu in the TOP node, as well as the in-node
  menus of child nodes are generated on export.  Descriptions of the
  nodes are defined in the :DESCRIPTION: property of the headlines.
- Tables are exported to @multitable.  Column widths are either
  defined by the widest cell in each column (a string of ~a~ is
  generated equal to that length), or by a string of fractions in
  #+attr_texinfo (e.g: ~#+attr_texinfo :columns "0.33 0.33 0.33"~)


I have left in an option for #+TEXINFO_CLASS even though only a single
one is defined by default.  Removing it would require reworking
certain portions of the code at the moment, leaving it in allows for
changes if an alternate structure is desired.

It still has issues with the following:
- Table.el tables will not be exported.
- Only a single type of two-column table can currently be created, 
address@hidden
- Two-column tables are restricted to a single "indicating" command,
  defined by ~org-e-texinfo-def-table-markup~.  I'm not sure how to
  get around these limitations since they are created from description
  lists (which do not recognize #+attr lines).
- Links will export either as @ref{} or @uref{}.  Manually creating
  @pxref{} and @xref{} links is possible within export snippets.  I'm
  not certain where I would need to check to determine the context to
  select between the three choices.  @xref and @pxref are preferred in
  some cases, however @ref does provide the necessary features in Info
  output.


Also attached is a transcription of orgguide.texi to orgguide.org for
use with the e-texinfo exporter.  It is not exactly identical and
likely has a few places that could be better transcribed into org from
.texi, however it does demonstrate the resultant output when
exporting.

Prior to exporting the following must be evaluated:

  (add-to-list 'org-export-snippet-translation-alist
               '("info" . "e-texinfo"))
  (setq org-e-texinfo-def-table-markup "@kbd")

Regards,

Jon

On 20 July 2012 09:42, Nicolas Goaziou <address@hidden> wrote:
> Jonathan Leech-Pepin <address@hidden> writes:
>
>> Can I define the export-snippet using:
>>
>>     (add-to-list 'org-export-snippet-translation-alist
>>                  '("e-info" . "e-texinfo"))
>>
>> Or should that be left up to the discretion of the user?
>
> This is an user-oriented variable (customizable).
>
> Though, you have full control over which export snippets you accept. In
> the following example, you accept both @@info:...@@ and @@texinfo:...@@
> snippets:
>
>   (defun org-e-latex-export-snippet (export-snippet contents info)
>     "Blah..."
>     (when (memq (org-export-snippet-backend export-snippet) '(info texinfo))
>       (org-element-property :value export-snippet)))
>
> Just specify it in package's documentation.

Attachment: org-e-texinfo.el
Description: Binary data

Attachment: orgguide.org
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]