diff --git a/main.cpp b/main.cpp index 8b2e6d3..8c149cd 100644 --- a/main.cpp +++ b/main.cpp @@ -333,6 +333,7 @@ InputExtractor::List InputExtractor::operator()(const Substring &input){ CommandList IncludeCommands; IncludeCommands["input"] = [](List &l, std::string a) { + if (a.empty()) return; if (Extension(a) != ".tex") a += ".tex"; l.push_back(a); // try to extract all inputs of that file @@ -440,7 +441,7 @@ int main(int argc, char ** args) { if (!output) { std::cout << "could not create output file" << std::endl; } else { - output << "filename: "; + output << filename << ": "; for (auto it = list.begin(); it != list.end(); it++) { output << '\t'; @@ -454,7 +455,7 @@ int main(int argc, char ** args) { } else { output << *it; } - output << "\\\\\n"; + output << "\t\\\n"; } output << endl; }