From 62dd071ce6d745925c34e081f71dd4701d384057 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 6 Dec 2011 20:44:37 +0000 Subject: [PATCH] Improve output of XHTML comments. (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/trunk@40400 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/layouts/stdinsets.inc | 10 ++++++++-- src/insets/InsetNote.cpp | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc index 89c8d6bdae..c5826029b9 100644 --- a/lib/layouts/stdinsets.inc +++ b/lib/layouts/stdinsets.inc @@ -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; diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 2351c2584a..9b4ba5768d 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -310,6 +310,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"); -- 2.39.5