Minor modification: do not worry about .sty extension.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22386 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-01-05 16:51:06 +00:00
parent 4675141344
commit c03c537a8a

View File

@ -406,9 +406,13 @@ bool LaTeXFeatures::mustProvide(string const & name) const
bool LaTeXFeatures::isAvailable(string const & name) bool LaTeXFeatures::isAvailable(string const & name)
{ {
string n = name;
if (packages_.empty()) if (packages_.empty())
getAvailable(); getAvailable();
return find(packages_.begin(), packages_.end(), name) != packages_.end(); size_t loc = n.rfind(".sty");
if (loc == n.length() - 4)
n = n.erase(name.length() - 4);
return find(packages_.begin(), packages_.end(), n) != packages_.end();
} }