all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The way tags are exported in HTML (without colons!) -- no workaround for searches!
@ 2010-11-25 10:34 Sébastien Vauban
  2011-02-03 17:27 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-11-25 10:34 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

#+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


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

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

* Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2010-11-25 10:34 The way tags are exported in HTML (without colons!) -- no workaround for searches! Sébastien Vauban
@ 2011-02-03 17:27 ` Bastien
  2011-02-03 19:45   ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-03 17:27 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> - 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|
>       +----+  +----+  +----+

Each tag in the HTML output comes with its own CSS class.

For example:

,----
| * Heading1					       :tag1:tag2:
`----

is exported as

,----
| <div id="outline-container-1" class="outline-2">
| <h2 id="sec-1">Heading1
|   <span class="tag">
|     <span class="tag1">tag1</span>&nbsp;
|     <span class="tag2">tag2</span></span>
| </h2>
`----

You can tweak your .css to visually separate the tags.

HTH,

-- 
 Bastien

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

* Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2011-02-03 17:27 ` Bastien
@ 2011-02-03 19:45   ` Sébastien Vauban
  2011-02-03 21:15     ` Jeff Horn
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2011-02-03 19:45 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

Bastien wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> - 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|
>>       +----+  +----+  +----+
>
> Each tag in the HTML output comes with its own CSS class.
>
> For example:
>
> ,----
> | * Heading1					       :tag1:tag2:
> `----
>
> is exported as
>
> ,----
> | <div id="outline-container-1" class="outline-2">
> | <h2 id="sec-1">Heading1
> |   <span class="tag">
> |     <span class="tag1">tag1</span>&nbsp;
> |     <span class="tag2">tag2</span></span>
> | </h2>
> `----
>
> You can tweak your .css to visually separate the tags.

Thanks for the above. Much appreciated.

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

What about really adding the colon marker, so that one can easily find tags in
the exported file?

Best regards,
  Seb

-- 
Sébastien Vauban


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

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

* Re: Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2011-02-03 19:45   ` Sébastien Vauban
@ 2011-02-03 21:15     ` Jeff Horn
  2011-02-04  8:21       ` Bastien
  2011-02-04  8:41       ` Sébastien Vauban
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Horn @ 2011-02-03 21:15 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

2011/2/3 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>:
> What about really adding the colon marker, so that one can easily find tags in
> the exported file?

Use the CSS content property.

    http://www.w3schools.com/Css/pr_gen_content.asp

As an example, check out the links and how they are styled at

    http://almostobsolete.net/

-- 
Jeffrey Horn
http://www.failuretorefrain.com/jeff/

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

* Re: Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2011-02-03 21:15     ` Jeff Horn
@ 2011-02-04  8:21       ` Bastien
  2011-02-04  8:41       ` Sébastien Vauban
  1 sibling, 0 replies; 7+ messages in thread
From: Bastien @ 2011-02-04  8:21 UTC (permalink / raw)
  To: Jeff Horn; +Cc: Sébastien Vauban, emacs-orgmode

Jeff Horn <jrhorn424@gmail.com> writes:

> 2011/2/3 Sébastien Vauban <wxhgmqzgwmuf@spammotel.com>:
>> What about really adding the colon marker, so that one can easily find tags in
>> the exported file?
>
> Use the CSS content property.

I think the column belongs to Org's internal, so I second Jeff's
proposal here.

-- 
 Bastien

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

* Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2011-02-03 21:15     ` Jeff Horn
  2011-02-04  8:21       ` Bastien
@ 2011-02-04  8:41       ` Sébastien Vauban
  2011-02-04 20:56         ` Christian Moe
  1 sibling, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2011-02-04  8:41 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Jeff,

Jeff Horn wrote:
> 2011/2/3 Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>:
>> What about really adding the colon marker, so that one can easily find tags in
>> the exported file?
>
> Use the CSS content property.
>
>     http://www.w3schools.com/Css/pr_gen_content.asp

If you read my post of [2010-11-25 Thu 11:34] in this thread, you'll see I did
try that, but it's not working for the searches:

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

Best regards,
  Seb

-- 
Sébastien Vauban


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

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

* Re: Re: The way tags are exported in HTML (without colons!) -- no workaround for searches!
  2011-02-04  8:41       ` Sébastien Vauban
@ 2011-02-04 20:56         ` Christian Moe
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Moe @ 2011-02-04 20:56 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

This bookmarklet finds an Org tags in exported HTML in Firefox, at 
least (just a proof of concept). To try it just copy-paste the whole 
thing into the address field.

javascript:
t=window.prompt("Tag?", "");
e=document.getElementsByClassName(t);
for(i=0;i<e.length;i++)
    {e[i].scrollIntoView(true);
     if(! window.confirm("Next?"))
     {break;}
    }
void(0);

Probably not what you wanted, but fun anyway.
:)

CM


On 2/4/11 9:41 AM, Sébastien Vauban wrote:
> Hi Jeff,
>
> Jeff Horn wrote:
>> 2011/2/3 Sébastien Vauban<wxhgmqzgwmuf@spammotel.com>:
>>> What about really adding the colon marker, so that one can easily find tags in
>>> the exported file?
>>
>> Use the CSS content property.
>>
>>      http://www.w3schools.com/Css/pr_gen_content.asp
>
> If you read my post of [2010-11-25 Thu 11:34] in this thread, you'll see I did
> try that, but it's not working for the searches:
>
>>>> * 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)
>
> Best regards,
>    Seb
>

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

end of thread, other threads:[~2011-02-04 20:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 10:34 The way tags are exported in HTML (without colons!) -- no workaround for searches! Sébastien Vauban
2011-02-03 17:27 ` Bastien
2011-02-03 19:45   ` Sébastien Vauban
2011-02-03 21:15     ` Jeff Horn
2011-02-04  8:21       ` Bastien
2011-02-04  8:41       ` Sébastien Vauban
2011-02-04 20:56         ` Christian Moe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.