On 12/06/2011 03:55 PM, Rob Oakes wrote:
> Dear LyX Developers, 
>
> I've continued working on some of the challenges to getting clean ePub from 
> LyX and have finished an inset that tentatively allows you to move footnotes 
> to endnotes when exporting to HTML. Attached is a patch implementing the 
> change (or the logic of it, at least).
>
Two thoughts.
 
First, I wonder if we'd be better just outputting footnotes as endnotes
all the time. The inline version we now use is cool, but maybe it's too
cool for it's own good.

Second, I've been thinking recently about introducing some sort of
chapter splitting capability. Not so important for e-books probably, but
useful for the good old web. In that case, one would want to be able to
output footnotes per chapter. There might be other cases where people
wanted to print endnotes per chapter, even without the splitting. That
suggests the idea of "collecting" the footnotes along the way in some
kind of structure, and then emptying it when it comes time to print
them, which could then be at any time. Very roughly:

In LaTeXFeatures or some such place:
    std::list<InsetFoot const *> footlist;
In InsetFoot::xhtml():
    op.features.footlist.push_back(this);
and then in InsetPrintEndnotes::xhtml():
    list<InsetFoot *> & footlist = op.features.footlist;
    while (!footlist.empty()) {
        InsetFoot const * foot = footlist.front();
        footlist.pop_front();
        ...
        // Something like this must be legal
        // I think this trick should simplify much of your code...
        xs << foot->InsetFootlike::xhtml();

Richard
       
       

Comments?

Richard

Reply via email to