[Top][All Lists]

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

Re: [Orgmode] text color + highlight

From: Carsten Dominik
Subject: Re: [Orgmode] text color + highlight
Date: Tue, 10 Aug 2010 09:06:38 +0200


Can we please first read Samuels post about extensible syntax? Before we invent 20 other new syntaxes?



On Aug 10, 2010, at 8:14 AM, Christian Moe wrote:


>> - this would be extensible, e.g.
>>  [background[yellow] highlighted text]
>>  could export to the following html
>>  <span "style=background:yellow;">highlighted text</span>
>> - this would avoid "{}"s
>> - this would look more "org-like" than the pure latex solution
>> the only issue with the above is that it may conflate a new / markup/
>> syntax with org-mode's existing /link/ syntax.
>> Thoughts? -- Eric

I'd like an extensible inline markup construct (not primarily for coloring).

Would it make sense to hijack custom links for this purpose, and use existing bracketed link syntax rather than add a new syntax?

For semantic tagging (my chief interest), one might e.g. define a `class' link type and an HTML export handler to wrap the contents in <span class="kewyord"> tags.

: [[class:animals][some text about animals]]

As for color: If one is satisfied with getting colors on export, defining a `color' link type and appropriate export handlers will do.

: [[color:red][some colored text]]

If one also wants the text to appear in the right color within Org- mode, and does not want the pseudo-link markup to be underlined and look like links, it would require additional Org functionality (I think): User-defined custom faces for different link types.

What syntax to use...

I've thought briefly about the following syntax

[color[red] text to be colored red]
Nope, I am against this syntax. If we introduce a more general syntax,
then it should be done in the way Samuel proposed.  WHich means
we firs get a keyword indtroducing the piece, and then properties.
  $[style :color red the red text]
  $[face :color :italic t red the red text]
Something like the $ before "[" also would seem critical to disambiguate
from other uses of "[".
However, I am not too excited about extra syntax to get this kind of thing.
Would not oppose it, but probably never use it.
- Carsten

Those examples are not very readable IMO -- without a separator it's hard to see where the property values end and the marked up text begins.


- Carsten

reply via email to

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