> From: Dave Kuhlman
> To: David Emo ; doc...@li...
> Sent: Tue, May 11, 2010 4:59:18 PM
>
> >
> > I'm trying to style the images of my rst document and it does not
> > work.
> >
> > I use that command line : rst2odt --stylesheet=styles.odt index.rst
> > index.odt
> >
> > In the styles.odt, I have defined an image style : rststyle-logo.
> >
> > In my document, I tried :
> > .. image:: image.png
> > :align: right
> > :scale: 100
> > :class: rststyle-logo
> >
> > or
> >
> > ..class:: rststyle-logo
> > .. image:: image.png
> > :align: right
> > :scale: 100
> >
> > It "compiles", the image is visible but the style os not right.
> >
> > How can I link an image with a style defined in the styles.odt?
>
> David and others -
>
> Here is what I've done (so far). I've implemented two new styles::
>
> rststyle-image
> The style applied to an image, either an image by itself or an
> image in a figure.
>
> rststyle-figureframe
> The style applied to a figure (actually to the frame that
> surrounds a figure).
>
> There is one problem with this strategy -- If you modify both
> rststyle-image and rststyle-figureframe so that they both have
> thick borders, the border of the image obscures a portion of the
> border of the figure. I suppose that this is because the image
> fits exactly inside the (width of) the frame and the border of
> the frame is also inside the frame. I don't think I can fix this,
> because when odf-odt writer runs, it does not know whether
> the figure has a border and how thick it will be and how much
> room to allow for it.
>
> So, it seems to me that we have a solution that works as long as
> you do not put a border on a figure. (Borders on images are fine.)
>
> Is this the solution you (we) are looking for?
>
> I'll do more testing. And then, unless I hear objections about
> this way of styling images, I'll check it in to the Subversion
> repository.
>
I've implemented and checked in the change that I described
above.
- Dave
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
|