The stupid question is the question not asked | |
PerlMonks |
OODoc Document Formatting Problemsby Bruce32903 (Scribe) |
on Apr 13, 2011 at 13:11 UTC ( [id://899181]=perlquestion: print w/replies, xml ) | Need Help?? |
Bruce32903 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks, I am trying to use OODoc to combine files into a single OpenOffice Writer document. I am successful in combining files but am rather lost when trying to manipulate the format of the odt file. My two current problems are: 1) I always use the "old school" method of indenting subroutines and loops (three spaces for first indent, 6 for one more level of nesting, then 9, etc.). No matter how many leading spaces a source line has the output document only has a single leading space. 2) When I use my full set of files the output document has paragraph numbering turned on. It is not a huge task to turn it off inside OO Writer, but it would be nicer if it did not get turned on. To illustrate the spaces problem I started with a fake data file named 1.php. (Overall I am working with some perl, some php and some odt files) For my second fake program/data file I just changed the "1" in both the file name and subroutine name to "2". My sample code is here:
When I copy the odt file to a temporary directory, unzip it and look inside the content.xml file I can see that the 3 spaces are there. I can't find any way in OO Writer to turn off the contraction of these spaces so I am totally stuck. Since I would like my code to work for me and make my life easier I am also stuck on how to make my perl code correct this. Overall, based upon current needs, I may be combining perl code, php code, text files or OO document files. Later I might throw spreadsheets into the mix too. My full size code example currently works with php and odt. I have a additional related problem there. The output document (combined odt files) has an additional left margin and all paragraphs have paragraph numbers. I have found the procedure to turn this off in OO Writer, but again I would prefer to have my perl code make "ready to use" files for me. So far I have not been able to find the answer to this one either. Note that my large code file will, based upon file extension, use different code for odt files. I am using sample code from the internet that seems to combine the odt files properly. If this one posting doesn't solve both problems then I will repost with sample code for odt files. My guess is that this contraction of spaces problem will expose me to a wide variety of formatting power that will solve many style and formatting issues. Any suggestions would be appreciated. Thanks, Bruce
Back to
Seekers of Perl Wisdom
|
|