emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Change color in fontified html export for strings
@ 2010-09-13 13:06 Rainer M Krug
  2010-09-14  0:36 ` Sebastian Rose
  0 siblings, 1 reply; 13+ messages in thread
From: Rainer M Krug @ 2010-09-13 13:06 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

- -- 
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/

iEYEARECAAYFAkyOIcIACgkQoYgNqgF2egrBHACeIDxvfTQos5zlMgwky+7V8yCq
xwsAnR92wa8TXzLO3QnKnJljFiqII7rk
=ibKq
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-13 13:06 Change color in fontified html export for strings Rainer M Krug
@ 2010-09-14  0:36 ` Sebastian Rose
  2010-09-14  7:11   ` Rainer M Krug
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2010-09-14  0:36 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Rainer M Krug <r.m.krug@gmail.com> 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


Change the CSS styles for strings using a stylesheet. 

This is the htmlize-related section of my CSS stylesheet:


pre.src .comment {
  color: #777777;
  font-style: italic;
}
pre.src .comment-delimiter {
  color: #777777;
  font-style: italic;
}
.constant {
  color: #ff4500;
}
.default {
  color: #000000;
}
.builtin {
  color: #0000ff;
}
.function-name {
  color:#0000ff;
}
.html-tag {
  color: #0000ff;
}
.keyword {
  color: #a52a2a;
  font-weight: bold;
}
.string {
  color: #006400;
}
.type {
  font-weight:bold;
  color:#238b8b;
}
.preprocessor {
  color:#0000FF;
}
.variable-name {
  color: #4d4d4d;
  font-weight:bold;
}
.org-meta-line {
  color: #990000;
}
.css-selector {
  color: #0000ff;
  font-weight:bold;
}
.css-property {
  color: #000000;
  font-weight:bold;
}
.makefile-targets {
  font-weight:bold;
  color: #0000ff;
}
pre.src .doc {
  color:#777777;
}
/* ENDE htmlize.el */



  Sebastian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  0:36 ` Sebastian Rose
@ 2010-09-14  7:11   ` Rainer M Krug
  2010-09-14  7:41     ` Eric S Fraga
  0 siblings, 1 reply; 13+ messages in thread
