Skip to content

Commit d3ff805

Browse files
committed
Support amsrefs
This commit changes the condition that decides whether bibtex is run to finding `\bibdata` in the aux file (was `\citation` and `\bibcite`). Since bibtex exits with an error if it does not find `\bibdata` anyway, this avoids running bibtex unecessarily when for instance amsrefs is used to process the bibliography.
1 parent 94237b2 commit d3ff805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli_driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ impl ProcessingSession {
548548

549549
let use_bibtex = {
550550
if let Some(auxdata) = self.io.mem.files.borrow().get(self.aux_path.as_os_str()) {
551-
let cite_aut = AcAutomaton::new(vec!["\\citation", "\\bibcite"]);
552-
cite_aut.find(auxdata).count() > 0
551+
let cite_aut = AcAutomaton::new(vec!["\\bibdata"]);
552+
cite_aut.find(auxdata).next().is_some()
553553
} else {
554554
false
555555
}

0 commit comments

Comments
 (0)