From 04d6290966612ffc59b729b38a0e093d49617d3f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 15 Sep 2010 14:23:32 +0000 Subject: [PATCH] Label tag should default to div for "top environment" labels. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35394 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/doc/Customization.lyx | 43 ++++++++++++++++++++++++++++++++++++++- lib/layouts/stdstruct.inc | 1 - src/Layout.cpp | 9 ++++++-- 3 files changed, 49 insertions(+), 4 deletions(-) diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 747d2369e6..0cdfa07abf 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -1,5 +1,5 @@ #LyX 2.0.0svn created this file. For more info see http://www.lyx.org/ -\lyxformat 398 +\lyxformat 400 \begin_document \begin_header \textclass scrbook @@ -101,6 +101,7 @@ End \use_amsmath 0 \use_esint 0 \use_mhchem 1 +\use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false @@ -16955,6 +16956,46 @@ span \end_inset +, unless +\begin_inset Flex CharStyle:Code +status collapsed + +\begin_layout Plain Layout +LabelType +\end_layout + +\end_inset + + is either +\begin_inset Flex CharStyle:Code +status collapsed + +\begin_layout Plain Layout +Top_Environment +\end_layout + +\end_inset + + or +\begin_inset Flex CharStyle:Code +status collapsed + +\begin_layout Plain Layout +Centered_Top_Environment +\end_layout + +\end_inset + +, in which case it defaults to +\begin_inset Flex CharStyle:Code +status collapsed + +\begin_layout Plain Layout +div +\end_layout + +\end_inset + . \end_layout diff --git a/lib/layouts/stdstruct.inc b/lib/layouts/stdstruct.inc index 0eb7a1918f..f3349f6435 100644 --- a/lib/layouts/stdstruct.inc +++ b/lib/layouts/stdstruct.inc @@ -33,7 +33,6 @@ Style Abstract Series Bold Size Large EndFont - HTMLLabel div HTMLLabelFirst 1 HTMLForceCSS 1 HTMLStyle diff --git a/src/Layout.cpp b/src/Layout.cpp index 9a75637331..83bd608687 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -957,8 +957,13 @@ string const & Layout::htmlitemattr() const string const & Layout::htmllabeltag() const { - if (htmllabeltag_.empty()) - htmllabeltag_ = "span"; + if (htmllabeltag_.empty()) { + if (labeltype != LABEL_TOP_ENVIRONMENT && + labeltype != LABEL_CENTERED_TOP_ENVIRONMENT) + htmllabeltag_ = "span"; + else + htmllabeltag_ = "div"; + } return htmllabeltag_; } -- 2.39.2