From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Colorized TODO in Latex export? Date: Fri, 19 Apr 2013 21:59:55 +0200 Message-ID: <86ip3ithok.fsf@somewhere.org> References: <20130419092622.GA27702@kuru.dyndns-at-home.com> <861ua6vjwl.fsf@somewhere.org> <20130419173933.GB3154@kuru.dyndns-at-home.com> <87ppxqo1fm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello, Nicolas Goaziou wrote: > Suvayu Ali writes: >> 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? >>> > >>> > 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 think the OP wants to customize `org-latex-format-headline-function' > instead of using a filter. Though, the problem he encounters isn't clear > to me. The only missing piece of code, to the above, is: --8<---------------cut here---------------start------------->8--- ;; function for formatting the headline's text (setq org-latex-format-headline-function 'org-latex-format-headline) --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban