* Colorized TODO in Latex export? @ 2013-04-19 7:46 Johan Ekh 2013-04-19 9:26 ` Suvayu Ali 0 siblings, 1 reply; 6+ messages in thread From: Johan Ekh @ 2013-04-19 7:46 UTC (permalink / raw) To: emacs-orgmode@gnu.org [-- Attachment #1: Type: text/plain, Size: 191 bytes --] Hi all, 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? Best regards, Johan [-- Attachment #2: Type: text/html, Size: 268 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Colorized TODO in Latex export? 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 0 siblings, 1 reply; 6+ messages in thread From: Suvayu Ali @ 2013-04-19 9:26 UTC (permalink / raw) To: emacs-orgmode On Fri, Apr 19, 2013 at 09:46:06AM +0200, Johan Ekh wrote: > Hi all, > 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. :) -- Suvayu Open source is the future. It sets us free. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Colorized TODO in Latex export? 2013-04-19 9:26 ` Suvayu Ali @ 2013-04-19 11:28 ` Sebastien Vauban 2013-04-19 17:39 ` Suvayu Ali 0 siblings, 1 reply; 6+ messages in thread From: Sebastien Vauban @ 2013-04-19 11:28 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ 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--- Best regards, Seb -- Sebastien Vauban ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Colorized TODO in Latex export? 2013-04-19 11:28 ` Sebastien Vauban @ 2013-04-19 17:39 ` Suvayu Ali 2013-04-19 17:49 ` Nicolas Goaziou 0 siblings, 1 reply; 6+ messages in thread From: Suvayu Ali @ 2013-04-19 17:39 UTC (permalink / raw) To: emacs-orgmode 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 <http://orgmode.org/worg/exporters/filter-markup.html> 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Colorized TODO in Latex export? 2013-04-19 17:39 ` Suvayu Ali @ 2013-04-19 17:49 ` Nicolas Goaziou 2013-04-19 19:59 ` Sebastien Vauban 0 siblings, 1 reply; 6+ messages in thread From: Nicolas Goaziou @ 2013-04-19 17:49 UTC (permalink / raw) To: Suvayu Ali; +Cc: emacs-orgmode Hello, Suvayu Ali <fatkasuvayu+linux@gmail.com> 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? >> > >> > 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). INFO contains all export options, the whole parse tree, etc. See "The Communication Channel" section in ox.el, or notes for back-end developers on Worg. > Your function above doesn't conform to the above signature. You can > take a look at <http://orgmode.org/worg/exporters/filter-markup.html> 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. 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. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Colorized TODO in Latex export? 2013-04-19 17:49 ` Nicolas Goaziou @ 2013-04-19 19:59 ` Sebastien Vauban 0 siblings, 0 replies; 6+ messages in thread From: Sebastien Vauban @ 2013-04-19 19:59 UTC (permalink / raw) To: emacs-orgmode-mXXj517/zsQ 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-19 19:59 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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
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).