[latex3-commits] [git/LaTeX3-latex3-pdfresources] renamedict77: working on attachfile (32283e2)

Ulrike Fischer fischer at troubleshooting-tex.de
Fri Apr 17 00:02:09 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : renamedict77
Link       : https://github.com/latex3/pdfresources/commit/32283e23f5c8dd2de85ba6153b69192941325115

>---------------------------------------------------------------

commit 32283e23f5c8dd2de85ba6153b69192941325115
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri Apr 17 00:02:09 2020 +0200

    working on attachfile


>---------------------------------------------------------------

32283e23f5c8dd2de85ba6153b69192941325115
 experiments/new-attachfile.atfi |  2 +-
 experiments/new-attachfile.tex  |  2 +-
 newpackages/new-attachfile.sty  | 33 +++++++++++++++++----------------
 3 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/experiments/new-attachfile.atfi b/experiments/new-attachfile.atfi
index d6d0b24..698b84b 100644
--- a/experiments/new-attachfile.atfi
+++ b/experiments/new-attachfile.atfi
@@ -1,2 +1,2 @@
 \attachfile at timezone{}
-\attachfile at file[]{6578616D706C652D696D6167652D41}
+\attachfile at file[]{636174616C6F6775652E746578}
diff --git a/experiments/new-attachfile.tex b/experiments/new-attachfile.tex
index e51631f..dbf9935 100644
--- a/experiments/new-attachfile.tex
+++ b/experiments/new-attachfile.tex
@@ -6,7 +6,7 @@
 %\definecolor{attachfilecolor}{cmyk}{.1,.2,.3,.4}
 %t0\attachfilesetup{color=attachfilecolor}
 \begin{document}
-\attachfile[icon=Graph]{example-image-A} some text
+\attachfile[icon=Graph,mimetype=application/x-hdf]{catalogue.tex} some text
 \makeatletter
 
 x\atfi at acroPushPin x
diff --git a/newpackages/new-attachfile.sty b/newpackages/new-attachfile.sty
index 260934b..5700762 100644
--- a/newpackages/new-attachfile.sty
+++ b/newpackages/new-attachfile.sty
@@ -137,22 +137,23 @@
 \def\atfi at mimetype{}
 \define at key{AtFi}{mimetype}{%
   \edef\atfi at mimetype{#1}%
-  \ifx\atfi at mimetype\ltx at empty
-  \else
-    \atfi at Match\atfi at mimetype{%
-      ^(application|audio|image|model|text|video|x-\atfi at PatToken)%
-      /%
-      ([a-z\-\+_\.0-9]+)%
-      (; ?\atfi at PatToken=(\atfi at PatToken|\atfi at PatQuotedString))*$%
-    }{icase}{}{%
-      \atfi at Warning{%
-        Invalid value `\atfi at mimetype'\MessageBreak
-        of option `mimetype'.\MessageBreak
-        Value is discarded%
-      }%
-      \let\atfi at mimetype\ltx at empty
-    }%
-  \fi
+  %fails with allowed types so removing it
+ % \ifx\atfi at mimetype\ltx at empty
+%  \else
+%    \atfi at Match\atfi at mimetype{%
+%      ^(application|audio|image|model|text|video|x-\atfi at PatToken)%
+%      /%
+%      ([a-z\-\+_\.0-9]+)%
+%      (; ?\atfi at PatToken=(\atfi at PatToken|\atfi at PatQuotedString))*$%
+%    }{icase}{}{%
+%      \atfi at Warning{%
+%        Invalid value `\atfi at mimetype'\MessageBreak
+%        of option `mimetype'.\MessageBreak
+%        Value is discarded%
+%      }%
+%      \let\atfi at mimetype\ltx at empty
+%    }%
+%  \fi
   \ifx\atfi at mimetype\ltx at empty
   \else
     \EdefEscapeName\atfi at mimetype{\atfi at mimetype}%





More information about the latex3-commits mailing list.