- if (!listings_params.empty() || features.isRequired("listings"))
- os << "\\usepackage{listings}\n";
-
- if (!listings_params.empty()) {
- os << "\\lstset{";
- // do not test validity because listings_params is
- // supposed to be valid
- string par =
- InsetListingsParams(listings_params).separatedParams(true);
- // we can't support all packages, but we should load the color package
- if (par.find("\\color", 0) != string::npos)
- features.require("color");
- os << from_utf8(par)
- << "}\n";
- }