I'm working in Overleaf, and using the syntax package for Backus-Naur notation, as suggested here. However, it seems to interfere with using the \input command on files with underscores in their names. Here is a minimal working example, where my_file.tex is in the same directory as main.tex.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{syntax}
\begin{document}
\input{my_file}
\end{document}
This gives Latex Error: file my@uscore.file not found. The error goes away if I either comment out \usepackge{syntax} or remove the underscore in the file name. I'd rather not have to remove all underscores from file names, because I have a whole naming convention that I always use, across multiple projects. Is there any other way to make this work?
syntaxpackage changes_to make it active. Additionally,syntaxhas not been updated since 1996 so might not work well with modern latex. – daleif Feb 21 '22 at 12:04\input{my\string_file}but the package should not be doing that – David Carlisle Feb 21 '22 at 12:22\usepackage[nounderscore]{syntax}, if you really want to use the package. – egreg Feb 21 '22 at 13:39