From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinh Nguyen Subject: Re: text color + highlight Date: Thu, 9 Sep 2010 09:15:05 -0700 Message-ID: References: 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=59625 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Otjme-00072v-GX for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Otjma-0005EH-CM for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:15:32 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:57227) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Otjma-0005Dy-7s for emacs-orgmode@gnu.org; Thu, 09 Sep 2010 12:15:28 -0400 Received: by pxi5 with SMTP id 5so1026717pxi.0 for ; Thu, 09 Sep 2010 09:15:27 -0700 (PDT) In-Reply-To: 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: emacs-orgmode@gnu.org I'd like to write a concluding email for this thread for future searchers to find. This easy solution is brought to you by Eric Schulte and Christian Moe. Place the following in your .emacs or init.el file: ;; org-mode color (org-add-link-type "color" nil (lambda (path desc format)p (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "{\\color{%s}%s}" path desc))))) ;; org-mode highlight (org-add-link-type "hl" nil (lambda (path desc format) (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "\\colorbox{%s}{%s}" path desc))))) ;; require \usepackage{colo= r} Examples: [[color:blue][test this out]] [[hl:yellow][highlighted text]] Remarks: * Pros - don't need to modify org-mode source (just edit your .emacs) - use the existing links syntax * Cons - cannot be used concurrently or with other formatting * To Do - Hopefully it will be implemented via extensible syntax in the future ($[options mytext]) - highlight and color paragraph or region -- Vinh On Thu, Aug 5, 2010 at 1:42 PM, Vinh Nguyen wrote: > Dear list, > > I was wondering if there is an easy way to markup the color of the > text for html output (and highlight as well). =C2=A0When I prepare meetin= g > minutes I'd like to color some things and highlight certain things. > Right now, I am using emphasizing a major portion of the text. =C2=A0It > would be great to have colors and highlights to draw attention to > certain items. > > Thanks. > Vinh