LaTeX contains an internal macro \filename@parse
that decomposes a filename into path and basename. Applying it to a filename that contains unicode characters, in conjunction with pdflatex
, does not work, however.
$ pdflatex test
...
> \filename@base=macro:
->\LGR\textalpha \LGR\texttau \LGR\textalpha .
l.6 \show\filename@base
where test.tex
contains
\documentclass{article}
\usepackage[greek]{babel}
\begin{document}
\makeatletter
\filename@parse{ατα.tex}
\show\filename@base
\makeatother
\end{document}
\LGR\textalpha \LGR\texttau \LGR\textalpha
apparently is not a proper filename.
Using xelatex
or lualatex
instead of pdflatex
works, but requires to set up a Greek font separately. On the other hand, \input{ατα.tex}
works also under pdflatex
.
Is there an equivalent of \filename@parse
that does not expand the Unicode characters? (Apparently babel
defines them as macros.)