all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Superscript and subscript in HTML?
@ 2014-05-28 11:47 Peter Davis
  2014-05-28 12:50 ` Rick Frankel
  2014-05-28 13:37 ` Nick Dokos
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Davis @ 2014-05-28 11:47 UTC (permalink / raw)
  To: emacs-orgmode

Is there any markup which will let me get superscripts and subscripts in 
HTML export?

It would be great if the HTML exporter recognized ^{...} and _{...} so 
the same markup would work for both LaTeX/PDF and for HTML.

Thanks,
-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Superscript and subscript in HTML?
  2014-05-28 11:47 Superscript and subscript in HTML? Peter Davis
@ 2014-05-28 12:50 ` Rick Frankel
  2014-05-28 13:22   ` Peter Davis
  2014-05-28 13:37 ` Nick Dokos
  1 sibling, 1 reply; 7+ messages in thread
From: Rick Frankel @ 2014-05-28 12:50 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On 2014-05-28 07:47, Peter Davis wrote:
> Is there any markup which will let me get superscripts and subscripts
> in HTML export?
> 
> It would be great if the HTML exporter recognized ^{...} and _{...} so
> the same markup would work for both LaTeX/PDF and for HTML.

It does for me. I believe it always has. Are you sure your options are
set correctly? Also, are you sure that the html source doesn't contain
<sup/> and <sub/> tags that aren't being styled?

Here's a example and the output

#+BEGIN_SRC org
,#+OPTIONS: toc:nil
,* Super and subscript
this is a super^{1} script. and a sub_{2} script.

another super^3 and another sub_4
#+END_SRC

and the results (C-c C-e C-b h H)

#+BEGIN_EXAMPLE
<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Super and subscript</h2>
<div class="outline-text-2" id="text-1">
<p>
this is a super<sup>1</sup> script. and a sub<sub>2</sub> script.
</p>

<p>
another super<sup>3</sup> and another sub<sub>4</sub></p>
</div>
</div>

#+END_EXAMPLE

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

* Re: Superscript and subscript in HTML?
  2014-05-28 12:50 ` Rick Frankel
@ 2014-05-28 13:22   ` Peter Davis
  2014-05-28 13:29     ` Rick Frankel
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2014-05-28 13:22 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

On Wed, May 28, 2014 at 08:50:20AM -0400, Rick Frankel wrote:
> On 2014-05-28 07:47, Peter Davis wrote:
> >Is there any markup which will let me get superscripts and subscripts
> >in HTML export?
> >
> >It would be great if the HTML exporter recognized ^{...} and _{...} so
> >the same markup would work for both LaTeX/PDF and for HTML.
> 
> It does for me. I believe it always has. Are you sure your options are
> set correctly? Also, are you sure that the html source doesn't contain
> <sup/> and <sub/> tags that aren't being styled?
> 
> Here's a example and the output
> 
> #+BEGIN_SRC org
> ,#+OPTIONS: toc:nil
> ,* Super and subscript
> this is a super^{1} script. and a sub_{2} script.
> 
> another super^3 and another sub_4
> #+END_SRC
> 
> and the results (C-c C-e C-b h H)
> 
> #+BEGIN_EXAMPLE
> <div id="outline-container-sec-1" class="outline-2">
> <h2 id="sec-1">Super and subscript</h2>
> <div class="outline-text-2" id="text-1">
> <p>
> this is a super<sup>1</sup> script. and a sub<sub>2</sub> script.
> </p>
> 
> <p>
> another super<sup>3</sup> and another sub<sub>4</sub></p>
> </div>
> </div>
> 
> #+END_EXAMPLE
> 

Here's what I get for the body, using your example:

+==========
<div class="org-src-container">

<pre class="src src-org"><span style="color: #b22222;">#+OPTIONS: toc:nil</span>
<span style="color: #0000ff;">* Super and subscript</span>
this is a super^{1} script. and a sub_{2} script.

another super^3 and another sub_4
</pre>
</div>
+==========

Leaving out the #+BEGIN_SRC/#+END_SRC doesn't work either. This is with emacs 24.3.3, org-mode 8.2.5g

