[NTG-context] xetex and attachment: troubles

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed Apr 2 23:29:38 CEST 2008

On Mon, Mar 31, 2008 at 5:28 PM, Andrea Valle wrote:
> Dear all,
> I'm using xetex with fun (as suggested and discussed on the mailing list).
> I'm revising a previously created document which used attachment command.
> (the one documented here:
> http://wiki.contextgarden.net/Verbatim_text#A_different_approach_to_formatting_and_code_colorization
> )
> The actual version is here:
> http://www.cirma.unito.it/andrea/sw/sc/prd_tSCIRMA_scr.pdf
> Now, with ConTeXt no problem.
> If I use XeConTeXt (--> texexec --xtx) the file is not attached (there's the
> marker, a link is diplayed, but Acrobat says that there's no attachment).
> As far as I can say, the problem seems to depend on --xtx switch,

The problem is not the "--xtx switch", but the lack of support for the
underlying (xdvipdfmx) driver.

I googled a bit and found the following slides:
see page 18 in particular.

In spec-fdf there is:

\definespecial \doattachfile {\doPDFattachfile}

  {\bgroup % title width height color symbol file
   % beware: the symbol may (indirectly) use the file
   % reference when typesetting the object number;
   \presetPDFsymbolappearance{#5}{#6}{#2}{#3}{#4}% sets width/height
       {/Subtype /FileAttachment
        /FS \PDFobjectreference\space
        /Contents (#1)

Something similar needs to be added to spec-dpx.tex. (If Hans doesn't
reply, then someone else will have to.)


More information about the ntg-context mailing list