>>> Maybe one suggestion ("very nice to have"): would it be possible to
>>> apply syntax coloring/highlighting to the example code? It would make it
>>> so much easier for readers to orientate themselves in the code examples.
>>> Something like applying the [g]vim syntax highlighting?
>>>
>>> Would you be able/contemplate of adding it?
>>>      
>> Hmmm... I'm not sure how easy this will be.  The code blocks are given a
>> "Preformatted" paragraph style which applies the grey background, and
>> the monospaced character styles.  Short of manually editing and applying
>> custom character styles through all code blocks, I'm not sure how it
>> could be done.
>>
>> Exporting the existing syntax highlighting from the Wiki is beyond the
>> current capabilities of the Book (Collection) extension.
>>
>> If anyone has any ideas on how this might be done... I'm definitely open
>> to them :-)
>>
>>    
> I have macros that do something similar in OOo. I apply character styles
> to different portions of the text to colorize them. The primary macro
> works based on a cursor selection. I have code that wades through an
> entire document and color codes what it finds based on paragraph styles.
> Because I am not aware of your process, I do not know how adaptable this
> is for your export process.
> 
> I have code that can colorize starbasic, Java, C++, Perl, Python, and XML.
> 
> I use simplistic parsers, but the only error of which I am currently
> aware (that I have not yet fixed) is that in Basic, I failed to list \
> as an operator (integer division). Oops!

That might work.  The ODFs use a paragraph style for all of the code
blocks in the main text.  It can't hurt to give it a try - the ODFs are
all available on the Wiki Books page.

The export process uses the Collection/Book export to ODT, and from
there I simply import a template to it, tidy up a few places where the
template doesn't yet work quite right and publish.  The macro, if it
works, could be rolled into the template for future publish runs.

C.
-- 
Clayton Cornell       [email protected]
OpenOffice.org Documentation Project co-lead
StarOffice - Sun Microsystems, Inc. - Hamburg, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to