From: Rainer M Krug @ 2010-09-14  7:11 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/09/10 02:36, Sebastian Rose wrote:
> Rainer M Krug <r.m.krug@gmail.com> 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: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
For longer style definitions, you can use several such lines. You could
also directly write a
<style> </style> 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: <style> .string {color: #ff4500;}</style>

failed.

Any suggestions or CSS stylesheets?

Rainer

> 
> This is the htmlize-related section of my CSS stylesheet:
> 
> 
> pre.src .comment {
>   color: #777777;
>   font-style: italic;
> }
> pre.src .comment-delimiter {
>   color: #777777;
>   font-style: italic;
> }
> .constant {
>   color: #ff4500;
> }
> .default {
>   color: #000000;
> }
> .builtin {
>   color: #0000ff;
> }
> .function-name {
>   color:#0000ff;
> }
> .html-tag {
>   color: #0000ff;
> }
> .keyword {
>   color: #a52a2a;
>   font-weight: bold;
> }
> .string {
>   color: #006400;
> }
> .type {
>   font-weight:bold;
>   color:#238b8b;
> }
> .preprocessor {
>   color:#0000FF;
> }
> .variable-name {
>   color: #4d4d4d;
>   font-weight:bold;
> }
> .org-meta-line {
>   color: #990000;
> }
> .css-selector {
>   color: #0000ff;
>   font-weight:bold;
> }
> .css-property {
>   color: #000000;
>   font-weight:bold;
> }
> .makefile-targets {
>   font-weight:bold;
>   color: #0000ff;
> }
> pre.src .doc {
>   color:#777777;
> }
> /* ENDE htmlize.el */
> 
> 
> 
>   Sebastian


- -- 
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/

iEYEARECAAYFAkyPIAsACgkQoYgNqgF2egqo/QCcDJhu8+/rx79XUAO64k1PAybh
vIMAnRTCqNYtejI0xo7wciLr4f4NzBw7
=sDxV
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  7:11   ` Rainer M Krug
@ 2010-09-14  7:41     ` Eric S Fraga
  2010-09-14  8:05       ` Rainer M Krug
  0 siblings, 1 reply; 13+ messages in thread
From: Eric S Fraga @ 2010-09-14  7:41 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]

On Tue, 14 Sep 2010 09:11:07 +0200, Rainer M Krug <r.m.krug@gmail.com> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 14/09/10 02:36, Sebastian Rose wrote:
> > Rainer M Krug <r.m.krug@gmail.com> 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: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
> For longer style definitions, you can use several such lines. You could
> also directly write a
> <style> </style> 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: <style> .string {color: #ff4500;}</style>
> 
> failed.
> 
> Any suggestions or CSS stylesheets?

Did you C-c C-c after adding that line so that org setup is reset?  Is
there actually any HTML code in the exported file that has the
sequence

: <XXX class="string">

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?

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  7:41     ` Eric S Fraga
@ 2010-09-14  8:05       ` Rainer M Krug
  2010-09-14  8:16         ` Eric S Fraga
  0 siblings, 1 reply; 13+ messages in thread
From: Rainer M Krug @ 2010-09-14  8:05 UTC (permalink / raw)
  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 <r.m.krug@gmail.com> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 14/09/10 02:36, Sebastian Rose wrote:
>>> Rainer M Krug <r.m.krug@gmail.com> 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: <link rel="stylesheet" type="text/css" href="stylesheet.css" />
>> For longer style definitions, you can use several such lines. You could
>> also directly write a
>> <style> </style> 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: <style> .string {color: #ff4500;}</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
> 
> : <XXX class="string">
> 
> 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

<style> .string {color: #ff4500;}</style>

is in the html file, but it is not used - the color is hardcoded as
#ffff00:

<span style="color: #ffff00;">"seed"</span>

Here is an example .org file:

- ---------------------------
#+STYLE: <style> .string {color: #ff4500;}</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:

- ---------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2010-09-14 10:00:53 CEST"/>
<meta name="author" content="Rainer M Krug"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Times, serif; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  textarea { overflow-x: auto; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  /*]]>*/-->
</style>
<style> .string {color: #ff4500;}</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>

</head>
<body>
<div id="content">

<h1 class="title">test</h1>


<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 Results </a></li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> Results </h2>
<div class="outline-text-2" id="text-1">




<pre class="src src-R"><span style="color: #4186be;">plot</span>(
     res,
     <span style="color: #00ff00;">stages</span>=<span style="color:
#4186be;">c</span>(
       <span style="color: #ffff00;">"flower"</span>,
       <span style="color: #ffff00;">"parFlower"</span>,
       <span style="color: #ffff00;">"gall"</span>,
       <span style="color: #ffff00;">"midgeAdult"</span>,
       <span style="color: #ffff00;">"grePod"</span>,
       <span style="color: #ffff00;">"weavilAdult"</span>,
       <span style="color: #ffff00;">"seed"</span>
       ),
     <span style="color: #00ff00;">plot.type</span>=<span style="color:
#ffff00;">"multiple"</span>
     )
</pre>




</div>
</div>
<div id="postamble">
<p class="author"> Author: Rainer M Krug
</p>
<p class="date"> Date: 2010-09-14 10:00:53 CEST</p>
<p class="creator">HTML generated by org-mode 7.01trans in emacs 23</p>
</div>
</div>
</body>
</html>
- ---------------------------

The question is: how can I change the  "color: #ffff00;" for the
strings, e.g. in

<span style="color: #ffff00;">"seed"</span>

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-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  8:05       ` Rainer M Krug
@ 2010-09-14  8:16         ` Eric S Fraga
  2010-09-14  8:29           ` Rainer M Krug
  0 siblings, 1 reply; 13+ messages in thread
From: Eric S Fraga @ 2010-09-14  8:16 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]

On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug <r.m.krug@gmail.com> wrote:

[...]

> The string
> 
> <style> .string {color: #ff4500;}</style>
> 
> is in the html file, but it is not used - the color is hardcoded as
> #ffff00:

so this has nothing to do with CSS as style specifications can only
affect specific tags, not hard-coded style information.

The question then becomes one of which particular tool in the chain is
generating hard-coded colours and can that tool be configured to do
this in a different more general manner?

[...]

> <pre class="src src-R"><span style="color: #4186be;">plot</span>(
>      res,
>      <span style="color: #00ff00;">stages</span>=<span style="color:
> #4186be;">c</span>(
>        <span style="color: #ffff00;">"flower"</span>,
>        <span style="color: #ffff00;">"parFlower"</span>,
>        <span style="color: #ffff00;">"gall"</span>,
>        <span style="color: #ffff00;">"midgeAdult"</span>,
>        <span style="color: #ffff00;">"grePod"</span>,
>        <span style="color: #ffff00;">"weavilAdult"</span>,
>        <span style="color: #ffff00;">"seed"</span>
>        ),
>      <span style="color: #00ff00;">plot.type</span>=<span style="color:
> #ffff00;">"multiple"</span>
>      )
> </pre>

Which tool generates this pre-formatted code snippet?  I'm not up to
speed on the whole export tool chain for org unfortunately.

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  8:16         ` Eric S Fraga
@ 2010-09-14  8:29           ` Rainer M Krug
  2010-09-14 10:13             ` Sebastian Rose
  0 siblings, 1 reply; 13+ messages in thread
From: Rainer M Krug @ 2010-09-14  8:29 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/09/10 10:16, Eric S Fraga wrote:
> On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug <r.m.krug@gmail.com> wrote:
> 
> [...]
> 
>> The string
>>
>> <style> .string {color: #ff4500;}</style>
>>
>> is in the html file, but it is not used - the color is hardcoded as
>> #ffff00:
> 
> so this has nothing to do with CSS as style specifications can only
> affect specific tags, not hard-coded style information.

Agreed.

> 
> The question then becomes one of which particular tool in the chain is
> generating hard-coded colours and can that tool be configured to do
> this in a different more general manner?

Exactly.

> 
> [...]
> 
>> <pre class="src src-R"><span style="color: #4186be;">plot</span>(
>>      res,
>>      <span style="color: #00ff00;">stages</span>=<span style="color:
>> #4186be;">c</span>(
>>        <span style="color: #ffff00;">"flower"</span>,
>>        <span style="color: #ffff00;">"parFlower"</span>,
>>        <span style="color: #ffff00;">"gall"</span>,
>>        <span style="color: #ffff00;">"midgeAdult"</span>,
>>        <span style="color: #ffff00;">"grePod"</span>,
>>        <span style="color: #ffff00;">"weavilAdult"</span>,
>>        <span style="color: #ffff00;">"seed"</span>
>>        ),
>>      <span style="color: #00ff00;">plot.type</span>=<span style="color:
>> #ffff00;">"multiple"</span>
>>      )
>> </pre>
> 
> Which tool generates this pre-formatted code snippet?  I'm not up to
> speed on the whole export tool chain for org unfortunately.
> 

Me neither. Probably somebody can help?

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/

iEYEARECAAYFAkyPMnMACgkQoYgNqgF2egrbWwCgjI1cOQrUbg4othy6VLX+YJqf
JccAnAyo89M1BL5c+cQnMT43j/GnMsJp
=GLS1
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14  8:29           ` Rainer M Krug
@ 2010-09-14 10:13             ` Sebastian Rose
  2010-09-14 10:39               ` Eric S Fraga
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2010-09-14 10:13 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Rainer M Krug <r.m.krug@gmail.com> writes:
> On 14/09/10 10:16, Eric S Fraga wrote:
>> On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug <r.m.krug@gmail.com> wrote:
>> 
>> [...]
>> 
>>> The string
>>>
>>> <style> .string {color: #ff4500;}</style>
>>>
>>> is in the html file, but it is not used - the color is hardcoded as
>>> #ffff00:
>> 
>> so this has nothing to do with CSS as style specifications can only
>> affect specific tags, not hard-coded style information.
>
> Agreed.


M-x customize-variable RET org-export-htmlize-output-style

and set it to 'css'

HTH

  Sebastian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14 10:13             ` Sebastian Rose
@ 2010-09-14 10:39               ` Eric S Fraga
  2010-09-14 11:41                 ` Sebastian Rose
  0 siblings, 1 reply; 13+ messages in thread
From: Eric S Fraga @ 2010-09-14 10:39 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode, Rainer M Krug

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

On Tue, 14 Sep 2010 12:13:12 +0200, Sebastian Rose <sebastian_rose@gmx.de> wrote:
> 
> Rainer M Krug <r.m.krug@gmail.com> writes:
> > On 14/09/10 10:16, Eric S Fraga wrote:
> >> On Tue, 14 Sep 2010 10:05:32 +0200, Rainer M Krug <r.m.krug@gmail.com> wrote:
> >> 
> >> [...]
> >> 
> >>> The string
> >>>
> >>> <style> .string {color: #ff4500;}</style>
> >>>
> >>> is in the html file, but it is not used - the color is hardcoded as
> >>> #ffff00:
> >> 
> >> so this has nothing to do with CSS as style specifications can only
> >> affect specific tags, not hard-coded style information.
> >
> > Agreed.
> 
> 
> M-x customize-variable RET org-export-htmlize-output-style
> 
> and set it to 'css'
> 
> HTH
> 
>   Sebastian

Thanks Sebastian.  I think that will definitely help the OP.  However,
at least on my system, I believe the variable is actually
org-export-htmlize-output-type (type, not style).

cheers,
eric

[-- Attachment #2: Type: text/plain, Size: 75 bytes --]

-- 
Eric S Fraga
GnuPG: 8F5C 279D 3907 E14A 5C29  570D C891 93D8 FFFC F67D

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14 10:39               ` Eric S Fraga
@ 2010-09-14 11:41                 ` Sebastian Rose
  2010-09-14 11:54                   ` Rainer M Krug
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2010-09-14 11:41 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode, Rainer M Krug

Eric S Fraga <ucecesf@ucl.ac.uk> writes:
> Thanks Sebastian.  I think that will definitely help the OP.  However,
> at least on my system, I believe the variable is actually
> org-export-htmlize-output-type (type, not style).


Yes, sorry Eric, right: org-export-htmlize-output-type


Sebastian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14 11:41                 ` Sebastian Rose
@ 2010-09-14 11:54                   ` Rainer M Krug
  2010-09-14 16:25                     ` Sebastian Rose
  0 siblings, 1 reply; 13+ messages in thread
From: Rainer M Krug @ 2010-09-14 11:54 UTC (permalink / raw)
  To: Sebastian Rose; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/09/10 13:41, Sebastian Rose wrote:
> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>> Thanks Sebastian.  I think that will definitely help the OP.  However,
>> at least on my system, I believe the variable is actually
>> org-export-htmlize-output-type (type, not style).
> 
> 
> Yes, sorry Eric, right: org-export-htmlize-output-type

I found the variable - but then all the highlighting is gone. I assume,
I have to use CSS sylesheet for that. That is an overkill for me at the
moment.

Is there really no way, just to change the color of one entity in the
htmlization of code?

Thanks a lot,

Rainer

> 
> 
> Sebastian


- -- 
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/

iEYEARECAAYFAkyPYnMACgkQoYgNqgF2egqWygCfYGPjAlIwJczE4PBgPF7Ge6RO
PhcAn3cTxJZ7d/oDHOdk87rhgu9dhuOq
=rrpG
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14 11:54                   ` Rainer M Krug
@ 2010-09-14 16:25                     ` Sebastian Rose
  2010-09-14 18:56                       ` Rainer M Krug
  0 siblings, 1 reply; 13+ messages in thread
From: Sebastian Rose @ 2010-09-14 16:25 UTC (permalink / raw)
  To: Rainer M Krug; +Cc: emacs-orgmode

Rainer M Krug <r.m.krug@gmail.com> writes:
> On 14/09/10 13:41, Sebastian Rose wrote:
>> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>>> Thanks Sebastian.  I think that will definitely help the OP.  However,
>>> at least on my system, I believe the variable is actually
>>> org-export-htmlize-output-type (type, not style).
>> 
>> 
>> Yes, sorry Eric, right: org-export-htmlize-output-type
>
> I found the variable - but then all the highlighting is gone. I assume,
> I have to use CSS sylesheet for that. That is an overkill for me at the
> moment.
>
> Is there really no way, just to change the color of one entity in the
> htmlization of code?


Ahhh, sorry, yes, there is one:

   M-x customize-variable RET org-export-html-style RET

You should leave your `org-export-htmlize-output-type' setting as
discussed before.

Set `org-export-html-style' to, e.g., 

  <style> .string { color:#006600; } </style>



HTH

   Sebastian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Change color in fontified html export for strings
  2010-09-14 16:25                     ` Sebastian Rose
@ 2010-09-14 18:56                       ` Rainer M Krug
  0 siblings, 0 replies; 13+ messages in thread
From: Rainer M Krug @ 2010-09-14 18:56 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 14/09/10 18:25, Sebastian Rose wrote:
> Rainer M Krug <r.m.krug@gmail.com> writes:
>> On 14/09/10 13:41, Sebastian Rose wrote:
>>> Eric S Fraga <ucecesf@ucl.ac.uk> writes:
>>>> Thanks Sebastian.  I think that will definitely help the OP.  However,
>>>> at least on my system, I believe the variable is actually
>>>> org-export-htmlize-output-type (type, not style).
>>>
>>>
>>> Yes, sorry Eric, right: org-export-htmlize-output-type
>>
>> I found the variable - but then all the highlighting is gone. I assume,
>> I have to use CSS sylesheet for that. That is an overkill for me at the
>> moment.
>>
>> Is there really no way, just to change the color of one entity in the
>> htmlization of code?
>
>
> Ahhh, sorry, yes, there is one:
>
>    M-x customize-variable RET org-export-html-style RET
>
> You should leave your `org-export-htmlize-output-type' setting as
> discussed before.
>
> Set `org-export-html-style' to, e.g.,
>
>   <style> .string { color:#006600; } </style>

Thanks - that looks more like it. But I don't get it as I want it - so I
just leave it as it is for the moment.

Thanks a lot for your help,

Rainer

>
>
>
> HTH
>
>    Sebastian


- -- 
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/

iEYEARECAAYFAkyPxXkACgkQoYgNqgF2egqHKgCdE4onbiHrkMpQCYuwPlOeK9Hs
UT4An0ucD4LCAJGj+D5rHn508NmzLzT6
=f/xF
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-09-14 18:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 13:06 Change color in fontified html export for strings Rainer M Krug
2010-09-14  0:36 ` Sebastian Rose
2010-09-14  7:11   ` Rainer M Krug
2010-09-14  7:41     ` Eric S Fraga
2010-09-14  8:05       ` Rainer M Krug
2010-09-14  8:16         ` Eric S Fraga
2010-09-14  8:29           ` Rainer M Krug
2010-09-14 10:13             ` Sebastian Rose
2010-09-14 10:39               ` Eric S Fraga
2010-09-14 11:41                 ` Sebastian Rose
2010-09-14 11:54                   ` Rainer M Krug
2010-09-14 16:25                     ` Sebastian Rose
2010-09-14 18:56                       ` Rainer M Krug

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).