I'm trying to condition on the current directory using the "currfile-abspath" package from currfile by means of ifthen. The command
\getpwd
does recover the pwd, but for some reason I can't condition on the value of \thepwd
using ifthen. The problem seems to be with the ifthen command, since I *can* condition on the value of \currfilepath so long as I use the provided \ifcurrfilepath, but *not* if I use an ifthen statement. Here's an example.
\documentclass{amsart} \usepackage{currfile} \usepackage{currfile-abspath} \usepackage{ifthen} \begin{document} \getpwd The current file name is \currfilepath Pwd is set to \thepwd \ifcurrfilepath{testCurrfile.tex} {The current filename is \currfilepath} {Apparently the current filename is not \currfilepath} \ifthenelse{\equal{\currfilepath}{testCurrfile.tex}} {The current filename is \currfilepath} {Apparently the current filename is not \currfilepath} \ifthenelse{\equal{\thepwd}{/tmp}} {The current directory is \thepwd} {Apparently the current directory is not \thepwd} \end{document}
If I run this from, say, /tmp, (I'm using Linux) then \thepwd correctly returns /tmp/ but the ifthen conditional fails. Also the \ifcurrfilepath returns true, but the \equal{\currfilepath}{testCurrfile.tex} returns false.
Any advice would be most appreciated, Thanks