]> git.lyx.org Git - features.git/commitdiff
Show symbol name and description in plaintext export of nomenclature entries.
authorTommaso Cucinotta <tommaso@lyx.org>
Sat, 29 Oct 2016 10:32:51 +0000 (12:32 +0200)
committerTommaso Cucinotta <tommaso@lyx.org>
Mon, 31 Oct 2016 09:50:33 +0000 (10:50 +0100)
This addresses one of the issues highlighted in #10459.
See http://www.lyx.org/trac/ticket/10459

src/insets/InsetNomencl.cpp
src/insets/InsetNomencl.h

index 2595b14a6992b35f04797aae1888718bbc58b53d..76bd7b3a0aa8d56da215ddc628cc16c88f23a59d 100644 (file)
@@ -93,6 +93,14 @@ docstring InsetNomencl::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/)
 }
 
 
+int InsetNomencl::plaintext(odocstringstream & os,
+        OutputParams const &, size_t) const
+{
+       docstring s = "[" + getParam("symbol") + ": " + getParam("description") + "]";
+       os << s;
+       return s.size();
+}
+
 
 int InsetNomencl::docbook(odocstream & os, OutputParams const &) const
 {
index 14507b66ce3cd163b7c0b8b9110e70531d2bba93..5e161a6ca5bfe9d117a561c4c24cdeae6d1a98b9 100644 (file)
@@ -45,6 +45,9 @@ public:
        ///
        InsetCode lyxCode() const { return NOMENCL_CODE; }
        ///
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const;
+       ///
        int docbook(odocstream &, OutputParams const &) const;
        /// Does nothing at the moment.
        docstring xhtml(XHTMLStream &, OutputParams const &) const;