[FM Discuss] code highlighting

adam adam at xs4all.nl
Wed Apr 20 13:37:57 PDT 2011


so...the thing is if anyone wants to put code snippets in fm we can work 
with code highlights as it is implemented now. the printed (pdf) output 
will be black and white but I think it can be overridden with css put 
into the 'custom' css field when u export the manual to pdf.

anyways...there are not many that want this yet but for those that do 
this could be useful

if anyone wants to do this then they can ask me and i can help - its a 
little tricky but not too bad...later we make it easier...

adam



On 04/20/2011 06:46 PM, Luka Frelih wrote:
> 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
>>>>>>>>
>>
>
> _______________________________________________
> Discuss mailing list
> Discuss at lists.flossmanuals.net
> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net

-- 


--
Adam Hyde
Founder FLOSS Manuals
Project Manager Booki
Book Sprint Facilitator
+49 01774935122


Please note: I am not usually online on weekends unless facilitating a 
Book Sprint



More information about the Discuss mailing list