]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.h
Allow the suppression of LyX's own labels.
[lyx.git] / src / Layout.h
index e41c3069e5fc3ce7128efa233ef798bac8a2a92c..28085dbd6b1c1823267f06f8750c58f4bd17e83e 100644 (file)
@@ -28,12 +28,12 @@ class Language;
 class Lexer;
 class TextClass;
 
-/* Fix labels are printed flushright, manual labels flushleft.
+/* Fixed labels are printed flushright, manual labels flushleft.
  * MARGIN_MANUAL and MARGIN_FIRST_DYNAMIC are *only* for LABEL_MANUAL,
  * MARGIN_DYNAMIC and MARGIN_STATIC are *not* for LABEL_MANUAL.
  * This seems a funny restriction, but I think other combinations are
  * not needed, so I will not change it yet.
- * Correction: MARGIN_FIRST_DYNAMIC also usable with LABEL_STATIC
+ * Correction: MARGIN_FIRST_DYNAMIC also usable with LABEL_STATIC.
  */
 
 
@@ -85,7 +85,8 @@ public:
        ///
        void setLatexName(std::string const & n) { latexname_ = n; }
        ///
-       docstring const & labelstring() const { return labelstring_; }
+       docstring const & labelstring(bool in_appendix) const 
+       { return in_appendix ? labelstring_appendix_ : labelstring_; }
        ///
        docstring const & endlabelstring() const { return endlabelstring_; }
        ///
@@ -120,15 +121,13 @@ public:
        std::string const & htmllabel() const { return htmllabel_; }
        /// 
        std::string const & htmllabelattr() const { return htmllabelattr_; }
+       ///
+       bool htmllabelfirst() const { return htmllabelfirst_; }
        /// 
        docstring const & htmlstyle() const { return htmlstyle_; }
        /// 
        docstring const & htmlpreamble() const { return htmlpreamble_; }
        ///
-       docstring const & labelstring_appendix() const {
-               return labelstring_appendix_;
-       }
-       ///
        bool isParagraph() const { return latextype == LATEX_PARAGRAPH; }
        ///
        bool isCommand() const { return latextype == LATEX_COMMAND; }
@@ -283,29 +282,37 @@ private:
        std::string latexparam_;
        /// Internal tag to use (e.g., <title></title> for sect header)
        std::string innertag_;
-       /// Internal tag to use e.g. to surround varlistentry label)
+       /// Internal tag to use (e.g. to surround varentrylist label)
        std::string labeltag_;
-       /// Internal tag to surround the item text in a list)
+       /// Internal tag to surround the item text in a list.
        std::string itemtag_;
-       /// Tag for HTML output, e.g., h2.
+       /// Tag for HTML output, e.g., h2. Defaults to "div".
        std::string htmltag_;
-       /// Additional attributes for inclusion with the start tag
-       /// e.g.: class='section'.
+       /// Additional attributes for inclusion with the start tag. Defaults
+       /// to: class="layoutname".
        std::string htmlattr_;
        /// Tag for individual paragraphs in an environment. In lists, this
        /// would be something like "li". But it also needs to be set for
        /// quotation, e.g., since the paragraphs in a quote need to be 
-       /// in "p" tags.
+       /// in "p" tags. Default is "div".
        std::string htmlitem_;
-       /// Attributes for htmlitem_
+       /// Attributes for htmlitem_. Default is: class="layoutnameitem".
        std::string htmlitemattr_;
        /// Tag for labels, of whatever sort. One use for this is in setting
        /// descriptions, in which case it would be: dt. Another use is to
        /// customize the display of, say, the auto-generated label for 
-       /// sections (in that case, it might be: span).
+       /// sections. Defaults to "span".
+       /// If set to "NONE", this suppresses the printing of the label.
        std::string htmllabel_;
-       /// Attributes for the label.
+       /// Attributes for the label. Defaults to: class="layoutnamelabel".
        std::string htmllabelattr_;
+       /// Whether to put the label before the item, or within the item.
+       /// I.e., do we have (true):
+       ///    <label>...</label><item>...</item>
+       /// or instead (false):
+       ///    <item><label>...</label>...</item>
+       /// The latter is the default.
+       bool htmllabelfirst_;
        /// CSS information needed by this layout.
        docstring htmlstyle_;
        /// Any other info for the HTML header.