summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-06-26 21:55:22 +0000
committerKarl Berry <karl@freefriends.org>2018-06-26 21:55:22 +0000
commitc00c402f9ebb625ed7471c54956908814dd88c15 (patch)
treeab4d4e65774807c508799ef1ed1335fa2eb42286 /Master/texmf-dist
parent775480ef50d7ef9930bb2432b3f08611ce683f01 (diff)
ocgx2 (26jun18)
git-svn-id: svn://tug.org/texlive/trunk@48095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/ocgx2/ChangeLog4
-rw-r--r--Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty71
2 files changed, 40 insertions, 35 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
index 6d492850b42..c93ec6d7113 100644
--- a/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
+++ b/Master/texmf-dist/doc/latex/ocgx2/ChangeLog
@@ -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
diff --git a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
index 4ba86c3b76b..8722c180ffd 100644
--- a/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
+++ b/Master/texmf-dist/tex/latex/ocgx2/ocgx2.sty
@@ -35,8 +35,8 @@
\RequirePackage{xparse}
\RequirePackage{l3keys2e}
-\def\g@ocgxii@date@tl{2018/06/07}
-\def\g@ocgxii@version@tl{0.34}
+\def\g@ocgxii@date@tl{2018/06/26}
+\def\g@ocgxii@version@tl{0.35}
\ProvidesExplPackage{ocgx2}{\g@ocgxii@date@tl}{\g@ocgxii@version@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,21 +933,20 @@
\ifx\empty\ocgxii@name\empty#1\else\ocgxii@name\fi%
}{#1}{\ocgxii@visibility}},
/tikz/execute at end scope={\end{ocg}},
- },
+ }
},
switch ocg/.style={
postaction={
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,41 +987,38 @@
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={
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={
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);}};
+ }
+ }
+ }
}