emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* \nbsp trick to get prefixed superscript to work?
@ 2015-05-18 15:43 Lawrence Bottorff
  2015-05-18 16:09 ` Nick Dokos
  2015-05-18 16:09 ` Eric S Fraga
  0 siblings, 2 replies; 5+ messages in thread
From: Lawrence Bottorff @ 2015-05-18 15:43 UTC (permalink / raw)
  To: emacs-orgmode

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

I saw an earlier discussion about Emacs/org-mode superscript and subscript
behavior. My issue is I want to do a chem isotope of an element. In
standard Latex format I would do this:

$^{147}$Pm  or leaving off the $ and turning on Emacs' display of UTF-8 (
C-c C-x \ ) just ^{147}Pm

but it doesn't work in either Emacs or org-mode, however

Pm^{147} does, i.e., putting the super-/subscript /after/ Pm. Also,

$^{147}Pm$ does work, although it converts the Pm into italicized text upon
export. Also

\nbsp^{147}Pm works in both Emacs and org-mode, but upon standard export to
HTML, it works in the TOC and down in the actual text, but not in the
"Contents" section (not used in Latex export).

Apparently, chemists cannot do Emacs and/or org-mode when they want to
prefix the super- bzw. sub-script without a kudge?

LB

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \nbsp trick to get prefixed superscript to work?
  2015-05-18 15:43 \nbsp trick to get prefixed superscript to work? Lawrence Bottorff
@ 2015-05-18 16:09 ` Nick Dokos
  2015-05-18 16:09 ` Eric S Fraga
  1 sibling, 0 replies; 5+ messages in thread
From: Nick Dokos @ 2015-05-18 16:09 UTC (permalink / raw)
  To: emacs-orgmode

Lawrence Bottorff <borgauf@gmail.com> writes:

> I saw an earlier discussion about Emacs/org-mode superscript and
> subscript behavior. My issue is I want to do a chem isotope of an
> element. In standard Latex format I would do this:
>
> $^{147}$Pm  or leaving off the $ and turning on Emacs' display of
> UTF-8 ( C-c C-x \ ) just ^{147}Pm
>
> but it doesn't work in either Emacs or org-mode, however
>
> Pm^{147} does, i.e., putting the super-/subscript /after/ Pm. Also,
>
> $^{147}Pm$ does work, although it converts the Pm into italicized text
> upon export. Also
>
> \nbsp^{147}Pm works in both Emacs and org-mode, but upon standard
> export to HTML, it works in the TOC and down in the actual text, but
> not in the "Contents" section (not used in Latex export).
>
> Apparently, chemists cannot do Emacs and/or org-mode when they want to
> prefix the super- bzw. sub-script without a kudge?
>

This seems to work fine for me both for latex and html (with MathJax)
export:

--8<---------------cut here---------------start------------->8---
* Dating with \(^{14}\)C.

Dating with \(^{14}\)C.
--8<---------------cut here---------------end--------------->8---

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \nbsp trick to get prefixed superscript to work?
  2015-05-18 15:43 \nbsp trick to get prefixed superscript to work? Lawrence Bottorff
  2015-05-18 16:09 ` Nick Dokos
@ 2015-05-18 16:09 ` Eric S Fraga
  2015-05-18 16:17   ` John Kitchin
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2015-05-18 16:09 UTC (permalink / raw)
  To: Lawrence Bottorff; +Cc: emacs-orgmode

On Monday, 18 May 2015 at 11:43, Lawrence Bottorff wrote:
> Apparently, chemists cannot do Emacs and/or org-mode when they want to
> prefix the super- bzw. sub-script without a kudge?

I've recently have had to start writing papers with significant amounts
of chemistry in them.  I simply use the mhchem package which supports
all types of chemical notation...  org is quite happy with it for simple
entries although you may need to @@...@@ escape more complex entries.

However, if you wanted something portable, i.e. that could export to
other targets, then this won't help you.  Sorry!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1136-g0e7062

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \nbsp trick to get prefixed superscript to work?
  2015-05-18 16:09 ` Eric S Fraga
@ 2015-05-18 16:17   ` John Kitchin
  2015-05-18 19:18     ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: John Kitchin @ 2015-05-18 16:17 UTC (permalink / raw)
  To: Lawrence Bottorff, emacs-orgmode@gnu.org

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

I think what Eric is referring to is:

#+latex_header: \usepackage[version=3]{mhchem}

@@latex:\ce{^{147}Pm}@@

that exports for me.

\nbsp{}^{147}Pm also seems to work, but might put an extra space in.

you might prefer \phantom{}^{147}Pm

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, May 18, 2015 at 12:09 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> On Monday, 18 May 2015 at 11:43, Lawrence Bottorff wrote:
> > Apparently, chemists cannot do Emacs and/or org-mode when they want to
> > prefix the super- bzw. sub-script without a kudge?
>
> I've recently have had to start writing papers with significant amounts
> of chemistry in them.  I simply use the mhchem package which supports
> all types of chemical notation...  org is quite happy with it for simple
> entries although you may need to @@...@@ escape more complex entries.
>
> However, if you wanted something portable, i.e. that could export to
> other targets, then this won't help you.  Sorry!
> --
> : Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1136-g0e7062
>
>

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: \nbsp trick to get prefixed superscript to work?
  2015-05-18 16:17   ` John Kitchin
@ 2015-05-18 19:18     ` Sebastien Vauban
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2015-05-18 19:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

John Kitchin wrote:
> I think what Eric is referring to is:
>
> #+latex_header: \usepackage[version=3]{mhchem}
>
> @@latex:\ce{^{147}Pm}@@
>
> that exports for me.
>
> \nbsp{}^{147}Pm also seems to work, but might put an extra space in.
>
> you might prefer \phantom{}^{147}Pm

Or using the zero-width char (via the predefined entity \zwnj in Org)?

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-18 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 15:43 \nbsp trick to get prefixed superscript to work? Lawrence Bottorff
2015-05-18 16:09 ` Nick Dokos
2015-05-18 16:09 ` Eric S Fraga
2015-05-18 16:17   ` John Kitchin
2015-05-18 19:18     ` Sebastien Vauban

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).