diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-29 21:12:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-29 21:12:40 +0000 |
commit | 70467f28c321a6700620dd5b77fba19e158047a8 (patch) | |
tree | a58c382a99ad7d070f106090ea27640214d9307f /Master/texmf-dist | |
parent | c8454de77c687a7d1556434032f9461862f1a02b (diff) |
rm ocgtools, requires acrotex
git-svn-id: svn://tug.org/texlive/trunk@27237 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
43 files changed, 0 insertions, 2530 deletions
diff --git a/Master/texmf-dist/doc/latex/ocgtools/README b/Master/texmf-dist/doc/latex/ocgtools/README deleted file mode 100644 index e39a13d65ee..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/README +++ /dev/null @@ -1,21 +0,0 @@ -The package ocgtools is designed to insert OGC (Optional Group -Content, known as layers) into PDF presentations. From the user's -point of view, the package allows to insert in an comfortable way any -TeX material into separate layers in PDF document and also insert -links which toggle theselayers on and off. Parts of the PDF document -like formatted text, tables, math formulas or graphics can be turned -to visible or inivisible state by clicking active links or buttons. - -Similar packages are cooltooltips, pdfcomment, AcroTeX and -fancytooltips. See the ocgtools package documentation for differences -between ocgtools and the other packages. - -The package is distributed with examples build from one source using -several presentation packages (beamer, web, pdfscreen). All necessary -files are on CATN and Texlive 2009. - -Supported by the grant 131/2010 of Higher Education Development Fund -(www.frvs.cz). - - - diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/book.jpg b/Master/texmf-dist/doc/latex/ocgtools/examples/book.jpg Binary files differdeleted file mode 100644 index dfa9376e31e..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/book.jpg +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/fancytipmark.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/fancytipmark.pdf Binary files differdeleted file mode 100644 index 6bc49497e42..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/fancytipmark.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.pdf Binary files differdeleted file mode 100644 index 339d308b85f..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.tex deleted file mode 100644 index ad983fc0b3f..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-article.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass{article} -\usepackage[mouseover]{ocgtools} -\begin{document} -\section{Test} -This is a \ocgminitextrt{OCG layer test}{Test Test -Test} - -\newpage -\section{Second page} -The OCGtools does not (yet) work well on PDF files consistion from one page. -\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.pdf Binary files differdeleted file mode 100644 index 1396ebc3dc8..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.tex deleted file mode 100644 index 28993cf7350..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Hannover.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass{beamer} -\usetheme{Hannover} - -\usepackage[transparent,minimouseover -]{ocgtools} - -%\usepackage{helvet} - -\input ocgtools-test.tex - -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.pdf Binary files differdeleted file mode 100644 index f5777ee95bb..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.tex deleted file mode 100644 index ea461b69bcb..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer-Marburg.tex +++ /dev/null @@ -1,13 +0,0 @@ -\let\oldlabel\label -\documentclass{beamer} - -\usetheme{Marburg} -\usepackage[transparent,minimouseover -]{ocgtools} - -\AtBeginDocument{\let\label\oldlabel} -%\usepackage{helvet} - -\input ocgtools-test.tex - -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.pdf Binary files differdeleted file mode 100644 index 0da1459d953..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.tex deleted file mode 100644 index 331c0a37438..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-beamer.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentclass{beamer} -\usepackage[transparent, -minimouseover -]{ocgtools} -%\usepackage{helvet} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.pdf Binary files differdeleted file mode 100644 index cfdf07241d5..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.tex deleted file mode 100644 index f4607a5ab1b..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-fancytooltips.tex +++ /dev/null @@ -1,34 +0,0 @@ -\documentclass{article} -\usepackage[noxcolor,usetemplates,pdftex]{web} -\screensize{4.875in}{6.5in} -\margins{12pt}{24pt}{24pt}{24pt} - -\definecolor{pozadi}{rgb}{1,1,0.9} -\pagecolor{pozadi} - -\usepackage[filename=tall,mouseover, movetips,blur]{fancytooltips} - -\usepackage[transparent, -mouseover -]{ocgtools} -\begin{document} - -\title{Testing OCGtools and fancytooltips} -\maketitle -\parindent 0 pt -\begin{itemize} -\item -Testing \tooltip{fancytooltips}{1}. (Does the bigger picture of little golf -player appear when moving mouse to the blue text?) - -\item -Testing \ocgminitext{ocgtools}{Wow, seems to work. Great!}. Does it work? -(Click the blue text or move mouse to the last letter) - -\item -Testing \verb|\ocgpicture| -- does the bigger image appear when clicking the -smaller one? -\begin{center}\ocgpicture[width=1cm]{tall.jpg}\end{center} -\end{itemize} - -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.pdf Binary files differdeleted file mode 100644 index e28ada5f3a7..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.tex deleted file mode 100644 index 8e90a6af516..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-minimal.tex +++ /dev/null @@ -1,49 +0,0 @@ -\documentclass{article} - -\usepackage{ocgtools} - -\begin{document} - -\ocgtext{Test}{We test placing OCG's.} for placing OCG's: - -\hbox to \hsize{\hss\begin{minipage}{0.2\linewidth} - \ocgminitextlb{lb}{This is optional OCG.} - - \ocgminitextrb{rb}{This is optional OCG.} - - \ocgminitextlt{lt}{This is optional OCG.} - - \ocgminitextrt{rt}{This is optional OCG.} -\end{minipage} -\hss\hss\hss -\begin{minipage}{0.2\linewidth} - \ocgminitextlb{lb}{This is optional OCG.} - - \ocgminitextrb{rb}{This is optional OCG.} - - \ocgminitextlt{lt}{This is optional OCG.} - - \ocgminitextrt{rt}{This is optional OCG.} -\end{minipage} -\hss -} -\newpage - -\ocgminitextlb{New}{New} \ocgminitextrb{page}{page}. - -Second line - -\bigskip - -\ocgminitext{New}{New} \ocgminitext{page}{page}. - -Second line -\newpage - -Plain page. -\newpage - -\ocgminitextlb{Last}{Last} \ocgminitextrb{page}{page}. - -Second line on last page. -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.pdf Binary files differdeleted file mode 100644 index 25b2042ff83..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.tex deleted file mode 100644 index 48c859b1b77..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-nopanel.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass{article} -\usepackage[pdftex, -nopanel, -screen]{pdfscreen} - -\margins{0.25in}{0.25in}{0.25in}{0.25in} %left,right,top,bot -%\screensize{6in}{8in} -\screensize{4.875in}{6.5in} - -%\usepackage{times} - -\usepackage[transparent, -nobutton, nopageclose -]{ocgtools} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.pdf Binary files differdeleted file mode 100644 index 2e8b1d182e9..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.tex deleted file mode 100644 index 89af37a8681..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen-panelleft.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass{article} -\usepackage[pdftex, -panelleft, -screen]{pdfscreen} - -\margins{0.25in}{0.25in}{0.25in}{0.25in} %left,right,top,bot -%\screensize{6in}{8in} -\screensize{4.875in}{6.5in} - -%\usepackage{times} - -\usepackage[transparent, -nobutton, nopageclose -]{ocgtools} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.pdf Binary files differdeleted file mode 100644 index 8e09643792d..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.tex deleted file mode 100644 index 48921a775a9..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-pdfscreen.tex +++ /dev/null @@ -1,17 +0,0 @@ -\documentclass{article} -\usepackage[pdftex, -panelright, -screen]{pdfscreen} - -\margins{0.25in}{0.25in}{0.25in}{0.25in} %left,right,top,bot -%\screensize{6in}{8in} -\screensize{4.875in}{6.5in} - -%\usepackage{times} - -\usepackage[transparent, -nobutton, nopageclose -]{ocgtools} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.pdf Binary files differdeleted file mode 100644 index 28b3e683178..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.tex deleted file mode 100644 index 12e80f8e2a6..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-leftpanel.tex +++ /dev/null @@ -1,34 +0,0 @@ -\documentclass{article} -\usepackage[%latextoc, -noxcolor,leftpanel, -usetemplates,pdftex]{web} -%\usepackage{times} -\screensize{4.875in}{6.5in} -\margins{12pt}{24pt}{24pt}{24pt} - -\definecolor{pozadi}{rgb}{1,1,0.9} -\pagecolor{pozadi} - -\usepackage[%transparent, -%nobutton -minimouseover -]{ocgtools} - -\buildpanel -{% -\null -\vfill -\textbf{Ocgtools demo} - -\bigskip -by - -\bigskip -Robert Ma\v{r}\'{i}k -\vfill -\panelNaviGroup % defined in web -} - - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.pdf Binary files differdeleted file mode 100644 index bc062d63d36..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.tex deleted file mode 100644 index 6ede932b445..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web-rightpanel.tex +++ /dev/null @@ -1,33 +0,0 @@ -\documentclass{article} -\usepackage[%latextoc, -noxcolor,rightpanel, -usetemplates,pdftex]{web} -%\usepackage{times} -\screensize{4.875in}{6.5in} -\margins{12pt}{24pt}{24pt}{24pt} - -\definecolor{pozadi}{rgb}{1,1,0.9} -\pagecolor{pozadi} - -\usepackage[%transparent, -%nobutton -minimouseover -]{ocgtools} - -\buildpanel -{% -\null -\vfill -\textbf{Ocgtools demo} - -\bigskip -by - -\bigskip -Robert Ma\v{r}\'{i}k -\vfill -\panelNaviGroup % defined in web -} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.pdf Binary files differdeleted file mode 100644 index 36fba04f3ab..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.tex deleted file mode 100644 index ffdd2212447..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-example-web.tex +++ /dev/null @@ -1,19 +0,0 @@ -\documentclass{article} -\usepackage[%latextoc, -noxcolor, -usetemplates,pdftex]{web} -%\usepackage{times} -\screensize{4.875in}{6.5in} -\margins{12pt}{24pt}{24pt}{24pt} - -\definecolor{pozadi}{rgb}{1,1,0.9} -\pagecolor{pozadi} - -\usepackage[%transparent, -%nobutton, -insertvisible, -minimouseover -]{ocgtools} - -\input ocgtools-test.tex -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.bat b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.bat deleted file mode 100755 index 7f0a9ab7a29..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.bat +++ /dev/null @@ -1,5 +0,0 @@ -pdflatex "\AtBeginDocument{\usepackage[pdftex,displaymath,floats,active,tightpage]{preview}}\PassOptionsToPackage{noocg}{ocgtools} \def\ocgpreview#1#2{#2}\input ocgtools-preview " -copy ocgtools-preview.pdf preview-temp.pdf -pdflatex ocgtools-preview -pdflatex ocgtools-preview -pdflatex ocgtools-preview diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.pdf Binary files differdeleted file mode 100644 index 973a4a1015f..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.sh b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.sh deleted file mode 100644 index 344d55fef7b..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.sh +++ /dev/null @@ -1,6 +0,0 @@ -pdflatex "\AtBeginDocument{\usepackage[pdftex,displaymath,floats,active,tightpage]{preview}}\PassOptionsToPackage{noocg}{ocgtools} \def\ocgpreview#1#2{#2}\input $1 " -cp $1.pdf preview-temp.pdf -grep '\\newlabel{' ocgtools-preview.aux | sed 's/newlabel/maplabelstoall/g' > preview.labels -pdflatex $1 -pdflatex $1 -pdflatex $1 diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.tex deleted file mode 100644 index 0cf2411c138..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-preview.tex +++ /dev/null @@ -1,66 +0,0 @@ -\documentclass{article} -\usepackage[%latextoc, -noxcolor, -usetemplates,pdftex]{web} -%\usepackage{times} -\screensize{4.875in}{6.5in} -\margins{12pt}{24pt}{24pt}{24pt} - -\definecolor{pozadi}{rgb}{1,1,0.9} -\pagecolor{pozadi} - -%\scrollmode -\def\MyPersonalMacro{Hello world} - -\title{OCGtools and preview} - -\optionalPageMatter{ - \begin{center} - \colorbox{yellow}{\begin{minipage}{0.5\linewidth} This is a demo - file to test cooperation between ocgtools and preview - packages. Go to the Section \ref{page} on page \pageref{page} - and put you mouse to the question marks following referrences - to figure and equation. The figure and equation should appear - in minilayer at the same page. - - The concept is DoItYourself, see the source - \texttt{.tex} file and script \texttt{ocgtools-preview.sh}. - \end{minipage}} - \end{center} -} - -\def\title#1{} -\usepackage[minimouseover]{ocgtools} - - -\ifx\ocgpreview\undefined\def\ocgpreview#1#2{#1}\fi - - \ocgpreview{\AtBeginDocument{ - \gdef\maplabeltopage#1#2{\expandafter\xdef\csname ocgtools@page@#1\endcsname{#2} -\message{^^J OCG: page #2}} - \gdef\savemaplabels#1#2#3#4{\xdef\ocgtoolstemp{#2}} - \gdef\maplabelstoall#1#2{\savemaplabels#2 \maplabeltopage{#1}{\ocgtoolstemp}} - \input preview.labels - \let\orieqref\eqref - \let\oriref\ref - \def\eqref#1{(\oriref{#1})% - \expandafter\ifx\csname ocgtools@page@#1\endcsname\relax\else - \,{\ocgminitext{$^{\text{?}}$}% - {\includegraphics[page=\csname ocgtools@page@#1\endcsname]{preview-temp}}}% - \fi}% - \def\ref#1{\oriref{#1}% - \expandafter\ifx\csname ocgtools@page@#1\endcsname\relax\else - \,{\ocgminitext{$^{\text{?}}$}% - {\includegraphics[page=\csname ocgtools@page@#1\endcsname]{preview-temp}}}% - \fi}% - }}{\AtBeginDocument{ - \newwrite\refsfile - \pagecolor{lightblue} - \immediate\openout\refsfile=preview.labels - \let\orilabel\label - \def\label#1{\orilabel{#1}\write\refsfile{\string\maplabeltopage{#1}{\thepage}}} - }} - -\input ocgtools-test.tex - -\end{document} diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.pdf Binary files differdeleted file mode 100644 index 258131ee939..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.tex deleted file mode 100644 index 21768f99f6c..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-scrartcl.tex +++ /dev/null @@ -1,11 +0,0 @@ -\documentclass{scrartcl} -\usepackage[mouseover]{ocgtools} -\begin{document} -\section{Test} -This is a \ocgminitextrt{OCG layer test}{Test Test -Test} - -\newpage -\section{Second page} -The OCGtools does not (yet) work well on PDF files consistion from one page. -\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.bat b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.bat deleted file mode 100755 index bdfeb1fe2f2..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.bat +++ /dev/null @@ -1,55 +0,0 @@ -pdflatex ocgtools-example-web -pdflatex ocgtools-example-web -mpost mfpic-picture.mp -pdflatex ocgtools-example-web - -pdflatex ocgtools-example-web-leftpanel -pdflatex ocgtools-example-web-leftpanel -pdflatex ocgtools-example-web-leftpanel - -pdflatex ocgtools-example-web-rightpanel -pdflatex ocgtools-example-web-rightpanel -pdflatex ocgtools-example-web-rightpanel - -pdflatex ocgtools-example-pdfscreen-panelleft -pdflatex ocgtools-example-pdfscreen-panelleft -pdflatex ocgtools-example-pdfscreen-panelleft - -pdflatex ocgtools-example-pdfscreen-nopanel -pdflatex ocgtools-example-pdfscreen-nopanel -pdflatex ocgtools-example-pdfscreen-nopanel - -pdflatex ocgtools-example-pdfscreen -pdflatex ocgtools-example-pdfscreen -pdflatex ocgtools-example-pdfscreen - -pdflatex ocgtools-example-beamer -pdflatex ocgtools-example-beamer -pdflatex ocgtools-example-beamer - -pdflatex ocgtools-example-beamer-Hannover -pdflatex ocgtools-example-beamer-Hannover -pdflatex ocgtools-example-beamer-Hannover - -pdflatex ocgtools-example-beamer-Marburg -pdflatex ocgtools-example-beamer-Marburg -pdflatex ocgtools-example-beamer-Marburg - -pdflatex ocgtools-example-minimal -pdflatex ocgtools-example-minimal -pdflatex ocgtools-example-minimal - -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips - -pdflatex ocgtools-article -pdflatex ocgtools-article -pdflatex ocgtools-article - -pdflatex ocgtools-scrartcl -pdflatex ocgtools-scrartcl -pdflatex ocgtools-scrartcl - -ocgtools-preview.bat
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.sh b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.sh deleted file mode 100644 index 27900f84874..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.sh +++ /dev/null @@ -1,56 +0,0 @@ -pdflatex ocgtools-example-web -pdflatex ocgtools-example-web -mpost mfpic-picture.mp -pdflatex ocgtools-example-web - -pdflatex ocgtools-example-web-leftpanel -pdflatex ocgtools-example-web-leftpanel -pdflatex ocgtools-example-web-leftpanel - -pdflatex ocgtools-example-web-rightpanel -pdflatex ocgtools-example-web-rightpanel -pdflatex ocgtools-example-web-rightpanel - -pdflatex ocgtools-example-pdfscreen-panelleft -pdflatex ocgtools-example-pdfscreen-panelleft -pdflatex ocgtools-example-pdfscreen-panelleft - -pdflatex ocgtools-example-pdfscreen-nopanel -pdflatex ocgtools-example-pdfscreen-nopanel -pdflatex ocgtools-example-pdfscreen-nopanel - -pdflatex ocgtools-example-pdfscreen -pdflatex ocgtools-example-pdfscreen -pdflatex ocgtools-example-pdfscreen - -pdflatex ocgtools-example-beamer -pdflatex ocgtools-example-beamer -pdflatex ocgtools-example-beamer - -pdflatex ocgtools-example-beamer-Hannover -pdflatex ocgtools-example-beamer-Hannover -pdflatex ocgtools-example-beamer-Hannover - -pdflatex ocgtools-example-beamer-Marburg -pdflatex ocgtools-example-beamer-Marburg -pdflatex ocgtools-example-beamer-Marburg - -pdflatex ocgtools-example-minimal -pdflatex ocgtools-example-minimal -pdflatex ocgtools-example-minimal - -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips -pdflatex ocgtools-example-fancytooltips - -pdflatex ocgtools-article -pdflatex ocgtools-article -pdflatex ocgtools-article - -pdflatex ocgtools-scrartcl -pdflatex ocgtools-scrartcl -pdflatex ocgtools-scrartcl - -sh ocgtools-preview.sh ocgtools-preview -rm *.log *.aux *.toc *.snm *.nav *.out *.pos mfpic-picture.* Tooltipsdljs.djs
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.tex b/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.tex deleted file mode 100644 index b750e5ca25f..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/ocgtools-test.tex +++ /dev/null @@ -1,269 +0,0 @@ -\usepackage[metapost]{mfpic} -\opengraphsfile{mfpic-picture} -\usepackage{amsmath} -\usepackage{helvet} -\let\rmdefault\sfdefault - -\usepackage{wrapfig} -\definecolor{darkgreen}{rgb}{0,0.5,0} -% new page which works in beamer class only -\def\beamernewpage{\ifx \usetheme \undefined \relax \else \newpage\fi} - -% background for web.sty package -\ifx \ifweb@navibar \undefined \relax \else -\definecolor{lightgray}{rgb}{0.9,0.9,0.9} -\newbox\backgroundbox -\newbox\backgroundboxa -\setbox\backgroundboxa=\hbox{\rotatebox{20}{{\color{lightgray}\Large ocgtools\color{black}}}} -\newbox\backgroundboxb -\setbox\backgroundboxb=\hbox to \paperwidth{\xleaders\copy\backgroundboxa\hfill} -\newbox\backgroundboxc -\setbox\backgroundboxc=\vbox to \paperheight{\xleaders\copy\backgroundboxb\vfill} -\makeatletter - \def\ocgtools@shipoutstart@hook{\hbox to 0 pt{% - \kern -1in \vbox to 0 pt{\vss\copy\backgroundboxc} - \hss}} -\makeatother -\fi - -\begin{document} - -\sloppy -\fboxsep=4pt - -\title{Ocgtools demo} -\author{Robert Ma\v{r}\'{i}k} - -\maketitle -\def\maxwell{ -\nabla \cdot D&= \rho \\ -\nabla \cdot B&=0 \\ -\nabla \times E&=- \frac{\partial B}{\partial t}\\ -\nabla \times H&=J+ \frac{\partial D}{\partial t}} - -\tableofcontents -\beamernewpage -\makeatletter\ifx\PDFSCR@Info\undefined\relax\else\newpage\fi\makeatother - -\section{Introduction} - -\vbox to 0 pt{\noindent\hbox{\ocgpicture[width=3cm]{book.jpg}} - \vss} - -\definecolor{mywhite}{rgb}{0.3,0.3,0.6} -\hangindent=3.5cm \hangafter -5 \noindent This is test file for -\texttt{ocgtools} package. You can (using \texttt{pdflatex}) insert -hidden \TeX{} material into PDF files and open/close by clicking -active links. The active links in this document are pictures (like the -picture in this paragraph) or blue text. There are two kinds of -behavior -\begin{itemize} -\item OCG spans over allmost whole PDF pages (with black or - transparent boundary) and can be hidden by clicikng anywhere in the - page -- \makeatletter - \ocgtext[0pt,bg=red,fg=yellow]{Try it here!}{Click - \ifocg@hide@button anywhere \else red cross \fi to close.} \makeatother - -\item OCG is small and can be hidden either with the same link which - opens this text or with red mark on the right top corner -- - \ocgminitext[4cm, bg=red]{Try it here!}{Click the same link or the red mark - to close.} -\end{itemize} - -\beamernewpage Note that the pictures may look darker in Adobe Reader -on Linux if you use package option \texttt{transparent} (means -transparent boundary of the OCG's, used for example in demos for -Beamer class and \verb|pdfscreen.sty| package). For comparison you can -look at the original picture -\href{http://math.mendelu.cz/en/analyza?lang=en}{here}) or at the -demos which use \verb|web.sty| package. \ocgtext[5cm,fg=red]{PDF viewer}{More - preciselly, Adobe Reader. \par \bigskip It is well known program. - You can install it on both Linux and Windows.} uses another -rendering when trasparency is called and this seems to be system -dependent. So be carefull when combining -\ocgminitext[3cm,bg=lightgray,fg=darkgreen]{\texttt{transparent}}{\rightskip 0 pt - plus 1 fill This comment is in \texttt{vbox} with specified width - and may contain new paragraphs. It is rather long and placed on the - top of the page. Hence \textit{it is shifted a bit to fit the area - on the screen}. However, if the papersize is small (like for - Beamer test files), the bottom part remains invisible for reader. - -\smallskip 2-nd paragraph. - -\smallskip 3-rd paragraph. This is the last paragraph.} option and -bitmap pictures. - -\definecolor{green}{rgb}{0.5,1,0.5} -\begin{minipage}[c]{0.4\linewidth} - \ocgtext[4cm]{\begin{align}\label{eq:maxwell}\maxwell - \end{align} - }{\colorbox{green}{\kern-2\fboxsep\hbox to \hsize{\hss Maxwell equations\hss}}$$\begin{aligned} \maxwell - \end{aligned}$$} -\end{minipage}\hskip 0 pt plus 1 filll -\begin{minipage}[c]{0.2\linewidth} -\ocgpicture[width=\linewidth]{tall.jpg} -\end{minipage}\hskip 0 pt plus 1 filll -\begin{minipage}{0.3\linewidth} - Here we test - \ocgminitextlt[bg=black,fg=yellow]{ocg's}{{\color{red}O}ptional - {\color{red}C}ontents {\color{red}G}roup} which are inside group - (Maxwell's equation in minipage) and which are taller than wide - (little golf player). -\end{minipage} - -\newpage -\section{Options of the package} - -{ -\begin{wrapfigure}[5]{r}{4cm} - \ocgpicture[width=4cm]{wide.jpg} -\end{wrapfigure} -\def\defaultocgpapercolor{black}\def\defaultocgfontcolor{green} -This is some \ocgtext{random text}{anmf asdfh akdfjha adfjh akjdfh } -to see that \ocgminitextlb{\texttt{wrapfig}}{Wrapfig is a package for - \LaTeX.} works and wide pictures are scaled properly. Several -options are available for the package \verb|ocgtools|: -\ocgminitext[6cm]{transparent}{\texttt{beamer} and \texttt{pdfscreen} - demo files are compiled with \texttt{transparent} option -- the - black boundary of big layers is opaque.}, -\ocgminitext[6cm]{insertvisible}{The file \texttt{ocgtools-example-web.tex} - is compiled with \texttt{insertvisible} option. The layers are - inserted as visible layers and are turned to invisible when the PDF - file is opened.}, - \ocgminitext[8cm]{nobutton}{Normally the pages - with active layers have a transparent button which can be used to - hide this layer. The user simply clicks anywhere and the layers - become hidden. In some viewers (like Foxit Reader) the button is not - 100\% transparent. This option allows not to include the big button - to hide layers. The layers can be closed by clicking the red cross - below. Demo files based on \texttt{pdfscreen} are compiled with this option. - Use this option to make the document accessible to Foxit Reader users.}, - \ocgminitext{noocg}{All OCG's are ignored}, - \ocgminitext{inactive}{The same as - \texttt{noocg}}, \ocgminitext{active}{OCG's are inserted, overrides - \texttt{inactive} and \texttt{noocg}}, - \ocgminitext[6cm]{noprogressmsg}{No messagae about processing OCG's at - the first page when document is opened.}, - \ocgminitext[8cm]{minimouseover}{\texttt{web} and \texttt{beamer} demo - files are compiled with \texttt{minimouseover} option. You can open - the minilayer by mouseover action in the area which is in the form - of invisible square 8pt$\times$8pt placed at the bottom right corner - of the referrence text.}, -\ocgminitext[8cm]{mouseover}{The same as - \texttt{minimouseover}, but works also for big layers. No demo file is - compiled with this option.}, -\ocgminitext[8cm]{nopageclose}{By default, layers and buttons for hiding them are - turned into hidden when entering a page. This option turns this behavior off. - Demo files based on \texttt{pdfscreen} are compiled with this option.} -(each option has an associated -minilayer with an explanation). Examples distributed with the package -are in the form of demo files based on three packages (\verb|beamer|, -\verb|web|, \verb|pdfscreen|). Each example has three variants with no -panel, with panel on the right and on the left and each example is -compiled with different options. The current document is compiled with -the following options: {\bfseries \makeatletter - \if@ocgtools@transparent transparent, \fi \if@ocgtools@insertvisible - insertvisible, \fi \ifocg@hide@button \relax \else nobutton, \fi - \ifx \ocgtools@progressmsg\relax - noprogressmsg, \fi \if@ocgtools@mouseover mouseover,\fi - \if@ocgtools@minimouseover minimouseover,\fi \if@ocgtools@pageclose\else nopageclose,\fi \makeatother } - -Note that we used \verb|\def\defaultocgpapercolor{black}| and -\verb|\def\defaultocgfontcolor{green}| on this page. - -} -\newpage -\section{A taste of mathematics} - -\def\a{\begin{mfpic}[80][40]{-0.1}{2}{-0.1}{2.8} - \gfill[green]\btwnfcn{0,1.5,0.1}{1+(x-1.2)**2}{0} - \axes - \xmarks{1.5} - \tlabelsep{4pt} - \tlabel[tc](0,0){$a$} - \tlabel[tc](1.5,0){$b$} - \pen{1pt} - \function{0,1.5,0.1}{1+(x-1.2)**2} - \end{mfpic}} - - \begin{figure} - \centering - \ocgtext{\a}{\a} - \caption{Floating figure} - \label{fig:figure} - \end{figure} - - Mfpic pictures can be scaled easily (see the floating figure). - - \beamernewpage We can add explanation to some computations easily - (Note the text \verb|Why?| inserted automatically by redefining - macro \verb|\ocgtextend|). - -{\def\ocgtextend{\raise0.75\baselineskip\hbox to 0 pt{\hss\tiny\color{red}Why?}\hss} - \global\def\dx{\,\mathrm{d}x} -\begin{eqnarray}\label{eq:label} -\int\ln x\dx&\ocgminitext[4cm]={Integration by parts $$\int\ln x\dx=\int1\cdot\ln x \dx$$}&x\ln x-\int x\frac 1x\dx\\ -&\ocgminitext={Formula $\int 1\dx=x$}&x\ln x - x +C -\end{eqnarray} - -} - -\newpage -\section{Few more tests} -Package \verb|ocgtools.sty| redefines output routine via -\verb|atbegshi.sty| package. From this reason it may be incompatible -with some other packages dealing with output routine. However, the -package \verb|eso-pic.sty| works fine. - -Test for placing OCG's: - -\hbox to \hsize{\hss\begin{minipage}{0.2\linewidth} - \ocgminitextlb{lb}{This is optional OCG.} - - \ocgminitextrb{rb}{This is optional OCG.} - - \ocgminitextlt{lt}{This is optional OCG.} - - \ocgminitextrt{rt}{This is optional OCG.} -\end{minipage} -\hss\hss\hss -\begin{minipage}{0.2\linewidth} - \ocgminitextlb{lb}{This is optional OCG.} - - \ocgminitextrb{rb}{This is optional OCG.} - - \ocgminitextlt{lt}{This is optional OCG.} - - \ocgminitextrt{rt}{This is optional OCG.} -\end{minipage} -\hss -} - -\ifx \MyPersonalMacro \undefined \else -We inserted equation \eqref{eq:label} and Figure \ref{fig:figure} in -this document. - -The reference to Maxwell equations \eqref{eq:maxwell} works only if -compiled on Linux via \texttt{ocgtools-preview.sh} (called from -\texttt{ocgtools-test.sh} automatically with correct parameter). \fi - -\label{page} -\newpage - -\ocgminitextlb{New}{New} \ocgminitextrb{page}{page}. - -Second line - -\bigskip - -\ocgminitext{New}{New} \ocgminitext{page}{page}. - -Second line -\newpage - -Plain page. -\newpage - -\ocgminitextlb{Last}{Last} \ocgminitextrb{page}{page}. - -Second line on last page. diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/tall.jpg b/Master/texmf-dist/doc/latex/ocgtools/examples/tall.jpg Binary files differdeleted file mode 100644 index 7df7b6ef2fc..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/tall.jpg +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/tall.pdf b/Master/texmf-dist/doc/latex/ocgtools/examples/tall.pdf Binary files differdeleted file mode 100644 index aa27fd27f7a..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/tall.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/examples/wide.jpg b/Master/texmf-dist/doc/latex/ocgtools/examples/wide.jpg Binary files differdeleted file mode 100644 index 130885e5dd7..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/examples/wide.jpg +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/ocgtools/ocgtools.pdf b/Master/texmf-dist/doc/latex/ocgtools/ocgtools.pdf Binary files differdeleted file mode 100644 index 9efccb2901e..00000000000 --- a/Master/texmf-dist/doc/latex/ocgtools/ocgtools.pdf +++ /dev/null diff --git a/Master/texmf-dist/source/latex/ocgtools/ocgtools.dtx b/Master/texmf-dist/source/latex/ocgtools/ocgtools.dtx deleted file mode 100644 index 2949d0be269..00000000000 --- a/Master/texmf-dist/source/latex/ocgtools/ocgtools.dtx +++ /dev/null @@ -1,1122 +0,0 @@ -% \iffalse meta-comment -% -% Copyright (C) 2010 by Robert Marik <marik@mendelu.cz> -% ----------------------------------------------------- -% -% This file may be distributed and/or modified under the conditions of -% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX -% version 1999/12/01 or later. -% -% \fi -% -% \iffalse -%<*driver> -\ProvidesFile{ocgtools.dtx} -%</driver> -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{ocgtools} -%<*package> - [2010/11/19 v0.8a ocgtools.dtx file] -%</package> -% -%<*driver> -\documentclass{ltxdoc} -\usepackage{a4wide,url,color} -\EnableCrossrefs -\CodelineIndex -\RecordChanges - -\begin{document} - \DocInput{ocgtools.dtx} - \PrintChanges - \PrintIndex -\end{document} -%</driver> -% \fi -% -% \CheckSum{1082} -% -% \CharacterTable -% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -% Digits \0\1\2\3\4\5\6\7\8\9 -% Exclamation \! Double quote \" Hash (number) \# -% Dollar \$ Percent \% Ampersand \& -% Acute accent \' Left paren \( Right paren \) -% Asterisk \* Plus \+ Comma \, -% Minus \- Point \. Solidus \/ -% Colon \: Semicolon \; Less than \< -% Equals \= Greater than \> Question mark \? -% Commercial at \@ Left bracket \[ Backslash \\ -% Right bracket \] Circumflex \^ Underscore \_ -% Grave accent \` Left brace \{ Vertical bar \| -% Right brace \} Tilde \~} -% -% -% \changes{v0.5}{2010/04/01}{First public version} -% \changes{v0.6}{2010/04/10}{Keeping document's dirty for Adobe -% Acrobat users} -% \changes{v0.7}{2010/05/01}{Each (mini)text layer -% can get its own colors, fixed layerHshift and layerVshift macros, -% options \texttt{inactive} and \texttt{active}} -% \changes{v0.8}{2010/05/10}{Minor fix related to fancytooltips package} -% \changes{v0.8a}{2010/11/19}{Minor fix related to color in new eforms package} -% -% \GetFileInfo{ocgtools.dtx} -% -% \DoNotIndex{\newcommand,\newenvironment,\def} -% -% \title{The \textsf{ocgtools} package\thanks{This document -% corresponds to \textsf{ocgtools}~\fileversion, dated \filedate.} -% \thanks{Supported by grant 131/2010 of Higher -% Education Development Fund (FRV\v S) }} \author{Robert Ma\v r\'\i k \\ -% \texttt{marik@mendelu.cz}} -% -% \maketitle -% -% \section{Introduction} -% -% The package |ocgtools| is designed to insert OCG (Optional Content -% Group) into PDF presentations. From the user's point of view, the -% package allows to insert in an comfortable way any \TeX{} material -% into separate layer in PDF document and insert links which toggle -% this layer on/off. Hence parts of PDF document like formatted text, -% tables, math formulas or graphics can be turned to visible or -% invisible state by clicking active links or buttons. -% -% Similar packages are |cooltooltips|, |pdfcomment|, |AcroTeX| and -% |fancytooltips|. In contrast to |cooltooltips| and |pdfcomment|, we -% can work with any \TeX{} material, not only plain text. In contrast -% to |fancytooltips|, no external file is necessary and more -% minilayers (see below) can be opened simultaneously on one page. -% However, |fancytooltips| and |ocgtools| can be combined in the same -% document, even on the same page\footnote{remember to load -% fancytooltips as the first package}. |AcroTeX| has far more -% possibilities than |ocgtools|, but has three disadvantages: (1) -% limited support for |pdftex| (no layers with |pdftex| driver) (2) -% PDF file needs post-processing (3) for the post-processing the -% non-free Adobe Acrobat Professional is necessary. However, the user -% of |ocgtools| must have |AcroTeX| installed, since we use its -% capability to insert buttons and JavaScripts into document (|eforms| -% and |insdljs| packages). -% -% Two types of OCG objects can be inserted -% \begin{itemize} -% \item \textit{layers}: OCG's which span across the whole size of paper -% (scaled if necessary) -% \item \textit{minilayers}: OCG's which have their natural size and -% are placed somewhere close to the link which toggles them on/off. -% \end{itemize} -% -% The user should use viewer which allows to hide/reveal layers by -% JavaScript. This includes especially Adobe Reader. Some limited -% functionality is also in Foxit Reader (see the option |nobutton| -% below). In some other viewers (like |xpdf|) users see red warning on -% the first page (see |\ocgtools@msg|), all layers are visible and -% cannot be hidden. -% -% \marginpar{\texttt{Important comment!}}\textbf{\color{red} Big -% warning:} Unfortunately, with this package you may make your PDF -% files \textbf{less portable} even if you use Adobe Reader! Till now, -% we observed the following problems (for known problems not related -% to portability se the end of this manual): -% \begin{itemize} -% \item jpg pictures may look darker when using \texttt{transparent} -% option and \textbf{Linux} version of Adobe Reader -- Adobe Reader -% switches to different rendering method which seems to be system -% dependent. Hope, Adobe fixes this problem soon. -% \item The layer with initial message on the first page which should -% be hidden to the users of Adobe Reader is sometimes still visible, -% if the PDF file is opened in Internet browser. From this reason, -% layer \texttt{ocgtools0} is switched on and then off when -% initializing PDF document. Hope, this workaround solves the -% problem. If not, report the problem with a minimal example, please. -% \end{itemize} -% -% \section{Examples} Several examples are distributed with the -% package. We have one minimal example, one example which shows -% cooperation with |preview.sty| and mainly -- examples which show -% cooperation with three most popular packages to build -% presentations. This includes |web.sty|, |pdfscreen.sty| and -% |beamer.cls|. We have three demo files for each -- with no panel, -% with panel on the right and with panel on the left. All examples can -% be recompiled by running |ocgtools-test.bat| on Windows and -% |ocgtools-test.sh| on Linux. -% -% \section{Usage} -% -% \subsection{Compilation} -% All the packages we use are on CTAN or in \TeX live2009. The file -% |ocg.sty| is a part of |asymptote| package\footnote{Do not -% interchange with the |ocg.sty| provided by \"Osterreichische -% Computer Geselshafft. The correct file |ocg.sty| is at -% \url{http://www.tug.org/svn/texlive/trunk/Master/texmf/tex/latex/asymptote/ocg.sty}}. -% |AcroTeX| is quite old on CTAN but the version on CTAN works well. -% New version of |AcroTeX| is at |www.acrotex.net|, if necessary. -% -% \bigskip \textbf{Prerequisites}: Only |pdflatex| is supported. The -% route via |dvips| or |dvipdfm| is not (yet?) supported (this -% restriction follows from |ocg.sty| and |transparent.sty| -% packages). To work with the package load |color.sty| and -% |hyperref.sty| packages. (This is usually done automatically by most -% packages which are used to build PDF presentations. If not, these -% packages are loaded by |ocgtools| automatically as soon as -% |\definecolor| and |\href| remain undefined, respectively.) You may -% use also |xcolor.sty|, but this package is not compatible with -% |transparent| option. \bigskip -% -% You have to compile your |.tex| file \textit{three times} (!). If -% you change your document and create new layer, you have to compile -% three times again. After most changes (which include change in -% position of but not the number of layers) you have to compile twice -% to put layers on correct position. If you change the content of text -% layers or minilayers, one compilation is sufficient. -% -% \subsection{Package options} -% Load package |ocgtools.sty| as usual: -% \cs{usepackage}\oarg{options}|{ocgtools}|. Options include: -% \begin{description} -% \item[\texttt{transparent}] Layers produced by |\ocgtext| and -% |\ocgpicture| in fact do not span over the whole page, but the -% material of layer is scaled to some reasonable size (we keep -% aspect ratio and the width and height are not bigger than -% \DescribeMacro{\ocgtools@maxheight}|\ocgtools@maxheight| and -% \DescribeMacro{\ocgtools@maxwidth} |\ocgtools@maxwidth|). If the -% layer is activated, the page is covered by a uniform color |ocgbg| -% and the layer is placed on the top. The options |transparent| -% makes the color |ocgbg| transparent. Looks cool, but it could be -% slow and could change some colors of bitmap pictures (and this -% behavior seems to be system dependent -- looks differently on -% Linux and differently on Windows). The transparency is achieved by -% putting the command |\ocgtools@transparent| on appropriate place. -% The default setting is -% |\def\ocgtools@transparent{\transparent{0.4}}|. Use something like -% like the following three lines to override:\\ -% |\makeatletter|\\ -% |\def\ocgtools@transparent{\transparent{0.6}}|\\ -% |\makeatother| \\Default values for |\ocgtools@maxheight| and -% |\ocgtools@maxwidth| are 0.9 of |\paperheight| and |\paperwidth|. -% You can redefine them after |\begin{document}| (remember to use -% |\makeatletter| \dots |\makeatother| pair). -% \item[\texttt{nobutton}] The pages with active layers have a -% transparent button which can be used to hide this layer. The user -% simply clicks anywhere and the layers become hidden. In some -% viewers (like Foxit Reader) the button is not 100\% transparent. -% This option allows not to include the big button to hide layers. -% The layers can be closed by clicking the red cross -% below. -% \item[\texttt{insertvisible}] In some rare cases problems with OCG's -% occur on Windows installation of \TeX. Temporary (I hope) -% workaround is to use this option, which inserts OCG's as visible. -% The visibility is turned off when the PDF is opened on the first -% page. -% \item[\texttt{mouseover}] Layers can be opened by MouseOver action. -% The corresponding active area is an invisible square with side 8pt -% placed on the right bottom corner of the text or picture which -% opens the layer. More details: MouseOver opens the layer and -% MouseExit hides this layer again. If mouse button is clicked, the -% layer remains opened after exiting the button and can be closed by -% hovering and exiting minibutton, clicking the active area outside -% the minibutton or clicking the red cross. The field with red cross -% gets focus after opening the layer and hence pressing Enter key -% also hides the layer or minilayer. -% \item[\texttt{minimouseover}] As mouseover, but restricted to -% minilayers. -% \item[\texttt{noprogressmsg}] Opening PDF on the first page show the -% message related to initial processing layers. This option turns -% the message off. -% \item[\texttt{nopageclose}] By default, all layers become off and -% all buttons become hidden if the page is changed. The option -% \texttt{nopageclose} suppresses this behavior. -% \item[\texttt{inactive}] This option makes the package inactive. -% \item[\texttt{noocg}] The same as \texttt{inactive}. -% \item[\texttt{active}] This option forces the package active even if -% |inactive| option is loaded. -% \end{description} -% -% \subsection{Text layer which extends to papersize} -% The macro |\ocgtext[width=|\meta{width}, |bg=|\meta{color1}, -% |fg=|\meta{color2}|]|\marg{text1}\marg{text2} -% \DescribeMacro{\ocgtext} is used to create layer which contains any -% \LaTeX{} material. \meta{text1} is a text which is written in an -% ``usual'' way (in blue color which indicates that this text can be -% used to hide/unhide another object) and this text is used to -% hide/unhide layer with \meta{text2} (which could be text divided -% into more than one paragraph, figure created by |mfpic| or any -% \LaTeX{} material). \meta{text2} is either placed into |\hbox| (if -% \meta{width} is 0\,pt, which is default) or wrapped by |\vbox| with -% |\hsize| equal to \meta{width} (in the opposite case). The color -% \meta{color1} is used to set the background for this box and the -% color \meta{color2} is used as text color. The default value for -% \meta{color1} is stored in macro |\defaultocgpapercolor| and the -% default vaue for this macro is \DescribeMacro{ocgpaper} |ocgpaper|. -% The color |ocgpaper| is yellow by default, more precisely, it is -% declared with |\definecolor{ocgpaper}{rgb}{1,1,0.2}|. The default -% value for \meta{color2} is stored in macro |\defaultocgfontcolor| -% and the default vaue for this macro is -% \DescribeMacro{ocgfontcolor}|ocgfontcolor|. The color |ocgfontcolor| -% is declared as black by default. You can use also key words -% |background| instead of |bg| and |color| instead of |fg|. The -% keyword |width| can be omitted, provided \meta{width} comes as first -% argument. Thus |\ocgtext[1cm,background=black,color=white]{text}| -% puts the white text on black background in the box of width 1cm. For -% more details about color management see paragraph \ref{summary}. -% -% \subsection{Layer with image which extends to papersize} -% \DescribeMacro{\ocgpicture} The macro -% |\ocgpicture|\oarg{params}\marg{picture} is used to insert a picture -% which is used as a link to layer with bigger version of this -% picture. The optional parameter \meta{params} is used by -% |\includegraphics| command to draw picture in text. The layer -% contains scaled version of the picture (aspect ratio is preserved). -% -% \subsection{Layer with text (or whatever) in its natural size} -% \DescribeMacro{\ocgminitext} The macro -% |\ocgminitext[width=|\meta{width}, |bg=|\meta{color1}, -% |fg=|\meta{color2}|]|\marg{text1}\marg{text2} is used to create layer -% containing \meta{text2} which is placed near the right top corner of -% \meta{text1}. \meta{text2} is placed into |\hbox| or |\vbox| with -% given |\hsize| according to the value of \meta{width} and other -% optional parameters, as has been explained at |\ocgtext| -% macro. Macros |\ocgminitextrb|, |\ocgminitextlt| and -% |\ocgminitextlb| can be used to place the minilayer to the right -% bottom, left to and left bottom corner. -% -% Starting from version 0.9 you can use keywords -% |jsopen=|\meta{openaction} and |jsclose=|\meta{closeaction} to -% define JavaScript action which is performed when the layer is opened -% and closed, respectively. -% -% \subsection{Fine-tuning, customizing} -% \DescribeMacro{\ocgtextstart}\DescribeMacro{\ocgtextend} Macros -% |\ocgtextstart| and |\ocgtextend| are used to denote the start and -% the end of hyperlink which is used to hide/reveal layers. Default -% setting is |\def\ocgtextstart{\color{blue}}| and |\def\ocgtextend{}| -% and hence, the links are blue and there is no mark at the end of the -% link. -% -% \DescribeMacro{ocgbg} The color |ocgbg| is used to set the color -% which are used to hide page when using |\ocgtext| and |\ocgpicture| -% commands. The default setting is |\definecolor{ocgbg}{rgb}{0,0,0}|. -% You may want to redefine this color, but you have to do this before -% |\begin{document}|. -% -% \DescribeMacro{\layerHshift} \DescribeMacro{\layerVshift} The -% dimensions |\layerHshift| and |\layerVshift| are used to place -% layers exactly on the top of the page. Should be set automatically -% in the second pass, when reading aux file. If not (the big layers -% do not cover the PDF page and minitext layers are shifted), you -% may adjust them as required after |\begin{document}|. In this -% case, \textit{report the problem} to the author of the package, -% please. -% -% Commands |\ocgtools@shipoutstart@hook| and -% |\ocgtools@shipoutend@hook| are introduced to insert some material -% at the begin and at the end of the box with the page contents. Can -% be used for example to put background to the presentation. Both -% commands should produce boxes of zero dimensions, i.e. use something -% like -% \begin{verbatim} -% \makeatletter -% \def\ocgtools@shipoutstart@hook{\hbox to 0 pt{\kern -1in \Huge -% A\hss}} -% \makeatother -% \end{verbatim} -% to insert letter "A" into the left bottom corner. Note that you will -% see this letter only if the background of the presentation is -% transparent. See also the files |ocgtools-example-web*.tex| and -% |ocgtools-example-web*.pdf| for slightly more complicated -% background. -% -% {\sloppy \DescribeMacro{\...envelope} The arguments of commands -% |\ocgpicture|, |\ocgtext| and family of |\ocgminitext| etc. are -% wrapped by macros |\ocgtools@pict@envelope|, -% |\mocgtools@text@envelope| and |\ocgtools@minitext@envelope|, -% respectively. You can redefine these macros to suit more to your -% need. All macros are |\relax| by default. -% -% }\DescribeMacro{\ocgclosechar} The |\ocgclosechar| command is used to -% print mark which is used to close layers. This mark is a red cross. -% On the minitextlayers with red background we switch this color to -% black (see the first few lines of the code to see, how we get this -% behavior). Note that we used the macro -% |\if@ocgtools@insideminilayer| which is true on layers with minitext -% and false otherwise. -% -% \DescribeMacro{\ocgtools@msg} The |\ocgtools@msg| command contains -% string for users of viewers which do not support layers (see the -% first few lines of the code for default settings). -% -% \subsection{Summary on customizing colors in text layers}\label{summary} -% Note that all colors related to the layers are set (and hence must -% be declared before) when reading auxiliary files at -% |\begin{document}|. Declaring of redefining colors after -% |\begin{document}| has no influence. To summarize, if you want to -% change colors, use the following. -% \begin{itemize}\sloppy -% \item To change the setting in the whole paper, redeclare colors -% |ocgpaper| and |ocgfontcolor| before |\begin{document}|. Use the -% command |\definecolor| for this purpose. -% \item To change the setting from now to the end of document (or -% group) redefine macros |\defaultocgpapercolor| and -% |\defaultocgfontcolor|. Use for example -% |\renewcommand{\defaultocgpapercolor}{green}|. -% \item To change the setting for one single layer use |bg| and |fg| -% keywords in optional parameter of |\ocgtext| and |\ocgminitext| -% macros. -% \end{itemize} -% -% \section{Possible future development and known problems} -% The source code is in Mercurial repository at -% \url{http://bitbucket.org/robert.marik/ocgtools/}. You can also -% report problems and issues in the forum at this site. -% \subsection{Known problems} -% \begin{enumerate} -% \item The package does not work properly if the \textbf{\color{red}PDF has one page} -% only. This is probably minor problem, since most presentations are -% longer and the problem will be traced later. -% \item There could be a \textbf{\color{red}conflict with another package which -% deals with} |\pdfpageattr|. This problem is resolved for -% fancytooltips package. To make both fancytooltips and ocgtools -% work in one document, load \textit{fancytooltips as the first one} -% and ocgtools after. Remember the only one |\pdfpageattr| is -% allowed in PDF specification for each single page. -% \item In some rare cases the layers may be not inserted properly -% when the \textbf{\color{red}\LaTeX{} file is compiled on Windows} -% -- see the option \texttt{insertvisible} which solves this -% problems in most cases. Since the author has limited access to -% \TeX{} installations on Windows and hence reporting of problems -% with a minimal example is highly appreciated. -% \item The package cannot be used to hide 3D graphics inserted by -% |movie15| package. However, you can put this graphics into -% floating window or full-screen using capabilities of Acrobat Reader -% 9. -% \end{enumerate} -% \subsection{Ideas for future developement} -% These ideas may appear in new versions of the package (and patches -% which include the solutions to this or other problems are -% welcomed). -% \begin{enumerate} -% \item Using |preview| package it is possible to extract equations -% and figures from the document and redefine |\ref| and |\eqref| -% commands in such a way that clicking (or mouseover) opens on the -% current page the layer with this equation (figure) and shift -% clicking moves the user to the page with this equation (figure). -% Or would |fancytooltips| produce better results in this case -% (smaller PDF file)? See also the paper by Ross More at -% \url{http://www.tug.org/TUGboat/Articles/tb29-3/tb93moore.pdf} and -% the demo |examples/fancy-preview| in fancytooltips distribution. -% See the |ocgtools-preview.*| files for some initial attempts in -% this direction based on ocgtools. -% \item Introduce draft mode, which prints all layers at the end of -% document with links there and back? -% \item If you open and close layer and then use "Back" -% (Alt+LeftArrow), the layer opens again, but the button to hide -% this layer becomes unavailable. Possible solution is to define -% open action and close action for each layer (is it possible in -% current PDF specification?). -% \end{enumerate} -% -% \StopEventually{} -% -% \section{Implementation} -% Initial settings -% \begin{macrocode} -%<*package> -\def\ocgtools@msg{If this message does not disappear after a short time, the - author either did not compile the \LaTeX{} file three times, or your - PDF viewer does not support OCG. Use Adobe Reader!} - -\def\ocgtextstart{\color{blue}} -\def\ocgtextend{} -\ifx\definecolor\undefined\RequirePackage{color}\fi -\ifx\href\undefined\RequirePackage[pdftex]{hyperref}\fi -\definecolor{ocgpaper}{rgb}{1,1,0.2} -\definecolor{ocgfontcolor}{rgb}{0,0,0} -\def\defaultocgpapercolor{ocgpaper} -\def\defaultocgfontcolor{ocgfontcolor} -\definecolor{ocgbg}{rgb}{0,0,0} -\RequirePackage{graphicx} -\RequirePackage{pifont} -\RequirePackage{ocg} -\RequirePackage{xkeyval} - -\newif\if@ocgtools@insideminilayer -\def\ocgclosechar{{\color{red}\def\temp{red}% - \ifx\temp\ocgt@@ls@bg\if@ocgtools@insideminilayer\color{black}\fi\fi - \ding{56}}} - -% \end{macrocode} -% Make packages and options known. -% \begin{macrocode} -\RequirePackage{atbegshi} -\RequirePackage[pdftex]{eforms} -\newif\if@ocgtools@transparent\@ocgtools@transparentfalse -\DeclareOption{transparent}{\@ocgtools@transparenttrue} -\newif\if@ocgtools@insertvisible\@ocgtools@insertvisiblefalse -\def\ocgtools@initialvisibility{0} -\DeclareOption{insertvisible}{\@ocgtools@insertvisibletrue - \def\ocgtools@initialvisibility{1}} -\newif\ifocg@hide@button\ocg@hide@buttontrue -\DeclareOption{nobutton}{\ocg@hide@buttonfalse} -\def\ocgtools@progressmsg{\lower \layerVshift\hbox to 0 pt{ %space - \textField[\V{OCGtools: processing OCG's ...}\BG{1 1 1} - \textColor{1 0 0} \textSize{10}]% -{ocgtoolsmsg}{6cm}{20pt}\hss}}% -\DeclareOption{noprogressmsg}{\let\ocgtools@progressmsg\relax} -\newif\if@ocgtools@minimouseover \@ocgtools@minimouseoverfalse -\DeclareOption{minimouseover}{\@ocgtools@minimouseovertrue} -\newif\if@ocgtools@mouseover \@ocgtools@mouseoverfalse -\DeclareOption{mouseover}{\@ocgtools@mouseovertrue \@ocgtools@minimouseovertrue} -\newif\if@ocgtools@pageclose \@ocgtools@pageclosetrue -\DeclareOption{nopageclose}{\@ocgtools@pageclosefalse} -\newif\if@ocgtools@inactive\@ocgtools@inactivefalse -\DeclareOption{inactive}{\@ocgtools@inactivetrue} -\DeclareOption{noocg}{\@ocgtools@inactivetrue} -\newif\if@ocgtools@active\@ocgtools@activefalse -\DeclareOption{active}{\@ocgtools@activetrue} - -\ProcessOptions - -\if@ocgtools@active\@ocgtools@inactivefalse\fi -\newdimen\layerHshift \layerHshift=-1in -\newdimen\layerVshift \layerVshift=0pt - -\if@ocgtools@inactive - \newcommand\ocgpicture[2][]{\leavevmode\includegraphics[#1]{#2}} - \newcommand\ocgtext[3][0pt]{\leavevmode #2} - \newcommand\ocgtoolsplacepicture[3]{} - \newcommand\ocgtoolsplacetext[3]{} - \newcommand\ocgtoolsplaceminitext[7]{} - \newcommand\ocgminitext[3][0pt]{\leavevmode #2}% - \let\ocgminitextlt\ocgminitext - \let\ocgminitextrt\ocgminitext - \let\ocgminitextlb\ocgminitext - \let\ocgminitextrb\ocgminitext - \PackageWarning{ocgtools}{Ocgtools inactive}% -\expandafter\endinput\fi - -% \end{macrocode} -% We use the hack for Adobe Acrobat suggested by DPS and Jorg at -% http://www.acrotex.net/forum/showthread.php?tid=78. -% \begin{macrocode} -\def\ocgtools@JS#1{\JS{DirtyBeforeOCGtools=this.dirty; #1 - this.dirty=DirtyBeforeOCGtools;}} -% \end{macrocode} -% We insert JavaScripts which are evaluated when the file is opened at -% the first page. There is a clash with fancytooltips package. To make -% things work, load fancytooltips before ocgtools and add the -% |\pdfpageattr| from fancytooltips to |\pdfpageattr| inserted by -% ocgtools. -% \begin{macrocode} -\@ifpackageloaded{fancytooltips}{% - \let\TooltipPageopencloseJS\relax - \ifx\fancytooltips@pdfpageattrJS\undefined - \def\@ocgtools@fancytooltips{var DirtyBeforeCloseTooltip=this.dirty; - CloseTooltips(); this.dirty=DirtyBeforeCloseTooltip;} - \else - \let\@ocgtools@fancytooltips\fancytooltips@pdfpageattrJS - \fi - }{\def\@ocgtools@fancytooltips{}} - -\edef\ocgtools@pdfpageattr{ -/AA << /O << /S /JavaScript /JS - ( -% \end{macrocode} -% We close layers, if the page is opened. If the document is opened -% and \texttt{ocgtoolsOCGs} is not initialized, we skip to -% \texttt{catch} part and initialize. -% \begin{macrocode} - if (typeof(ocgtoolsOCGs)!="undefined"){ - var temp = ocgtoolsOCGs.length; - \if@ocgtools@pageclose - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \fi - } -% \end{macrocode} -% We initialize document -- we find all layers, put into -% \texttt{ocgtoolsOCGs} field and make them hidden. -% \begin{macrocode} - else { -% \end{macrocode} -% No dotted rectangle for buttons which have focus. -% \begin{macrocode} - app.focusRect = false; - var DirtyBeforeOCGtools=this.dirty; -% \end{macrocode} -% The OCG objects inserted by ocgtools are stored in variable -% |ocgtoolsOCGs| when the PDF document is opened on the first page. -% \begin{macrocode} - var iniocgtoolsOCGs = this.getOCGs(); - var ocgtoolsOCGs = []; - for(var i=0; iniocgtoolsOCGs && i<iniocgtoolsOCGs.length;i++) - { - if(iniocgtoolsOCGs[i].name.substr(0,8) == "ocgtools") - { - ocgtoolsOCGs.push(iniocgtoolsOCGs[i]); - \if@ocgtools@insertvisible - iniocgtoolsOCGs[i].state=false; - \fi - } - } - iniocgtoolsOCGs[0].state=true; - iniocgtoolsOCGs[0].state=false; - \ifx\ocgtools@progressmsg\relax\relax\else - this.getField("ocgtoolsmsg").hidden=true; - this.dirty=false; - \fi - } - \ifocg@hide@button - this.getField("OcgtoolsBtn.HideButton.main").hidden = true; - this.dirty=false; - \fi - \@ocgtools@fancytooltips - ) - >> >> -} - -\expandafter\global\expandafter\pdfpageattr\expandafter{\ocgtools@pdfpageattr} - -\def\ocgtools@transparent{} -\if@ocgtools@transparent -\RequirePackage{transparent} \def\ocgtools@transparent{\transparent{0.4}} -\fi -% \end{macrocode} -% Internal variables -% \begin{macrocode} -\newif\ifocg@minitext@left -\newif\ifocg@minitext@bottom -\newcount\ocgtools@layercount -\newskip\ocgtools@left@skip -\newskip\ocgtools@bottom@skip -\newdimen\ocgtools@maxheight -\newdimen\ocgtools@maxwidth -% \end{macrocode} -% We introduce lengths which can be used to fine-tune position of -% layers on the screen. These lengths should be se automatically. -% \begin{macrocode} -\def\ocgtools@save@position{\pdfsavepos -\write\@auxout{\string\global\string\advance\string \layerVshift \the\pdflastypos sp\string\relax}% -\write\@auxout{\string\global\string\advance\string \layerHshift \the\pdflastxpos sp\string\relax}% -\global\let\ocgtools@save@position\relax -} - -\newtoks\ocgtools@layer@toks -\ocgtools@layer@toks{\ocg@place@text{0}{1}{5cm}} -\newbox\ocgtools@box@a -\newbox\ocgtools@box@b -\newif\ifocg@page@contains@layer -% \end{macrocode} -% We modify |shipout| routine and insert content of layers on the top of -% PDF pages. -% \begin{macrocode} -\def\ocgtools@one{1} -\let\ocgtools@shipoutstart@hook\relax -\let\ocgtools@shipoutend@hook\relax -\AtBeginShipout{% -\expandafter\global\expandafter\pdfpageattr\expandafter{\ocgtools@pdfpageattr} -\setbox\AtBeginShipoutBox=\hbox{% -% \end{macrocode} -% Hook which can be used to place background. -% \begin{macrocode} -\ocgtools@shipoutstart@hook -% \end{macrocode} -% This command writes the info about the position on the first PDF -% page and then is set to relax on next pages. -% \begin{macrocode} -\ocgtools@save@position -% \end{macrocode} -% We insert the page first. -% \begin{macrocode} -\hbox to 0 pt{\box\AtBeginShipoutBox\hss}\kern -1in\kern \layerHshift -% \end{macrocode} -% We insert the layers. -% \begin{macrocode} -\ocg@page@contains@layerfalse -\lower \layerVshift \hbox{\the\ocgtools@layer@toks}% -% \end{macrocode} -% If at least one layer has been inserted, we insert button which -% can be used to hide layers. -% \begin{macrocode} -\ifocg@page@contains@layer - \vbox to 0 pt{\kern -\paperheight \kern\layerVshift\hbox to 0 pt{\ocgtools@HideBtn\hss}\vss}% -\fi -% \end{macrocode} -% We insert progress field on the first page. -% \begin{macrocode} -\xdef\ocgtools@currpage{\thepage}% -\ifx\ocgtools@currpage\ocgtools@one -\ocgtools@progressmsg -\fi -% \end{macrocode} -% We finish the box. -% \begin{macrocode} -\hss \ocgtools@shipoutend@hook% -\kern 1in \kern -\layerHshift% -}% -} -% \end{macrocode} -% We create buttons which are used to hide all layers (if we create -% buttons, we keep possibility to make them hidden, in contrast to -% links). -% \begin{macrocode} -\ifx\ocgtools@AfterHideBtn\undefined\def\ocgtools@AfterHideBtn{}\fi -\def\ocgtools@HideBtn{\pushButton[\W{0}\BG{}\S{S}\BC{}\H{N}\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton").hidden = true; \fi - \ocgtools@AfterHideBtn - }}]{OcgtoolsBtn.HideButton.main}{\paperwidth}{\paperheight}} -% \end{macrocode} -% We create buttons which are attached to the top right corner -% of each minilayer and can be used to hide the corresponding minilayer. -% \begin{macrocode} -\ifx\ocgtools@AfterHideMiniLayer\undefined\def\ocgtools@AfterHideMiniLayer{}\fi -\newcommand\ocgtools@HideMiniLayer[2][] -{\setbox\ocgtools@box@a=\hbox{{\ocgclosechar}}% -\hbox to \wd\ocgtools@box@a% -{\hbox{{\ocgclosechar}}\hss% -\hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#2") - ocgtoolsOCGs[i].state = false; - } - this.getField("OcgtoolsBtn.HideButton.mini.#2").hidden = true; - \ocgtools@AfterHideMiniLayer - #1 - }}]% -{OcgtoolsBtn.HideButton.mini.#2}{\wd\ocgtools@box@a}{\ht\ocgtools@box@a}}}} -% \end{macrocode} -% We create buttons which are attached to the bottom right corner -% of the screen and can be used to hide all layers. -% \begin{macrocode} -\ifx\ocgtools@AfterHideLayers\undefined\def\ocgtools@AfterHideLayers{}\fi -\newcommand\ocgtools@HideLayers[1]{% -\setbox\ocgtools@box@a=\hbox{{\ocgclosechar}}% -\hbox to \wd\ocgtools@box@a% -{\hbox{{\ocgclosechar}}\hss% -\hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button - this.getField("OcgtoolsBtn.HideButton.main").hidden = true; - \fi - \ocgtools@AfterHideLayers - }}]% - {OcgtoolsBtn.HideButton.corner.#1}{\wd\ocgtools@box@a}{\ht\ocgtools@box@a}}}} -% \end{macrocode} -% To hide/unhide layers and minilayers we use modified code from -% http://www.texample.net/weblog/2008/nov/02/creating-pdf-layers/ -% \begin{macrocode} -\newcommand{\ocgtools@ToggleLayer}[2]{% - % #1: layer name, - % #2: link text - \leavevmode% - \pdfstartlink user { - /Subtype /Link - /Border [0 0 0]% - /H /N - /A << - /S/JavaScript - /JS ( - DirtyBeforeOCGtools=this.dirty; - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = !ocgtoolsOCGs[i].state; - else - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi - this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; - this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); - this.dirty=DirtyBeforeOCGtools; - ) - >> - }#2% - \if@ocgtools@mouseover - \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\ocgtools@JS{ - var OpenedByMouseEnter#1=false; - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi - this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; - this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); - }} - \AA{\AAMouseEnter{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - var OpenedByMouseEnter#1=true; - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = true; - else - ocgtoolsOCGs[i].state = false; - } - }} - \AAMouseExit{\ocgtools@JS{ - if (OpenedByMouseEnter#1) - {for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = false; - }} - }}}] - {OcgtoolsBtn.MaxiButton.#1}{8pt}{8pt}}% - \fi - \pdfendlink% -} - -\newcommand{\ocgtools@ToggleMiniLayer}[4]{% - % #1: layer name, - % #2: link text - % #3: js action if the layer is opened - % #4: js action if the layer is closed - \leavevmode% - \pdfstartlink user { - /Subtype /Link - /Border [0 0 0]% - /H /N - /A << - /S/JavaScript - /JS ( - DirtyBeforeOCGtools=this.dirty; - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - { - if (ocgtoolsOCGs[i].state) - { - #4 - ocgtoolsOCGs[i].state = false; - } - else - { - #3 - ocgtoolsOCGs[i].state = true; - } - } - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = - !this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden; - if (!this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden) - {this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus();} - this.dirty=DirtyBeforeOCGtools; - ) - >> - }#2% - \if@ocgtools@minimouseover - \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\ocgtools@JS{ - var OpenedByMouseEnter#1=false; - this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus(); - }} - \AA{\AAMouseEnter{\ocgtools@JS{for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - var OpenedByMouseEnter#1=true; - if(ocgtoolsOCGs[i].name == "ocgtools#1") - {#3 ocgtoolsOCGs[i].state = true;} - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = false; - }} - \AAMouseExit{\ocgtools@JS{ - if (OpenedByMouseEnter#1) - { - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - {#4 ocgtoolsOCGs[i].state = false; } - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = true; - } - }}}] - {OcgtoolsBtn.MiniButton.#1}{8pt}{8pt}}% - \fi - \pdfendlink% -} - -% \end{macrocode} -% Macros dealing with |\savepos| from Vit Zyka's paper in CSTUG -% Bulletin (ISSN 1211-6661, No. 2, 2007) -% \begin{macrocode} -\newwrite\posHandle -\def\posFile{\jobname.pos} -\def\posOpen{\openout\posHandle=\posFile} -\def\posClose{\closeout\posHandle} -\AtBeginDocument{\InputIfFileExists{\posFile}{}{}% -\ocgtools@maxheight=0.9\paperheight -\ocgtools@maxwidth=0.9\paperwidth -\expandafter\global\expandafter\def\csname ocgtools@textcontent@0\endcsname -{{\color{red}\bfseries\ocgtools@msg}}% -\posOpen} -\AtEndDocument{\posClose} - -% \end{macrocode} -% The following commands create links to hide/unhide layers and -% minilayers and write information on the layer number, page and layer -% content into the |pos| file. The content of textlayer is stored in -% command |\ocgtools@textcontent@<n>| where |<n>| is the number of the -% layer. Similarly, the content of the minitextlayer is stored in -% |\ocgtools@minitextcontent@<n>|. -% \begin{macrocode} -\newcommand\ocgpicture[2][]{% -\global\advance\ocgtools@layercount by 1% -\ocgtools@ToggleLayer{\the\ocgtools@layercount}% -{\leavevmode\includegraphics[#1]{#2}}% -\expandafter\write\expandafter\posHandle\expandafter{% -\expandafter\string\expandafter\ocgtoolsplacepicture\expandafter{% -\the\ocgtools@layercount}{\thepage}{#2}}% -} - -\define@key{ocg@key}{width}[0pt]{\def\ocgt@@ls@width{#1}} -\define@key{ocg@key}{background}[ocgpaper]{\def\ocgt@@ls@bg{#1}} -\define@key{ocg@key}{bg}[ocgpaper]{\def\ocgt@@ls@bg{#1}} -\define@key{ocg@key}{color}[ocgfontcolor]{\def\ocgt@@ls@fg{#1}} -\define@key{ocg@key}{fg}[ocgfontcolor]{\def\ocgt@@ls@fg{#1}} -\define@key{ocg@key}{jsopen}[]{\def\ocgt@@ls@jsopen{#1}} -\define@key{ocg@key}{jsclose}[]{\def\ocgt@@ls@jsclose{#1}} - -\newtoks\ocg@pdflastxpos\ocg@pdflastxpos{\the\pdflastxpos} -\newtoks\ocg@pdflastypos\ocg@pdflastypos{\the\pdflastypos} -\newtoks\ocg@pagetoks\ocg@pagetoks{\thepage} - -% \end{macrocode} -% The trick with |\setkeys*| allows to write |[2cm,fg=red]| instead of -% |[width=2cm,fg=red]|. -% \begin{macrocode} -\def\ocgtools@setdefault{\def\ocgt@@ls@bg{\defaultocgpapercolor}% -\def\ocgt@@ls@fg{\defaultocgfontcolor}% -\def\ocgt@@ls@width{0pt}\def\ocgt@@ls@jsopen{}% -\def\ocgt@@ls@jsclose{}% -} - -\newcommand\ocgtext[3][0pt]{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\global\advance\ocgtools@layercount by 1% -\ocgtools@ToggleLayer{\the\ocgtools@layercount}% -{\leavevmode{\ocgtextstart #2\ocgtextend}}% -\edef\ocgtools@act{\write\posHandle{\noexpand\string\noexpand\ocgtoolsplacetext{\the\ocgtools@layercount}{\the\ocg@pagetoks}{width=\ocgt@@ls@width,bg=\ocgt@@ls@bg,fg=\ocgt@@ls@fg}}}% -\ocgtools@act -\expandafter\global\expandafter\def -\csname ocgtools@textcontent@\the\ocgtools@layercount\endcsname{#3}% -} - -\newcommand\ocgminitextlt[3][0pt]{% -\ocg@minitext@bottomfalse\ocg@minitext@lefttrue -\do@ocg@minitext{#1}{#2}{#3}{lt}}% -\newcommand\ocgminitextrt[3][0pt]{% -\ocg@minitext@bottomfalse\ocg@minitext@leftfalse -\do@ocg@minitext{#1}{#2}{#3}{rt}}% -\newcommand\ocgminitextlb[3][0pt]{% -\ocg@minitext@bottomtrue\ocg@minitext@lefttrue -\do@ocg@minitext{#1}{#2}{#3}{lb}}% -\newcommand\ocgminitextrb[3][0pt]{% -\ocg@minitext@bottomtrue\ocg@minitext@leftfalse -\do@ocg@minitext{#1}{#2}{#3}{rb}}% -\let\ocgminitext\ocgminitextrt - -\long\def\do@ocg@minitext#1#2#3#4{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\global\advance\ocgtools@layercount by 1\relax% -\leavevmode -\ifocg@minitext@left - \ifocg@minitext@bottom - \vbox to 0 pt{\kern 0.7\baselineskip\pdfsavepos\vss}% - \else - \vbox to 0 pt{\vss\pdfsavepos\kern 0.7\baselineskip}% - \fi -\fi -\ocgtools@ToggleMiniLayer{\the\ocgtools@layercount}% -{{\ocgtextstart #2\ocgtextend}}{\ocgt@@ls@jsopen}{\ocgt@@ls@jsclose}% -\ifocg@minitext@left\else - \ifocg@minitext@bottom - \vbox to 0 pt{\kern 0.7\baselineskip\pdfsavepos\vss}% - \else - \vbox to 0 pt{\vss\pdfsavepos\kern 0.7\baselineskip}% - \fi -\fi -\edef\ocgtools@act{\write\posHandle{\noexpand\string\noexpand\ocgtoolsplaceminitext{\the\ocgtools@layercount}{\the\ocg@pagetoks}{\the\ocg@pdflastxpos}{\the\ocg@pdflastypos}{}{width=\ocgt@@ls@width,bg=\ocgt@@ls@bg,fg=\ocgt@@ls@fg,jsopen={\ocgt@@ls@jsopen},jsclose={\ocgt@@ls@jsclose}}{#4}}}% -\ocgtools@act -\expandafter\global\expandafter\def -\csname ocgtools@minitextcontent@\the\ocgtools@layercount\endcsname{#3}% -}% - -% \end{macrocode} -% These commands appear in |pos| file and we read these commands at the -% begin of the document. Pictures are stored in token register, texts -% for layers and minilayers are stored in commands defined by -% |\csname|. -% \begin{macrocode} -\newcommand\ocgtoolsplacepicture[3]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks \ocg@place@picture{#1}{#2}{#3}}} - -\newcommand\ocgtoolsplacetext[3]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks\ocg@place@text{#1}{#2}{#3}}} - -\newcommand\ocgtoolsplaceminitext[7]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks \ocg@place@minitext{#1}{#2}{#3}{#4}{#5}{#6}{#7}}} - -% \end{macrocode} -% These commands are called in output routine for each layer on each -% page. They put the layer on the page, if the layer should be here -% (i.e., if the second parameter equals |\thepage|). -% \begin{macrocode} -\def\ocg@place@picture#1#2#3{\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\ifx\tempnumb\tempnuma - \global\ocg@page@contains@layertrue - \vbox to 0 pt{\vss\hbox to 0pt% - {\hbox{\begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawpicture{#3}{#1}\end{ocg}}\hss}}% -\fi} - -\def\ocg@place@text#1#2#3{\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\ifx\tempnumb\tempnuma - \global\ocg@page@contains@layertrue - \vbox to 0 pt{\vss\hbox to 0 pt{\hbox{% - \begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawtext{#3}{\csname ocgtools@textcontent@#1\endcsname}{#1}% - \end{ocg}}\hss}}% -\fi} - -\long\def\ocg@place@minitext#1#2#3#4#5#6#7{% -\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\def\ocg@placement{#7}% -\def\ocg@rb{rb}\def\ocg@lb{lb}\def\ocg@rt{rt}\def\ocg@lt{lt}% -\ocg@minitext@leftfalse\ocg@minitext@bottomfalse -\ifx\ocg@placement\ocg@lb - \ocg@minitext@lefttrue\ocg@minitext@bottomtrue -\fi -\ifx\ocg@placement\ocg@rb - \ocg@minitext@leftfalse\ocg@minitext@bottomtrue\fi -\ifx\ocg@placement\ocg@lt - \ocg@minitext@lefttrue\ocg@minitext@bottomfalse -\fi -\ifx\tempnumb\tempnuma - \ocgtools@left@skip=#3sp minus #3sp% - \ocgtools@bottom@skip=#4sp% - \setbox\ocgtools@box@a=\hbox{\begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawminitext{#6}{\csname ocgtools@minitextcontent@#1\endcsname}{#1} - \end{ocg}}% - \ifocg@minitext@left - \ifdim \ocgtools@left@skip>\wd\ocgtools@box@a - \advance \ocgtools@left@skip by -\wd\ocgtools@box@a plus 0 pt minus -\wd\ocgtools@box@a - \else - \ocgtools@left@skip=0pt\relax - \fi - \fi - \ifocg@minitext@bottom - \advance \ocgtools@bottom@skip by -\ht\ocgtools@box@a - \fi - \hbox to 0 pt{\hbox to \paperwidth{\hskip \ocgtools@left@skip - \vbox to 0 pt{\vss - \vbox to \paperheight{\vskip 0 pt plus 1 fill - \box\ocgtools@box@a\vskip \ocgtools@bottom@skip} - }% - \hskip 0 pt plus 1 fill}\hss}% -\fi -} - -% \end{macrocode} -% This code actually gives a graphical representation of the layers. -% \begin{macrocode} -\let\ocgtools@pict@envelope\relax -\def\ocgtools@drawpicture#1#2{\vbox to \paperheight{\vbox to 0 pt{{% -\ocgtools@transparent\color{ocgbg}% -\hrule width \paperwidth height \paperheight}\vss}\vss -\hbox to \paperwidth{\hss -\setbox\ocgtools@box@a=\hbox{\ocgtools@pict@envelope{% - \includegraphics[height=\ocgtools@maxheight]{#1}}}% -\ifdim\wd\ocgtools@box@a>\ocgtools@maxwidth - \ocgtools@pict@envelope{\includegraphics[width=\ocgtools@maxwidth]{#1}}% - \else \box\ocgtools@box@a -\fi -\hss}% -\vss -\hbox to \paperwidth {\hss\ocgtools@HideLayers{#2}}}} - -\newdimen\ocg@textdimen -\let\ocgtools@text@envelope\relax -\long\def\ocgtools@drawtext#1#2#3{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\vbox to \paperheight{% -\vbox to 0 pt{{\ocgtools@transparent\color{ocgbg}% -\hrule width \paperwidth height \paperheight}\vss}\vss\hbox to \paperwidth -{\hss -\ifdim\ocgt@@ls@width=0pt - \setbox\ocgtools@box@a=\hbox{\expandafter\colorbox\expandafter{\ocgt@@ls@bg}% - {\expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@text@envelope{#2}}}% -\else - \setbox\ocgtools@box@a=\hbox{\expandafter\colorbox{\expandafter\ocgt@@ls@bg}% - {\vbox{\hsize=\ocgt@@ls@width\relax\linewidth=\ocgt@@ls@width\relax - \rightskip 0 pt plus 1 fil\relax - \expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@text@envelope{#2}}}}% -\fi -\setbox\ocgtools@box@b\hbox{\resizebox{!}{\ocgtools@maxheight}{\copy\ocgtools@box@a}}% -\ifdim\wd\ocgtools@box@b>\ocgtools@maxwidth - \resizebox{\ocgtools@maxwidth}{!}{\box\ocgtools@box@a} -\else - \box\ocgtools@box@b -\fi -\hss}% -\vss -\hbox to \paperwidth {\hss\ocgtools@HideLayers{#3}}% -}% -} - -\def\ocg@empty{} - -\let\ocgtools@minitext@envelope\relax -\newcommand\ocgtools@drawminitext[3]{% -\@ocgtools@insideminilayertrue -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\ifdim\ocgt@@ls@width=0pt - \setbox\ocgtools@box@a=\hbox{\colorbox{\ocgt@@ls@bg}{\expandafter\color - \expandafter{\ocgt@@ls@fg}\ocgtools@minitext@envelope{#2}\ }}% -\else \setbox\ocgtools@box@a=\hbox{\colorbox{\ocgt@@ls@bg}% - {\vbox{\hsize=\ocgt@@ls@width\relax\linewidth=\ocgt@@ls@width\relax - \rightskip 0 pt plus 1 fil\relax - \expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@minitext@envelope{#2}}}}% -\fi -\def\temp{#3}% -\ifx\temp\ocg@empty -\box\ocgtools@box@a -\else -\hbox{\copy\ocgtools@box@a\raise\ht\ocgtools@box@a -\vbox to 0 pt{\hbox to 0 pt{\hss -\ocgtools@HideMiniLayer[\ocgt@@ls@jsclose]{#3}}\vss}}% -\fi -\@ocgtools@insideminilayerfalse -} - -%</package> -% \end{macrocode} -% -% \Finale -\endinput - - - diff --git a/Master/texmf-dist/source/latex/ocgtools/ocgtools.ins b/Master/texmf-dist/source/latex/ocgtools/ocgtools.ins deleted file mode 100644 index d8d016b6e24..00000000000 --- a/Master/texmf-dist/source/latex/ocgtools/ocgtools.ins +++ /dev/null @@ -1,56 +0,0 @@ -%% -%% Copyright (C) 2010 by Robert Marik <marik@mendelu.cz> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version -%% 1999/12/01 or later. -%% - -\input docstrip.tex -\keepsilent - -\usedir{tex/latex/ocgtools} - -\preamble - -This is a generated file. - -Copyright (C) 2010 by Robert Marik <marik@mendelu.cz> - -This file may be distributed and/or modified under the conditions of -the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version -1999/12/01 or later. - -\endpreamble - -\generate{\file{ocgtools.sty}{\from{ocgtools.dtx}{package}} -} - -\obeyspaces -\Msg{*************************************************************} -\Msg{* *} -\Msg{* To finish the installation you have to move the following *} -\Msg{* files into a directory searched by TeX: *} -\Msg{* *} -\Msg{* ocgtools.sty *} -\Msg{* *} -\Msg{* To produce the documentation run the file *} -\Msg{* ocgtools.dtx through LaTeX. *} -\Msg{* *} -\Msg{* Happy TeXing! *} -\Msg{* *} -\Msg{*************************************************************} - -\endbatchfile diff --git a/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty b/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty deleted file mode 100644 index e49d4b67603..00000000000 --- a/Master/texmf-dist/tex/latex/ocgtools/ocgtools.sty +++ /dev/null @@ -1,600 +0,0 @@ -%% -%% This is file `ocgtools.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% ocgtools.dtx (with options: `package') -%% -%% This is a generated file. -%% -%% Copyright (C) 2010 by Robert Marik <marik@mendelu.cz> -%% -%% This file may be distributed and/or modified under the conditions of -%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version -%% 1999/12/01 or later. -%% -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{ocgtools} - [2010/11/19 v0.8a ocgtools.dtx file] -\def\ocgtools@msg{If this message does not disappear after a short time, the - author either did not compile the \LaTeX{} file three times, or your - PDF viewer does not support OCG. Use Adobe Reader!} - -\def\ocgtextstart{\color{blue}} -\def\ocgtextend{} -\ifx\definecolor\undefined\RequirePackage{color}\fi -\ifx\href\undefined\RequirePackage[pdftex]{hyperref}\fi -\definecolor{ocgpaper}{rgb}{1,1,0.2} -\definecolor{ocgfontcolor}{rgb}{0,0,0} -\def\defaultocgpapercolor{ocgpaper} -\def\defaultocgfontcolor{ocgfontcolor} -\definecolor{ocgbg}{rgb}{0,0,0} -\RequirePackage{graphicx} -\RequirePackage{pifont} -\RequirePackage{ocg} -\RequirePackage{xkeyval} - -\newif\if@ocgtools@insideminilayer -\def\ocgclosechar{{\color{red}\def\temp{red}% - \ifx\temp\ocgt@@ls@bg\if@ocgtools@insideminilayer\color{black}\fi\fi - \ding{56}}} - -\RequirePackage{atbegshi} -\RequirePackage[pdftex]{eforms} -\newif\if@ocgtools@transparent\@ocgtools@transparentfalse -\DeclareOption{transparent}{\@ocgtools@transparenttrue} -\newif\if@ocgtools@insertvisible\@ocgtools@insertvisiblefalse -\def\ocgtools@initialvisibility{0} -\DeclareOption{insertvisible}{\@ocgtools@insertvisibletrue - \def\ocgtools@initialvisibility{1}} -\newif\ifocg@hide@button\ocg@hide@buttontrue -\DeclareOption{nobutton}{\ocg@hide@buttonfalse} -\def\ocgtools@progressmsg{\lower \layerVshift\hbox to 0 pt{ %space - \textField[\V{OCGtools: processing OCG's ...}\BG{1 1 1} - \textColor{1 0 0} \textSize{10}]% -{ocgtoolsmsg}{6cm}{20pt}\hss}}% -\DeclareOption{noprogressmsg}{\let\ocgtools@progressmsg\relax} -\newif\if@ocgtools@minimouseover \@ocgtools@minimouseoverfalse -\DeclareOption{minimouseover}{\@ocgtools@minimouseovertrue} -\newif\if@ocgtools@mouseover \@ocgtools@mouseoverfalse -\DeclareOption{mouseover}{\@ocgtools@mouseovertrue \@ocgtools@minimouseovertrue} -\newif\if@ocgtools@pageclose \@ocgtools@pageclosetrue -\DeclareOption{nopageclose}{\@ocgtools@pageclosefalse} -\newif\if@ocgtools@inactive\@ocgtools@inactivefalse -\DeclareOption{inactive}{\@ocgtools@inactivetrue} -\DeclareOption{noocg}{\@ocgtools@inactivetrue} -\newif\if@ocgtools@active\@ocgtools@activefalse -\DeclareOption{active}{\@ocgtools@activetrue} - -\ProcessOptions - -\if@ocgtools@active\@ocgtools@inactivefalse\fi -\newdimen\layerHshift \layerHshift=-1in -\newdimen\layerVshift \layerVshift=0pt - -\if@ocgtools@inactive - \newcommand\ocgpicture[2][]{\leavevmode\includegraphics[#1]{#2}} - \newcommand\ocgtext[3][0pt]{\leavevmode #2} - \newcommand\ocgtoolsplacepicture[3]{} - \newcommand\ocgtoolsplacetext[3]{} - \newcommand\ocgtoolsplaceminitext[7]{} - \newcommand\ocgminitext[3][0pt]{\leavevmode #2}% - \let\ocgminitextlt\ocgminitext - \let\ocgminitextrt\ocgminitext - \let\ocgminitextlb\ocgminitext - \let\ocgminitextrb\ocgminitext - \PackageWarning{ocgtools}{Ocgtools inactive}% -\expandafter\endinput\fi - -\def\ocgtools@JS#1{\JS{DirtyBeforeOCGtools=this.dirty; #1 - this.dirty=DirtyBeforeOCGtools;}} -\@ifpackageloaded{fancytooltips}{% - \let\TooltipPageopencloseJS\relax - \ifx\fancytooltips@pdfpageattrJS\undefined - \def\@ocgtools@fancytooltips{var DirtyBeforeCloseTooltip=this.dirty; - CloseTooltips(); this.dirty=DirtyBeforeCloseTooltip;} - \else - \let\@ocgtools@fancytooltips\fancytooltips@pdfpageattrJS - \fi - }{\def\@ocgtools@fancytooltips{}} - -\edef\ocgtools@pdfpageattr{ -/AA << /O << /S /JavaScript /JS - ( - if (typeof(ocgtoolsOCGs)!="undefined"){ - var temp = ocgtoolsOCGs.length; - \if@ocgtools@pageclose - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \fi - } - else { - app.focusRect = false; - var DirtyBeforeOCGtools=this.dirty; - var iniocgtoolsOCGs = this.getOCGs(); - var ocgtoolsOCGs = []; - for(var i=0; iniocgtoolsOCGs && i<iniocgtoolsOCGs.length;i++) - { - if(iniocgtoolsOCGs[i].name.substr(0,8) == "ocgtools") - { - ocgtoolsOCGs.push(iniocgtoolsOCGs[i]); - \if@ocgtools@insertvisible - iniocgtoolsOCGs[i].state=false; - \fi - } - } - iniocgtoolsOCGs[0].state=true; - iniocgtoolsOCGs[0].state=false; - \ifx\ocgtools@progressmsg\relax\relax\else - this.getField("ocgtoolsmsg").hidden=true; - this.dirty=false; - \fi - } - \ifocg@hide@button - this.getField("OcgtoolsBtn.HideButton.main").hidden = true; - this.dirty=false; - \fi - \@ocgtools@fancytooltips - ) - >> >> -} - -\expandafter\global\expandafter\pdfpageattr\expandafter{\ocgtools@pdfpageattr} - -\def\ocgtools@transparent{} -\if@ocgtools@transparent -\RequirePackage{transparent} \def\ocgtools@transparent{\transparent{0.4}} -\fi -\newif\ifocg@minitext@left -\newif\ifocg@minitext@bottom -\newcount\ocgtools@layercount -\newskip\ocgtools@left@skip -\newskip\ocgtools@bottom@skip -\newdimen\ocgtools@maxheight -\newdimen\ocgtools@maxwidth -\def\ocgtools@save@position{\pdfsavepos -\write\@auxout{\string\global\string\advance\string \layerVshift \the\pdflastypos sp\string\relax}% -\write\@auxout{\string\global\string\advance\string \layerHshift \the\pdflastxpos sp\string\relax}% -\global\let\ocgtools@save@position\relax -} - -\newtoks\ocgtools@layer@toks -\ocgtools@layer@toks{\ocg@place@text{0}{1}{5cm}} -\newbox\ocgtools@box@a -\newbox\ocgtools@box@b -\newif\ifocg@page@contains@layer -\def\ocgtools@one{1} -\let\ocgtools@shipoutstart@hook\relax -\let\ocgtools@shipoutend@hook\relax -\AtBeginShipout{% -\expandafter\global\expandafter\pdfpageattr\expandafter{\ocgtools@pdfpageattr} -\setbox\AtBeginShipoutBox=\hbox{% -\ocgtools@shipoutstart@hook -\ocgtools@save@position -\hbox to 0 pt{\box\AtBeginShipoutBox\hss}\kern -1in\kern \layerHshift -\ocg@page@contains@layerfalse -\lower \layerVshift \hbox{\the\ocgtools@layer@toks}% -\ifocg@page@contains@layer - \vbox to 0 pt{\kern -\paperheight \kern\layerVshift\hbox to 0 pt{\ocgtools@HideBtn\hss}\vss}% -\fi -\xdef\ocgtools@currpage{\thepage}% -\ifx\ocgtools@currpage\ocgtools@one -\ocgtools@progressmsg -\fi -\hss \ocgtools@shipoutend@hook% -\kern 1in \kern -\layerHshift% -}% -} -\ifx\ocgtools@AfterHideBtn\undefined\def\ocgtools@AfterHideBtn{}\fi -\def\ocgtools@HideBtn{\pushButton[\W{0}\BG{}\S{S}\BC{}\H{N}\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton").hidden = true; \fi - \ocgtools@AfterHideBtn - }}]{OcgtoolsBtn.HideButton.main}{\paperwidth}{\paperheight}} -\ifx\ocgtools@AfterHideMiniLayer\undefined\def\ocgtools@AfterHideMiniLayer{}\fi -\newcommand\ocgtools@HideMiniLayer[2][] -{\setbox\ocgtools@box@a=\hbox{{\ocgclosechar}}% -\hbox to \wd\ocgtools@box@a% -{\hbox{{\ocgclosechar}}\hss% -\hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#2") - ocgtoolsOCGs[i].state = false; - } - this.getField("OcgtoolsBtn.HideButton.mini.#2").hidden = true; - \ocgtools@AfterHideMiniLayer - #1 - }}]% -{OcgtoolsBtn.HideButton.mini.#2}{\wd\ocgtools@box@a}{\ht\ocgtools@box@a}}}} -\ifx\ocgtools@AfterHideLayers\undefined\def\ocgtools@AfterHideLayers{}\fi -\newcommand\ocgtools@HideLayers[1]{% -\setbox\ocgtools@box@a=\hbox{{\ocgclosechar}}% -\hbox to \wd\ocgtools@box@a% -{\hbox{{\ocgclosechar}}\hss% -\hbox{\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% -\F{\FHidden}\A{\ocgtools@JS{ - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button - this.getField("OcgtoolsBtn.HideButton.main").hidden = true; - \fi - \ocgtools@AfterHideLayers - }}]% - {OcgtoolsBtn.HideButton.corner.#1}{\wd\ocgtools@box@a}{\ht\ocgtools@box@a}}}} -\newcommand{\ocgtools@ToggleLayer}[2]{% - % #1: layer name, - % #2: link text - \leavevmode% - \pdfstartlink user { - /Subtype /Link - /Border [0 0 0]% - /H /N - /A << - /S/JavaScript - /JS ( - DirtyBeforeOCGtools=this.dirty; - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = !ocgtoolsOCGs[i].state; - else - ocgtoolsOCGs[i].state = false; - } - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi - this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; - this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); - this.dirty=DirtyBeforeOCGtools; - ) - >> - }#2% - \if@ocgtools@mouseover - \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\ocgtools@JS{ - var OpenedByMouseEnter#1=false; - \ifocg@hide@button this.getField("OcgtoolsBtn.HideButton.main").hidden = false;\fi - this.getField("OcgtoolsBtn.HideButton.corner").hidden = false; - this.getField("OcgtoolsBtn.HideButton.corner.#1").setFocus(); - }} - \AA{\AAMouseEnter{\ocgtools@JS{ for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - var OpenedByMouseEnter#1=true; - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = true; - else - ocgtoolsOCGs[i].state = false; - } - }} - \AAMouseExit{\ocgtools@JS{ - if (OpenedByMouseEnter#1) - {for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - ocgtoolsOCGs[i].state = false; - }} - }}}] - {OcgtoolsBtn.MaxiButton.#1}{8pt}{8pt}}% - \fi - \pdfendlink% -} - -\newcommand{\ocgtools@ToggleMiniLayer}[4]{% - % #1: layer name, - % #2: link text - % #3: js action if the layer is opened - % #4: js action if the layer is closed - \leavevmode% - \pdfstartlink user { - /Subtype /Link - /Border [0 0 0]% - /H /N - /A << - /S/JavaScript - /JS ( - DirtyBeforeOCGtools=this.dirty; - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - { - if (ocgtoolsOCGs[i].state) - { - #4 - ocgtoolsOCGs[i].state = false; - } - else - { - #3 - ocgtoolsOCGs[i].state = true; - } - } - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = - !this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden; - if (!this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden) - {this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus();} - this.dirty=DirtyBeforeOCGtools; - ) - >> - }#2% - \if@ocgtools@minimouseover - \hbox to 0 pt{\hss\pushButton[\W{0}\S{S}\BG{}\BC{}\H{N}% - \A{\ocgtools@JS{ - var OpenedByMouseEnter#1=false; - this.getField("OcgtoolsBtn.HideButton.mini.#1").setFocus(); - }} - \AA{\AAMouseEnter{\ocgtools@JS{for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - var OpenedByMouseEnter#1=true; - if(ocgtoolsOCGs[i].name == "ocgtools#1") - {#3 ocgtoolsOCGs[i].state = true;} - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = false; - }} - \AAMouseExit{\ocgtools@JS{ - if (OpenedByMouseEnter#1) - { - for(var i=0; ocgtoolsOCGs && i<ocgtoolsOCGs.length;i++) - { - if(ocgtoolsOCGs[i].name == "ocgtools#1") - {#4 ocgtoolsOCGs[i].state = false; } - } - this.getField("OcgtoolsBtn.HideButton.mini.#1").hidden = true; - } - }}}] - {OcgtoolsBtn.MiniButton.#1}{8pt}{8pt}}% - \fi - \pdfendlink% -} - -\newwrite\posHandle -\def\posFile{\jobname.pos} -\def\posOpen{\openout\posHandle=\posFile} -\def\posClose{\closeout\posHandle} -\AtBeginDocument{\InputIfFileExists{\posFile}{}{}% -\ocgtools@maxheight=0.9\paperheight -\ocgtools@maxwidth=0.9\paperwidth -\expandafter\global\expandafter\def\csname ocgtools@textcontent@0\endcsname -{{\color{red}\bfseries\ocgtools@msg}}% -\posOpen} -\AtEndDocument{\posClose} - -\newcommand\ocgpicture[2][]{% -\global\advance\ocgtools@layercount by 1% -\ocgtools@ToggleLayer{\the\ocgtools@layercount}% -{\leavevmode\includegraphics[#1]{#2}}% -\expandafter\write\expandafter\posHandle\expandafter{% -\expandafter\string\expandafter\ocgtoolsplacepicture\expandafter{% -\the\ocgtools@layercount}{\thepage}{#2}}% -} - -\define@key{ocg@key}{width}[0pt]{\def\ocgt@@ls@width{#1}} -\define@key{ocg@key}{background}[ocgpaper]{\def\ocgt@@ls@bg{#1}} -\define@key{ocg@key}{bg}[ocgpaper]{\def\ocgt@@ls@bg{#1}} -\define@key{ocg@key}{color}[ocgfontcolor]{\def\ocgt@@ls@fg{#1}} -\define@key{ocg@key}{fg}[ocgfontcolor]{\def\ocgt@@ls@fg{#1}} -\define@key{ocg@key}{jsopen}[]{\def\ocgt@@ls@jsopen{#1}} -\define@key{ocg@key}{jsclose}[]{\def\ocgt@@ls@jsclose{#1}} - -\newtoks\ocg@pdflastxpos\ocg@pdflastxpos{\the\pdflastxpos} -\newtoks\ocg@pdflastypos\ocg@pdflastypos{\the\pdflastypos} -\newtoks\ocg@pagetoks\ocg@pagetoks{\thepage} - -\def\ocgtools@setdefault{\def\ocgt@@ls@bg{\defaultocgpapercolor}% -\def\ocgt@@ls@fg{\defaultocgfontcolor}% -\def\ocgt@@ls@width{0pt}\def\ocgt@@ls@jsopen{}% -\def\ocgt@@ls@jsclose{}% -} - -\newcommand\ocgtext[3][0pt]{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\global\advance\ocgtools@layercount by 1% -\ocgtools@ToggleLayer{\the\ocgtools@layercount}% -{\leavevmode{\ocgtextstart #2\ocgtextend}}% -\edef\ocgtools@act{\write\posHandle{\noexpand\string\noexpand\ocgtoolsplacetext{\the\ocgtools@layercount}{\the\ocg@pagetoks}{width=\ocgt@@ls@width,bg=\ocgt@@ls@bg,fg=\ocgt@@ls@fg}}}% -\ocgtools@act -\expandafter\global\expandafter\def -\csname ocgtools@textcontent@\the\ocgtools@layercount\endcsname{#3}% -} - -\newcommand\ocgminitextlt[3][0pt]{% -\ocg@minitext@bottomfalse\ocg@minitext@lefttrue -\do@ocg@minitext{#1}{#2}{#3}{lt}}% -\newcommand\ocgminitextrt[3][0pt]{% -\ocg@minitext@bottomfalse\ocg@minitext@leftfalse -\do@ocg@minitext{#1}{#2}{#3}{rt}}% -\newcommand\ocgminitextlb[3][0pt]{% -\ocg@minitext@bottomtrue\ocg@minitext@lefttrue -\do@ocg@minitext{#1}{#2}{#3}{lb}}% -\newcommand\ocgminitextrb[3][0pt]{% -\ocg@minitext@bottomtrue\ocg@minitext@leftfalse -\do@ocg@minitext{#1}{#2}{#3}{rb}}% -\let\ocgminitext\ocgminitextrt - -\long\def\do@ocg@minitext#1#2#3#4{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\global\advance\ocgtools@layercount by 1\relax% -\leavevmode -\ifocg@minitext@left - \ifocg@minitext@bottom - \vbox to 0 pt{\kern 0.7\baselineskip\pdfsavepos\vss}% - \else - \vbox to 0 pt{\vss\pdfsavepos\kern 0.7\baselineskip}% - \fi -\fi -\ocgtools@ToggleMiniLayer{\the\ocgtools@layercount}% -{{\ocgtextstart #2\ocgtextend}}{\ocgt@@ls@jsopen}{\ocgt@@ls@jsclose}% -\ifocg@minitext@left\else - \ifocg@minitext@bottom - \vbox to 0 pt{\kern 0.7\baselineskip\pdfsavepos\vss}% - \else - \vbox to 0 pt{\vss\pdfsavepos\kern 0.7\baselineskip}% - \fi -\fi -\edef\ocgtools@act{\write\posHandle{\noexpand\string\noexpand\ocgtoolsplaceminitext{\the\ocgtools@layercount}{\the\ocg@pagetoks}{\the\ocg@pdflastxpos}{\the\ocg@pdflastypos}{}{width=\ocgt@@ls@width,bg=\ocgt@@ls@bg,fg=\ocgt@@ls@fg,jsopen={\ocgt@@ls@jsopen},jsclose={\ocgt@@ls@jsclose}}{#4}}}% -\ocgtools@act -\expandafter\global\expandafter\def -\csname ocgtools@minitextcontent@\the\ocgtools@layercount\endcsname{#3}% -}% - -\newcommand\ocgtoolsplacepicture[3]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks \ocg@place@picture{#1}{#2}{#3}}} - -\newcommand\ocgtoolsplacetext[3]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks\ocg@place@text{#1}{#2}{#3}}} - -\newcommand\ocgtoolsplaceminitext[7]{% -\expandafter\global\expandafter\ocgtools@layer@toks\expandafter -{\the\ocgtools@layer@toks \ocg@place@minitext{#1}{#2}{#3}{#4}{#5}{#6}{#7}}} - -\def\ocg@place@picture#1#2#3{\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\ifx\tempnumb\tempnuma - \global\ocg@page@contains@layertrue - \vbox to 0 pt{\vss\hbox to 0pt% - {\hbox{\begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawpicture{#3}{#1}\end{ocg}}\hss}}% -\fi} - -\def\ocg@place@text#1#2#3{\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\ifx\tempnumb\tempnuma - \global\ocg@page@contains@layertrue - \vbox to 0 pt{\vss\hbox to 0 pt{\hbox{% - \begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawtext{#3}{\csname ocgtools@textcontent@#1\endcsname}{#1}% - \end{ocg}}\hss}}% -\fi} - -\long\def\ocg@place@minitext#1#2#3#4#5#6#7{% -\def\tempnuma{#2}\edef\tempnumb{\thepage}% -\def\ocg@placement{#7}% -\def\ocg@rb{rb}\def\ocg@lb{lb}\def\ocg@rt{rt}\def\ocg@lt{lt}% -\ocg@minitext@leftfalse\ocg@minitext@bottomfalse -\ifx\ocg@placement\ocg@lb - \ocg@minitext@lefttrue\ocg@minitext@bottomtrue -\fi -\ifx\ocg@placement\ocg@rb - \ocg@minitext@leftfalse\ocg@minitext@bottomtrue\fi -\ifx\ocg@placement\ocg@lt - \ocg@minitext@lefttrue\ocg@minitext@bottomfalse -\fi -\ifx\tempnumb\tempnuma - \ocgtools@left@skip=#3sp minus #3sp% - \ocgtools@bottom@skip=#4sp% - \setbox\ocgtools@box@a=\hbox{\begin{ocg}{ocgtools#1}{ocgtools#1}{\ocgtools@initialvisibility}% - \ocgtools@drawminitext{#6}{\csname ocgtools@minitextcontent@#1\endcsname}{#1} - \end{ocg}}% - \ifocg@minitext@left - \ifdim \ocgtools@left@skip>\wd\ocgtools@box@a - \advance \ocgtools@left@skip by -\wd\ocgtools@box@a plus 0 pt minus -\wd\ocgtools@box@a - \else - \ocgtools@left@skip=0pt\relax - \fi - \fi - \ifocg@minitext@bottom - \advance \ocgtools@bottom@skip by -\ht\ocgtools@box@a - \fi - \hbox to 0 pt{\hbox to \paperwidth{\hskip \ocgtools@left@skip - \vbox to 0 pt{\vss - \vbox to \paperheight{\vskip 0 pt plus 1 fill - \box\ocgtools@box@a\vskip \ocgtools@bottom@skip} - }% - \hskip 0 pt plus 1 fill}\hss}% -\fi -} - -\let\ocgtools@pict@envelope\relax -\def\ocgtools@drawpicture#1#2{\vbox to \paperheight{\vbox to 0 pt{{% -\ocgtools@transparent\color{ocgbg}% -\hrule width \paperwidth height \paperheight}\vss}\vss -\hbox to \paperwidth{\hss -\setbox\ocgtools@box@a=\hbox{\ocgtools@pict@envelope{% - \includegraphics[height=\ocgtools@maxheight]{#1}}}% -\ifdim\wd\ocgtools@box@a>\ocgtools@maxwidth - \ocgtools@pict@envelope{\includegraphics[width=\ocgtools@maxwidth]{#1}}% - \else \box\ocgtools@box@a -\fi -\hss}% -\vss -\hbox to \paperwidth {\hss\ocgtools@HideLayers{#2}}}} - -\newdimen\ocg@textdimen -\let\ocgtools@text@envelope\relax -\long\def\ocgtools@drawtext#1#2#3{% -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\vbox to \paperheight{% -\vbox to 0 pt{{\ocgtools@transparent\color{ocgbg}% -\hrule width \paperwidth height \paperheight}\vss}\vss\hbox to \paperwidth -{\hss -\ifdim\ocgt@@ls@width=0pt - \setbox\ocgtools@box@a=\hbox{\expandafter\colorbox\expandafter{\ocgt@@ls@bg}% - {\expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@text@envelope{#2}}}% -\else - \setbox\ocgtools@box@a=\hbox{\expandafter\colorbox{\expandafter\ocgt@@ls@bg}% - {\vbox{\hsize=\ocgt@@ls@width\relax\linewidth=\ocgt@@ls@width\relax - \rightskip 0 pt plus 1 fil\relax - \expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@text@envelope{#2}}}}% -\fi -\setbox\ocgtools@box@b\hbox{\resizebox{!}{\ocgtools@maxheight}{\copy\ocgtools@box@a}}% -\ifdim\wd\ocgtools@box@b>\ocgtools@maxwidth - \resizebox{\ocgtools@maxwidth}{!}{\box\ocgtools@box@a} -\else - \box\ocgtools@box@b -\fi -\hss}% -\vss -\hbox to \paperwidth {\hss\ocgtools@HideLayers{#3}}% -}% -} - -\def\ocg@empty{} - -\let\ocgtools@minitext@envelope\relax -\newcommand\ocgtools@drawminitext[3]{% -\@ocgtools@insideminilayertrue -\ocgtools@setdefault -\setkeys*{ocg@key}{#1}% -\ifx\XKV@rm\empty\setkeys{ocg@key}{#1}\else\setkeys{ocg@key}{width=#1}\fi -\ifdim\ocgt@@ls@width=0pt - \setbox\ocgtools@box@a=\hbox{\colorbox{\ocgt@@ls@bg}{\expandafter\color - \expandafter{\ocgt@@ls@fg}\ocgtools@minitext@envelope{#2}\ }}% -\else \setbox\ocgtools@box@a=\hbox{\colorbox{\ocgt@@ls@bg}% - {\vbox{\hsize=\ocgt@@ls@width\relax\linewidth=\ocgt@@ls@width\relax - \rightskip 0 pt plus 1 fil\relax - \expandafter\color\expandafter{\ocgt@@ls@fg}\ocgtools@minitext@envelope{#2}}}}% -\fi -\def\temp{#3}% -\ifx\temp\ocg@empty -\box\ocgtools@box@a -\else -\hbox{\copy\ocgtools@box@a\raise\ht\ocgtools@box@a -\vbox to 0 pt{\hbox to 0 pt{\hss -\ocgtools@HideMiniLayer[\ocgt@@ls@jsclose]{#3}}\vss}}% -\fi -\@ocgtools@insideminilayerfalse -} - -\endinput -%% -%% End of file `ocgtools.sty'. |