emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exporting to HTML - underscores cause unwanted sub-script
@ 2008-08-15  1:01 Parker, Matthew
  2008-08-15  1:52 ` Nick Dokos
  2008-08-15  8:39 ` Rick Moynihan
  0 siblings, 2 replies; 6+ messages in thread
From: Parker, Matthew @ 2008-08-15  1:01 UTC (permalink / raw)
  To: Emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 359 bytes --]

Hi,

 

The export to HTML is really great.... 

 

One thing that I'm tripping up on is that I'm trying to list data base
names that have underscores, e.g. prc_tms. 

 

And the 'second word' is coming out subscript: 'prctms' field

 

I realize this may be a feature and not a bug... but how to turn it off?

 

 

Thanks!

Matt


[-- Attachment #1.2: Type: text/html, Size: 3330 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Exporting to HTML - underscores cause unwanted sub-script
  2008-08-15  1:01 Exporting to HTML - underscores cause unwanted sub-script Parker, Matthew
@ 2008-08-15  1:52 ` Nick Dokos
  2008-08-15  2:05   ` Parker, Matthew
  2008-08-15  8:39 ` Rick Moynihan
  1 sibling, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2008-08-15  1:52 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: Emacs-orgmode

Parker, Matthew <MParker@seic.com> wrote:

> 
> One thing that I’m tripping up on is that I’m trying to list data base names that have underscores, e.g. prc_tms.
> 
> And the ‘second word’ is coming out subscript: 'prc[tms'] field
> 
> I realize this may be a feature and not a bug… but how to turn it off?
> 

Escape the underscore with a backslash: prc\_tms. Similarly, ^ produces
a superscript whereas \^ produces a caret. And for something completely
different, \alpha produces &alpha; which is rendered as the first letter
of the Greek alphabet etc.

This notation is TeX-inspired: Carsten is a scientist, he uses TeX/LaTeX
for papers and he uses org-mode for notes, so it was natural for him to
adopt the notation.

Nick

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

* RE: Exporting to HTML - underscores cause unwanted sub-script
  2008-08-15  1:52 ` Nick Dokos
@ 2008-08-15  2:05   ` Parker, Matthew
  2008-08-15  7:23     ` Daniel J. Sinder
  0 siblings, 1 reply; 6+ messages in thread
From: Parker, Matthew @ 2008-08-15  2:05 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Emacs-orgmode

Perfect. Thanks!

-----Original Message-----
From: nick@gamaville.dokosmarshall.org
[mailto:nick@gamaville.dokosmarshall.org] On Behalf Of Nick Dokos
Sent: Thursday, August 14, 2008 9:52 PM
To: Parker, Matthew
Cc: Emacs-orgmode@gnu.org
Subject: Re: [Orgmode] Exporting to HTML - underscores cause unwanted
sub-script 

Parker, Matthew <MParker@seic.com> wrote:

> 
> One thing that I'm tripping up on is that I'm trying to list data base
names that have underscores, e.g. prc_tms.
> 
> And the 'second word' is coming out subscript: 'prc[tms'] field
> 
> I realize this may be a feature and not a bug... but how to turn it
off?
> 

Escape the underscore with a backslash: prc\_tms. Similarly, ^ produces
a superscript whereas \^ produces a caret. And for something completely
different, \alpha produces &alpha; which is rendered as the first letter
of the Greek alphabet etc.

This notation is TeX-inspired: Carsten is a scientist, he uses TeX/LaTeX
for papers and he uses org-mode for notes, so it was natural for him to
adopt the notation.

Nick

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

* Re: Exporting to HTML - underscores cause unwanted sub-script
  2008-08-15  2:05   ` Parker, Matthew
@ 2008-08-15  7:23     ` Daniel J. Sinder
  2008-08-20  9:03       ` David House
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel J. Sinder @ 2008-08-15  7:23 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: Emacs-orgmode

For the record, you can also "fix" this problem using the following 
file-local customization:

#+OPTIONS:   ^:{}

I'm a regular LaTeX user, but find that escaping underscores (with 
'\') gets tedious when cutting and pasting multiple file names 
and/or variable names that include them.

With the above option, "before_after" is left as is, while 
"before_{after}" has "after" set as a subscript.  See section 12.2 
of the documentation.

Dan



Parker, Matthew wrote:
> Perfect. Thanks!
> 
> -----Original Message-----
> From: nick@gamaville.dokosmarshall.org
> [mailto:nick@gamaville.dokosmarshall.org] On Behalf Of Nick Dokos
> Sent: Thursday, August 14, 2008 9:52 PM
> To: Parker, Matthew
> Cc: Emacs-orgmode@gnu.org
> Subject: Re: [Orgmode] Exporting to HTML - underscores cause unwanted
> sub-script 
> 
> Parker, Matthew <MParker@seic.com> wrote:
> 
> 
>>One thing that I'm tripping up on is that I'm trying to list data base
> 
> names that have underscores, e.g. prc_tms.
> 
>>And the 'second word' is coming out subscript: 'prc[tms'] field
>>
>>I realize this may be a feature and not a bug... but how to turn it
> 
> off?
> 
> 
> Escape the underscore with a backslash: prc\_tms. Similarly, ^ produces
> a superscript whereas \^ produces a caret. And for something completely
> different, \alpha produces &alpha; which is rendered as the first letter
> of the Greek alphabet etc.
> 
> This notation is TeX-inspired: Carsten is a scientist, he uses TeX/LaTeX
> for papers and he uses org-mode for notes, so it was natural for him to
> adopt the notation.
> 
> Nick
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Exporting to HTML - underscores cause unwanted sub-script
  2008-08-15  1:01 Exporting to HTML - underscores cause unwanted sub-script Parker, Matthew
  2008-08-15  1:52 ` Nick Dokos
@ 2008-08-15  8:39 ` Rick Moynihan
  1 sibling, 0 replies; 6+ messages in thread
From: Rick Moynihan @ 2008-08-15  8:39 UTC (permalink / raw)
  To: Parker, Matthew; +Cc: Emacs-orgmode

Parker, Matthew wrote:
> Hi,
> 
> The export to HTML is really great.... 
> 
> One thing that I'm tripping up on is that I'm trying to list data base
> names that have underscores, e.g. prc_tms. 
> 
> And the 'second word' is coming out subscript: 'prctms' field

I had this same problem and tried to find a way to turn it off, but 
noticed that whenever I used underscores I was referring to elements of 
a program, e.g. method_name, variable_name, database_name, or /file/path 
etc...

So my solution was to use the following syntax:

=method_name=

=/file/path=

Surrounding the word in ='s like above causes the font to be exported 
inside an inline <code> tag, which renders as a fixed width font and 
ensures it's not confused as something else.  It also nicely disables 
the subscripting.

R.

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

* Re: Exporting to HTML - underscores cause unwanted sub-script
  2008-08-15  7:23     ` Daniel J. Sinder
@ 2008-08-20  9:03       ` David House
  0 siblings, 0 replies; 6+ messages in thread
From: David House @ 2008-08-20  9:03 UTC (permalink / raw)
  To: emacs-orgmode

Daniel J. Sinder <daniel <at> sindercity.com> writes:

> 
> For the record, you can also "fix" this problem using the following 
> file-local customization:
> 
> #+OPTIONS:   ^:{}

You can also disable this globally with the following code in your .emacs:

;; Don't convert _ and ^ unless surrounded by braces
(setq org-export-with-sub-superscripts '{})

IMO this option isn't flexible enough, though. Typically when I write a^b I
nearly always mean b as a subscript. However when I write a_b, I rarely mean b
as a subscript. So I would like an option that forces me to use braces for
subscript, but accepts superscripts without braces.

If I have time tonight I'll try to throw a patch together to do this.

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

end of thread, other threads:[~2008-08-20  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-15  1:01 Exporting to HTML - underscores cause unwanted sub-script Parker, Matthew
2008-08-15  1:52 ` Nick Dokos
2008-08-15  2:05   ` Parker, Matthew
2008-08-15  7:23     ` Daniel J. Sinder
2008-08-20  9:03       ` David House
2008-08-15  8:39 ` Rick Moynihan

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