[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: added \pdf_bmc:n command (5d256e5)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Oct 17 22:15:28 CEST 2019


Repository : https://github.com/latex3/pdfresources
On branch  : backendtest
Link       : https://github.com/latex3/pdfresources/commit/5d256e5c03e5f6e51647e7184464a28d60fcf49e

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

commit 5d256e5c03e5f6e51647e7184464a28d60fcf49e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Oct 17 22:15:28 2019 +0200

    added \pdf_bmc:n command


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

5d256e5c03e5f6e51647e7184464a28d60fcf49e
 experiments/formpushfields.tex |  4 ++--
 pdfresources.dtx               | 37 ++++++++++++++++++++++++++++++++-----
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/experiments/formpushfields.tex b/experiments/formpushfields.tex
index a6e1443..6134ef9 100644
--- a/experiments/formpushfields.tex
+++ b/experiments/formpushfields.tex
@@ -8,11 +8,11 @@
 \begin{document}
 \begin{Form}%[NeedAppearances=false] %radio buttons don't like this ...
 [action=mailto:test at testnet.com,encoding=html, method=post]
-\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
+\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info1},bordercolor={0.2 0.2 0.7},default={}]{}
 
 \Submit{Submitxxxxxxxxxxx}
 
-\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
+\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info2},bordercolor={0.2 0.2 0.7},default={}]{}
 
 \PushButton[onclick={this.exportAsText()}]{Submitxxxxxxxxxxxxxxxx}
 \end{Form}
diff --git a/pdfresources.dtx b/pdfresources.dtx
index 0b6699f..b379148 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -1125,6 +1125,17 @@
 %   \cs{pdf_object_new:nn} and filled with \cs{pdf_object_write:n} with
 %   the properties of the BDC.
 %   \end{function}
+% \begin{function}[added = 2019-10-17]
+%   {
+%     \pdf_bmc:n
+%   }
+%   \begin{syntax}
+%     \cs{pdf_bmc:n} \Arg{tag}
+%   \end{syntax}
+%    This command created a BMC marked content operator. The argument is the
+%    tag without the leading slash. It can be e.g. used for simple artifact
+%    markers.
+%
 % \begin{function}[added = 2019-06-30]
 %   {
 %     \pdf_emc:
@@ -1148,11 +1159,13 @@
 % \begin{macro}
 %   {
 %     \@@_backend_bdc:nn,
+%     \@@_backend_bmc:n,
 %     \@@_backend_emc:,
 %     \@@_backend_PageN_Resources_gpush:n
 %   }
-% \cs{@@_backend_bdc:nn} and \cs{@@_backend_emc:} are the backend command that
-% create the bdc/emc marker and store the properties.
+% \cs{@@_backend_bdc:nn}, \cs{\@@_backend_bmc:n} and \cs{@@_backend_emc:}
+%  are the backend command that
+%  create the bdc/emc marker and store the properties.
 % \cs{@@_backend_PageN_Resources_gpush:n} outputs the /Properties in
 % \cs{@@_BACKEND_thispage_shipout_gput:n} for the current page.
 %    \begin{macrocode}
@@ -1184,6 +1197,10 @@
       {
         \special {ps:~mark~/EMC~pdfmark} %
       }
+    \cs_set_protected:Npn \@@_backend_bmc:n #1
+      {
+        \special {ps:~mark~/#1~/BMC~pdfmark} %
+      }
     \cs_new_protected:Npn \@@_backend_PageN_Resources_gpush:n #1 {}
  }
 % xetex has so create the entries in the /Properties manually
@@ -1213,7 +1230,10 @@
               >>
           }
       }
-
+ \cs_set_protected:Npn \@@_backend_bmc:n #1
+    {
+      \__kernel_backend_literal:n {pdf:code~/#1~BMC}  %pdfbase
+    }
   \cs_set_protected:Npn \@@_backend_emc:
     {
       \__kernel_backend_literal:n {pdf:code~EMC}  %pdfbase
@@ -1262,7 +1282,10 @@
               }
           }
     }
-
+   \cs_set_protected:Npn \@@_backend_bmc:n #1
+      {
+        \__kernel_backend_literal_page:n { /#1~BMC }
+      }
     \cs_set_protected:Npn \@@_backend_emc:
       {
         \__kernel_backend_literal_page:n { EMC }
@@ -1307,7 +1330,10 @@
               { \@@_backend_object_ref:n{#2} }
           }
       }
-
+  \cs_set_protected:Npn \@@_backend_bmc:n #1
+    {
+      \__kernel_backend_literal_page:n { /#1~BMC }
+    }
   \cs_set_protected:Npn \@@_backend_emc:
     {
       \__kernel_backend_literal_page:n { EMC }
@@ -1349,6 +1375,7 @@
 % \subsubsection{bdc / management}
 %    \begin{macrocode}
 \cs_new_protected:Npn  \pdf_bdc:nn #1 #2 { \@@_backend_bdc:nn {#1}{#2}}
+\cs_new_protected:Npn  \pdf_bmc:n #1 { \@@_backend_bmc:n {#1}}
 \cs_new_protected:Npn  \pdf_emc:  { \@@_backend_emc: }
 %    \end{macrocode}
 %





More information about the latex3-commits mailing list