Skip to content

"could not open format file latex" / "Access is denied" (os error 5) when a directory named LaTeX exists relative to input file on Windows #1344

@alexpacini

Description

@alexpacini

Summary

On Windows (case-insensitive NTFS), tectonic fails with "could not open format file latex" / "Access is denied. (os error 5)" if a directory named LaTeX/ (or latex/, LATEX/, etc.) exists relative to the input .tex file's location.

  • What are those format files?

Environment

  • OS: Windows 11 (NTFS, case-insensitive)
  • Tectonic: 0.15.0
  • Bundle: tlextras-2022.0r0.tar (default v33)

Steps to reproduce

mkdir C:\test-tectonic\LaTeX
Set-Content C:\test-tectonic\test.tex "\documentclass{article}`n\begin{document}`nHello`n\end{document}"
tectonic C:\test-tectonic\test.tex

Expected behaviour

Tectonic should compile test.tex successfully. The LaTeX/ directory is irrelevant: it is not a format file.

Actual behaviour

error: could not open format file latex
caused by: Access is denied. (os error 5)

Workarounds

  1. Move the .tex file to a directory without a LaTeX/ sibling.
  2. Use latexmk, pdflatex, luatex, xetex...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions