summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/ChangeLog5
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/README2
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty27
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty66
4 files changed, 57 insertions, 43 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
index 76d8ee4afcc..6d492850b42 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
+++ b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-07
+ * v0.34: ocgx2.sty
+ * v0.14: ocgbase.sty
+ * fix: many cs now def'ed `protected'; adjustments after migration to GitLab
+
2018-04-06
* v0.33: ocgx2.sty
* v0.13: ocgbase.sty
diff --git a/Master/texmf-dist/doc/latex/ocgx2/README b/Master/texmf-dist/doc/latex/ocgx2/README
index aa0887ff920..f6d3b376f68 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/README
+++ b/Master/texmf-dist/doc/latex/ocgx2/README
@@ -1,7 +1,7 @@
==================================
The `ocgx2' LaTeX Package
- https://github.com/agrahn/ocgx2
+ https://gitlab.com/agrahn/ocgx2
(C) 2015--\today Alexander Grahn
==================================
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
index 3e71da49b34..b0113bf270a 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgbase.sty
@@ -95,8 +95,8 @@
\RequirePackage{expl3}
\RequirePackage{pdfbase}
-\def\g@ocgbase@date@tl{2018/04/06}
-\def\g@ocgbase@version@tl{0.13}
+\def\g@ocgbase@date@tl{2018/06/07}
+\def\g@ocgbase@version@tl{0.14}
\ProvidesExplPackage{ocgbase}{\g@ocgbase@date@tl}{\g@ocgbase@version@tl}
{support package for ocgx2.sty}
@@ -172,7 +172,7 @@
}
%macro for inserting new OCG object
-\cs_new_nopar:Nn\ocgbase_new_ocg:nnn{
+\cs_new_protected_nopar:Nn\ocgbase_new_ocg:nnn{
\pbs_pdfobj:nnn{}{dict}{
/Type/OCG/Name~(#1)~\str_if_eq_x:nnF{#2}{}{/Usage<<#2>>}
}
@@ -198,7 +198,7 @@
%macro for starting OCG object (and nested children) insertion into Order
%hierarchy (shown as tree structure in the viewers `Layers' tab
-\cs_new:Nn\ocgbase_tree_node_begin:n{ % #1: OCG obj
+\cs_new_protected:Nn\ocgbase_tree_node_begin:n{ % #1: OCG obj
%get the parent node from stack
\seq_get:NN\g_ocgbase_tree_nd_stack_seq\l__ocgbase_prnt_tl
\tl_if_exist:cTF{g_ocgbase_nd_\l__ocgbase_prnt_tl _chld_tl}{
@@ -233,7 +233,7 @@
}
%macro that ends insertion of OCG and sub-OCGs into Order tree
-\cs_new:Nn\ocgbase_tree_node_end:{
+\cs_new_protected:Nn\ocgbase_tree_node_end:{
\seq_get:NN\g_ocgbase_tree_nd_stack_seq\l_tempa_tl
\seq_get:NN\g_ocgbase_tree_ocg_stack_seq\l_tempb_tl
\str_if_eq_x:nnT{
@@ -246,7 +246,7 @@
}
}
-% helper macro; traverses siblings to find either
+% helper macro (recursive); traverses siblings to find either
% the node which refers to the same OCG (arg #2 remains un-modified), or
% the last sibling inserted (arg #2 is cleared);
% the node id of the sibling found is returned in arg #1
@@ -263,6 +263,7 @@
}
\cs_new:Nn\ocgbase_build_order:Nn{
+ % (recursive macro)
% #1: tl var to which the OCG order is written (output)
% #2: starting node id (input; usually `1')
\tl_set:Nx\l__ocgbase_cur_nd_tl{#2}
@@ -286,7 +287,7 @@
%macro for appending an OCG object to the global `OFF' list
%(initial non-visibility)
-\cs_new_nopar:Nn\ocgbase_add_to_off_list:n{
+\cs_new_protected_nopar:Nn\ocgbase_add_to_off_list:n{
\seq_if_in:NxF\g_ocgbase_offocgs_seq{#1}{
\seq_gput_right:Nx\g_ocgbase_offocgs_seq{#1}
}
@@ -294,7 +295,7 @@
%macro for removing an OCG object from global `OFF' list
%(initial non-visibility)
-\cs_new_nopar:Nn\ocgbase_del_from_off_list:n{
+\cs_new_protected_nopar:Nn\ocgbase_del_from_off_list:n{
\seq_if_in:NxT\g_ocgbase_offocgs_seq{#1}{
\ocgbase_seq_gremove_all:Nx\g_ocgbase_offocgs_seq{#1}
}
@@ -303,7 +304,7 @@
\cs_generate_variant:Nn\ocgbase_seq_gremove_all:Nn{Nx}
\seq_new:N\g_ocgbase_rbtn_groups_seq
-\cs_new_nopar:Nn\ocgbase_add_ocg_to_radiobtn_grp:nn{
+\cs_new_protected_nopar:Nn\ocgbase_add_ocg_to_radiobtn_grp:nn{
% #1: rbtn group name,
% #2: OCG obj ref
\seq_if_exist:cF{g_ocgbase_rbtn_group_#1_seq}{
@@ -316,16 +317,16 @@
}
% OC-marked content
-\cs_new_nopar:Nn\ocgbase_oc_bdc:n{\pbs_pdfbdc:nn{/OC}{#1}}
-\cs_new_nopar:Nn\ocgbase_oc_emc:{\pbs_pdfemc:}
+\cs_new_protected_nopar:Nn\ocgbase_oc_bdc:n{\pbs_pdfbdc:nn{/OC}{#1}}
+\cs_new_protected_nopar:Nn\ocgbase_oc_emc:{\pbs_pdfemc:}
%stack of PDF obj references of currently open OCGs
\seq_new:N\g_ocgbase_open_stack_seq
%push OCG to stack
-\cs_new_nopar:Nn\ocgbase_open_stack_push:n{
+\cs_new_protected_nopar:Nn\ocgbase_open_stack_push:n{
\seq_gpush:Nx\g_ocgbase_open_stack_seq{#1}}
%pop OCG from stack into tl
-\cs_new_nopar:Nn\ocgbase_open_stack_pop:N{
+\cs_new_protected_nopar:Nn\ocgbase_open_stack_pop:N{
\seq_gpop:NN\g_ocgbase_open_stack_seq#1}
%command that inserts /OC <<OCMD with currently open OCGs>> entry;
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index 75a8a023804..4ba86c3b76b 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -35,14 +35,14 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\def\g@ocgxii@date@tl{2018/04/06}
-\def\g@ocgxii@version@tl{0.33}
+\def\g@ocgxii@date@tl{2018/06/07}
+\def\g@ocgxii@version@tl{0.34}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
%creating global definitions
-\cs_new:Npn\ocgxii@newkey#1#2{\tl_gset:cx{#1}{#2}}
+\cs_new_protected:Npn\ocgxii@newkey#1#2{\tl_gset:cx{#1}{#2}}
\AtBeginDocument{
\iow_now:Nx\@mainaux{
@@ -164,7 +164,7 @@
\ocgxii_endocg:
}
-\cs_new_nopar:Nn\ocgxii_beginocg:nnnn{
+\cs_new_protected_nopar:Nn\ocgxii_beginocg:nnnn{
\group_begin:
\ocgxii_reset_cmd_opts: % ... to the user-set package options
\tl_if_exist:cTF{ocgxii@#3}{ %re-open existing layer
@@ -219,7 +219,7 @@
\ignorespaces
}
-\cs_new_nopar:Nn\ocgxii_endocg:{
+\cs_new_protected_nopar:Nn\ocgxii_endocg:{
\unskip
\ocgbase_oc_emc:
\ocgbase_tree_node_end:
@@ -227,7 +227,7 @@
\ocgxii_stack_shipout:NN\ocgxii@ocg@stack@on@page\g_ocgbase_open_stack_seq
}
-\cs_new_nopar:Nn\ocgxii_stack_shipout:NN{
+\cs_new_protected_nopar:Nn\ocgxii_stack_shipout:NN{
\iow_shipout_x:Nx\@mainaux{
\token_to_str:N#1{
\exp_not:N\int_use:N\g_ocgxii_page_int
@@ -235,7 +235,7 @@
}
}
-\cs_new_nopar:Npn\ocgxii@ocg@stack@on@page#1#2{
+\cs_new_protected_nopar:Npn\ocgxii@ocg@stack@on@page#1#2{
\seq_gset_from_clist:cn{g_pending_ocgs_on_#1_seq}{#2}
%re-add braces around items for dvips
\bool_if:nT{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{
@@ -247,7 +247,7 @@
}
\ocgxii@ocg@stack@on@page{0}{} %initialize
-\cs_new_nopar:Npn\ocgxii@lnkcol@stack@on@page#1#2{
+\cs_new_protected_nopar:Npn\ocgxii@lnkcol@stack@on@page#1#2{
\seq_gset_from_clist:cn{g_pending_lnkcols_on_#1_seq}{#2}
%re-add braces around items
\seq_map_inline:cn{g_pending_lnkcols_on_#1_seq}{
@@ -352,14 +352,14 @@
}
\int_new:N\g_ocgxii_page_int %abs. page counter
-\cs_new_nopar:Nn\ocgxii_ocglist_reset:{
+\cs_new_protected_nopar:Nn\ocgxii_ocglist_reset:{
\tl_clear_new:N\l_ocgxii_u_list_tl
\tl_clear_new:N\l_ocgxii_d_list_tl
\tl_clear_new:N\l_ocgxii_e_list_tl
\tl_clear_new:N\l_ocgxii_x_list_tl
}
-\cs_new_nopar:Nn\ocgxii_ocglist_build:Nn{
+\cs_new_protected_nopar:Nn\ocgxii_ocglist_build:Nn{
\tl_set:Nx\l_ocglistarg_tl{#2}\tl_trim_spaces:N\l_ocglistarg_tl
\seq_set_split:NnV\l_ocgxii_ocglistarg_seq{~}\l_ocglistarg_tl
\seq_map_variable:NNn\l_ocgxii_ocglistarg_seq\l_tempa_tl{
@@ -367,7 +367,7 @@
}
}
-\cs_new:Nn\ocgxii_commalist_process:n{
+\cs_new_protected:Nn\ocgxii_commalist_process:n{
\seq_set_split:Nnn\l_tmpa_seq{,}{#1}
\ocgxii_ocglist_build:Nn\l_ocgxii_e_list_tl{\seq_item:Nn\l_tmpa_seq{1}}
\ocgxii_ocglist_build:Nn\l_ocgxii_x_list_tl{\seq_item:Nn\l_tmpa_seq{2}}
@@ -375,7 +375,7 @@
\ocgxii_ocglist_build:Nn\l_ocgxii_u_list_tl{\seq_item:Nn\l_tmpa_seq{4}}
}
-\cs_new_nopar:Nn\ocgxii_ocglist_process_idlist:nn{
+\cs_new_protected_nopar:Nn\ocgxii_ocglist_process_idlist:nn{
\ocgxii_ocglist_reset:
\tl_set:Nx\l_ocgxii_opt_tl{#1}\tl_remove_all:Nn\l_ocgxii_opt_tl{~}
\str_case_x:nnF{\l_ocgxii_opt_tl}{
@@ -426,7 +426,7 @@
\bool_new:N\l_ocgxii_mouse_triggers_bool
\bool_new:N\l_ocgxii_nobreak_bool
-\cs_new:Nn\ocgxii_actionsocg:nnnnnn{
+\cs_new_protected:Nn\ocgxii_actionsocg:nnnnnn{
\leavevmode
\bool_set_false:N\l_ocgxii_mouse_triggers_bool
\bool_set_false:N\l_ocgxii_nobreak_bool
@@ -600,13 +600,13 @@
}
%mimic commands from ocg-p
-\cs_new:Npn\toggleocgs{\switchocg*}
-\cs_new:Npn\showocgs{\showocg*}
-\cs_new:Npn\hideocgs{\hideocg*}
-\cs_new:Npn\setocgs{\actionsocg*}
+\cs_new_protected:Npn\toggleocgs{\switchocg*}
+\cs_new_protected:Npn\showocgs{\showocg*}
+\cs_new_protected:Npn\hideocgs{\hideocg*}
+\cs_new_protected:Npn\setocgs{\actionsocg*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cs_new:Nn\ocgxii_process_ocgref:NN{
+\cs_new_protected:Nn\ocgxii_process_ocgref:NN{
\str_if_eq_x:nnF{#2}{}{
\tl_if_exist:cTF{ocgx2.ocg.#2}{
\tl_put_right:Nx#1{~\tl_use:c{ocgx2.ocg.#2}}
@@ -671,7 +671,7 @@
radiobtngrp .value_required:n = {true}
}
-\cs_new:Nn\ocgxii_reset_cmd_opts:{
+\cs_new_protected:Nn\ocgxii_reset_cmd_opts:{
\tl_set_eq:NN\l_ocgxii_view_tl\g_ocgxii_view_tl
\tl_set_eq:NN\l_ocgxii_print_tl\g_ocgxii_print_tl
\tl_set_eq:NN\l_ocgxii_export_tl\g_ocgxii_export_tl
@@ -707,13 +707,13 @@
% with some improvements
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cs_new_nopar:Nn\ocgxii_colourlink_begin:{}
-\cs_new_nopar:Nn\ocgxii_colourlink_end:{}
-\cs_new_nopar:Nn\ocgxii_colourlink_nobreak_begin:{
+\cs_new_protected_nopar:Nn\ocgxii_colourlink_begin:{}
+\cs_new_protected_nopar:Nn\ocgxii_colourlink_end:{}
+\cs_new_protected_nopar:Nn\ocgxii_colourlink_nobreak_begin:{
\hbox_set:Nw\l_tmpa_box\color@begingroup
\tl_set_eq:NN\color@setgroup\group_begin:
}
-\cs_new_nopar:Nn\ocgxii_colourlink_nobreak_end:{
+\cs_new_protected_nopar:Nn\ocgxii_colourlink_nobreak_end:{
\color@endgroup\hbox_set_end:
\mbox{
\ocgbase_oc_bdc:n{\ocgxii@OCPrint}
@@ -733,7 +733,7 @@
\bool_if:nTF{\sys_if_output_dvi_p: && !\g_ocgxii_dvipdfmx_bool}{
% non-breakable links in dvips
- \cs_new_nopar:Nn\ocgxii_enable_ocglinks:{
+ \cs_new_protected_nopar:Nn\ocgxii_enable_ocglinks:{
\def\Hy@colorlink##1{
\group_begin:
\tl_set:Nn\l_ocgxii_lnkcol_tl{##1}
@@ -748,7 +748,7 @@
}{
% pdftex,luatex,xetex,dvipdfmx:
% ocgcolorlinks that extend over line and page breaks
- \cs_new_nopar:Nn\ocgxii_enable_ocglinks:{
+ \cs_new_protected_nopar:Nn\ocgxii_enable_ocglinks:{
\def\Hy@colorlink##1{
\ifx\Hy@setbreaklinks\@gobble\else
\Hy@breaklinkstrue
@@ -861,12 +861,20 @@
\@ifpackageloaded{hyperref}{
\Hy@colorlinkstrue
\AtBeginDocument{
- \ocgbase_new_ocg:nnn{OCView}{/Print<</PrintState/OFF>>}{on}
+ \ocgbase_new_ocg:nnn{OCView}{
+ /Print<</PrintState/OFF>>
+ /Export<</ExportState/OFF>>
+ }{on}
\tl_gset:Nx\ocgxii@OCView{\ocgbase_last_ocg:}
- \tl_gset:cx{ocgxii@OCView.opts}{showingui=never,printocg=never}
- \ocgbase_new_ocg:nnn{OCPrint}{/Print<</PrintState/ON>>}{off}
+ \tl_gset:cx{ocgxii@OCView.opts}{
+ showingui=never,printocg=never,exportocg=never}
+ \ocgbase_new_ocg:nnn{OCPrint}{
+ /Print<</PrintState/ON>>
+ /Export<</ExportState/ON>>
+ }{off}
\tl_gset:Nx\ocgxii@OCPrint{\ocgbase_last_ocg:}
- \tl_gset:cx{ocgxii@OCPrint.opts}{showingui=never,printocg=always}
+ \tl_gset:cx{ocgxii@OCPrint.opts}{
+ showingui=never,printocg=always,exportocg=always}
\ocgxii_enable_ocglinks:
\iow_now:Nx\@mainaux{
\token_to_str:N\ocgxii@newkey{ocgx2.ocg.OCView}{\ocgxii@OCView}