texlive[72288] Master/texmf-dist: ocgx2 (15sep24)

commits+karl at tug.org commits+karl at tug.org
Sun Sep 15 21:56:18 CEST 2024


Revision: 72288
          https://tug.org/svn/texlive?view=revision&revision=72288
Author:   karl
Date:     2024-09-15 21:56:18 +0200 (Sun, 15 Sep 2024)
Log Message:
-----------
ocgx2 (15sep24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
    trunk/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
    trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty

Modified: trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2024-09-15 19:56:07 UTC (rev 72287)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2024-09-15 19:56:18 UTC (rev 72288)
@@ -1,3 +1,8 @@
+2024-09-15
+	* v0.59: ocgx2.sty
+	* v0.24: ocgbase.sty
+	* fix: pdf/a compliance (issue #22); log output (issue #20)
+
 2024-08-28
 	* v0.58: ocgx2.sty
 	* v0.23: ocgbase.sty

Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty	2024-09-15 19:56:07 UTC (rev 72287)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty	2024-09-15 19:56:18 UTC (rev 72288)
@@ -100,8 +100,8 @@
 %
 % The Current Maintainer of this work is A. Grahn.
 
-\def\g at ocgbase@date at tl{2024/08/28}
-\def\g at ocgbase@version at tl{0.23}
+\def\g at ocgbase@date at tl{2024/09/15}
+\def\g at ocgbase@version at tl{0.24}
 
 \ProvidesExplPackage{ocgbase}{\g at ocgbase@date at tl}{\g at ocgbase@version at tl}
 {support package for ocgx2.sty}
@@ -424,8 +424,8 @@
 %
 % The Current Maintainer of this work is A. Grahn.
 
-\def\g at ocgbase@date at tl{2024/08/28}
-\def\g at ocgbase@version at tl{0.23}
+\def\g at ocgbase@date at tl{2024/09/15}
+\def\g at ocgbase@version at tl{0.24}
 
 \ProvidesExplPackage{ocgbase}{\g at ocgbase@date at tl}{\g at ocgbase@version at tl}
 {support package for ocgx2.sty}
@@ -514,11 +514,14 @@
     }
     \pdfmanagement_add:nnx{Catalog/OCProperties}{OCGs}{\g_ocgbase_ocgs_tl}
     \pdfmanagement_add:nnx{Catalog/OCProperties}{D}{<<
-          /AS~[
-            <</Event/View  /Category[/View]  /OCGs~\l_ocgbase_ocgarray_tl>>
-            <</Event/Print /Category[/Print] /OCGs~\l_ocgbase_ocgarray_tl>>
-            <</Event/Export/Category[/Export]/OCGs~\l_ocgbase_ocgarray_tl>>
-          ]
+          /Name~(OC~default~configuration)
+          \pdfmeta_standard_verify:nT{Catalog_OCProperties_no_AS}{ %for pdf/a compliance
+            /AS~[
+              <</Event/View  /Category[/View]  /OCGs~\l_ocgbase_ocgarray_tl>>
+              <</Event/Print /Category[/Print] /OCGs~\l_ocgbase_ocgarray_tl>>
+              <</Event/Export/Category[/Export]/OCGs~\l_ocgbase_ocgarray_tl>>
+            ]
+          }
           /BaseState/ON~\l_ocgbase_offocgentry_tl
           \l_ocgbase_ocgorderentry_tl
           \l_ocgbase_rbgroupsentry_tl

Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2024-09-15 19:56:07 UTC (rev 72287)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2024-09-15 19:56:18 UTC (rev 72288)
@@ -43,11 +43,11 @@
   %
   % The Current Maintainer of this work is A. Grahn.
 
-  \def\g at ocgxii@date at tl{2024/08/28}
-  \def\g at ocgxii@version at tl{0.58}
+  \def\g at ocgxii@date at tl{2024/09/15}
+  \def\g at ocgxii@version at tl{0.59}
 
   \ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at tl}
-  {ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
+  {ports~`ocgx'~functionality~to~dvips+ps2pdf,~xelatex~and~dvipdfmx}
 
   %creating global definitions
   \cs_new_protected:Npn\ocgxii at newkey#1#2{\tl_gset:cx{#1}{#2}}
@@ -1579,11 +1579,11 @@
 %
 % The Current Maintainer of this work is A. Grahn.
 
-\def\g at ocgxii@date at tl{2024/08/28}
-\def\g at ocgxii@version at tl{0.58}
+\def\g at ocgxii@date at tl{2024/09/15}
+\def\g at ocgxii@version at tl{0.59}
 
 \ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at tl}
-{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
+{ports~`ocgx'~functionality~to~dvips+ps2pdf,~xelatex~and~dvipdfmx}
 
 %creating global definitions
 \cs_new_protected:Npn\ocgxii at newkey#1#2{\tl_gset:cx{#1}{#2}}
@@ -2385,104 +2385,132 @@
   %
   \bool_if:nTF{\l_ocgxii_nobreak_bool || \l_ocgxii_mouse_triggers_bool}{
     \hbox_set:Nn\l_tmpa_box{#6}
-    \bool_if:NTF\l_ocgxii_mouse_triggers_bool{
-      % e,d,x mouse triggers require (non-breakable) /Widget annot
-      \pdfannot_dict_put:nnn{link/GoTo}{Subtype}{/Widget}
-      \pdfannot_dict_remove:nn{link/GoTo}{Border}
-    }{
-      \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
-    }
-    \pdfannot_dict_remove:nn{link/GoTo}{C}
-    \pbs_pdfannot:nnnn{
-      \dim_use:N\box_wd:N\l_tmpa_box}{
-      \dim_use:N\box_ht:N\l_tmpa_box}{
-      \dim_use:N\box_dp:N\l_tmpa_box
-    }{
-      \pdfannot_dict_use:n{link/GoTo}
+    % suppress annots with SetOCGState Action Subtype for pdf/a compliance
+    \pdfmeta_standard_verify:nT{annot_action_A}{
       \bool_if:NTF\l_ocgxii_mouse_triggers_bool{
-        /Ff~65536/FT/Btn/BS<</W~0>>
-        /T~(ocgx2@\int_use:N\g_ocgxii_widcount_int)
-        %treat mouse-up as mouse-click --> handle through /A dictionary
-        \str_if_eq:eeF{}{
-          \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
-        }{
-          /A <</S/SetOCGState/State [
-            \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
-              /Toggle~\l_ocgxii_toswitch_u_tl
-            }
-            \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
-              /ON~\l_ocgxii_toshow_u_tl
-            }
-            \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
-              /OFF~\l_ocgxii_tohide_u_tl
-            }
-          ]>>
-        }
-        % other mouse triggers need add. actions dict
-        /AA <<
-          %\str_if_eq:eeF{}{ % mouse-up
-          %  \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
-          %}{
-          %  /U <</S/SetOCGState/State [
-          %    \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
-          %      /Toggle~\l_ocgxii_toswitch_u_tl
-          %    }
-          %    \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
-          %      /ON~\l_ocgxii_toshow_u_tl
-          %    }
-          %    \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
-          %      /OFF~\l_ocgxii_tohide_u_tl
-          %    }
-          %  ]>>
-          %}
-          \str_if_eq:eeF{}{ % mouse-down
-            \l_ocgxii_toswitch_d_tl\l_ocgxii_toshow_d_tl\l_ocgxii_tohide_d_tl
+        % e,d,x mouse triggers require (non-breakable) /Widget annot
+        \pdfannot_dict_put:nnn{link/GoTo}{Subtype}{/Widget}
+        \pdfannot_dict_remove:nn{link/GoTo}{Border}
+      }{
+        \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
+      }
+      \pdfannot_dict_remove:nn{link/GoTo}{C}
+      \pbs_pdfannot:nnnn{
+        \dim_use:N\box_wd:N\l_tmpa_box}{
+        \dim_use:N\box_ht:N\l_tmpa_box}{
+        \dim_use:N\box_dp:N\l_tmpa_box
+      }{
+        \pdfannot_dict_use:n{link/GoTo}
+        \bool_if:NTF\l_ocgxii_mouse_triggers_bool{
+          /Ff~65536/FT/Btn/BS<</W~0>>
+          /T~(ocgx2@\int_use:N\g_ocgxii_widcount_int)
+          %treat mouse-up as mouse-click --> handle through /A dictionary
+          \str_if_eq:eeF{}{
+            \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
           }{
-            /D <</S/SetOCGState/State [
-              \str_if_eq:VnF\l_ocgxii_toswitch_d_tl{}{
-                /Toggle~\l_ocgxii_toswitch_d_tl
+            /A <</S/SetOCGState/State [
+              \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
+                /Toggle~\l_ocgxii_toswitch_u_tl
               }
-              \str_if_eq:VnF\l_ocgxii_toshow_d_tl{}{
-                /ON~\l_ocgxii_toshow_d_tl
+              \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
+                /ON~\l_ocgxii_toshow_u_tl
               }
-              \str_if_eq:VnF\l_ocgxii_tohide_d_tl{}{
-                /OFF~\l_ocgxii_tohide_d_tl
+              \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
+                /OFF~\l_ocgxii_tohide_u_tl
               }
             ]>>
           }
-          \str_if_eq:eeF{}{ % mouse-enter
-            \l_ocgxii_toswitch_e_tl\l_ocgxii_toshow_e_tl\l_ocgxii_tohide_e_tl
-          }{
-            /E <</S/SetOCGState/State [
-              \str_if_eq:VnF\l_ocgxii_toswitch_e_tl{}{
-                /Toggle~\l_ocgxii_toswitch_e_tl
-              }
-              \str_if_eq:VnF\l_ocgxii_toshow_e_tl{}{
-                /ON~\l_ocgxii_toshow_e_tl
-              }
-              \str_if_eq:VnF\l_ocgxii_tohide_e_tl{}{
-                /OFF~\l_ocgxii_tohide_e_tl
-              }
-            ]>>
-          }
-          \str_if_eq:eeF{}{ % mouse-exit
-            \l_ocgxii_toswitch_x_tl\l_ocgxii_toshow_x_tl\l_ocgxii_tohide_x_tl
-          }{
-            /X <</S/SetOCGState/State [
-              \str_if_eq:VnF\l_ocgxii_toswitch_x_tl{}{
-                /Toggle~\l_ocgxii_toswitch_x_tl
-              }
-              \str_if_eq:VnF\l_ocgxii_toshow_x_tl{}{
-                /ON~\l_ocgxii_toshow_x_tl
-              }
-              \str_if_eq:VnF\l_ocgxii_tohide_x_tl{}{
-                /OFF~\l_ocgxii_tohide_x_tl
-              }
-            ]>>
-          }
-        >>
-      }{
-        %mouse-up alone
+          % other mouse triggers need add. actions dict
+          /AA <<
+            %\str_if_eq:eeF{}{ % mouse-up
+            %  \l_ocgxii_toswitch_u_tl\l_ocgxii_toshow_u_tl\l_ocgxii_tohide_u_tl
+            %}{
+            %  /U <</S/SetOCGState/State [
+            %    \str_if_eq:VnF\l_ocgxii_toswitch_u_tl{}{
+            %      /Toggle~\l_ocgxii_toswitch_u_tl
+            %    }
+            %    \str_if_eq:VnF\l_ocgxii_toshow_u_tl{}{
+            %      /ON~\l_ocgxii_toshow_u_tl
+            %    }
+            %    \str_if_eq:VnF\l_ocgxii_tohide_u_tl{}{
+            %      /OFF~\l_ocgxii_tohide_u_tl
+            %    }
+            %  ]>>
+            %}
+            \str_if_eq:eeF{}{ % mouse-down
+              \l_ocgxii_toswitch_d_tl\l_ocgxii_toshow_d_tl\l_ocgxii_tohide_d_tl
+            }{
+              /D <</S/SetOCGState/State [
+                \str_if_eq:VnF\l_ocgxii_toswitch_d_tl{}{
+                  /Toggle~\l_ocgxii_toswitch_d_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_toshow_d_tl{}{
+                  /ON~\l_ocgxii_toshow_d_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_tohide_d_tl{}{
+                  /OFF~\l_ocgxii_tohide_d_tl
+                }
+              ]>>
+            }
+            \str_if_eq:eeF{}{ % mouse-enter
+              \l_ocgxii_toswitch_e_tl\l_ocgxii_toshow_e_tl\l_ocgxii_tohide_e_tl
+            }{
+              /E <</S/SetOCGState/State [
+                \str_if_eq:VnF\l_ocgxii_toswitch_e_tl{}{
+                  /Toggle~\l_ocgxii_toswitch_e_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_toshow_e_tl{}{
+                  /ON~\l_ocgxii_toshow_e_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_tohide_e_tl{}{
+                  /OFF~\l_ocgxii_tohide_e_tl
+                }
+              ]>>
+            }
+            \str_if_eq:eeF{}{ % mouse-exit
+              \l_ocgxii_toswitch_x_tl\l_ocgxii_toshow_x_tl\l_ocgxii_tohide_x_tl
+            }{
+              /X <</S/SetOCGState/State [
+                \str_if_eq:VnF\l_ocgxii_toswitch_x_tl{}{
+                  /Toggle~\l_ocgxii_toswitch_x_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_toshow_x_tl{}{
+                  /ON~\l_ocgxii_toshow_x_tl
+                }
+                \str_if_eq:VnF\l_ocgxii_tohide_x_tl{}{
+                  /OFF~\l_ocgxii_tohide_x_tl
+                }
+              ]>>
+            }
+          >>
+        }{
+          %mouse-up alone
+          /A <</S/SetOCGState
+            /State [
+              \str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
+                /Toggle~\l_ocgxii_toswitch_u_tl}~
+              \str_if_eq:VnF{\l_ocgxii_toshow_u_tl}{}{/ON~\l_ocgxii_toshow_u_tl}~
+              \str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
+            ]
+          >>
+        }
+      }
+      \bool_if:NT\l_ocgxii_mouse_triggers_bool{
+        \pbs_appendtofields:n{\pbs_pdflastann:}
+        \int_gincr:N\g_ocgxii_widcount_int
+      }
+    }
+    \box_use_drop:N\l_tmpa_box
+  }{
+    % suppress annots with SetOCGState Action Subtype for pdf/a compliance
+    \pdfmeta_standard_verify:nTF{annot_action_A}{
+      \bool_if:NF\g_ocgxii_hyperref_loaded_bool{
+        \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
+      }
+      %line-breakable annotation
+      \pbs_pdflink:nn{
+        %look and feel of hyperref internal links
+        \pdfannot_dict_use:n{link/GoTo}
         /A <</S/SetOCGState
           /State [
             \str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
@@ -2491,33 +2519,12 @@
             \str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
           ]
         >>
+      }{
+        \hook_use:n{pdfannot/link/GoTo/begin}
+        #6
+        \hook_use:n{pdfannot/link/GoTo/end}
       }
-    }\box_use_drop:N\l_tmpa_box
-    \bool_if:NT\l_ocgxii_mouse_triggers_bool{
-      \pbs_appendtofields:n{\pbs_pdflastann:}
-      \int_gincr:N\g_ocgxii_widcount_int
-    }
-  }{
-    \bool_if:NF\g_ocgxii_hyperref_loaded_bool{
-      \pdfannot_dict_put:nnn{link/GoTo}{Border}{[0~0~0]}
-    }
-    %line-breakable annotation
-    \pbs_pdflink:nn{
-      %look and feel of hyperref internal links
-      \pdfannot_dict_use:n{link/GoTo}
-      /A <</S/SetOCGState
-        /State [
-          \str_if_eq:VnF{\l_ocgxii_toswitch_u_tl}{}{
-            /Toggle~\l_ocgxii_toswitch_u_tl}~
-          \str_if_eq:VnF{\l_ocgxii_toshow_u_tl}{}{/ON~\l_ocgxii_toshow_u_tl}~
-          \str_if_eq:VnF{\l_ocgxii_tohide_u_tl}{}{/OFF~\l_ocgxii_tohide_u_tl}
-        ]
-      >>
-    }{
-      \hook_use:n{pdfannot/link/GoTo/begin}
-      #6
-      \hook_use:n{pdfannot/link/GoTo/end}
-    }
+    }{#6}
   }
   \group_end:
 }



More information about the tex-live-commits mailing list.