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-bounces(a)xwiki.org [mailto:users-bounces@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</span><span style="color: rgb(102, 102,
102);">()</span> <span style="color: rgb(102, 102,
102);">{</span><br/>
System<span style="color: rgb(102, 102, 102);">.</span><span
style="color: rgb(125, 144, 41);">out</span><span style="color:
rgb(102,
102, 102);">.</span><span style="color: rgb(125, 144,
41);">println</span><span style="color: rgb(102, 102,
102);">(</span><span style="color: rgb(186, 33,
33);">"bla"</span><span
style="color: rgb(102, 102, 102);">);</span><br/><span
style="color:
rgb(102, 102, 102);">}</span><br/>
</div>
Thanks a lot.
Reto
_______________________________________________
users mailing list
users(a)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