emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Colorized TODO in Latex export?
Date: Fri, 19 Apr 2013 21:59:55 +0200	[thread overview]
Message-ID: <86ip3ithok.fsf@somewhere.org> (raw)
In-Reply-To: 87ppxqo1fm.fsf@gmail.com

Hello,

Nicolas Goaziou wrote:
> Suvayu Ali <fatkasuvayu+linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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

      reply	other threads:[~2013-04-19 19:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  7:46 Colorized TODO in Latex export? Johan Ekh
2013-04-19  9:26 ` Suvayu Ali
2013-04-19 11:28   ` Sebastien Vauban
2013-04-19 17:39     ` Suvayu Ali
2013-04-19 17:49       ` Nicolas Goaziou
2013-04-19 19:59         ` Sebastien Vauban [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ip3ithok.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).