From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Change color in fontified html export for strings Date: Tue, 14 Sep 2010 10:05:32 +0200 Message-ID: <4C8F2CCC.7060407@gmail.com> References: <4C8E21C2.80501@gmail.com> <87wrqp9n4y.fsf@gmx.de> <4C8F200B.7090702@gmail.com> <87vd68db69.wl%ucecesf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50122 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvQWI-000759-1p for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 04:05:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvQWG-0001xS-CP for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 04:05:37 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:35841) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvQWG-0001xN-3v for emacs-orgmode@gnu.org; Tue, 14 Sep 2010 04:05:36 -0400 Received: by wyb36 with SMTP id 36so8379853wyb.0 for ; Tue, 14 Sep 2010 01:05:35 -0700 (PDT) In-Reply-To: <87vd68db69.wl%ucecesf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric S Fraga Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 14/09/10 09:41, Eric S Fraga wrote: > On Tue, 14 Sep 2010 09:11:07 +0200, Rainer M Krug wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 14/09/10 02:36, Sebastian Rose wrote: >>> Rainer M Krug writes: >>>> Hi >>>> >>>> when exporting code blocks to html, strings are exported as yellow >>>> (#ffff00), which is really difficult to read. Is there a possibility to >>>> customize the colors (specifically the one used for strings) used for >>>> the fontification when exporting to html? >>>> >>>> Thanks, >>>> >>>> Rainer >>> >>> >> Hi Sebastian, >> >>> Change the CSS styles for strings using a stylesheet. >> >> I must admit, I know nerly nothing about html, and even less about CSS >> stylesheets. So what do I have o do with the code you gave below? >> >> I found the following statement in the org manual: >> >> #### >> To set the latter variable individually for each file, you can >> use >> #+STYLE: >> For longer style definitions, you can use several such lines. You could >> also directly write a >> section in this way, without referring to an external file. >> ### >> >> As I only want to change the color for .string (right?), I am thinking >> about specifying it in the properties - but >> >> #+STYLE: >> >> failed. >> >> Any suggestions or CSS stylesheets? > > Did you C-c C-c after adding that line so that org setup is reset? Yes > Is there actually any HTML code in the exported file that has the > sequence > > : > > where XXX might be SPAN or DIV? That is, is there any HTML code that > is actually using the string class? Maybe try a very small example > and post the html file that results? > The string is in the html file, but it is not used - the color is hardcoded as #ffff00: "seed" Here is an example .org file: - --------------------------- #+STYLE: * Results #+begin_src R :exports code plot( res, stages=c( "flower", "parFlower", "gall", "midgeAdult", "grePod", "weavilAdult", "seed" ), plot.type="multiple" ) #+end_src - --------------------------- and the resulting html file: - --------------------------- test

test

Table of Contents

1 Results

plot(
     res,
     stages=c(
       "flower",
       "parFlower",
       "gall",
       "midgeAdult",
       "grePod",
       "weavilAdult",
       "seed"
       ),
     plot.type="multiple"
     )

Author: Rainer M Krug

Date: 2010-09-14 10:00:53 CEST

HTML generated by org-mode 7.01trans in emacs 23

- --------------------------- The question is: how can I change the "color: #ffff00;" for the strings, e.g. in "seed" to any other color? Cheers, Rainer - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAkyPLMsACgkQoYgNqgF2egrl4wCggKSb2hmp9le670Iu3qom0Mr+ IwIAmIFX19NAzm8PL6Kenkq1C2yqSEI= =Pg9t -----END PGP SIGNATURE-----