X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBiblioInfo.cpp;h=3298990a00d4e8a7486efa6c1f8eba3f2d094d69;hb=4db3e641ed6765e005343010cb90ee8af26f8f99;hp=bb971628e5f1334d1bd7ccd36b6c7d16f690a49a;hpb=62d1e762c7c769eb4378f6f3e2cf63a0497024e2;p=lyx.git diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index bb971628e5..3298990a00 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -370,9 +370,10 @@ string parseEmbeddedOption(string const & format, string & ifelsepart) LYXERR0("ERROR! Couldn't parse `" << format <<"'."); return format; } - LASSERT(rest.size() <= format.size(), /* */); + LASSERT(rest.size() <= format.size(), + { ifelsepart = ""; return format; }); ifelsepart = format.substr(0, format.size() - rest.size()); - return rest; + return rest; } @@ -664,7 +665,7 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf, key = oldkey.substr(6); cleanit = true; } - + docstring ret = operator[](key); if (ret.empty() && xref) ret = (*xref)[key]; @@ -679,6 +680,10 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf, ret = bib_key_; else if (key == "label") ret = label_; + else if (key == "modifier" && modifier_ != 0) + ret = modifier_; + else if (key == "numericallabel") + ret = cite_number_; else if (key == "abbrvauthor") // Special key to provide abbreviated author names. ret = getAbbreviatedAuthor(buf, false); @@ -713,7 +718,7 @@ docstring BibTeXInfo::getValueForKey(string const & oldkey, Buffer const & buf, } if (cleanit) return html::cleanAttr(ret); - + return ret; } @@ -980,7 +985,7 @@ void BiblioInfo::makeCitationLabels(Buffer const & buf) { collectCitedEntries(buf); CiteEngineType const engine_type = buf.params().citeEngineType(); - bool const numbers = (engine_type == ENGINE_TYPE_NUMERICAL); + bool const numbers = (engine_type & ENGINE_TYPE_NUMERICAL); int keynumber = 0; char modifier = 0;