mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
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:
parent
4675141344
commit
c03c537a8a
@ -406,9 +406,13 @@ bool LaTeXFeatures::mustProvide(string const & name) const
|
||||
|
||||
bool LaTeXFeatures::isAvailable(string const & name)
|
||||
{
|
||||
string n = name;
|
||||
if (packages_.empty())
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user