emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to enforce sub-scripts with {} only for HTML export?
@ 2022-02-20 21:31 edgar
  2022-02-20 21:49 ` Kyle Meyer
  2022-02-20 23:29 ` Greg Minshall
  0 siblings, 2 replies; 5+ messages in thread
From: edgar @ 2022-02-20 21:31 UTC (permalink / raw)
  To: emacs-orgmode

Hi. I hope that this is not a known issue and that you can help me.

* Short description

If I export this as html

#+begin_src org
    test_my_subs
#+end_src

the corresponding line is exported as

#+begin_src html
    <p>
    test<sub>my</sub><sub>subs</sub>
    </p>
#+end_src

* Expected output

I was expecting the output to be
#+begin_src html
    <p>
    test_my_subs
    </p>
#+end_src

In the [[help:org-export-with-sub-superscripts][documentation]], it 
reads:
#+begin_quote
     Still, ambiguity is possible.  So when in doubt, use {} to enclose
     the sub/superscript.  If you set this variable to the symbol ‘{}’,
     the braces are *required* in order to trigger interpretations as
     sub/superscript.  This can be helpful in documents that need "_"
     frequently in plain text.
#+end_src

What am I doing wrong? Thanks!

* Emacs and Org configuration

I am using this with ~emacs -q~:

#+begin_src emacs-lisp
     (setq
        ;; Use {} for super and subscripts
        org-export-with-sub-superscripts "{}")
#+end_src

#+begin_src emacs-lisp
   (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, 
cairo version 1.17.4)
:  of 2021-03-26

#+begin_src emacs-lisp
   (org-version)
#+end_src

#+RESULTS:
: 9.4.6

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  


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

* Re: How to enforce sub-scripts with {} only for HTML export?
  2022-02-20 21:31 How to enforce sub-scripts with {} only for HTML export? edgar
@ 2022-02-20 21:49 ` Kyle Meyer
  2022-02-21  0:47   ` edgar
  2022-02-20 23:29 ` Greg Minshall
  1 sibling, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2022-02-20 21:49 UTC (permalink / raw)
  To: edgar; +Cc: emacs-orgmode

edgar@openmail.cc writes:

> What am I doing wrong? Thanks!
>
> * Emacs and Org configuration
>
> I am using this with ~emacs -q~:
>
> #+begin_src emacs-lisp
>      (setq
>         ;; Use {} for super and subscripts
>         org-export-with-sub-superscripts "{}")
> #+end_src

{} should be a symbol.  Try

  (setq org-export-with-sub-superscripts '{})


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

* Re: How to enforce sub-scripts with {} only for HTML export?
  2022-02-20 21:31 How to enforce sub-scripts with {} only for HTML export? edgar
  2022-02-20 21:49 ` Kyle Meyer
@ 2022-02-20 23:29 ` Greg Minshall
  2022-02-21  0:50   ` edgar
  1 sibling, 1 reply; 5+ messages in thread
From: Greg Minshall @ 2022-02-20 23:29 UTC (permalink / raw)
  To: edgar; +Cc: emacs-orgmode

Edgar,

one of my .org files has this
----
#  ^:{}: disable super/subscripting: https://stackoverflow.com/a/698791/1527747
#+options: ^:{}
----

ymmv.


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

* Re: How to enforce sub-scripts with {} only for HTML export?
  2022-02-20 21:49 ` Kyle Meyer
@ 2022-02-21  0:47   ` edgar
  0 siblings, 0 replies; 5+ messages in thread
From: edgar @ 2022-02-21  0:47 UTC (permalink / raw)
  To: emacs-orgmode

On 2022-02-20 21:49, Kyle Meyer wrote:
> {} should be a symbol.  Try
> 
>   (setq org-export-with-sub-superscripts '{})

Thank you!!!

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  


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

* Re: How to enforce sub-scripts with {} only for HTML export?
  2022-02-20 23:29 ` Greg Minshall
@ 2022-02-21  0:50   ` edgar
  0 siblings, 0 replies; 5+ messages in thread
From: edgar @ 2022-02-21  0:50 UTC (permalink / raw)
  To: emacs-orgmode

On 2022-02-20 23:29, Greg Minshall wrote:
> Edgar,
> 
> one of my .org files has this
> ----
> #  ^:{}: disable super/subscripting: 
> https://stackoverflow.com/a/698791/1527747
> #+options: ^:{}
> ----
> 
> ymmv.

Thank you, Greg. Sometimes I need to export sub-headings, selected text 
or included files, and the variable gets overridden. Thanks a lot :) .

-------------------------------------------------
This free account was provided by VFEmail.net - report spam to abuse@vfemail.net
 
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  


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

end of thread, other threads:[~2022-02-21  0:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-20 21:31 How to enforce sub-scripts with {} only for HTML export? edgar
2022-02-20 21:49 ` Kyle Meyer
2022-02-21  0:47   ` edgar
2022-02-20 23:29 ` Greg Minshall
2022-02-21  0:50   ` edgar

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