emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: prayner@unimelb.edu.au
Cc: emacs-orgmode@gnu.org
Subject: Re: superscripts, tables and latex
Date: Thu, 06 Sep 2012 10:23:28 -0400	[thread overview]
Message-ID: <6042.1346941408@alphaville> (raw)
In-Reply-To: Message from Peter Rayner <peter.julien.rayner@gmail.com> of "Thu, 06 Sep 2012 22:44:29 +1000." <20552.39597.747235.71356@raynernix2.earthsci.unimelb.edu.au>

Peter Rayner <peter.julien.rayner@gmail.com> wrote:

> I'm trying to export a simple table to latex with the only catch being
> it has some units I need to superscript.
> Here is the org code
> ----------------------------------------------------------------------
> ..
> ----------------------------------------------------------------------
> It has the text of the table with the pipe characters removed then the
> table itself.
> Here is the latex it generates
> ----------------------------------------------------------------------
> ...
> ----------------------------------------------------------------------
> 
> In the untabulated text the ^{-2} is being replaced with math
> delimiters while in the tabulated version the braces are being quoted.
> 
> This doesn't seem to happen when I export to html where both versions
> get superscripted. This could be a bug but it's more likely something
> I'm misunderstanding, can someone enlighten me?
> please reply directly as well as to the list, I'm behind on my mailing
> list browsing.

The standard latex exporter does indeed mishandle this, but unless it is
a very easy fix, it's unlikely to be fixed: the exporter is on its way
out.

If you can, please use Nicolas Goaziou's new exporter: it handles the
situation correctly.

Assuming you are running a recent version of org, you can install it
alongside the old one. Just add the following to your init file (with
the path modified appropriately):

--8<---------------cut here---------------start------------->8---
(add-to-list 'load-path "/path/to/contrib/lisp"))
(require 'org-export)
(require 'org-e-ascii) ; if you want
(require 'org-e-html)  ; if you want
(require 'org-e-latex)
--8<---------------cut here---------------end--------------->8---

In my case, I bind the new exporter dispatch to a key sequence, but that
is strictly optional. In addition, when the switchover is complete and
the old exporter is thrown overboard, C-c C-e will be the official
binding. In the meantime, something like this

--8<---------------cut here---------------start------------->8---
(define-key org-mode-map (kbd "C-c E") 'org-export-dispatch)
--8<---------------cut here---------------end--------------->8---

will allow you to invoke it with C-c E (which is officially undefined
currently). But you can always skip the define-key stuff and invoke it
the long way:

--8<---------------cut here---------------start------------->8---
M-x org-export-dispatch RET
--8<---------------cut here---------------end--------------->8---

Nick

  parent reply	other threads:[~2012-09-06 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 12:44 superscripts, tables and latex Peter Rayner
     [not found] ` <peter.julien.rayner@gmail.com>
2012-09-06 14:23   ` Nick Dokos [this message]
2012-09-06 15:27     ` Jambunathan K
2012-09-06 18:39     ` Nick Dokos
2012-09-07  4:33     ` Peter Rayner
2012-09-07  4:58       ` Nick Dokos
2012-09-07 12:54     ` Peter Rayner
2012-09-07 16:03   ` Nick Dokos

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=6042.1346941408@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=prayner@unimelb.edu.au \
    /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).