On 12/15/2011 11:34 AM, Rob Oakes wrote:
Dear Developers,

I've been working on modifying the XHTML created by LyX to be more compliant 
with HTML5. In the process, though, I've run into a couple of snags, 
particularly with wrap floats and figure labels.

In way of experimentation, I would like to use the<figure>  tag for figures and 
tables and the<figcaption>  tag for figure captions. However, I'm not able to get LyX 
to respect the HTMLTag argument I'm providing.

It should looks like this:

<figure class='wrap'>
...
</figure>

Instead, it still uses the default:

<div class='wrap'>
...
</div>

Any idea on what I might be doing wrong? Here are the layout commands I'm using:

InsetLayout Wrap
        HTMLTag                         figure
        HTMLAttr                                class='wrap'
        HTMLInnerTag                    p
        HTMLInnerAttr                   class='figure-text'
        HTMLStyle
                .wrap {
                        float: right;
                        page-break-inside: avoid;
                        padding: 1ex;
                        margin: 1ex;
                }
        EndHTMLStyle
End

Please file a bug for this. I seem to have hardcoded how this is handled, due to the "width" argument.

There is a similar story for figcaption:

InsetLayout Caption
        HTMLTag                         figcaption
        HTMLInnerTag                    p
        HTMLInnerAttr                   class='figure-text'
        HTMLStyle
                figcaption {
                        page-break-before: avoid;
                }
        EndHTMLStyle
End

It ignores the HTMLTag I'm feeding it and defaults to<div>.
Pretty much the same deal here.

Richard

Reply via email to