[FM Discuss] code highlighting
adam
adam at xs4all.nl
Tue Apr 19 13:16:19 PDT 2011
your a hard task master ;)
i think for now i cant use just highlighting because the syntax is for a
templating language that is now well known and hence i would have to
extend the highlighting js with regex to accommodate it and thats too
much for me and for this use case...
so I think we have to work on a generic case...but cant do now...thanks
heaps for the feedback...very nice to be working with someone with such
a clear vision
thanks heaps
adam
On 04/19/2011 10:00 PM, James Simmons wrote:
> Adam,
>
> I would say that the most objectionable part of the style is the
> alternating gray bars. The second most is the line numbering. Line
> numbering makes sense in a complete program listing, but not so much
> in code snippets. For instance, in MYOSA I show both complete
> listings and short excerpts of the same code, plus even in the
> complete listings I leave off GPL comments, etc. Having line numbers
> confuses things.
>
> 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
>
>
> On Tue, Apr 19, 2011 at 2:50 PM, adam<adam at xs4all.nl> wrote:
>> james...what do u think of this as another attempt:
>> http://booki.flossmanuals.net/newscoop-cookbook2/_full/
>>
>> adam
>>
>>
>>
>> On 04/19/2011 06:59 PM, James Simmons wrote:
>>>
>>> Adam,
>>>
>>> The code samples in the book uses<pre> tags. About the only images
>>> of code I can think of are images of IDEs, web pages showing code from
>>> Git, and I can't think of anything else. The purpose of those images
>>> was not to show the code. For sample code I used plain preformatted
>>> text.
>>>
>>> When I got my first proof copy of the book and the print was too small
>>> to be readable I had to reformat a ton of preformatted text, but I
>>> didn't need to replace a single image.
>>>
>>> For Git I used screen shots of web pages with code because I felt that
>>> they explained the subject better than any text I could replace them
>>> with could.
>>>
>>> James Simmons
>>>
>>>
>>> On Tue, Apr 19, 2011 at 11:21 AM, adam<adam at xs4all.nl> wrote:
>>>>
>>>> yeah...interesting
>>>>
>>>> in myosa you use a lot of images to show code..is that your preffered
>>>> approach?
>>>>
>>>> On 04/19/2011 06:14 PM, James Simmons wrote:
>>>>>
>>>>> Adam,
>>>>>
>>>>> I'd have to say I don't care for it. It's one thing to have code
>>>>> highlighted in your editor. It can help you spot errors. On the
>>>>> printed page it doesn't work for me, especially since code has to be
>>>>> squeezed (re-wrapped) to fit on a narrow page and still be readable.
>>>>> On a web page I have the same issue.
>>>>>
>>>>> I spent many hours fixing up the code samples in MYOSA to work on the
>>>>> printed page, so my opinion on this may be stronger than others.
>>>>>
>>>>> James Simmons
>>>>>
>>>>>
>>>>> On Tue, Apr 19, 2011 at 10:48 AM, adam<adam at xs4all.nl> wrote:
>>>>>>
>>>>>> hi
>>>>>>
>>>>>> 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
>>>>>>
>>>>>> --
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 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
>>>>>> _______________________________________________
>>>>>> Discuss mailing list
>>>>>> Discuss at lists.flossmanuals.net
>>>>>> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
>>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>> _______________________________________________
>>>> Discuss mailing list
>>>> Discuss at lists.flossmanuals.net
>>>> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
>>>>
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> Discuss mailing list
>> Discuss at lists.flossmanuals.net
>> http://lists.flossmanuals.net/listinfo.cgi/discuss-flossmanuals.net
>>
> _______________________________________________
> 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