From: L. L. <lrl...@gm...> - 2009-08-11 13:12:51
|
Benny, Thank you for letting me know. I may try and see what happens. If successful, I'll report back. Norma **************************** On Tue, Aug 11, 2009 at 5:48 AM, Benny Malengier <ben...@gm...>wrote: > 2009/8/11 L. Laskey <lrl...@gm...>: > > List, > > > > I posted a message yesterday requesting help for several problems I was > > experiencing using the style editor when creating reports or books. One > > issue was addressed but not the issue of styling the space above or below > > paragraphs and headers. Can some one explain why this feature does not > work. > > Or, can someone tell me where to find the instructions in the manual? > > So you create an odf document. > I think top and bottom margin are not supported, but the person who > wrote that piece of code is not around. > If you are daring, you can try to change the code yourself to change it. > You should open the file ODFDoc.py in the gramps install directory. > Just search for that file, and open it in gedit/kate/wordpad with > root/admin rights (in ubuntu on the command line: sudo kate ODFDoc.py > > The code you want to experiment with is around line 684. You see there: > > for style_name in styles.get_paragraph_style_names(): > style = styles.get_paragraph_style(style_name) > self.sfile.write('<style:style style:name="%s" ' % style_name) > self.sfile.write('style:family="paragraph" ') > self.sfile.write('style:parent-style-name="Standard" ') > self.sfile.write('style:class="text">\n') > self.sfile.write('<style:paragraph-properties\n') > self.sfile.write('fo:margin-left="%.2fcm"\n' % > style.get_left_margin()) > self.sfile.write('fo:margin-right="%.2fcm"\n' % > style.get_right_margin()) > self.sfile.write('fo:margin-top="0.00cm"\n') > self.sfile.write('fo:margin-bottom="0.212cm"\n') > > Don't be afraid of the above. The 4th to last line says that the > margin-left is taken from the defined style, the 3th to last that the > margin-right is taken from the defined style, but margin-top and > margin-bottom are fixed to 0cm and 0.212 cm. > Changing these last two lines to > > self.sfile.write('fo:margin-top="%.2fcm"\n' % > style.get_top_margin() ) > self.sfile.write('fo:margin-bottom="%.2fcm"\n' % > style.get_bottom_margin()) > > saving the file, and restarting GRAMPS, should take the values you > saved in the style editor to be applied as paragraph top and bottom > margin. > > Give it a try, it is not much work to do, and let us know if it works. > You could also just fix the values to something else just to see if it > works, > > self.sfile.write('fo:margin-top="1.00cm"\n') > self.sfile.write('fo:margin-bottom="1.212cm"\n') > > should be pretty obvious to see. > > Yes, as odf is an xml file, it is that easy to change how things look. > We are looking for somebody who knows odf however, as new features > have been added to pdf/html/... output and they are not present in the > odf output. > > Benny > |