summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty')
-rw-r--r--Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty282
1 files changed, 282 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty b/Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty
new file mode 100644
index 00000000000..b067e4a4e30
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/dvdcoll/pdfnotiz.sty
@@ -0,0 +1,282 @@
+%%
+%% Copyright (C) 2006 by:
+%% Josef Kleber
+%% <josef.kleber@gmx.net>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "author-maintained".
+%%
+%% This Current Maintainer of this work is Josef Kleber.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+%% This style is largely based on Scott Pakin's cooltooltips.sty with minor
+%% adjustmjents for the needs of dvdcoll.cls plus some new commands
+%%
+\NeedsTeXFormat{LaTeX2e}[2001/06/01]%
+\ProvidesPackage{pdfnotiz}[2006/10/05 v1.0 PDF tooltips (pdfnotiz.sty)]%
+\RequirePackage{ifpdf}%
+\RequirePackage{marginnote}%
+\newcommand*{\ctip@form@fields}{}%
+\ifpdf%
+ \AtEndDocument{%
+ \immediate\pdfobj {%
+ <<%
+ /Fields [\ctip@form@fields]%
+ /NeedAppearances true%
+ >>%
+ }%
+ \pdfcatalog {%
+ /AcroForm \the\pdflastobj\space 0 R%
+ }%
+ }%
+\fi%
+\ifpdf%
+ \setbox\@tempboxa=\hbox{}%
+ \immediate\pdfxform\@tempboxa%
+ \edef\ctip@empty@icon{\the\pdflastxform}%
+\fi%
+\newcommand*{\ctip@tip@number}{0}%
+\newcommand*{\ctip@make@Text}[3][0 1 0]{%
+ \pdfannot width 0pt height 0pt depth 0pt {%
+ /Subtype /Text%
+ /C [#1]%
+ /Subj (#2)%
+ /Contents (#3)%
+ /NM (ctip Text \ctip@tip@number)%
+ /AP <<%
+ /N \ctip@empty@icon\space 0 R%
+ /D \ctip@empty@icon\space 0 R%
+ /R \ctip@empty@icon\space 0 R%
+ >>%
+ /Open false%
+ }%
+}%
+\newcommand*{\ctip@current@page}{1}%
+\newcommand*{\ctip@last@invis}{0}%
+\let\ctip@label=\label%
+\newcommand*{\ctip@update@pagenum}{%
+ \ctip@label{ctip:tip:\ctip@tip@number}%
+ \expandafter\let\expandafter\ctip@refname%
+ \csname r@ctip:tip:\ctip@tip@number\endcsname%
+ \@ifundefined{ctip@refname}{%
+ \xdef\ctip@current@page{\thepage}%
+ }{%
+ \def\ctip@secondofN##1##2##3!{%
+ \xdef\ctip@current@page{##2}%
+ }%
+ \expandafter\ctip@secondofN\ctip@refname!%
+ }%
+}%
+\newcommand*{\ctip@make@invisible@Widget}{%
+ \pdfannot width 0pt height 0pt depth 0pt {%
+ /Subtype /Widget%
+ /FT /Btn%
+ /T (ctip invisible Widget \ctip@current@page)%
+ /DA (/Helv 10 Tf 0 0 0 rg)%
+ /Ff 65536%
+ /F 2%
+ /AA <<%
+ /Fo <<%
+ /Type /Action%
+ /S /JavaScript%
+ /JS (event.target.display = display.hidden)%
+ >>%
+ >>%
+ }%
+}%
+\newsavebox{\ctip@content@box}%
+
+\newcommand*{\ctip@unfocus@js}{%
+ var ctipField =%
+ this.getField("ctip invisible Widget \ctip@current@page");%
+ ctipField.display = display.visible;%
+ ctipField.setFocus();%
+}
+\newcommand*{\ctip@enter@js}{%
+ if (!global.ctip_disable_popups) {%
+ var ctipText =%
+ this.getAnnot(this.pageNum, "ctip Text \ctip@tip@number");%
+ ctipText.popupOpen = true;%
+ \ctip@unfocus@js%
+ }%
+}%
+\newcommand*{\ctip@exit@js}{%
+ if (!global.ctip_disable_popups) {%
+ var ctipText =%
+ this.getAnnot(this.pageNum, "ctip Text \ctip@tip@number");%
+ ctipText.popupOpen = false;%
+ \ctip@unfocus@js%
+ }%
+}%
+\newcommand*{\ctip@make@Widget}[3][0 1 0]{%
+ \setlength{\@tempdima}{\wd\ctip@content@box}%
+ \addtolength{\@tempdima}{\fboxsep}%
+ \setlength{\@tempdimb}{\ht\ctip@content@box}%
+ \addtolength{\@tempdimb}{0.5\fboxsep}%
+ \setlength{\@tempdimc}{\dp\ctip@content@box}%
+ \addtolength{\@tempdimc}{0.5\fboxsep}%
+ \hspace*{-0.5\fboxsep}%
+ \immediate%
+ \pdfobj {%
+ <<%
+ /Type /Action%
+ /S /JavaScript%
+%insert for click opening%
+ /JS (\ctip@enter@js)%
+%deleted link ability%
+% /S /URI%
+% /URI (#2)%
+ >>%
+ }%
+ \edef\ctip@action@object{\the\pdflastobj\space 0 R}%
+ \makebox[0pt][l]{%
+ \advance\fboxrule by 0.9999pt%
+ \pdfannot width \@tempdima%
+ height \@tempdimb%
+ depth \@tempdimc {%
+ /Subtype /Link%
+ /A \ctip@action@object%
+ /Border [0 0 \strip@pt\fboxrule]%
+ /C [#1]%
+ }%
+ }%
+ \pdfannot width \@tempdima%
+ height \@tempdimb%
+ depth \@tempdimc {%
+ /Subtype /Widget%
+ /FT /Btn%
+ /T (ctip Field \ctip@tip@number)%
+ /TU (#3)%
+ /DA (/Helv 10 Tf 0 0 0 rg)%
+ /Ff 65536%
+ /BS <<%
+ /Type /Border%
+ /W \strip@pt\fboxrule%
+ >>%
+ /MK <<%
+ /BC [#1]%
+ /TP 1%
+ >>%
+ /AA <<%
+%deleting moseover effects
+% /E <<
+% /Type /Action
+% /S /JavaScript
+% /JS (\ctip@enter@js)
+% >>
+% /X <<
+% /Type /Action
+% /S /JavaScript
+% /JS (\ctip@exit@js)
+% >>
+ /U <<%
+ /Type /Action%
+ /S /JavaScript%
+ /JS (\ctip@unfocus@js)%
+ /Next \ctip@action@object%
+ >>%
+ >>%
+ }%
+ \xdef\ctip@form@fields{\ctip@form@fields\space\the\pdflastannot\space 0 R}%
+}%
+\DeclareRobustCommand{\cooltooltip}[1][0 1 0]{%
+ \def\ctip@popup@color{#1}%
+ \ctip@cooltooltip@i%
+}%
+\newcommand*{\ctip@cooltooltip@i}[6][\ctip@popup@color]{%
+ \savebox{\ctip@content@box}{#6}%
+ \@tempcnta=\ctip@tip@number%
+ \advance\@tempcnta by 1%
+ \xdef\ctip@tip@number{\the\@tempcnta}%
+ \ctip@update@pagenum%
+ \@tempcnta=\ctip@last@invis%
+ \@tempcntb=\ctip@current@page%
+ \ifnum\@tempcnta<\@tempcntb%
+ \ctip@make@invisible@Widget%
+ \xdef\c@ctip@last@invis{\ctip@current@page}%
+ \fi%
+ \makebox[0pt][l]{%
+ \ctip@make@Widget[#1]{#4}{#5}%
+ \makebox[\paperwidth][r]{%
+ \ctip@make@Text[\ctip@popup@color]{#2}{#3}%
+ }%
+ }%
+ \usebox{\ctip@content@box}%
+}%
+\DeclareRobustCommand{\cooltooltiptoggle}[1]{%
+ \savebox{\ctip@content@box}{#1}%
+ \makebox[0pt][l]{%
+ \pdfannot width \wd\ctip@content@box%
+ height \ht\ctip@content@box%
+ depth \dp\ctip@content@box {%
+ /Subtype /Link%
+ /Border [0 0 0]%
+ /A <<%
+ /Type /Action%
+ /S /JavaScript%
+ /JS (%
+ global.ctip_disable_popups = !global.ctip_disable_popups;%
+ var ctipField;%
+ var i;%
+ for (i=1; (ctipField=this.getField("ctip Field " + i)); i++)%
+ ctipField.display =%
+ global.ctip_disable_popups ? display.hidden : display.visible;%
+ )%
+ >>%
+ }%
+ }%
+ \usebox{\ctip@content@box}%
+}%
+\RequirePackage{ifpdf}%
+\ifpdf%
+\else%
+ \PackageWarning{pdfnotiz}{%
+ Not running pdfLaTeX in PDF mode; disabling pdf annotations%
+ }%
+ \renewcommand*{\ctip@cooltooltip@i}[6][]{\mbox{#6}}%
+\fi%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\def\pn@pdf@boxcolor{0 0 1}%
+\def\pn@pdf@linkcolor{0 0 1}%
+\gdef\pn@pdf@desc{}%
+%
+\newcommand{\pdfnote}[1]%
+{%
+ \cooltooltip[\pn@pdf@boxcolor][\pn@pdf@linkcolor]{\dc@pdf@subject}{\pn@pdf@desc}{}{}{#1}%
+}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+\def\pn@pdfmarginnote@color{0 0 1}%
+\def\pn@pdfmarginnote@subject{Info}%
+%
+\newcommand{\pdfmarginnote}[2][Help]{%
+\def\pn@notiz{}%
+\pdfstringdef\pn@notiz{#2}%
+\marginnote{%
+ \pdfannot width 0pt height \baselineskip depth 0pt%
+ {%
+ /Subtype /Text%
+ /C [\pn@pdfmarginnote@color]%
+ /Subj (\pn@pdfmarginnote@subject)%
+ /Name (#1)%
+ /TU ( )%
+ /Contents (\pn@notiz)%
+ /Open false%
+ }%
+ }%
+}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file