]> git.lyx.org Git - features.git/commitdiff
Improve output of XHTML comments.
authorRichard Heck <rgheck@comcast.net>
Tue, 6 Dec 2011 20:46:40 +0000 (20:46 +0000)
committerRichard Heck <rgheck@comcast.net>
Tue, 6 Dec 2011 20:46:40 +0000 (20:46 +0000)
(i)  Validate even for comments when outputting XHTML.
(ii) Output comments as divs hidden by default. Then people
     can display them other ways if they wish.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40401 a592a061-630c-0410-9148-cb99ea01b6c8

lib/layouts/stdinsets.inc
src/insets/InsetNote.cpp
status.20x

index 89c8d6bdaec0d8d47a17e420d418f9a061179e1d..c5826029b949a0dfc1dd272ca13db66a0112ada6 100644 (file)
@@ -87,8 +87,13 @@ InsetLayout Note:Comment
        EndFont
        MultiPar              true
        Display               false
-       HTMLTag               !--
-       HTMLIsBlock           false
+       HTMLTag               div
+       HTMLIsBlock           true
+  HTMLStyle
+    div.note_comment {
+      display: none;
+    }
+  EndHTMLStyle
 End
 
 
@@ -121,6 +126,7 @@ InsetLayout Note:Greyedout
        EndFont
        MultiPar              true
        Display               false
+       HTMLInnerTag div
        HTMLStyle
                div.note_greyedout {
                        display: inline;
index 05ee4f0fbb752c03f19a056fd94e9402c92197da..76b5bfc284d0410ea1072fab596a385824f9dc27 100644 (file)
@@ -311,6 +311,10 @@ void InsetNote::validate(LaTeXFeatures & features) const
        switch (params_.type) {
        case InsetNoteParams::Comment:
                features.require("verbatim");
+               if (features.runparams().flavor == OutputParams::HTML)
+                       // we do output this but set display to "none" by default,
+                       // but people might want to use it.
+                       InsetCollapsable::validate(features);
                break;
        case InsetNoteParams::Greyedout:
                features.require("color");
index 5214f57094b84e4b55820167d6265f00941180da..2446d2b10da6a1171789e9429d0ad64329936306 100644 (file)
@@ -26,6 +26,10 @@ What's new
 
 - Fix Sweave support for document encoding with R >= 2.13.1 (bug 7876).
 
+- Improved output of Comment notes for XHTML. These are now div's that are
+  hidden by the default CSS.
+
+
 * TEX2LYX IMPROVEMENTS
 
 - Chess diagram and Spreadsheet external templates are imported