emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Superscript before character
@ 2013-09-06 17:09 Roger Mason
  2013-09-06 18:03 ` Charles Berry
  0 siblings, 1 reply; 8+ messages in thread
From: Roger Mason @ 2013-09-06 17:09 UTC (permalink / raw)
  To: org-mode

Hello,

I'd like to create a superscript that preceeds a letter.  I tried 
^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.

Can this be done in org (8.0.3)?  If so how?

Thanks,
Roger

This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

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

* Re: Superscript before character
  2013-09-06 17:09 Superscript before character Roger Mason
@ 2013-09-06 18:03 ` Charles Berry
  2013-09-06 18:40   ` Roger Mason
  2013-09-07  8:43   ` Carsten Dominik
  0 siblings, 2 replies; 8+ messages in thread
From: Charles Berry @ 2013-09-06 18:03 UTC (permalink / raw)
  To: emacs-orgmode

Roger Mason <rmason <at> mun.ca> writes:

> 
> Hello,
> 
> I'd like to create a superscript that preceeds a letter.  I tried 
> ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.
> 
> Can this be done in org (8.0.3)?  If so how?
[snip]

\nbsp{}^{1}Fred

exports to ~$^{\text{1}}$Fred in latex and &nbsp;<sup>1</sup>Fred in html

HTH,

Chuck

 

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

* Re: Superscript before character
  2013-09-06 18:03 ` Charles Berry
@ 2013-09-06 18:40   ` Roger Mason
  2013-09-07  8:43   ` Carsten Dominik
  1 sibling, 0 replies; 8+ messages in thread
From: Roger Mason @ 2013-09-06 18:40 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

On 09/06/2013 03:33 PM, Charles Berry wrote:
> Roger Mason <rmason <at> mun.ca> writes:
>
>> Hello,
>>
>> I'd like to create a superscript that preceeds a letter.  I tried
>> ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.
>>
>> Can this be done in org (8.0.3)?  If so how?
> [snip]
>
> \nbsp{}^{1}Fred
>
> exports to ~$^{\text{1}}$Fred in latex and &nbsp;<sup>1</sup>Fred in html
>
> HTH,
>
> Chuck
>
yes, that helps - it works perfectly.

Many thanks,
Roger


This electronic communication is governed by the terms and conditions at
http://www.mun.ca/cc/policies/electronic_communications_disclaimer_2012.php

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

* Re: Superscript before character
  2013-09-06 18:03 ` Charles Berry
  2013-09-06 18:40   ` Roger Mason
@ 2013-09-07  8:43   ` Carsten Dominik
  2013-09-07 20:47     ` Rasmus
  1 sibling, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2013-09-07  8:43 UTC (permalink / raw)
  To: Charles Berry; +Cc: emacs-orgmode


On 6.9.2013, at 20:03, Charles Berry <ccberry@ucsd.edu> wrote:

> Roger Mason <rmason <at> mun.ca> writes:
> 
>> 
>> Hello,
>> 
>> I'd like to create a superscript that preceeds a letter.  I tried 
>> ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.
>> 
>> Can this be done in org (8.0.3)?  If so how?
> [snip]
> 
> \nbsp{}^{1}Fred

Yes, nice.  I also need this often.  You can also write \nbsp^{1}Fred, a bit more compact.  I am wondering if we could come up with something even more compact though.  I often have to write names of isotopes, for example
\nbsp^{13}CO, and I do find that cumbersome.

- Carsten

> 
> exports to ~$^{\text{1}}$Fred in latex and &nbsp;<sup>1</sup>Fred in html
> 
> HTH,
> 
> Chuck
> 
> 
> 
> 
> 
> 

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

* Re: Superscript before character
  2013-09-07  8:43   ` Carsten Dominik
@ 2013-09-07 20:47     ` Rasmus
  2013-09-08  5:47       ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2013-09-07 20:47 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On 6.9.2013, at 20:03, Charles Berry <ccberry@ucsd.edu> wrote:
>
>> Roger Mason <rmason <at> mun.ca> writes:
>>
>>>
>>> Hello,
>>>
>>> I'd like to create a superscript that preceeds a letter.  I tried
>>> ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.
>>>
>>> Can this be done in org (8.0.3)?  If so how?
>> [snip]
>>
>> \nbsp{}^{1}Fred
>
> Yes, nice.  I also need this often.  You can also write \nbsp^{1}Fred,
> a bit more compact.  I am wondering if we could come up with something
> even more compact though.  I often have to write names of isotopes,
> for example
> \nbsp^{13}CO, and I do find that cumbersome.

I don't use prescripts, but perhaps a macro could be used?

#+BEGIN_SRC org
#+LATEX_HEADER: \usepackage{mhchem}
#+MACRO: ce $\ce{$1}$
 {{{ce(^{227}_{90}Th+)}}} *bold*
#+END_SRC

Further flexibility is probably possible using ob-latex.

–Rasmus

--
Don't panic!!!

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

* Re: Superscript before character
  2013-09-07 20:47     ` Rasmus
