From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Converting AsciiDoc to org-mode, preserving index entries Date: Mon, 19 Feb 2018 20:54:40 +0100 Message-ID: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_A83F16EF-60A6-4FDD-9708-0A4FACF5F7EB" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1enrWf-00076N-4B for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 14:55:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1enrWb-0004Pv-Mo for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 14:55:01 -0500 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:51271) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1enrWb-0004P6-Dv for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 14:54:57 -0500 Received: by mail-wm0-x229.google.com with SMTP id h21so9901130wmd.1 for ; Mon, 19 Feb 2018 11:54:57 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Org-mode Cc: Diego Zamboni --Apple-Mail=_A83F16EF-60A6-4FDD-9708-0A4FACF5F7EB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, I have a large document (a book) written in AsciiDoc, and I=E2=80=99ve = been thinking of converting it to org-mode, which I find eminently more = readable. The method I=E2=80=99ve 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 =E2=80=98((( =E2=80=A6 )))=E2=80=99 = syntax (http://asciidoctor.org/docs/user-manual/#index-terms = ). Step 1 converts = them correctly into tags, but pandoc inserts them as part of = the main text instead of producing=E2=80=98#+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! =E2=80=94Diego --Apple-Mail=_A83F16EF-60A6-4FDD-9708-0A4FACF5F7EB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi,

I = have a large document (a book) written in AsciiDoc, and I=E2=80=99ve = been thinking of converting it to org-mode, which I find eminently more = readable. The method I=E2=80=99ve 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 =E2=80=98((( =E2=80=A6 = )))=E2=80=99 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=E2=80=98#+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!

=E2=80=94Diego

= --Apple-Mail=_A83F16EF-60A6-4FDD-9708-0A4FACF5F7EB-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Re: Converting AsciiDoc to org-mode, preserving index entries Date: Tue, 20 Feb 2018 11:07:21 +0100 Message-ID: References: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1c0d90fcb58d0565a1f9bb" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo4pa-00043W-4Z for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo4pW-0005f4-Tu for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:26 -0500 Received: from mail-ot0-x22b.google.com ([2607:f8b0:4003:c0f::22b]:44888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eo4pW-0005eT-LA for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:22 -0500 Received: by mail-ot0-x22b.google.com with SMTP id 79so10910585oth.11 for ; Tue, 20 Feb 2018 02:07:22 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: Org-mode --94eb2c1c0d90fcb58d0565a1f9bb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 th= e > 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 > wrote: > >> Hi, >> >> I have a large document (a book) written in AsciiDoc, and I=E2=80=99ve b= een >> thinking of converting it to org-mode, which I find eminently more >> readable. The method I=E2=80=99ve 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 =E2=80=98((( =E2=80=A6 )))=E2=80=99= syntax ( >> http://asciidoctor.org/docs/user-manual/#index-terms). Step 1 converts >> them correctly into tags, but pandoc inserts them as part of >> the main text instead of producing=E2=80=98#+INDEX entries. >> >> Before I go report the bug to Pandoc, I was wondering if anyone has trie= d >> this and maybe come up with some other way of doing the conversion. >> >> Thanks! >> >> =E2=80=94Diego >> >> > --94eb2c1c0d90fcb58d0565a1f9bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi John,

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

Best,
--Diego

On Tue, Feb 20, 2018 at 1:25 AM, John Kitchin <jkitchin@andrew.cm= u.edu> wrote:
If it is a one-time conversion, it might be worthwhile just replacing t= he 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 ter= m with a uuid, and keep a list that maps the uuid to the term. Then the uui= d 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=C2=A0
Do= herty Hall A207F
Department of Chemical Engineering
Carnegie Mellon U= niversity
Pittsburgh, PA 15213
412-268-7803

On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamb= oni <diego@zzamboni.org> wrote:
Hi,=

I have a large document (a book) written in AsciiDoc, a= nd I=E2=80=99ve been thinking of converting it to org-mode, which I find em= inently more readable. The method I=E2=80=99ve come up with is:
<= br>
1. AsciiDoc -> Docbook using asciidoc or asciidoctor
=
2. Docbook -> org using pandoc

The convers= ion seems to work well, except for one thing: I have index terms in my Asci= iDoc files using the =E2=80=98((( =E2=80=A6 )))=E2=80=99 syntax (ht= tp://asciidoctor.org/docs/user-manual/#index-terms). Step 1 conver= ts them correctly into <indexterm> tags, but pandoc inserts them as p= art of the main text instead of producing=E2=80=98#+INDEX entries.

Before I go report the bug to Pandoc, I was wondering if a= nyone has tried this and maybe come up with some other way of doing the con= version.

Thanks!

=E2=80=94Diego=



--94eb2c1c0d90fcb58d0565a1f9bb-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Converting AsciiDoc to org-mode, preserving index entries Date: Mon, 19 Feb 2018 16:25:21 -0800 Message-ID: References: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140b8289ab231056599d8ad" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1envkL-00087D-NI for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1envkJ-0003WJ-Vy for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:25 -0500 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:46242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1envkJ-0003Vh-LS for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:23 -0500 Received: by mail-wr0-x236.google.com with SMTP id 34so11338592wre.13 for ; Mon, 19 Feb 2018 16:25:23 -0800 (PST) In-Reply-To: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Diego Zamboni Cc: Org-mode --001a1140b8289ab231056599d8ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamboni wrote: > Hi, > > I have a large document (a book) written in AsciiDoc, and I=E2=80=99ve be= en > thinking of converting it to org-mode, which I find eminently more > readable. The method I=E2=80=99ve 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 =E2=80=98((( =E2=80=A6 )))=E2=80=99 = syntax ( > http://asciidoctor.org/docs/user-manual/#index-terms). Step 1 converts > them correctly into tags, but pandoc inserts them as part of > the main text instead of producing=E2=80=98#+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! > > =E2=80=94Diego > > --001a1140b8289ab231056599d8ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If it is a one-time conversion, it might be worthwhile jus= t replacing the index terms with something temporary, getting to the org-fi= le, and then putting them back in the right way. For example, you could rep= lace 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.

<= div>I don't know if that is worth the effort, but it might get you a fa= ster org-doc than bug reporting :)
John

------------= -----------------------
Professor John Kitchin=C2=A0
Doherty Hall A20= 7F
Department of Chemical Engineering
Carnegie Mellon University
P= ittsburgh, PA 15213
412-268-7803
@johnkitchin
<= a href=3D"http://kitchingroup.cheme.cmu.edu" target=3D"_blank">http://kitch= ingroup.cheme.cmu.edu


On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamb= oni <diego@zzamboni.org> wrote:
Hi,=

I have a large document (a book) written in AsciiDoc, a= nd I=E2=80=99ve been thinking of converting it to org-mode, which I find em= inently more readable. The method I=E2=80=99ve come up with is:
<= br>
1. AsciiDoc -> Docbook using asciidoc or asciidoctor
=
2. Docbook -> org using pandoc

The convers= ion seems to work well, except for one thing: I have index terms in my Asci= iDoc files using the =E2=80=98((( =E2=80=A6 )))=E2=80=99 syntax (ht= tp://asciidoctor.org/docs/user-manual/#index-terms). Step 1 conver= ts them correctly into <indexterm> tags, but pandoc inserts them as p= art of the main text instead of producing=E2=80=98#+INDEX entries.

Before I go report the bug to Pandoc, I was wondering if a= nyone has tried this and maybe come up with some other way of doing the con= version.

Thanks!

=E2=80=94Diego

<= /font>

--001a1140b8289ab231056599d8ad--