commit 4c8ba81dec222a85813ddc302defd31bf80fac4a
Author: Juergen Spitzmueller <[email protected]>
Date: Sat Sep 5 15:09:45 2026 +0200
Handle biblatex error on wrong bbl file (#13360)
(cherry picked from commit 723093895f8cf874e2be7b5bc6839af2c6f3f902)
---
src/LaTeX.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index 68c85598b9..dec5bbc360 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -406,6 +406,13 @@ int LaTeX::run(TeXErrors & terr)
int exit_code = startscript();
if (exit_code == Systemcall::KILLED || exit_code ==
Systemcall::TIMEOUT)
return exit_code;
+ if (scanres & ERROR_RERUN) {
+ // If we have a ERROR_RERUN clear the errors
+ // and reset exit_code in case it resolves on rerun.
+ // This might happen after a faulty blg file that
+ // has been corrected after the biber run (#13360).
+ terr.clearErrors();
+ }
scanres = scanLogFile(terr);
// update the depedencies
@@ -1036,6 +1043,7 @@ int LaTeX::scanLogFile(TeXErrors & terr)
static regex const undef_ref(".*Reference `(.+)\\' on page.*");
static regex const
minted_data("\\\\openout[0-9]+.*=.*`(.+)(..).*data\\.minted'\\.");
static regex const minted_highlight("\\(\\./.*highlight\\.minted");
+ static regex const biblatex_bbl_error("Package biblatex Error: File
'.*\\.bbl' not created by biblatex\\.");
// Flag for 'File ended while scanning' message.
// We need to wait for subsequent processing.
string wait_for_error;
@@ -1325,6 +1333,11 @@ int LaTeX::scanLogFile(TeXErrors & terr)
|| contains(desc,
"Package babel Error: Unknown
language"))
retval |= ERROR_RERUN;
+ if (regex_match(desc, sub, biblatex_bbl_error))
+ // A bbl file npt produced with biblatex
+ // has been found by biblatex (see
#13360)
+ // Simple rerun will generate the
correct one.
+ retval |= ERROR_RERUN;
// get the line number:
int line = 0;
sscanf(tmp.c_str(), "l.%d", &line);
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs