emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] The way tags are exported in HTML (without colons!) -- no work


From: Sébastien Vauban
Subject: [Orgmode] The way tags are exported in HTML (without colons!) -- no workaround for searches!
Date: Thu, 25 Nov 2010 11:34:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

#+TITLE:     HTML export of tags
#+DATE:      2010-11-25
#+LANGUAGE:  en_US

* Abstract

In HTML exports, one can wanna search on a tag name, via the Web browser's
simple =find= command (=Ctrl-F=).

In the Org file, such a simple search is easily done (let's say from Vim), as
tags are delimited by colon markers. So, just search on ":tagname:".

In the HTML file, there is no such marker. That means, finding a tag can be
really tough.

* Example

Format of the source Org file:

#+begin_src org
** TODO Order a new book                                                 :me:

In the meanwhile, give me something else to read than the AsciiDoc tutorial.
#+end_src

Searching the tag (string) "me" through the HTML output will be matched
4 times:

#+begin_src html
** TODO Order a new book   me
                           ^

In the meanwhile, give me something else to read than the AsciiDoc tutorial.
       ^               ^    ^
#+end_src

* Workaround?

Maybe adding a colon before and after the tag would help?  CSS to the rescue:

#+begin_src
.tag:before {
    content: ":";
}

.tag:after {
    content: ":";
}
#+end_src

Answer is: no! In the HTML display, we now do well see a ":me:", but searches
on that same string fail to find it.

* Solution?

- Really add a colon marker in the exported file (to HTML)

- As well, clearly make a separation between the different tags, instead of
  concatenating them as one big chunck, so that we could put a background
  color that'd be cut between the consecutive tags:

      +----+  +----+  +----+
      |tag1|  |tag2|  |tag3|
      +----+  +----+  +----+

Best regards,
  Seb

-- 
Sébastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]