[FM Discuss] code highlighting

Luka Frelih luka at ljudmila.org
Wed Apr 20 09:46:59 PDT 2011


hello!

i presume we're using this: http://code.google.com/p/google-code-prettify/

so basically, you want to:
- drop the linenums class on the code block
- declare prettify css with media=screen
- amend said css with a better theme that has white background and no zebra

http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html

i think it would then work as james specified.

i guess with cmyk printing one might like the colors in the book too.
agree color text printed in black and white reads very poorly indeed.

btw, looking at the newscoop example, for the site it could be much 
nicer to just let the pre block expand in width as required, to avoid 
many wrapping lines. and hopefully in a book there'll be a few more 
letters available per line...

best,
LF
>> If you just had highlighted code, no numbers, no background AND it
>> didn't prevent you from creating printed books in black, white and
>> gray with no highlighting you might have something helpful.  I'd have
>> to see it to be sure.
>>
>> James Simmons
>>
>>>>>>> I have been experimenting a little with code highlighting...take 
>>>>>>> a look
>>>>>>> at
>>>>>>> this:
>>>>>>>
>>>>>>>
>>>>>>> http://booki.flossmanuals.net/newscoop-cookbook2/_v/1.0/how-to-make-an-image-gallery/ 
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> the code blocks are a pre tag with class="prettyprint linenums"
>>>>>>>
>>>>>>> i'm still pondering how useful and 'pretty' it is...any thoughts?
>>>>>>>
>>>>>>> adam
>>>>>>>
>




More information about the Discuss mailing list