emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Diego Zamboni <diego@zzamboni.org>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: Converting AsciiDoc to org-mode, preserving index entries
Date: Tue, 20 Feb 2018 11:07:21 +0100	[thread overview]
Message-ID: <CAGY83Ef3KevvqZu_4y+9-kUU0_up1sF=6cgmEgWXJFJK+VGPJw@mail.gmail.com> (raw)
In-Reply-To: <CAJ51ETo4-0=m8gDjtECK4M0OMQypVcUdZfxhjJvr9z7rLR2x0g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

Hi John,

Thanks - it would be indeed a one-time conversion. I may end up going this
route, but I thought there should be a proper way of doing it :)

Best,
--Diego

On Tue, Feb 20, 2018 at 1:25 AM, John Kitchin <jkitchin@andrew.cmu.edu>
wrote:

> If it is a one-time conversion, it might be worthwhile just replacing the
> index terms with something temporary, getting to the org-file, and then
> putting them back in the right way. For example, you could replace each
> term with a uuid, and keep a list that maps the uuid to the term. Then the
> uuid would pass through the pandoc untouched, and afterwards, go back
> through and replace the uuid with the #+INDEX entries.
>
> I don't know if that is worth the effort, but it might get you a faster
> org-doc than bug reporting :)
>
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803 <(412)%20268-7803>
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
> On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamboni <diego@zzamboni.org>
> wrote:
>
>> Hi,
>>
>> I have a large document (a book) written in AsciiDoc, and I’ve been
>> thinking of converting it to org-mode, which I find eminently more
>> readable. The method I’ve come up with is:
>>
>> 1. AsciiDoc -> Docbook using asciidoc or asciidoctor
>> 2. Docbook -> org using pandoc
>>
>> The conversion seems to work well, except for one thing: I have index
>> terms in my AsciiDoc files using the ‘((( … )))’ syntax (
>> http://asciidoctor.org/docs/user-manual/#index-terms). Step 1 converts
>> them correctly into <indexterm> tags, but pandoc inserts them as part of
>> the main text instead of producing‘#+INDEX entries.
>>
>> Before I go report the bug to Pandoc, I was wondering if anyone has tried
>> this and maybe come up with some other way of doing the conversion.
>>
>> Thanks!
>>
>> —Diego
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 3338 bytes --]

      reply	other threads:[~2018-02-20 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 19:54 Converting AsciiDoc to org-mode, preserving index entries Diego Zamboni
2018-02-20  0:25 ` John Kitchin
2018-02-20 10:07   ` Diego Zamboni [this message]

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='CAGY83Ef3KevvqZu_4y+9-kUU0_up1sF=6cgmEgWXJFJK+VGPJw@mail.gmail.com' \
    --to=diego@zzamboni.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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).