Skip to main content

find_main_tex

Function find_main_tex 

Source
pub fn find_main_tex(dir: &Path, confined: bool) -> Result<PathBuf, String>
Expand description

Discover the main .tex file inside dir, mirroring the binary’s --whatsin=directory heuristic. The returned path is rooted at dir. Errors carry a human-readable diagnostic on Fatal: failure modes (PDF mis-named as TeX, only %auto-ignore files, no TeX at all). confined is whether the conversion will read confined (OXIDIZED_DESIGN_DIVERGENCES #1183: an archive input, --paranoid-input, the cortex worker): then only a file that opens inside dir is a candidate or a .bbl, and a link leading out of it counts for nothing; unconfined, a link is followed, as Perl’s detection does.