I'm using the attachfile LaTeX package (in PDFLaTeX) to embed files in a PDF and I've run into a difficulty regarding what I suspect is the 'filename' of the embedded file.
I can attach/embed files in the following manner:
\textattachfile[author=Zapp Brannigan, color=0 0 0]{my_directory/my_file.dat}{\detokenize{my_file.dat}}
The file seems to be embedded successfully in the resulting PDF and is accessible, but the file name suggested by the Evince PDF viewer when selecting to "Save Attachment As..." on the link for the attached file is the following:
my_directory/my_file.dat
So, you can see that it is including the path of the original file in this 'filename'. Obviously, there are difficulties when one tries to save the attached file under this suggested filename.
How might I go about changing this suggested filename to something such as my_file.dat? I've experimented and I've consulted documentation on the attachfile package and have not been able to come up with an answer.
Just as a quick note: I am disinclined to use a package other than attachfile because, in reality, my code is more complicated than that shown; I'm including custom icons for various file types, as permitted by the attachfile package. However, I'll keep an open mind.
Thank you very much for any thoughts you may have on the matter.
my_file.dat
one directory level upwards, i.e.\textattachfile[author=Zapp Brannigan, color=0 0 0]{my_file.dat}{\detokenize{my_file.dat}}
, should solve the problem (if you are in a hurry), but of course this is no real solution. The attachfile2 package "is a further development of Scott Pakin’s package attachfile for pdfTEX. Apart from bug fixes, package attachfile2 adds support for dvips, some new options, gets and writes meta information data about the attached files."my_file.dat
without any reference tomy_directory
.