emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Scott Otterson <scotto@sharpleaf.org>
To: Scott Randby <srandby@gmail.com>,
	"Emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Multiple underscores crash org latex export; other exporters survive
Date: Mon, 12 Dec 2016 16:18:09 +0100	[thread overview]
Message-ID: <CAPY3P0QbN7D7d71YA8uxumKTxvO8KmV9rsw-=r0ekdArYEG7Dw@mail.gmail.com> (raw)
In-Reply-To: <87bmwhbne5.fsf@nicolasgoaziou.fr>

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

Thanks to Nicolas and Scott for your painstaking efforts.  At least for me,
a fine stopgap measure is to simply avoid Latex crashes for orgmode
contents that are not explicitly Latex.  Sometime after that, it would be
ideal to produce similar output for all export types, insofar as that's
possible.

I thought I'd see what ox-pandoc does.  As I'm sure you know, pandoc
converts all input formats to a master markup language, and then converts
that to whatever output format is desired -- a design that makes output
uniformity easier to obtain.  Orgmode is already halfway there, since the
master markup language is orgmode itself.

Here's what pandoc does in the three cases I've recently posted about:

1.) *Multiple underscores* (the subject of this thread):  Pandoc doesn't
crash and it exports the same thing for either html or latex: everything
after the first underscore is subscripted and all underscores are deleted.
I don't love that behavior but it's consistent.

2.) *Plain lists with more than four sublevels*: For html export, pandoc
and orgmode do what you'd expect: produce a deeply nested html list.  For
(Windows) latex export, pandoc and orgmode also do the same thing: crash.
Ideally, pandoc would have generated valid Latex for deep list nesting, but
at least it's not completely ornery; it snips out the part of the original
Latex error message that points to the cause.

Perhaps pandoc latex export wouldn't crash in Linux, just as orgmode latex
export doesn't crash in Linux (from Nicolas).  This is still a mystery.
Nicolas's Linux-produced tex file is essentially the same as the one I got
in Windows, and it crashes Windows latexmk just like mine does.  *Nicolas*,
could it be that you're not running latexmk on your exports?

3.) *Web link with a '#' in the URL*: Pandoc never crashes and it exports
nearly the same thing for html or latex pdf:  In either case, clicking on
the link sends you to the right web page, and the only difference is that,
in the output pdf, the link text isn't highlighted; instead there's a
tooltip popup.

The reason pandoc latex export doesn't crash but orgmode does (in Windows)
is that pandoc escapes the '#'.  In the example I posted last week, orgmode
does this:

\section{Some section  \href{http://orgmode.org/manual/Column-groups.html#
Column-groups}{A random link}}


while pandoc does this:

\section{\texorpdfstring{Some section \href{http://orgmode.org/
manual/Column-groups.html\#Column-groups}{A random link}}{Some section A
random link}}


I don't understand why the escape prevents Windows crashes but doesn't
appear to be needed for Linux.  Nevertheless, it looks like pandoc does
something special to prevent this crash.

Scott

>
>

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

  reply	other threads:[~2016-12-12 15:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-03 19:40 Multiple underscores crash org latex export; other exporters survive Scott Otterson
2016-12-03 21:24 ` Scott Randby
2016-12-03 22:31   ` Charles C. Berry
2016-12-04  4:53     ` Scott Randby
2016-12-04 10:13       ` Nicolas Goaziou
2016-12-04 16:03         ` Scott Randby
2016-12-05  8:36         ` Scott Otterson
2016-12-06  1:33           ` Scott Randby
     [not found]             ` <CAPY3P0QcpouDjmNpmaY6FzNSNjZyHAGufrbVtSuBzPxr6mUAzg@mail.gmail.com>
2016-12-06 18:18               ` Scott Randby
2016-12-06 23:50             ` Nicolas Goaziou
2016-12-07  2:06               ` Scott Randby
2016-12-07 11:21                 ` Nicolas Goaziou
2016-12-10 23:24                   ` Scott Randby
2016-12-11  0:05                     ` Nicolas Goaziou
2016-12-12  3:37                       ` Scott Randby
2016-12-12  7:46                         ` Nicolas Goaziou
2016-12-12 15:18                           ` Scott Otterson [this message]
2016-12-13 12:54                             ` Nicolas Goaziou
2016-12-05 17:30         ` Charles C. Berry

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='CAPY3P0QbN7D7d71YA8uxumKTxvO8KmV9rsw-=r0ekdArYEG7Dw@mail.gmail.com' \
    --to=scotto@sharpleaf.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=srandby@gmail.com \
    /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).