From 6bbe691b92080fddde8fd992a79f1487a1d05965 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 5 Jun 2009 19:25:49 +0000 Subject: [PATCH] InsetFootnote XHTML output. Of course the CSS can be modified, but this is pretty cool, I think. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29965 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/stdinsets.inc | 15 +++++++++++++++ src/insets/InsetFoot.cpp | 10 ++++++++++ src/insets/InsetFoot.h | 2 ++ 3 files changed, 27 insertions(+) diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index a1d7c7e097..19068860ef 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -99,6 +99,21 @@ InsetLayout Foot MultiPar true HTMLTag span HTMLAttr class='footnote' + HTMLStyle + span.notenum { + vertical-align: super; + font-size: smaller; + } + span.footnote { + display: none; + } + span.footwrapper:hover span.footnote { + display: block; + border: 1px double black; + margin: 0em 1em; + padding: 1em; + } + EndHTMLStyle End InsetLayout Note:Comment diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index 122eaecc8a..22fa7f6f83 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -128,4 +128,14 @@ int InsetFoot::docbook(odocstream & os, OutputParams const & runparams) const } +int InsetFoot::xhtml(odocstream & os, OutputParams const & runparams) const +{ + // FIXME It'd be nice to output the note number, but we'd need to save + // that when we go through updateLabels. + os << "Note\n"; + InsetCollapsable::xhtml(os, runparams); + os << "\n\n"; + return 0; +} + } // namespace lyx diff --git a/src/insets/InsetFoot.h b/src/insets/InsetFoot.h index a2c1b7421c..e25e93138d 100644 --- a/src/insets/InsetFoot.h +++ b/src/insets/InsetFoot.h @@ -38,6 +38,8 @@ private: /// int docbook(odocstream &, OutputParams const &) const; /// + int xhtml(odocstream &, OutputParams const &) const; + /// docstring editMessage() const; /// Update the counters of this inset and of its contents void updateLabels(ParIterator const &); -- 2.39.2