#include "LaTeXFeatures.h"
#include "output_xhtml.h"
#include "ParIterator.h"
+#include "texstream.h"
#include "TocBackend.h"
#include "support/debug.h"
return _("No citations selected!");
vector<docstring> keys = getVectorFromString(key);
- vector<docstring>::const_iterator it = keys.begin();
- vector<docstring>::const_iterator en = keys.end();
+ if (keys.size() == 1)
+ return bi.getInfo(keys[0], buffer(), true);
+
docstring tip;
- for (; it != en; ++it) {
- docstring const key_info = bi.getInfo(*it, buffer());
+ tip += "<ol>";
+ for (docstring const & key : keys) {
+ docstring const key_info = bi.getInfo(key, buffer(), true);
if (key_info.empty())
continue;
- if (!tip.empty())
- tip += "\n";
- tip += wrap(key_info, -4);
+ tip += "<li>" + key_info + "</li>";
}
+ tip += "</ol>";
return tip;
}
{
if (!cache.recalculate && buffer().citeLabelsValid())
return;
-
// The label may have changed, so we have to re-create it.
docstring const glabel = generateLabel();
-
- unsigned int const maxLabelChars = 45;
-
- docstring label = glabel;
- if (label.size() > maxLabelChars) {
- label.erase(maxLabelChars - 3);
- label += "...";
- }
-
cache.recalculate = false;
cache.generated_label = glabel;
- cache.screen_label = label;
+ unsigned int const maxLabelChars = 45;
+ cache.screen_label = glabel.substr(0, maxLabelChars + 1);
+ support::truncateWithEllipsis(cache.screen_label, maxLabelChars);
}
}
-void InsetCitation::forOutliner(docstring & os, size_t) const
+void InsetCitation::forOutliner(docstring & os, size_t const, bool const) const
{
os += screenLabel();
}