if (key.empty())
return _("No citations selected!");
+ CiteItem ci;
+ ci.richtext = true;
vector<docstring> keys = getVectorFromString(key);
if (keys.size() == 1)
- return bi.getInfo(keys[0], buffer(), true);
+ return bi.getInfo(keys[0], buffer(), ci);
docstring tip;
tip += "<ol>";
for (docstring const & key : keys) {
- docstring const key_info = bi.getInfo(key, buffer(), true);
+ docstring const key_info = bi.getInfo(key, buffer(), ci);
if (key_info.empty())
continue;
tip += "<li>" + key_info + "</li>";
namespace {
-
CitationStyle asValidLatexCommand(BufferParams const & bp, string const & input,
vector<CitationStyle> const & valid_styles)
{
if (key.empty())
return _("No citations selected!");
- // We don't currently use the full or forceUCase fields.
string cite_type = getCmdName();
- if (isUpperCase(cite_type[0]))
- // If we were going to use them, this would mean ForceUCase
+ bool const uppercase = isUpperCase(cite_type[0]);
+ if (uppercase)
cite_type[0] = lowercase(cite_type[0]);
- if (cite_type[cite_type.size() - 1] == '*')
- // and this would mean FULL
+ bool const starred = (cite_type[cite_type.size() - 1] == '*');
+ if (starred)
cite_type = cite_type.substr(0, cite_type.size() - 1);
// handle alias
if (!alias.empty())
cite_type = alias;
- docstring const & before = getParam("before");
- docstring const & after = getParam("after");
-
// FIXME: allow to add cite macros
/*
buffer().params().documentClass().addCiteMacro("!textbefore", to_utf8(before));
*/
docstring label;
vector<docstring> keys = getVectorFromString(key);
- label = biblist.getLabel(keys, buffer(), cite_type, for_xhtml, UINT_MAX, before, after);
+ CiteItem ci;
+ ci.textBefore = getParam("before");
+ ci.textAfter = getParam("after");
+ ci.forceUpperCase = uppercase;
+ ci.Starred = starred;
+ ci.max_size = UINT_MAX;
+ if (for_xhtml) {
+ ci.max_key_size = UINT_MAX;
+ ci.context = CiteItem::Export;
+ }
+ ci.richtext = for_xhtml;
+ label = biblist.getLabel(keys, buffer(), cite_type, ci);
return label;
}