[xwiki-users] Customize colors of code macro

2009-05-20 Thread Reto Hotz
Hi,

I'd like to customize the colors of the code macro (1.8.3 / xwiki 2.0)

In the code macro documentation 
(http://code.xwiki.org/xwiki/bin/view/Macros/CodeMacro20) I see that 
there is an cssClass attribute for that purpose.

Unfortunately the available css keywords are not documented.
Firebug also didn't help me, because the color seems to be hard coded in 
some way (see example at the end).

Can you provide me with an example of customizing the color of the code 
macro?


e.g. my code macro:

{{code language=java}}
public void do() {
   System.out.println(bla);
}
{{/code}}

produces this rendered html:

div class=box code
   span style=font-weight: bold; color: rgb(0, 128, 0);public/span
   span style=color: rgb(176, 0, 64);void/span span style=color: 
rgb(0, 0, 255);do/spanspan style=color: rgb(102, 102, 
102);()/span span style=color: rgb(102, 102, 102);{/spanbr/ 
  Systemspan style=color: rgb(102, 102, 102);./spanspan 
style=color: rgb(125, 144, 41);out/spanspan style=color: rgb(102, 
102, 102);./spanspan style=color: rgb(125, 144, 
41);println/spanspan style=color: rgb(102, 102, 
102);(/spanspan style=color: rgb(186, 33, 33);bla/spanspan 
style=color: rgb(102, 102, 102););/spanbr/span style=color: 
rgb(102, 102, 102);}/spanbr/
/div


Thanks a lot.

Reto
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Customize colors of code macro

2009-05-20 Thread PERINAUD Christophe
Hi

If you look at the jar file of pygments, you will find a subfolder styles 
wich contains .py source files defining the style of tokens of the language. I 
am not sure if you can customize them without replacing the jar (and rebuilding 
the wanted .class from .py/.pyc)


-Message d'origine-
De : users-boun...@xwiki.org [mailto:users-boun...@xwiki.org] De la part de 
Reto Hotz
Envoyé : mercredi 20 mai 2009 09:16
À : XWiki Users
Objet : [xwiki-users] Customize colors of code macro

Hi,

I'd like to customize the colors of the code macro (1.8.3 / xwiki 2.0)

In the code macro documentation 
(http://code.xwiki.org/xwiki/bin/view/Macros/CodeMacro20) I see that 
there is an cssClass attribute for that purpose.

Unfortunately the available css keywords are not documented.
Firebug also didn't help me, because the color seems to be hard coded in 
some way (see example at the end).

Can you provide me with an example of customizing the color of the code 
macro?


e.g. my code macro:

{{code language=java}}
public void do() {
   System.out.println(bla);
}
{{/code}}

produces this rendered html:

div class=box code
   span style=font-weight: bold; color: rgb(0, 128, 0);public/span
   span style=color: rgb(176, 0, 64);void/span span style=color: 
rgb(0, 0, 255);do/spanspan style=color: rgb(102, 102, 
102);()/span span style=color: rgb(102, 102, 102);{/spanbr/ 
  Systemspan style=color: rgb(102, 102, 102);./spanspan 
style=color: rgb(125, 144, 41);out/spanspan style=color: rgb(102, 
102, 102);./spanspan style=color: rgb(125, 144, 
41);println/spanspan style=color: rgb(102, 102, 
102);(/spanspan style=color: rgb(186, 33, 33);bla/spanspan 
style=color: rgb(102, 102, 102););/spanbr/span style=color: 
rgb(102, 102, 102);}/spanbr/
/div


Thanks a lot.

Reto
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


This e-mail is intended only for the addressee named above. It does not bind 
the sender, except in the case of an existing written convention with the 
addressee. This e-mail may contain material that is confidential and privileged 
for the sole use of the intended recipient. Any review, reliance or 
distribution by others or forwarding without express permission is strictly 
prohibited and may be unlawful. If you are not the intended recipient, please 
contact the sender and delete all copies.

While reasonable precautions have been taken to ensure that this e-mail and any 
attachments are free from any computer virus or similar defect, no liability 
will be accepted in that respect. Anyone accessing this e-mail must take their 
own precautions as to security and virus protection.

KBL European Private Bankers S.A., 43 boulevard Royal L-2955 Luxembourg, R.C.S. 
Luxembourg B 6395, T (352) 47 97 1
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Customize colors of code macro

2009-05-20 Thread Thomas Mortagne
Hi,

There is no way currently to customize macro colors.

But there is already code to be able to put classes names instead of
hard coded colors in the spans and it just need to add to way to
configure it.

Can you create an issue for it on http://jira.xwiki.org ?

On Wed, May 20, 2009 at 09:15, Reto Hotz r...@retohotz.ch wrote:
 Hi,

 I'd like to customize the colors of the code macro (1.8.3 / xwiki 2.0)

 In the code macro documentation
 (http://code.xwiki.org/xwiki/bin/view/Macros/CodeMacro20) I see that
 there is an cssClass attribute for that purpose.

 Unfortunately the available css keywords are not documented.
 Firebug also didn't help me, because the color seems to be hard coded in
 some way (see example at the end).

 Can you provide me with an example of customizing the color of the code
 macro?


 e.g. my code macro:

 {{code language=java}}
 public void do() {
   System.out.println(bla);
 }
 {{/code}}

 produces this rendered html:

 div class=box code
   span style=font-weight: bold; color: rgb(0, 128, 0);public/span
   span style=color: rgb(176, 0, 64);void/span span style=color:
 rgb(0, 0, 255);do/spanspan style=color: rgb(102, 102,
 102);()/span span style=color: rgb(102, 102, 102);{/spanbr/
  Systemspan style=color: rgb(102, 102, 102);./spanspan
 style=color: rgb(125, 144, 41);out/spanspan style=color: rgb(102,
 102, 102);./spanspan style=color: rgb(125, 144,
 41);println/spanspan style=color: rgb(102, 102,
 102);(/spanspan style=color: rgb(186, 33, 33);bla/spanspan
 style=color: rgb(102, 102, 102););/spanbr/span style=color:
 rgb(102, 102, 102);}/spanbr/
 /div


 Thanks a lot.

 Reto
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Customize colors of code macro

2009-05-20 Thread Thomas Mortagne
On Wed, May 20, 2009 at 15:22, Thomas Mortagne
thomas.morta...@xwiki.com wrote:
 Hi,

 There is no way currently to customize macro colors.

Except changing the default Pygments style and repackaging pygments
jar as Christophe suggested.


 But there is already code to be able to put classes names instead of
 hard coded colors in the spans and it just need to add to way to
 configure it.

 Can you create an issue for it on http://jira.xwiki.org ?

 On Wed, May 20, 2009 at 09:15, Reto Hotz r...@retohotz.ch wrote:
 Hi,

 I'd like to customize the colors of the code macro (1.8.3 / xwiki 2.0)

 In the code macro documentation
 (http://code.xwiki.org/xwiki/bin/view/Macros/CodeMacro20) I see that
 there is an cssClass attribute for that purpose.

 Unfortunately the available css keywords are not documented.
 Firebug also didn't help me, because the color seems to be hard coded in
 some way (see example at the end).

 Can you provide me with an example of customizing the color of the code
 macro?


 e.g. my code macro:

 {{code language=java}}
 public void do() {
   System.out.println(bla);
 }
 {{/code}}

 produces this rendered html:

 div class=box code
   span style=font-weight: bold; color: rgb(0, 128, 0);public/span
   span style=color: rgb(176, 0, 64);void/span span style=color:
 rgb(0, 0, 255);do/spanspan style=color: rgb(102, 102,
 102);()/span span style=color: rgb(102, 102, 102);{/spanbr/
  Systemspan style=color: rgb(102, 102, 102);./spanspan
 style=color: rgb(125, 144, 41);out/spanspan style=color: rgb(102,
 102, 102);./spanspan style=color: rgb(125, 144,
 41);println/spanspan style=color: rgb(102, 102,
 102);(/spanspan style=color: rgb(186, 33, 33);bla/spanspan
 style=color: rgb(102, 102, 102););/spanbr/span style=color:
 rgb(102, 102, 102);}/spanbr/
 /div


 Thanks a lot.

 Reto
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users




 --
 Thomas Mortagne




-- 
Thomas Mortagne
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Customize colors of code macro

2009-05-20 Thread Reto Hotz
Hi,

Thomas Mortagne wrote:
 Can you create an issue for it on http://jira.xwiki.org ?

Done: http://jira.xwiki.org/jira/browse/XWIKI-3866

Thanks.
Reto

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users