}
-vector<string> const & possible_cite_commands()
+vector<string> const & possibleCiteCommands()
{
static vector<string> const possible = init_possible_cite_commands();
return possible;
}
-//FIXME See the header for the issue.
-string const default_cite_command(biblio::CiteEngine engine)
+// FIXME See the header for the issue.
+string defaultCiteCommand(biblio::CiteEngine engine)
{
string str;
switch (engine) {
}
-string const
- asValidLatexCommand(string const & input, biblio::CiteEngine const engine)
+string asValidLatexCommand(string const & input, biblio::CiteEngine const engine)
{
- string const default_str = default_cite_command(engine);
+ string const default_str = defaultCiteCommand(engine);
if (!InsetCitation::isCompatibleCommand(input))
return default_str;
}
-docstring getComplexLabel(Buffer const & buffer,
+docstring complexLabel(Buffer const & buffer,
string const & citeType, docstring const & keyList,
docstring const & before, docstring const & after,
biblio::CiteEngine engine)
}
-docstring const getBasicLabel(docstring const & keyList, docstring const & after)
+docstring basicLabel(docstring const & keyList, docstring const & after)
{
docstring keys = keyList;
docstring label;
keys = ltrim(split(keys, key, ','));
label += ", " + key;
}
- } else
+ } else {
label = keys;
+ }
if (!after.empty())
label += ", " + after;
bool InsetCitation::isCompatibleCommand(string const & cmd)
{
- vector<string> const & possibles = possible_cite_commands();
+ vector<string> const & possibles = possibleCiteCommands();
vector<string>::const_iterator const end = possibles.end();
return find(possibles.begin(), end, cmd) != end;
}
docstring const after = getParam("after");
docstring label;
- biblio::CiteEngine const engine = buffer().params().getEngine();
- label = getComplexLabel(buffer(), getCmdName(), getParam("key"),
+ biblio::CiteEngine const engine = buffer().params().citeEngine();
+ label = complexLabel(buffer(), getCmdName(), getParam("key"),
before, after, engine);
// Fallback to fail-safe
if (label.empty())
- label = getBasicLabel(getParam("key"), after);
+ label = basicLabel(getParam("key"), after);
return label;
}
void InsetCitation::updateLabels(ParIterator const &)
{
- biblio::CiteEngine const engine = buffer().params().getEngine();
+ biblio::CiteEngine const engine = buffer().params().citeEngine();
if (cache.params == params() && cache.engine == engine)
return;
// should revert to \cite[]{}
int InsetCitation::latex(odocstream & os, OutputParams const &) const
{
- biblio::CiteEngine cite_engine = buffer().params().getEngine();
+ biblio::CiteEngine cite_engine = buffer().params().citeEngine();
// FIXME UNICODE
docstring const cite_str = from_utf8(
asValidLatexCommand(getCmdName(), cite_engine));
void InsetCitation::validate(LaTeXFeatures & features) const
{
- switch (features.bufferParams().getEngine()) {
+ switch (features.bufferParams().citeEngine()) {
case biblio::ENGINE_BASIC:
break;
case biblio::ENGINE_NATBIB_AUTHORYEAR: