emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: Org-Mode mailing list <emacs-orgmode@gnu.org>
Subject: Custom export backend based on HTML: how to implement own blocks?
Date: Sun, 23 Nov 2014 16:44:52 +0100	[thread overview]
Message-ID: <87sih9q5u3.fsf@wmi.amu.edu.pl> (raw)

Hello,

I'd like to (ab)use the "underline" syntax for something else.
Basically, I'd like to translate

_underlined_

to

<span class="my-own"><variant>underlined<variant></span>

and

_underlined|with variant_

to

<span class="my own"><variant>underlined</variant><variant>with
variant</variant></span>

but only if the underlining is between

#+BEGIN_MYBLOCK
...
#+END_MYBLOCK

How to achieve this?  In particular, I'd like to know:

1. How can I know (in org-html-underline, for instance) whether I am in
a MYBLOCK or not?

2. How do I best translate the "|" syntax into "variants"?  More
specifically: is it a good idea to do it in org-my-html-underline, by
analysing the "underlined" text (as a string) or maybe it's better to
write a filter?  (I guess the former idea is better.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

             reply	other threads:[~2014-11-23 15:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23 15:44 Marcin Borkowski [this message]
2014-11-23 17:28 ` Custom export backend based on HTML: how to implement own blocks? Richard Lawrence
2014-11-23 19:17 ` Charles Berry

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=87sih9q5u3.fsf@wmi.amu.edu.pl \
    --to=mbork@wmi.amu.edu.pl \
    --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).