From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Slight problems with links Date: Mon, 29 Apr 2019 16:57:39 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000942d110587b189ea" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:53785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLDLX-0003wa-7L for emacs-orgmode@gnu.org; Mon, 29 Apr 2019 16:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLDLV-0007dr-Is for emacs-orgmode@gnu.org; Mon, 29 Apr 2019 16:57:55 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:45986) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLDLU-0007cO-9W for emacs-orgmode@gnu.org; Mon, 29 Apr 2019 16:57:53 -0400 Received: by mail-wr1-x434.google.com with SMTP id s15so17997573wra.12 for ; Mon, 29 Apr 2019 13:57:51 -0700 (PDT) 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: Emmanuel Charpentier Cc: emacs-orgmode --000000000000942d110587b189ea Content-Type: text/plain; charset="UTF-8" For org-ref, there isn't much magic on what happens on export. LaTeX is certainly the most well supported, and it seems like org -> latex -> pandoc is the only way that makes sense to get to docx to me. Using pandoc on org files directly is probably hopeless unless you can get pandoc to include some definitions for the org-ref links. Some of the link types in org-ref have some exports defined for org, html, latex, sometimes ascii. If one of these works well with pandoc we could try to make them output something useful for them, or at least make sure that org->org export turns them into something useful. Getting figure/table numbers has always been tricky; I don't think this worked well with pandoc, and handling it on the org side requires some preprocessing to add numbers. For now, the ox-word exporter in scimax comes closest, but it isn't a feature I use a lot, so it hasn't been improved in a while. 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, Apr 29, 2019 at 1:06 PM Emmanuel Charpentier < emm.charpentier@free.fr> wrote: > Dear list, > > one of my uses od org-mode is to prepare documents wrapping R (and > sometimes Sagemath) call results in interpretation text. My reference > output is .pdf documents, but I *have* to prepare a .docx version (for > use in managerial spheres, where computer literacy is *very* low. > Cross-references and citations are a sine qua non, maths are useful. > > I have been annoyed by a couple of deficiencies and inconsistencies > between exporters, so I prepared a test document testing various cases. > This documents and some exports are attached (NE = Native exporter, PE > = ox-pandoc exporter). > > TL;DR : > > * I tested the built-in latex/pdf exporter as well as ox-pandoc, the > latter both for .pdf and .docx export. The built-in ODT exporter > doesn't export citations ; therefore, I didn't test it further. > > > * org-ref's :labels and :refs do not export to anything but the > built-in latex exporter. The native system of #+NAME:s and #+CAPTION:s, > a bit on the heavy side, seems not to fail (except that they do not > expand in a caption...). > > * Maths, tables, figures are unproblematic. > > * The requirements of org-reftex, the built-in latex exporter and ox- > pandoc being mutually incompatible, and some ingenuity is required. see > the attached org source. Org-ref's requirements do not simplify the > situation... > > * Code snippets (i. e. source blocks exporting code) have a > captioning/numbering problem : > > - With the built-in latex exporter, they are numbered and labeled > as figures. > > - The pandoc latex exporter numbers them separately (as seen by > referencing them), but do not output this number (nor the category) > before the caption. > > - The pandoc .docx exporter works as advertised. > > So I have a couple of questions: > > * What can be done to reconcile org-ref's, latex-exporter's and ox- > pandoc's requirements for bibliographies ? > > * How to fix the pdf exporters' quirks with code snippets ? > > HTH, > > -- > Emmanuel Charpentier > --000000000000942d110587b189ea Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
For org-ref, there isn't much magic on what happens on= export. LaTeX is certainly the most well supported, and it seems like org = -> latex -> pandoc is the only way that makes sense to get to docx to= me.=C2=A0 Using pandoc on org files directly is probably hopeless unless y= ou can get pandoc to include some definitions for the org-ref links.
Some of the link types in org-ref have some exports defined fo= r org, html, latex, sometimes ascii. If one of these works well with pandoc= we could try to make them output something useful for them, or at least ma= ke sure that org->org export turns them into something useful. Getting f= igure/table numbers has always been tricky; I don't think this worked w= ell with pandoc, and handling it on the org side requires some preprocessin= g to add numbers. For now, the ox-word exporter in scimax comes closest, bu= t it isn't a feature I use a lot, so it hasn't been improved in a w= hile.

= John

-----------------------------------
Professor John Kitchin= =C2=A0
Doherty Hall A207F
Department of Chemical Engineering
Carne= gie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Mon, Apr 29, 2019 at 1:06 PM Emmanuel Char= pentier <emm.charpentier@free= .fr> wrote:
Dear list,

one of my uses od org-mode is to prepare documents wrapping R (and
sometimes Sagemath) call results in interpretation text. My reference
output is .pdf documents, but I *have* to prepare a .docx version (for
use in managerial spheres, where computer literacy is *very* low.
Cross-references and citations are a sine qua non, maths are useful.

I have been annoyed by a couple of deficiencies and inconsistencies
between exporters, so I prepared a test document testing various cases.
This documents and some exports are attached (NE =3D Native exporter, PE =3D ox-pandoc exporter).

TL;DR :

=C2=A0 * I tested the built-in latex/pdf exporter as well as ox-pandoc, the=
latter both for .pdf and .docx export. The built-in ODT exporter
doesn't export citations ; therefore, I didn't test it further.


=C2=A0 * org-ref's :labels and :refs do not export to anything but the<= br> built-in latex exporter. The native system of #+NAME:s and #+CAPTION:s,
a bit on the heavy side, seems not to fail (except that they do not
expand in a caption...).

=C2=A0 * Maths, tables, figures are unproblematic.

=C2=A0 * The requirements of org-reftex, the built-in latex exporter and ox= -
pandoc being mutually incompatible, and some ingenuity is required. see
the attached org source. Org-ref's requirements do not simplify the
situation...

=C2=A0 * Code snippets (i. e. source blocks exporting code) have a
captioning/numbering problem :

=C2=A0 =C2=A0 - With the built-in latex exporter, they are numbered and lab= eled
as figures.

=C2=A0 =C2=A0 - The pandoc latex exporter numbers them separately (as seen = by
referencing them), but do not output this number (nor the category)
before the caption.

=C2=A0 =C2=A0 - The pandoc .docx exporter works as advertised.

So I have a couple of questions:

=C2=A0 * What can be done to reconcile org-ref's, latex-exporter's = and ox-
pandoc's requirements for bibliographies ?

=C2=A0 * How to fix the pdf exporters' quirks with code snippets ?

HTH,

--
Emmanuel Charpentier
--000000000000942d110587b189ea--