mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-24 13:48:59 +00:00
Fix bug 2616
* src/LaTeX.C (LaTeX::deplog): Add the toc file to the dependencies if a line \tf@toc=\write# is present in the log file, since miktex does not write the line \openout# = `sample.toc'. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14496 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a4f2b40db
commit
a9983dfac2
22
src/LaTeX.C
22
src/LaTeX.C
@ -756,10 +756,17 @@ void LaTeX::deplog(DepTable & head)
|
|||||||
static regex reg3("No file ([^ ]+)\\..*");
|
static regex reg3("No file ([^ ]+)\\..*");
|
||||||
static regex reg4("\\\\openout[0-9]+.*=.*`([^ ]+)'\\..*");
|
static regex reg4("\\\\openout[0-9]+.*=.*`([^ ]+)'\\..*");
|
||||||
// If an index should be created, MikTex does not write a line like
|
// If an index should be created, MikTex does not write a line like
|
||||||
// \openout# = 'sample,idx'.
|
// \openout# = 'sample.idx'.
|
||||||
// but intstead only a line like this into the log:
|
// but instead only a line like this into the log:
|
||||||
// Writing index file sample.idx
|
// Writing index file sample.idx
|
||||||
static regex reg5("Writing index file ([^ ]+).*");
|
static regex reg5("Writing index file ([^ ]+).*");
|
||||||
|
// If a toc should be created, MikTex does not write a line like
|
||||||
|
// \openout# = `sample.toc'.
|
||||||
|
// but only a line like this into the log:
|
||||||
|
// \tf@toc=\write#
|
||||||
|
// This line is also written by tetex.
|
||||||
|
// This line is not present if no toc should be created.
|
||||||
|
static regex miktexTocReg("\\\\tf@toc=\\\\write.*");
|
||||||
|
|
||||||
ifstream ifs(logfile.c_str());
|
ifstream ifs(logfile.c_str());
|
||||||
while (ifs) {
|
while (ifs) {
|
||||||
@ -793,15 +800,16 @@ void LaTeX::deplog(DepTable & head)
|
|||||||
first = what[0].second;
|
first = what[0].second;
|
||||||
handleFoundFile(what.str(1), head);
|
handleFoundFile(what.str(1), head);
|
||||||
}
|
}
|
||||||
} else if (regex_match(token, sub, reg2)) {
|
} else if (regex_match(token, sub, reg2))
|
||||||
handleFoundFile(sub.str(1), head);
|
handleFoundFile(sub.str(1), head);
|
||||||
} else if (regex_match(token, sub, reg3)) {
|
else if (regex_match(token, sub, reg3))
|
||||||
handleFoundFile(sub.str(1), head);
|
handleFoundFile(sub.str(1), head);
|
||||||
} else if (regex_match(token, sub, reg4)) {
|
else if (regex_match(token, sub, reg4))
|
||||||
handleFoundFile(sub.str(1), head);
|
handleFoundFile(sub.str(1), head);
|
||||||
} else if (regex_match(token, sub, reg5)) {
|
else if (regex_match(token, sub, reg5))
|
||||||
handleFoundFile(sub.str(1), head);
|
handleFoundFile(sub.str(1), head);
|
||||||
}
|
else if (regex_match(token, sub, miktexTocReg))
|
||||||
|
handleFoundFile(changeExtension(file, ".toc"), head);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that the main .tex file is in the dependancy file.
|
// Make sure that the main .tex file is in the dependancy file.
|
||||||
|
Loading…
Reference in New Issue
Block a user