From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: text color + highlight Date: Fri, 06 Aug 2010 23:15:55 -0400 Message-ID: <87d3tvru38.fsf@gmail.com> References: <87pqxw5cb1.fsf@gnu.org> <87mxszcsuv.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=36067 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OhZtM-0003wm-Fb for emacs-orgmode@gnu.org; Fri, 06 Aug 2010 23:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OhZtL-0001dJ-6D for emacs-orgmode@gnu.org; Fri, 06 Aug 2010 23:16:12 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:62101) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OhZtL-0001dD-42 for emacs-orgmode@gnu.org; Fri, 06 Aug 2010 23:16:11 -0400 Received: by qyk12 with SMTP id 12so281159qyk.0 for ; Fri, 06 Aug 2010 20:16:10 -0700 (PDT) In-Reply-To: (Vinh Nguyen's message of "Fri, 6 Aug 2010 16:42:44 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vinh Nguyen Cc: emacs-orgmode@gnu.org, Bastien Hi Vinh, Vinh Nguyen writes: > Thanks Eric, this works. Great, > I do agree that the implemented syntax is not org-like but more > latex-like. To be more org-like, could we use parentheses or curly > braces like how links are implemented? They aren't taken, are they? > For example, > > ((red)(this text is red)) > {{yellow}{this text is highlighted yellow}} ## see > http://answers.yahoo.com/question/index?qid=3D20080316135432AANXSJc > yes, these would be equally easy to implement, and simpler than with the \color prefix, but as someone who often leaves lisp snippets laying around org-mode files, these options may be too dangerous. We'd have to ensure that the syntax doesn't accidentally grab text which is not intended for formatting. also, color gives the option of other keyword attributes which we may want to associate with text, e.g. "background" for background coloring (highlighting), "font-type" for possibly different fonts, etc... but again, I'm reticent to commit to any particular format, as Org-mode does a good job of feeling consistent, and I'd not want to hurt that consistency. > > What do you think? How hard would it be to change your code to this? > Can this be merged into the development branch? > In playing with the patched code I sent out, I noticed that it may be doing weird things to my headings (#+Title: etc...) in some Org-mode files, so probably it could use some more tweaking before any merge, also I'd not want to rush what could be a reasonably large change into Org-mode without more discussion, but I agree I'd ultimately like to see some form of this functionality appear in Org-mode. Best -- Eric > > Thanks, > Vinh > > > On Fri, Aug 6, 2010 at 2:51 PM, Eric Schulte wro= te: >> Hi, >> >> I've recently seen similar requests on this list. >> >> The attached patch provides a first pass at this support implementing >> both in-buffer coloring given the following syntax, and html export (I >> don't know the correct LaTeX syntax, but it shouldn't be hard to extend >> this to LaTeX as well). =C2=A0This uses something like the LaTeX Beamer >> \color{}{} directive, for example... >> >> =C2=A0My name is \color{red}{eric} schulte. >> >> Would result in the word "eric" appearing in red. =C2=A0Even though I >> implemented the syntax above, I'm *not* recommending this syntax, it >> feels decidedly more like "latex" than "org", it was simply the only >> obvious option for this initial implementation. >> >> -- Eric >>