#include "OutputParams.h"
#include "output_xhtml.h"
#include "sgml.h"
+#include "texstream.h"
#include "TocBackend.h"
#include "frontends/FontMetrics.h"
docstring InsetNomencl::screenLabel() const
{
size_t const maxLabelChars = 25;
-
docstring label = _("Nom: ") + getParam("symbol");
- if (label.size() > maxLabelChars) {
- label.erase(maxLabelChars - 3);
- label += "...";
- }
+ support::truncateWithEllipsis(label, maxLabelChars);
return label;
}
}
+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
{
struct NomenclEntry {
- NomenclEntry() {}
+ NomenclEntry() : par(0) {}
NomenclEntry(docstring s, docstring d, Paragraph const * p)
: symbol(s), desc(d), par(p)
{}