From f7aabdd9fad7c67c0b6a691d401310ba8051417f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Fri, 16 Jun 2017 10:05:12 +0200 Subject: [PATCH] Catch "! Incomplete \\if[x]" error Fixes: #10666 --- src/LaTeX.cpp | 6 ++++++ status.22x | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp index 06add5bb6a..739a9926dd 100644 --- a/src/LaTeX.cpp +++ b/src/LaTeX.cpp @@ -778,6 +778,12 @@ int LaTeX::scanLogFile(TeXErrors & terr) } } + if (prefixIs(token, "! Incomplete \\if")) { + // bug 10666. At this point its not clear we finish with error. + wait_for_error = desc; + continue; + } + if (prefixIs(token, "! Paragraph ended before \\Hy@setref@link was complete.")){ // bug 7344. We must rerun LaTeX if hyperref has been toggled. retval |= ERROR_RERUN; diff --git a/status.22x b/status.22x index abda25426b..4a56ac4565 100644 --- a/status.22x +++ b/status.22x @@ -47,6 +47,9 @@ What's new - Assure properly nested \begin{lang} and \end{lang} tags even when no language package is selected (bug 10685). +- Catch "! Incomplete \if[x]" LaTeX error (bug 10666). + + * LYX2LYX -- 2.39.5