Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-09-10 Thread Andrew Douglas Pitonyak

On 09/09/2009 07:36 AM, Ariel Constenla-Haile wrote:

Hello Andrew,

On Sunday 06 September 2009, 14:40, Andrew Douglas Pitonyak wrote:
   

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 maintain the latest copy here:

http://extensions.services.openoffice.org/project/CodeFormatter
 

applying the code formatter to a huge document like the Developer's Guide
seems impossible due to issue
http://qa.openoffice.org/issues/show_bug.cgi?id=84159

Regards
   
Yes, AndrewMacro.odt now causes OOo to crash when the document is 
closed. I would go even further, however, and state that a large 
document such as the developer's guide could cause OOo to crash even 
without colorizing the examples because of this bug.


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-09-09 Thread Ariel Constenla-Haile
Hello Andrew,

On Sunday 06 September 2009, 14:40, Andrew Douglas Pitonyak wrote:
  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 maintain the latest copy here:
 
 http://extensions.services.openoffice.org/project/CodeFormatter

applying the code formatter to a huge document like the Developer's Guide 
seems impossible due to issue 
http://qa.openoffice.org/issues/show_bug.cgi?id=84159

Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-09-06 Thread Andrew Douglas Pitonyak

On 09/05/2009 09:04 AM, Clayton wrote:

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.
   


I maintain the latest copy here:

http://extensions.services.openoffice.org/project/CodeFormatter

The code is open for use in any way you desire, with a request (not an 
insistence) to know of bugs, changes, what ever.


In its current state, a line is considered a single paragraph, not a new 
line character. This is of most importance when a comment is found, 
because the rest of the line is marked as a comment.


The algorithm is not perfect, but it is small. For example, a Print 
method on an object will be colorized as a key word (as in x.print()).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-09-05 Thread Clayton
 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   ccorn...@openoffice.org
OpenOffice.org Documentation Project co-lead
StarOffice - Sun Microsystems, Inc. - Hamburg, Germany

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-09-04 Thread Andrew Douglas Pitonyak

On 08/21/2009 10:12 AM, Clayton wrote:

I am also combining the chapters into one single document.  So far,
Chapters 1 to 6 are in one doc, and can also be downloaded from the page
linked above.

   

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 :-)

C.
   
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!


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-08-21 Thread Cor Nouws

Juergen Schmidt wrote (21-8-2009 15:50)


that are good news and thanks for keeping us informed about the progress.

The whole feature is very useful for all the other guides and books as 
well. It's great, good job man ;-)


Indeed, I like to thank Clayton as well. Yesterday evening wanted a file 
with cumulated CC minutes of this year, and even those were done in no time.

Great!

Cor

--
Cor Nouws - nl.OpenOffice.org marketing contact
Ontwikkelaar? Join! http://council.openoffice.org/developers.html
Gevoel niet vrij te zijn? Zie www.nieuwsteversie.nl

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org



Re: [api-dev] Progress on exporting the Dev Guide to ODT and PDF

2009-08-21 Thread Clayton
 I am also combining the chapters into one single document.  So far,
 Chapters 1 to 6 are in one doc, and can also be downloaded from the page
 linked above.
   
 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 :-)

C.
-- 
Clayton Cornell   ccorn...@openoffice.org
OpenOffice.org Documentation Project co-lead
StarOffice - Sun Microsystems, Inc. - Hamburg, Germany

-
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org