emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: leading superscript on a line for ODT export
Date: Wed, 16 Mar 2022 22:15:27 +0700	[thread overview]
Message-ID: <t0suuh$n37$1@ciao.gmane.io> (raw)
In-Reply-To: <20063.1647439486@apollo2.minshall.org>

On 16/03/2022 21:04, Greg Minshall wrote:
> hi.
> 
>>      @@org:@@^1 blah
> 
> i'm not familiar with the '@@' construct.  in the manual, searching for
> the string "@@", i see references to various =@@foo...=, but not, for
> example, =@@org:@@=.
> 
> is there a general definition?  might the index (or, one of the indices)
> usefully have references to various "special" characters (like "^", "|",
> and "@" when used in TODOs, iiuc)?

I have not found definition of export snippet in the manual as well, so:
https://orgmode.org/worg/dev/org-syntax.html#Export_Snippets

It is an export snippet that is expanded to nothing and "org" is the 
backend name (alphanumeric characters). I choose "org" for two reasons:
- `org-lint' might report unknown backend (it does not do it currently 
though and `ox-org' is not loaded by default)
- perfect solution should survive after export to org. From my point of 
view, it is a bug in `ox-org' that it ignores @@org:...@@ (and other) 
export snippets. My expectation that they should be copied verbatim to 
allow further export to arbitrary format.

So the main problem with

     @@org:@@^1 one

that it would not work after export to org.

Another solution:

     #+options: broken-links:t

     [[#not-found][{}]^2 two

It works but the price is that really broken links may remain unnoticed.

A custom entity may be better:

     #+begin_src elisp :exports (if (org-export-derived-backend-p 
org-export-current-backend 'org) "sources" "results") :results silent
       (setq org-entities-user '(("relax" "" nil "" "" "")))
     #+end_src

     \relax^3 three

Actually all these recipes are the outcome of flame in the threads about 
intra-word markup. Notice that a macro expanded to empty string does not 
work.

P.S. Juan Manuel, I was expecting that you suggested a custom link:

     #+begin_src elisp :exports (if (org-export-derived-backend-p 
org-export-current-backend 'org) "sources" "results") :results silent
       (org-link-set-parameters
        "discard"
        :export (lambda (_path _descr _backend) ""))
     #+end_src

     [[discard:][{}]]^5 four



  parent reply	other threads:[~2022-03-16 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 11:23 leading superscript on a line for ODT export Eric S Fraga
2022-03-16 12:03 ` Juan Manuel Macías
2022-03-16 12:46   ` Eric S Fraga
2022-03-16 13:12     ` Juan Manuel Macías
2022-03-16 13:42       ` Eric S Fraga
2022-03-16 13:46 ` Max Nikulin
2022-03-16 14:00   ` Eric S Fraga
2022-03-16 14:04   ` Greg Minshall
2022-03-16 14:54     ` Eric S Fraga
2022-03-16 15:15     ` Max Nikulin [this message]
2022-03-17  0:32       ` Greg Minshall
2022-03-16 14:07   ` Juan Manuel Macías

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='t0suuh$n37$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).