texlive[48095] Master/texmf-dist: ocgx2 (26jun18)
commits+karl at tug.org
commits+karl at tug.org
Tue Jun 26 23:55:23 CEST 2018
Revision: 48095
http://tug.org/svn/texlive?view=revision&revision=48095
Author: karl
Date: 2018-06-26 23:55:22 +0200 (Tue, 26 Jun 2018)
Log Message:
-----------
ocgx2 (26jun18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
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 2018-06-26 21:55:06 UTC (rev 48094)
+++ trunk/Master/texmf-dist/doc/latex/ocgx2/ChangeLog 2018-06-26 21:55:22 UTC (rev 48095)
@@ -1,3 +1,7 @@
+2018-06-26
+ * v0.35: ocgx2.sty
+ * fix: wrong link size of clickable paths in scaled `tikzpicture'
+
2018-06-07
* v0.34: ocgx2.sty
* v0.14: ocgbase.sty
Modified: trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty 2018-06-26 21:55:06 UTC (rev 48094)
+++ trunk/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty 2018-06-26 21:55:22 UTC (rev 48095)
@@ -35,8 +35,8 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\def\g at ocgxii@date at tl{2018/06/07}
-\def\g at ocgxii@version at tl{0.34}
+\def\g at ocgxii@date at tl{2018/06/26}
+\def\g at ocgxii@version at tl{0.35}
\ProvidesExplPackage{ocgx2}{\g at ocgxii@date at tl}{\g at ocgxii@version at tl}
{ports `ocgx' functionality to dvips+ps2pdf, xelatex and dvipdfmx}
@@ -899,7 +899,12 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Copyright notice: The code that follows until the end of the file was
-% taken from Paul Gaborit's `tikzlibraryocgx.code.tex' with minor additions.
+% taken from Paul Gaborit's `tikzlibraryocgx.code.tex' with a minor
+% addition:
+%
+% opts={...} allows ocg-environment options to be passed to a TikZ scope
+%
+% Also, it was fixed to work correctly in scaled tikzpictures.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\tikzset{
ocg/.style={ocg/.cd,#1,/tikz/.cd},
@@ -919,7 +924,7 @@
status/0/.style={visibility=0},
% default values
name=,
- opts=,
+ opts=, % NEW
status=on,
% ref
ref/.style={
@@ -928,7 +933,7 @@
\ifx\empty\ocgxii at name\empty#1\else\ocgxii at name\fi%
}{#1}{\ocgxii at visibility}},
/tikz/execute at end scope={\end{ocg}},
- },
+ }
},
switch ocg/.style={
postaction={
@@ -935,14 +940,13 @@
path picture={
\path let
\p1 = (path picture bounding box.south west),
- \p2 = (path picture bounding box.north east),
- \p3 = (\x2-\x1,\y2-\y1)
+ \p2 = (path picture bounding box.north east)
in
- (path picture bounding box.center)
- node[inner sep=0pt,anchor=center,outer sep=0pt]
- {\switchocg*{#1}{\phantom{\rule{\x3}{\y3}}}};
+ coordinate (p1) at (\p1) coordinate (p2) at (\p2)
+ node[inner sep=0pt,anchor=south west,outer sep=0pt] at (p1)
+ {\switchocg*{#1}{\tikz \useasboundingbox (p1) rectangle (p2);}};
}
- },
+ }
},
switch ocg with mark on/.style 2 args={
postaction={
@@ -958,7 +962,7 @@
;
\end{ocg}
},
- switch ocg={#1 #2},
+ switch ocg={#1 #2}
}
},
switch ocg with mark off/.style 2 args={
@@ -975,7 +979,7 @@
;
\end{ocg}
},
- switch ocg={#1 #2},
+ switch ocg={#1 #2}
}
},
show ocg/.style={
@@ -983,14 +987,13 @@
path picture={
\path let
\p1 = (path picture bounding box.south west),
- \p2 = (path picture bounding box.north east),
- \p3 = (\x2-\x1,\y2-\y1)
+ \p2 = (path picture bounding box.north east)
in
- (path picture bounding box.center)
- node[inner sep=0pt,anchor=center]
- {\showocg*{#1}{\phantom{\rule{\x3}{\y3}}}};
- },
- },
+ coordinate (p1) at (\p1) coordinate (p2) at (\p2)
+ node[inner sep=0pt,anchor=south west,outer sep=0pt] at (p1)
+ {\showocg*{#1}{\tikz \useasboundingbox (p1) rectangle (p2);}};
+ }
+ }
},
hide ocg/.style={
postaction={
@@ -997,14 +1000,13 @@
path picture={
\path let
\p1 = (path picture bounding box.south west),
- \p2 = (path picture bounding box.north east),
- \p3 = (\x2-\x1,\y2-\y1)
+ \p2 = (path picture bounding box.north east)
in
- (path picture bounding box.center)
- node[inner sep=0pt,anchor=center]
- {\hideocg*{#1}{\phantom{\rule{\x3}{\y3}}}};
- },
- },
+ coordinate (p1) at (\p1) coordinate (p2) at (\p2)
+ node[inner sep=0pt,anchor=south west,outer sep=0pt] at (p1)
+ {\hideocg*{#1}{\tikz \useasboundingbox (p1) rectangle (p2);}};
+ }
+ }
},
actions ocg/.style n args={3}{
postaction={
@@ -1011,13 +1013,12 @@
path picture={
\path let
\p1 = (path picture bounding box.south west),
- \p2 = (path picture bounding box.north east),
- \p3 = (\x2-\x1,\y2-\y1)
+ \p2 = (path picture bounding box.north east)
in
- (path picture bounding box.center)
- node[inner sep=0pt,anchor=center]
- {\actionsocg*{#1}{#2}{#3}{\phantom{\rule{\x3}{\y3}}}};
- },
- },
- },
+ coordinate (p1) at (\p1) coordinate (p2) at (\p2)
+ node[inner sep=0pt,anchor=south west,outer sep=0pt] at (p1)
+ {\actionsocg*{#1}{#2}{#3}{\tikz \useasboundingbox (p1) rectangle (p2);}};
+ }
+ }
+ }
}
More information about the tex-live-commits
mailing list