Skip to content

Commit

Permalink
latexmk: use out2dir if available
Browse files Browse the repository at this point in the history
Supported since latexmk v4.85. From the man page:

 -out2dir=FOO

   (Experimental new feature.)
   Sets the directory for the final output files of a whole round of compilations.
  • Loading branch information
luavreis committed Apr 18, 2024
1 parent 80d4334 commit 7bd2b11
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crates/parser/src/latexmkrc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,15 @@ fn extract_dirs(lines: Lines) -> Option<(String, String)> {
.split(",");

let aux_dir = it.next()?.trim().strip_prefix('\'')?.strip_suffix('\'')?;

it.next(); // Skip the old 'outdir' option.

let out_dir = it.next()?.trim().strip_prefix('\'')?.strip_suffix('\'')?;

// Ensure there's no more data
if it.next().is_some() {
return None;
}

Some((String::from(aux_dir), String::from(out_dir)))
}

0 comments on commit 7bd2b11

Please sign in to comment.