#include "lyxtextclass.h"
#include "lyxlex.h"
#include "support/filetools.h"
+#include "support/lstrings.h"
#include <algorithm>
#include <iostream>
#include <vector>
#include <map>
+
+namespace lyx {
+
using std::istringstream;
using std::ostream;
using std::ostringstream;
using std::cerr;
using std::endl;
-using lyx::support::libFileSearch;
+using support::FileName;
+using support::libFileSearch;
// special columntypes
extern std::map<char, int> special_columns;
p.skip_spaces();
// Force textclass if the user wanted it
- if (!forceclass.empty()) {
+ if (!forceclass.empty())
h_textclass = forceclass;
- }
- string layoutfilename = libFileSearch("layouts", h_textclass, "layout");
+ if (noweb_mode && !lyx::support::prefixIs(h_textclass, "literate-"))
+ h_textclass.insert(0, "literate-");
+ FileName layoutfilename = libFileSearch("layouts", h_textclass, "layout");
if (layoutfilename.empty()) {
cerr << "Error: Could not find layout file for textclass \"" << h_textclass << "\"." << endl;
exit(1);
}
// }])
+
+
+} // namespace lyx