@ 2013-09-08  5:47       ` Carsten Dominik
  2013-09-08 10:15         ` Rasmus
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2013-09-08  5:47 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

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


On 7.9.2013, at 22:47, Rasmus <rasmus@gmx.us> wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> On 6.9.2013, at 20:03, Charles Berry <ccberry@ucsd.edu> wrote:
>> 
>>> Roger Mason <rmason <at> mun.ca> writes:
>>> 
>>>> 
>>>> Hello,
>>>> 
>>>> I'd like to create a superscript that preceeds a letter.  I tried
>>>> ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail.
>>>> 
>>>> Can this be done in org (8.0.3)?  If so how?
>>> [snip]
>>> 
>>> \nbsp{}^{1}Fred
>> 
>> Yes, nice.  I also need this often.  You can also write \nbsp^{1}Fred,
>> a bit more compact.  I am wondering if we could come up with something
>> even more compact though.  I often have to write names of isotopes,
>> for example
>> \nbsp^{13}CO, and I do find that cumbersome.
> 
> I don't use prescripts, but perhaps a macro could be used?
> 
> #+BEGIN_SRC org
> #+LATEX_HEADER: \usepackage{mhchem}
> #+MACRO: ce $\ce{$1}$
> {{{ce(^{227}_{90}Th+)}}} *bold*
> #+END_SRC

Yes, this will do the trick for LaTeX, but {{{...}}} is still not pretty.
Yes, maybe I should think more about the cechem package - did not know it, and it looks good.
Thanks!

- Carsten

\ce

> 
> Further flexibility is probably possible using ob-latex.
> 
> –Rasmus
> 
> --
> Don't panic!!!
> 
> 


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

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

* Re: Superscript before character
  2013-09-08  5:47       ` Carsten Dominik
@ 2013-09-08 10:15         ` Rasmus
  2013-09-08 10:34           ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Rasmus @ 2013-09-08 10:15 UTC (permalink / raw)
  To: carsten.dominik; +Cc: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Yes, this will do the trick for LaTeX, but {{{...}}} is still not pretty.
> Yes, maybe I should think more about the cechem package - did not know
> it, and it looks good.
> Thanks!

{{{·}}} looks terrible but it's pretty quick to type. . .  Perhaps we
could fontify them like with URLs.

For more flexibility you could use a URL-like syntax which could then
export conditional on the output format,

(org-add-link-type "ce" nil
 (lambda (path desc format) 
  (cond ((eq format 'latex)
      (format "\ce{%s}" desc))
      ((eq format 'html)
        (format "\\nbsp%s" desc)))))

or something like  that . . . 

–Rasmus

-- 
There are known knowns; there are things we know that we know.

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

* Re: Superscript before character
  2013-09-08 10:15         ` Rasmus
@ 2013-09-08 10:34           ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2013-09-08 10:34 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

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


On 8.9.2013, at 12:15, Rasmus <rasmus@gmx.us> wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> Yes, this will do the trick for LaTeX, but {{{...}}} is still not pretty.
>> Yes, maybe I should think more about the cechem package - did not know
>> it, and it looks good.
>> Thanks!
> 
> {{{·}}} looks terrible but it's pretty quick to type. . .  Perhaps we
> could fontify them like with URLs.
> 
> For more flexibility you could use a URL-like syntax which could then
> export conditional on the output format,
> 
> (org-add-link-type "ce" nil
> (lambda (path desc format) 
>  (cond ((eq format 'latex)
>      (format "\ce{%s}" desc))
>      ((eq format 'html)
>        (format "\\nbsp%s" desc)))))
> 
> or something like  that . . . 

Another good idea - I'll try this.

- Carsten

> 
> –Rasmus
> 
> -- 
> There are known knowns; there are things we know that we know.


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

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

end of thread, other threads:[~2013-09-08 10:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-06 17:09 Superscript before character Roger Mason
2013-09-06 18:03 ` Charles Berry
2013-09-06 18:40   ` Roger Mason
2013-09-07  8:43   ` Carsten Dominik
2013-09-07 20:47     ` Rasmus
2013-09-08  5:47       ` Carsten Dominik
2013-09-08 10:15         ` Rasmus
2013-09-08 10:34           ` Carsten Dominik

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