From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: ODT export custom link colors? Date: Thu, 15 Dec 2011 10:03:08 +0100 Message-ID: <4EE9B7CC.6060905@christianmoe.com> References: <4EE90935.7010402@christianmoe.com> <81d3bqjn7p.fsf@gmail.com> Reply-To: mail@christianmoe.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb77r-0003o2-KE for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rb77q-0004D5-8s for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:57:15 -0500 Received: from b1.hitrost.net ([91.185.211.67]:40204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rb77p-0004Cz-VJ for emacs-orgmode@gnu.org; Thu, 15 Dec 2011 03:57:14 -0500 In-Reply-To: <81d3bqjn7p.fsf@gmail.com> 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: Jambunathan K Cc: Gary Oberbrunner , Orgmode Mailing List On 12/15/11 8:41 AM, Jambunathan K wrote: > I usually put the cursor on the text that I am interested in, press F11 > and switch to char styles or whatever category. The right style would be > highlighted which you can directly inherit from. Indeed, that's a better recipe. (On a Mac laptop keyboard, Cmd-T instead of F11.) > > The exact scenario you describe here is documented in the manual. > > (info "(org) Creating one-off styles") The scenario was not mixing raw ODT XML in with Org, but using a custom link type to color text. The manual page you point to gives all the info one would need to figure out how to do it, and I should have given the reference. But the manual does not spell out exactly how to solve that scenario, so I thought that would be helpful. > #+begin_src emacs-lisp > (org-odt-format-fontify "This text is in red" "red-style") > #+end_src > > It will mark the text in "red-style". You can similarly use this or this > for marking text in bold. > > #+begin_src emacs-lisp > (org-odt-format-fontify "This text is in red" 'bold) > #+end_src That's cool, but how do you suggest to use it? I tried it with =:exports results=, but that didn't work (the angle brackets got escaped). But I probably misunderstood, and you meant to use it to generate the correct raw XML and then include the result in the text, with =@= signs added? That works out of the box for the "bold" example, but not for "red-style" -- I assume we'd have to create that style first? > If you look at OrgOdtStyles.xml (C-h v org-odt-styles-dir) and you can > see a bunch of styles marked as "Org Agenda Styles". These are used for > marking TODO in red and DONE in green etc. > > Copy& paste those styles, fix the name and background color and you are > done. Thanks, that's helpful. Yours, Christian