I've set up a custom environment with DefineVerbatimEnvironment. Within that environment I'd like to \input{} files, which works all fine and well until one of them includes a hyphen. Here's an example that demonstrates the problem:
\documentclass{article}
\usepackage{fancyvrb}
\DefineVerbatimEnvironment{terminal}{Verbatim}{commandchars=\\\{\}}
\begin{document}
\begin{terminal}
\input{some-file}
\end{terminal}
\end{document}
If I try to \input{file} the contents of the file show up in the verbatim environment just as I'd expect. But if I try and \input{some-file} I get the following error:
! LaTeX Error: File `more\unhbox \voidb@x \kern \z@ \char `\discretionary {-}{}{}input.tex' not found.
Obviously, my hyphen is being translated into \unhbox ... {-}{}{} - how can I stop this happening?
{}). – Claudio Fiandrino Jan 24 '13 at 16:43\VerbatimInput{some-file}– egreg Jan 24 '13 at 16:45I am just replacing \input{xxx} in my example with \VerbatimInput{xxx} - is this what you mean?
– John Graham Jan 24 '13 at 17:02terminalenvironment at all. – egreg Jan 24 '13 at 19:26