Thanks,
-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Superscript and subscript in HTML?
  2014-05-28 13:22   ` Peter Davis
@ 2014-05-28 13:29     ` Rick Frankel
  2014-05-28 13:36       ` Peter Davis
  0 siblings, 1 reply; 7+ messages in thread
From: Rick Frankel @ 2014-05-28 13:29 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On 2014-05-28 09:22, Peter Davis wrote:
> On Wed, May 28, 2014 at 08:50:20AM -0400, Rick Frankel wrote:
> On 2014-05-28 07:47, Peter Davis wrote:
> >Is there any markup which will let me get superscripts and subscripts
> >in HTML export?
> >
> >It would be great if the HTML exporter recognized ^{...} and _{...} so
> >the same markup would work for both LaTeX/PDF and for HTML.
> 
> It does for me. I believe it always has. Are you sure your options are
> set correctly? Also, are you sure that the html source doesn't contain
> <sup/> and <sub/> tags that aren't being styled?
> 
> Here's a example and the output
> 
> #+BEGIN_SRC org
> ,#+OPTIONS: toc:nil
> ,* Super and subscript
> this is a super^{1} script. and a sub_{2} script.
> 
> another super^3 and another sub_4
> #+END_SRC
> 
> and the results (C-c C-e C-b h H)
> 
> #+BEGIN_EXAMPLE
> <div id="outline-container-sec-1" class="outline-2">
> <h2 id="sec-1">Super and subscript</h2>
> <div class="outline-text-2" id="text-1">
> <p>
> this is a super<sup>1</sup> script. and a sub<sub>2</sub> script.
> </p>
> 
> <p>
> another super<sup>3</sup> and another sub<sub>4</sub></p>
> </div>
> </div>
> 
> #+END_EXAMPLE
> 
> 
> Here's what I get for the body, using your example:
> 
> +==========
> <div class="org-src-container">
> 
> <pre class="src src-org"><span style="color: #b22222;">#+OPTIONS: 
> toc:nil</span>
> <span style="color: #0000ff;">* Super and subscript</span>
> this is a super^{1} script. and a sub_{2} script.
> 
> another super^3 and another sub_4
> </pre>
> </div>
> +==========
> 
> Leaving out the #+BEGIN_SRC/#+END_SRC doesn't work either. This is
> with emacs 24.3.3, org-mode 8.2.5g

The begin/end src lines are just that, markers to show where the org
source starts and end. What you have formatted is a source code
listing, not the source code.

1. Create a new org mode buffer.
2. Copy the contents WITHIN the begin/end src block to the buffer.
3. Remove the leading commas (,).
4. With your cursor on the #+OPTION line type [C-c C-c].
5. Generate the html output.

If it still doesn't work edit the file with:

emacs -Q -L<path to org 8.2.5g> mytest.org

and try again.

rick

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

* Re: Superscript and subscript in HTML?
  2014-05-28 13:29     ` Rick Frankel
@ 2014-05-28 13:36       ` Peter Davis
  2014-05-28 13:42         ` Rick Frankel
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2014-05-28 13:36 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

On Wed, May 28, 2014 at 09:29:44AM -0400, Rick Frankel wrote:
> 
> The begin/end src lines are just that, markers to show where the org
> source starts and end. What you have formatted is a source code
> listing, not the source code.

If you're giving an example of org buffer contents, #+BEGIN_SRC and #+END_SRC are probably not the best delimiters to use to set off your
example, since they're valid org markup.

Anyway, it turns out some options I had enabled were preventing the superscript/subscript markup from being recognized. I had this

#+OPTIONS:   H:5 \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t

at the top of the buffer. Removing that line seems to get me proper HTML markup.

Thanks!
-pd


-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com

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

* Re: Superscript and subscript in HTML?
  2014-05-28 11:47 Superscript and subscript in HTML? Peter Davis
  2014-05-28 12:50 ` Rick Frankel
@ 2014-05-28 13:37 ` Nick Dokos
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Dokos @ 2014-05-28 13:37 UTC (permalink / raw)
  To: emacs-orgmode

Peter Davis <pfd@pfdstudio.com> writes:

> Is there any markup which will let me get superscripts and subscripts
> in HTML export?
>
> It would be great if the HTML exporter recognized ^{...} and _{...} so
> the same markup would work for both LaTeX/PDF and for HTML.
>

It does - this works fine for me:

--8<---------------cut here---------------start------------->8---
* foo

This is a super^{script} and this is a sub_{script}.
--8<---------------cut here---------------end--------------->8---

Does that not work for you? If so, check for "#+OPTIONS: ^:nil" settings
perhaps.

-- 
Nick

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

* Re: Superscript and subscript in HTML?
  2014-05-28 13:36       ` Peter Davis
@ 2014-05-28 13:42         ` Rick Frankel
  0 siblings, 0 replies; 7+ messages in thread
From: Rick Frankel @ 2014-05-28 13:42 UTC (permalink / raw)
  To: Peter Davis; +Cc: emacs-orgmode

On 2014-05-28 09:36, Peter Davis wrote:
> On Wed, May 28, 2014 at 09:29:44AM -0400, Rick Frankel wrote:
> 
> The begin/end src lines are just that, markers to show where the org
> source starts and end. What you have formatted is a source code
> listing, not the source code.
> 
> If you're giving an example of org buffer contents, #+BEGIN_SRC and
> #+END_SRC are probably not the best delimiters to use to set off your
> example, since they're valid org markup.

#+BEGIN_SRC org
^^^

Is the common method on this list for specifying org (or any other)
source code in an email. Org can embed org source in org.
> 
> Anyway, it turns out some options I had enabled were preventing the
> superscript/subscript markup from being recognized. I had this
> 
> #+OPTIONS:   H:5 \n:nil @:t ::t |:t ^:nil -:t f:t *:t <:t

^^^^^
> at the top of the buffer. Removing that line seems to get me proper
> HTML markup.

You are explicitly disabling super/subscripts. It would be the same
for latex output.

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

end of thread, other threads:[~2014-05-28 13:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28 11:47 Superscript and subscript in HTML? Peter Davis
2014-05-28 12:50 ` Rick Frankel
2014-05-28 13:22   ` Peter Davis
2014-05-28 13:29     ` Rick Frankel
2014-05-28 13:36       ` Peter Davis
2014-05-28 13:42         ` Rick Frankel
2014-05-28 13:37 ` Nick Dokos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.