On Tue, May 8, 2012 at 10:58 PM, Richard Heck <[email protected]> wrote:
> On 05/08/2012 07:30 PM, Nico Williams wrote:
>> LyXHTML looks very promising.  It certainly preserves everything I
>> have in my [admittedly small] test file.  If it preserves custom inset
>> names then I could probably use custom insets to provide the
>> additional metadata I need (I still haven't quite figured out how to
>> create custom insets, but give me time).  XSLT can do the rest.
>>
> It will do with custom insets whatever you ask it to do. If I remember
> correctly, it defaults to something like:
> <div class="custominset">
> or an equivalent span, depending upon whether its a charstyle or a
> flex inset.

Excellent.  I've got an XSLT stylesheet in the works that does what I want.

I don't know how to create a custom inset that does.. nothing much
except have a custom inset name.  Specifically I need variants of the
Author inset to represent the metadata I need (author organization,
e-mail address, and postal address).  With that I'd be set.

> In principle, you can also tell the LyXHTML output to use some other
> tag than div or span. This is all customized in the layout files, as is
> explained in the bits on XHTML in the customization manual. So I'm
> guessing that you could get quite a long way towards XML simply in
> that sort of way.

The divs are fine.  I can address them just fine with XPath, so I'm
quite happy.  If the LyXHTML schema changes radically I'll just have
to re-write the XSLT stylesheet I'm writing now, but as long as no
metadata is lost I'll be fine.

Eventually I'll probably want to develop a layout and class for
actually dealing with RFCs directly in LyX.  The typesetting rules for
RFCs are... trivial in comparison to most other layouts.  But I
confess knowing nothing about LaTeX, so it will be sometime before I
get there.  For now I'm just happy -ecstatic even- to just consume
LyXHTML with XSLT.

[Actually, I'm noticing one problem with LyXHTML: it doesn't preserve
vertical spacing in any way, not even as horizontal spacing!  I'm
talking about Insert->Formatting->Vertical Space.  I suspect that
there are other such things that aren't preserved.  For now I'll live.
 Vertical space is useful for multi-paragraph list items, which are
very common in RFCs and Internet-Drafts.  If need be I suspect I can
write a patch and submit it.]

Thanks for your help.  Sorry to need so much handholding, I'm out of
my element here,

Nico
--

Reply via email to