-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I have written this small module to make attaching files to a pdf
easier. It works nice, unless I have e.g. a _ in the file name, as
then the text in the inset is "escaped", i.e. newfile_1.lyx becomes
newfile\_.lyx, which is obviously not found. Is there a way of
treating the test in the inset "as is" and not "escape" it?

For illustration, I attach the module and two lyx files - newfile1.lyx
works, newfile_1.lyx does not.

Thanks,

Rainer

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      [email protected]

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8Fr/cACgkQoYgNqgF2egpyrwCeMbs4HQPPwM3X/WRTpvorSmI/
6S8AnAieoxm1mtRCg93lyaTPg0j75rf5
=8RYB
-----END PGP SIGNATURE-----
#\DeclareLyXModule{Attach}
#DescriptionBegin
#Attaches a file into the pdf file
#DescriptionEnd
# Author: Rainer M Krug <[email protected]>

Format 11

InsetLayout attachFile
        LyXType               custom
        LabelString           attach
        LatexType             command
        LatexName             myOwnAttachFile
        Decoration            classic
        LabelFont
          Color               green
          Size                smalll
        EndFont
        OptionalArgs          1
        MultiPar              false
        Preamble
            \RequirePackage{attachfile2}
            \newcommand{\myOwnAttachFile}[1]{\attachfile{#1}}
        EndPreamble
End

Attachment: newfile1.lyx
Description: application/lyx

Attachment: newfile_1.lyx
Description: application/lyx

Attachment: attach.module.sig
Description: Binary data

Attachment: newfile1.lyx.sig
Description: Binary data

Attachment: newfile_1.lyx.sig
Description: Binary data

Reply via email to