I am trying to achieve the same goal as this thread: How can my LaTeX files detect if they're being compiled on Overleaf?.
However, the \homepath kept throwing the error as follows:
Undefined control sequence.
C:\Users\USER
How can I resolve this issue on Windows? I believe some modifications need to be made in the following code block but have no ideas what to do...
\makeatletter
\begingroup\endlinechar=-1\relax
\everyeof{\noexpand}%
\edef\x{\endgroup\def\noexpand\homepath{%
\@@input|"kpsewhich --var-value=HOME" }}\x
\makeatother
\jobnameinstead. – codecepts Jul 12 '22 at 12:06