The following code is the content of my main.tex.
The file a.tex is in the subdirectory tmp under the directory where main.tex is, that is to say: ./main.tex and ./tmp/a.tex.
The problem of my code is: \IfFileExists find the file ./tmp/a.tex. As there is no file ./a.tex, I think the typeset should be NO FILE. But the actual typeset is a.tex.
Is it a problem of my version of LaTex, MikTex, xelatex, auctex or any others?
PS: the subdirctory tmp is used to store those tmpt and aux files during compilation.
Code:
\documentclass{article}
\begin{document}
\makeatletter
\IfFileExists{a.tex}
{\filename@parse{a.tex}\filename@area\filename@base.\filename@ext}
{NO FILE}
\makeatother
\end{document}
./a.tex, but./tmp/a.tex.\input{a.tex}causes./tmp/a.texloaded. – lyl Jul 14 '22 at 07:37tmpinto the search path? – lyl Jul 14 '22 at 07:41./– user202729 Jul 14 '22 at 07:47currfilepackage – user202729 Jul 14 '22 at 07:55TEXINPUTSprovides: here, we'd geta.texas it's on the search path – Joseph Wright Jul 14 '22 at 08:18the absolute pathI mean is like/...../....../a.tex(from root path) – lyl Jul 14 '22 at 08:31full_nameseem not output the absolute path(I mean from root path). – lyl Jul 14 '22 at 08:38