#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;
ss << '{' << p.verbatim_item() << '}';
ss << '{' << p.verbatim_item() << '}';
if (name != "lyxcode" && name != "lyxlist" &&
- name != "lyxrightadress" && name != "lyxaddress")
+ name != "lyxrightadress" &&
+ name != "lyxaddress" && name != "lyxgreyedout")
h_preamble << ss.str();
}
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