From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Colorized TODO in Latex export? Date: Fri, 19 Apr 2013 19:39:33 +0200 Message-ID: <20130419173933.GB3154@kuru.dyndns-at-home.com> References: <20130419092622.GA27702@kuru.dyndns-at-home.com> <861ua6vjwl.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTFHj-0001gz-69 for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:39:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTFHf-0003x0-F0 for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:39:43 -0400 Received: from mail-ea0-x234.google.com ([2a00:1450:4013:c01::234]:57374) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTFHf-0003uW-8k for emacs-orgmode@gnu.org; Fri, 19 Apr 2013 13:39:39 -0400 Received: by mail-ea0-f180.google.com with SMTP id d10so1759345eaj.25 for ; Fri, 19 Apr 2013 10:39:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <861ua6vjwl.fsf@somewhere.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Seb, On Fri, Apr 19, 2013 at 01:28:58PM +0200, Sebastien Vauban wrote: > Hi Johan and Suvayu, > > Suvayu Ali wrote: > > On Fri, Apr 19, 2013 at 09:46:06AM +0200, Johan Ekh wrote: > >> I export minutes of meetings to latex and I would like to define colors for > >> the TODO keywords, like they are shown in my emacs agenda buffer. > >> > >> How can I do this? > > > > A combination of filters and the todonotes package in LaTeX might work. > > > > If you find a solution, please let us know. > > This used to work, but seems not anymore. > > --8<---------------cut here---------------start------------->8--- > (defun org-latex-format-headline (todo todo-type priority text tags) > "Default format function for an headline." > (concat (when todo > (format "\\colorbox{yellow}{\\textbf{\\textsc{\\textsf{%s}}}} " todo)) > (when priority > (format "\\framebox{\\#%c} " priority)) > text > (when tags > (format "\\hfill{}\\fbox{\\textsc{%s}}" > (mapconcat 'identity tags ":"))))) > --8<---------------cut here---------------end--------------->8--- I do not think this will work with the new exporter. A filter gets three arguments: contents, backend, and info. `contents' should be some LaTeX snippet as translated by ox-latex, backend is the latex symbol, and info is a plist (not sure what is in there :-p). Your function above doesn't conform to the above signature. You can take a look at to get a clearer idea. I still have to go through it myself :-p. After you have devised a compatible filter function, you should be able to add it to org-export-filter-headline-functions. Hope this helps somehow, -- Suvayu Open source is the future. It sets us free.