With the 2020 fall update, the behaviour of \input{}
changed. Before, I would have a main latex document (main.tex
) and then the table contents in another file (table.tex
) . Importantly, the file table.tex
could be anywhere on my PC, because I could add directories that the \input
command went through. So my set-up looked like this:
The main.tex document:
\documentclass[11pt, a4paper]{article}
\makeatletter
\providecommand*{\input@path}{}
\g@addto@macro\input@path{{"C:/Users/me/inpath/"}}% \input finds files in this directory
\makeatother
\begin{document}
\begin{tabular}{lll}
\hline
\input{table.tex}
\hline
\end{tabular}
\end{document}
Then the file table.tex that would be placed in the directory "C:/Users/me/inpath/":
1 & 2 \\
3 & 4 \\
Unfortunately, this set-up no longer works. My question is: What is the best way to replicate this behaviour? For now, my solution would be to change the main.tex
to:
\documentclass[11pt, a4paper]{article}
\newcommand{\inpath}{"C:/Users/me/inpath/"}
\makeatletter\let\expandableinput\@@input\makeatother
\begin{document}
\begin{tabular}{lll}
\hline
\expandableinput{\inpath table.tex}
\hline
\end{tabular}
%%% Or alternatively
\begin{tabular}{lll}
\hline
\input \inpath table.tex
\hline
\end{tabular}
\end{document}
Is there a more elegant way to achieve this? A solution similar to how things worked before the latex fall update? In which I can tell the TeX primitive \@@input
where to look for files? What I have found so far is the information here and here.