texlive[44307] Master/texmf-dist: ocgx2 (12may17)

commits+karl at tug.org commits+karl at tug.org
Sat May 13 00:00:54 CEST 2017


Revision: 44307
          http://tug.org/svn/texlive?view=revision&revision=44307
Author:   karl
Date:     2017-05-13 00:00:54 +0200 (Sat, 13 May 2017)
Log Message:
-----------
ocgx2 (12may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
    trunk/Master/texmf-dist/doc/latex/ocgx2/README.md
    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	2017-05-12 22:00:38 UTC (rev 44306)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog	2017-05-12 22:00:54 UTC (rev 44307)
@@ -1,3 +1,8 @@
+2017-05-12
+	* v0.26 : ocgx2.sty
+	* fix: OCView, OCPrint (ocgcolorlinks related OCGs) settings saved for
+	possible re-opening by the user 
+
 2017-04-25
 	* v0.25 : ocgx2.sty
 	* new:OCG  switching links (\showocg, \hideocg etc.) with hyperref look

Modified: trunk/Master/texmf-dist/doc/latex/ocgx2/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/ocgx2/README.md	2017-05-12 22:00:38 UTC (rev 44306)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/README.md	2017-05-12 22:00:54 UTC (rev 44307)
@@ -7,10 +7,10 @@
 ## Introduction
 
 This package serves as a drop-in replacement for the already existing packages
-`ocgx` by Paul Gaborit and `ocg-p` by Werner Moshammer for the creation of PDF
+**`ocgx`** by Paul Gaborit and **`ocg-p`** by Werner Moshammer for the creation of PDF
 Layers.
 
-It re-implements the functionality of the `ocg`, `ocgx` and `ocg-p` packages and
+It re-implements the functionality of the **`ocg`**, **`ocgx`** and **`ocg-p`** packages and
 adds support for all known engines and back-ends including:
 
 - LaTeX ⇒ dvips ⇒ ps2pdf/Distiller
@@ -24,7 +24,7 @@
 `animate` and `media9` packages, a re-implementation of **`hyperref`**'s
 **`ocgcolorlink`** option.
 
-To enable dvipdfmx support, pass `dvipdfmx` globally as a class option.
+To enable dvipdfmx support, pass **`dvipdfmx`** globally as a class option.
 
 ----
 
@@ -31,8 +31,8 @@
 *New features:*
 
 + layers extending across **page breaks**
-+ grouping layers into **Radio Button Groups**
-+ re-implementing `hyperref`'s `ocgcolorlinks` option
++ grouping layers into **Radio Button Groups** (`ocg` environment option **`radiobtngrp=...`**)
++ re-implementing **`hyperref`**'s **`ocgcolorlinks`** option
 
 for creating OCG coloured links, which are printed on paper in the default
 text colour and which can, unlike the original `hyperref` implementation,

Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2017-05-12 22:00:38 UTC (rev 44306)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty	2017-05-12 22:00:54 UTC (rev 44307)
@@ -37,8 +37,8 @@
 \RequirePackage{xparse}
 \RequirePackage{l3keys2e}
 
-\def\g at ocgxii@date at tl{2017/04/25}
-\def\g at ocgxii@version at tl{0.25}
+\def\g at ocgxii@date at tl{2017/05/12}
+\def\g at ocgxii@version at tl{0.26}
 
 \ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at tl}
 {ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -49,9 +49,12 @@
 \AtBeginDocument{
   \iow_now:Nx\@mainaux{
     \token_to_str:N\providecommand\token_to_str:N\ocgxii at newkey[2]{}
+  }
+  \iow_now:Nx\@mainaux{
+    \token_to_str:N\providecommand\token_to_str:N\ocgxii at ocg@stack at on@page[2]{}
+  }
+  \iow_now:Nx\@mainaux{
     \token_to_str:N\providecommand
-      \token_to_str:N\ocgxii at ocg@stack at on@page[2]{}
-    \token_to_str:N\providecommand
       \token_to_str:N\ocgxii at lnkcol@stack at on@page[2]{}
   }
 }
@@ -563,7 +566,7 @@
       }
     }{
       \cs_if_exist:NTF\Hy at colorlink{
-        \Hy at colorlink\@linkcolor#6\Hy at endcolorlink\Hy at VerboseLinkStop 
+        \Hy at colorlink\@linkcolor#6\Hy at endcolorlink\Hy at VerboseLinkStop
       }{#6}
     }
   }
@@ -683,9 +686,10 @@
 \cs_new_nopar:Nn\ocgxii_colourlink_nobreak_end:{
   \color at endgroup\egroup
   \mbox{
-    \ocgbase_oc_bdc:n{\g_ocgxii_ocgprint_tl}
+    \ocgbase_oc_bdc:n{\ocgxii at OCPrint}
     \hbox_to_zero:n{\box_use:N0\hss}
-    \ocgbase_oc_emc:\ocgbase_oc_bdc:n{\g_ocgxii_ocgview_tl}
+    \ocgbase_oc_emc:
+    \ocgbase_oc_bdc:n{\ocgxii at OCView}
     \group_begin:
       \exp_after:wN\HyColor at UseColor\l_ocgxii_lnkcol_tl
       \box_use_clear:N0
@@ -760,10 +764,10 @@
       \hbox_to_zero:n{\skip_horizontal:n{2\paperwidth}.\hss}
       \skip_vertical:n{2\paperheight}
     }
-    \ocgbase_oc_bdc:n{\g_ocgxii_ocgprint_tl}
+    \ocgbase_oc_bdc:n{\ocgxii at OCPrint}
       \ocgxii_literal_page:n{-88888~-88888~99999~99999~re~f}
     \ocgbase_oc_emc:
-    \ocgbase_oc_bdc:n{\g_ocgxii_ocgview_tl}
+    \ocgbase_oc_bdc:n{\ocgxii at OCView}
       \group_begin:
         \exp_after:wN\HyColor at UseColor\g_ocgxii_lnkcol_tl
         \ocgxii_literal_page:n{-88888~-88888~99999~99999~re~f}
@@ -799,12 +803,20 @@
 \bool_if:NT\l_ocgxii_ocgcolorlinks_bool{
   \@ifpackageloaded{hyperref}{
     \Hy at colorlinkstrue
-    \Hy at AtBeginDocument{
+    \AtBeginDocument{
       \ocgbase_new_ocg:nnn{OCView}{/Print<</PrintState/OFF>>}{on}
-      \tl_gset:Nx\g_ocgxii_ocgview_tl{\ocgbase_last_ocg:}
+      \tl_gset:Nx\ocgxii at OCView{\ocgbase_last_ocg:}
+      \tl_gset:cx{ocgxii at OCView.opts}{showingui=never,printocg=never}
       \ocgbase_new_ocg:nnn{OCPrint}{/Print<</PrintState/ON>>}{off}
-      \tl_gset:Nx\g_ocgxii_ocgprint_tl{\ocgbase_last_ocg:}
+      \tl_gset:Nx\ocgxii at OCPrint{\ocgbase_last_ocg:}
+      \tl_gset:cx{ocgxii at OCPrint.opts}{showingui=never,printocg=always}
       \ocgxii_enable_ocglinks:
+      \iow_now:Nx\@mainaux{
+        \token_to_str:N\ocgxii at newkey{ocgx2.ocg.OCView}{\ocgxii at OCView}
+      }
+      \iow_now:Nx\@mainaux{
+        \token_to_str:N\ocgxii at newkey{ocgx2.ocg.OCPrint}{\ocgxii at OCPrint}
+      }
     }
   }{
     \msg_error:nnn{ocgx2}{missing~package}{hyperref}



More information about the tex-live-commits mailing list