diff options
Diffstat (limited to 'Master/texmf-dist/source')
5 files changed, 485 insertions, 66 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx index a2067710dcf..cdcfece9391 100644 --- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx @@ -17,8 +17,8 @@ % This work consists of the main source file atbegshi.dtx % and the derived files % atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, -% atbegshi-example.tex, atbegshi-test1.tex, -% atbegshi-test2.tex, atbegshi-test3.tex. +% atbegshi-example1.tex, atbegshi-example2.tex, +% atbegshi-test1.tex, atbegshi-test2.tex, atbegshi-test3.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/atbegshi.dtx @@ -53,7 +53,8 @@ % Installation: % TDS:tex/generic/oberdiek/atbegshi.sty % TDS:doc/latex/oberdiek/atbegshi.pdf -% TDS:doc/latex/oberdiek/atbegshi-example.tex +% TDS:doc/latex/oberdiek/atbegshi-example1.tex +% TDS:doc/latex/oberdiek/atbegshi-example2.tex % TDS:doc/latex/oberdiek/test/atbegshi-test1.tex % TDS:doc/latex/oberdiek/test/atbegshi-test2.tex % TDS:doc/latex/oberdiek/test/atbegshi-test3.tex @@ -72,7 +73,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: atbegshi 2008/07/19 v1.8 At begin shipout hook (HO)} +\Msg{* Package: atbegshi 2008/07/31 v1.9 At begin shipout hook (HO)} \Msg{************************************************************************} \keepsilent @@ -100,8 +101,8 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file atbegshi.dtx and the derived files atbegshi.sty, atbegshi.pdf, atbegshi.ins, atbegshi.drv, - atbegshi-example.tex, atbegshi-test1.tex, - atbegshi-test2.tex, atbegshi-test3.tex. + atbegshi-example1.tex, atbegshi-example2.tex, + atbegshi-test1.tex, atbegshi-test2.tex, atbegshi-test3.tex. \endpreamble \let\MetaPrefix\DoubleperCent @@ -112,7 +113,8 @@ and the derived files \usedir{tex/generic/oberdiek}% \file{atbegshi.sty}{\from{atbegshi.dtx}{package}}% \usedir{doc/latex/oberdiek}% - \file{atbegshi-example.tex}{\from{atbegshi.dtx}{example}}% + \file{atbegshi-example1.tex}{\from{atbegshi.dtx}{example1}}% + \file{atbegshi-example2.tex}{\from{atbegshi.dtx}{example2}}% \usedir{doc/latex/oberdiek/test}% \file{atbegshi-test1.tex}{\from{atbegshi.dtx}{test1}}% \file{atbegshi-test2.tex}{\from{atbegshi.dtx}{test2}}% @@ -146,7 +148,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atbegshi.drv}% - [2008/07/19 v1.8 At begin shipout hook (HO)]% + [2008/07/31 v1.9 At begin shipout hook (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2007/11/11] \begin{document} @@ -176,7 +178,7 @@ and the derived files % \GetFileInfo{atbegshi.drv} % % \title{The \xpackage{atbegshi} package} -% \date{2008/07/19 v1.8} +% \date{2008/07/31 v1.9} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -299,13 +301,15 @@ and the derived files % See \cs{AtBeginShipoutUpperLeft}. The difference is that the material % is put in the foreground. % -% \subsection{Example} +% \subsection{Examples} +% +% \subsubsection{Example: circle in background} % % In this example we put a circle in the background in the middle % of the paper. % % \begin{macrocode} -%<*example> +%<*example1> % \end{macrocode} % \begin{macrocode} \documentclass[a4paper]{article} @@ -352,9 +356,40 @@ The last page. \end{document} % \end{macrocode} % \begin{macrocode} -%</example> +%</example1> % \end{macrocode} % +% \subsubsection{Example: adding TrimBox for dvipdfmx} +% +% Now an example from ``real life'' follows. Someone from the mailing list +% for dvipdfmx wants to put a TrimBox on every page. If we use +% \cs{AtBeginShipout}, we have to put the \cs{special} inside the +% box \cs{AtBeginShipoutBox} that gets shipped out. +% \begin{macrocode} +%<*example2> +\documentclass{minimal} +\usepackage{atbegshi} +\usepackage[ + dvipdfm, + paperwidth=630bp, + paperheight=810bp +]{geometry} +\AtBeginShipout{% + \setbox\AtBeginShipoutBox=\hbox{% + \special{pdf: put @thispage <</TrimBox[9 9 621 801]>>}% + \box\AtBeginShipoutBox + }% +} +\begin{document} + First page + \newpage + Second page +\end{document} +%</example2> +% \end{macrocode} +% Remember, in \cs{AtBeginShipoutBoxFirst} the \cs{setbox} wrapper code +% is implicitly given and the \cs{special} is used directly. +% % \section{Method of \cs{shipout} overloading} % % \subsection{\cs{shipout}} @@ -812,7 +847,7 @@ The last page. \fi \expandafter\x\csname ver@atbegshi.sty\endcsname \ProvidesPackage{atbegshi}% - [2008/07/19 v1.8 At begin shipout hook (HO)] + [2008/07/31 v1.9 At begin shipout hook (HO)] % \end{macrocode} % % \subsection{Catcodes} @@ -1616,7 +1651,7 @@ X \endgroup %<*test2> \input atbegshi.sty\relax \def\msg#{\immediate\write16} -\msg{File: atbegshi-test2.tex 2008/07/19 v1.8 Test file for plain-TeX} +\msg{File: atbegshi-test2.tex 2008/07/31 v1.9 Test file for plain-TeX} \def\testmsg#1#2{% \msg{}% \msg{*** Test with box (#1), expected page output [#2]}% hash-ok @@ -1713,7 +1748,7 @@ Hello World % \begin{macrocode} %<*test3> \NeedsTeXFormat{LaTeX2e} -\ProvidesFile{atbegshi-test3.tex}[2008/07/19 v1.8 Test file for LaTeX] +\ProvidesFile{atbegshi-test3.tex}[2008/07/31 v1.9 Test file for LaTeX] \RequirePackage{color} \pagecolor{yellow} \documentclass[a5paper,showtrims]{memoir} @@ -1823,7 +1858,8 @@ Hello World % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % atbegshi.sty & tex/generic/oberdiek/atbegshi.sty\\ % atbegshi.pdf & doc/latex/oberdiek/atbegshi.pdf\\ -% atbegshi-example.tex & doc/latex/oberdiek/atbegshi-example.tex\\ +% atbegshi-example1.tex & doc/latex/oberdiek/atbegshi-example1.tex\\ +% atbegshi-example2.tex & doc/latex/oberdiek/atbegshi-example2.tex\\ % test/atbegshi-test1.tex & doc/latex/oberdiek/test/atbegshi-test1.tex\\ % test/atbegshi-test2.tex & doc/latex/oberdiek/test/atbegshi-test2.tex\\ % test/atbegshi-test3.tex & doc/latex/oberdiek/test/atbegshi-test3.tex\\ @@ -1997,6 +2033,12 @@ Hello World % \item % \cs{AtBeginShipoutUpperLeftForeground} added. % \end{Version} +% \begin{Version}{2008/07/31 v1.9} +% \item +% Second example (TrimBox for dvipdfmx) added. +% \item +% No changes in package code. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx index aa66b73bda0..b29fc168600 100644 --- a/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/attachfile2.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2005, 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +% Copyright (C) 2005-2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -70,7 +70,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: attachfile2 2007/04/11 v2.3 attach files into PDF (HO)} +\Msg{* Package: attachfile2 2008/07/29 v2.4 attach files into PDF (HO)} \Msg{************************************************************************} \keepsilent @@ -81,7 +81,7 @@ This is a generated file. -Copyright (C) 2005, 2006 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +Copyright (C) 2005-2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -144,7 +144,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{attachfile2.drv}% - [2007/04/11 v2.3 attach files into PDF (HO)]% + [2008/07/29 v2.4 attach files into PDF (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2007/11/11] \begin{document} @@ -153,7 +153,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1383} +% \CheckSum{1380} % % \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 @@ -174,7 +174,7 @@ and the derived files % \GetFileInfo{attachfile2.drv} % % \title{The \xpackage{attachfile2} package} -% \date{2007/04/11 v2.3} +% \date{2008/07/29 v2.4} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -282,6 +282,67 @@ and the derived files % the generation of the auxiliary file \xfile{.atfi}. % \end{itemize} % +% \subsubsection{Option \xoption{color}} +% +% Package \xpackage{attachfile}'s option \xoption{color} only +% understands explicit RGB values as three space separated +% real numbers in the range from 0 to 1. +% +% This package \xpackage{attachfile2} extends the syntax. +% The usual color specifications of packages \xpackage{color} +% or \xpackage{xcolor} may be used. The latter one requires +% that package \xpackage{xcolor} is loaded. +% Without package \xpackage{xcolor} a limited range of +% explicit color specifications are supported, the color models +% \texttt{rgb} and \texttt{gray} (and \texttt{cmyk} if +% package \xpackage{hyperref}'s option \xoption{pdfversion} is set +% to \texttt{1.7} or greater. +% +% Example without package \xpackage{xcolor}: +%\begin{quote} +%\begin{verbatim} +%\documentclass{article} +%\usepackage[color={1 0 .5}]{attachfile2} +% % Spaces in option values in \usepackage or \documentclass +% % must be protected by curly braces. Otherwise LaTeX strips +% % the spaces and the package would see `color=10.5'. +% % This protection is not necessary for \attachfilesetup. +%\attachfilesetup{color=1 0 .5} +%\attachfilesetup{color=[rgb]{1,0,.5}} +%\attachfilesetup{color=[gray]{.5}} +%\end{verbatim} +%\end{quote} +% +% The following example with package \xpackage{xcolor} shows +% additional color specifications: +%\begin{quote} +%\begin{verbatim} +%\documentclass{article} +%\usepackage{xcolor} +%\definecolor{attachfilecolor}{cmyk}{.1,.2,.3,.4} +%\usepackage{color=red}{attachfile2} +%\attachfilesetup{color=red} +%\attachfilesetup{color=attachfilecolor} +%\end{verbatim} +%\end{quote} +% +% \paragraph{For experts.}% +% If the color is used in annotations, the color is converted +% with the help of package \xpackage{xcolor} to RGB. +% PDF versions 1.7 or later also understand color models Gray and +% CMYK. The PDF version is detected if the experimental +% option \xoption{pdfversion} +% of package \xpackage{hyperref} is used, example: +%\begin{quote} +%\begin{verbatim} +%\documentclass{article} +%\usepackage[pdfversion=1.7]{hyperref} +%\usepackage{attachfile2} +%\end{verbatim} +%\end{quote} +% However, currently only driver \xoption{pdftex} also supports +% the actual setting of the PDF version in the output PDF file. +% % \subsubsection{Perl script \xfile{pdfatfi.pl}} % % This package also tries to get and add meta information data, @@ -331,7 +392,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{attachfile2}% - [2007/04/11 v2.3 attach files into PDF (HO)]% + [2008/07/29 v2.4 attach files into PDF (HO)]% % \end{macrocode} % \begin{macrocode} \RequirePackage{ifpdf} @@ -343,6 +404,7 @@ and the derived files \RequirePackage{hyperref} % because of \pdfstringdef +\RequirePackage{hycolor}[2008/07/29] \def\atfi@pdfstringdef#1#2{% \pdfstringdef\atfi@temp@string{#2}% @@ -470,8 +532,9 @@ and the derived files % option color \define@key{AtFi}{color}{% - \def\atfi@color{/C[#1]}% hash-ok - \def\atfi@color@rgb{#1}% + \HyColor@AttachfileColor{#1}% + \atfi@color@tex\atfi@color@inline\atfi@color@annot + {attachfile2}{color}% } \setkeys{AtFi}{color=1 0.9255 0.7765} @@ -611,10 +674,11 @@ and the derived files \begingroup \setkeys{AtFi}{#1}% \ifatfi@print - \def\atfi@textcolor(##1 ##2 ##3)##4{% - \textcolor[rgb]{##1,##2,##3}{##4}}% - \expandafter\atfi@textcolor\expandafter - (\atfi@color@rgb){#2\strut}% + \leavevmode + \begingroup + \HyColor@UseColor\atfi@color@tex + #2\strut + \endgroup \else \setbox0=\hbox{#2\strut}% \makebox[\wd0]{}% @@ -662,7 +726,7 @@ and the derived files 2.7319 4.1367 3.9571 13.8867 \atfi@RECTFILL 8.7031 4.1367 3.9571 9.8867 \atfi@RECTFILL 14.7471 4.1367 3.9571 11.8867 \atfi@RECTFILL - \atfi@color@rgb\space \atfi@SETRGBCOLORFILL + \atfi@color@inline{FILL}% 1.689 3.0938 3.9571 13.8867 \atfi@RECTFILL 7.6602 3.0938 3.9571 9.8867 \atfi@RECTFILL 13.7041 3.0938 3.9571 11.8867 \atfi@RECTFILL @@ -711,7 +775,7 @@ and the derived files 6.9692 6.3301 6.9692 7.1572 \atfi@CURVETOV 6.9692 7.9863 6.9692 12.21 \atfi@CURVETOY \atfi@STROKE - \atfi@color@rgb\space \atfi@SETRGBCOLORSTROKE + \atfi@color@inline{STROKE}% 1 \atfi@SETLINEWIDTH 1.2495 12.4404 \atfi@MOVETO 1.2495 3.9883 1.2495 3.1895 \atfi@CURVETOV @@ -754,7 +818,7 @@ and the derived files 11 1 \atfi@LINETO 11 6 \atfi@LINETO \atfi@FILLSTROKE{% - \atfi@color@rgb\space\atfi@SETRGBCOLORFILL + \atfi@color@inline{FILL}% }{% 0 \atfi@SETGRAYSTROKE }% @@ -816,7 +880,7 @@ and the derived files 9.4463 10.1035 8.7344 10.9199 7.856 10.9199 \atfi@CURVETO \atfi@CLOSEPATH \atfi@FILLSTROKE{% - \atfi@color@rgb\space\atfi@SETRGBCOLORFILL + \atfi@color@inline{FILL}% }{% 0 \atfi@SETGRAYSTROKE }% @@ -1042,11 +1106,13 @@ and the derived files \def\atfi@textattachfile@i#1#2#3{% \setkeys{AtFi}{#1}% \atfi@embedfile{#2}% - \def\atfi@textcolor(##1 ##2 ##3)##4{% - \textcolor[rgb]{##1,##2,##3}{##4}}% \atfi@set@appearance{% - \expandafter\atfi@textcolor\expandafter - (\atfi@color@rgb){#3\strut}}% + \leavevmode + \begingroup + \HyColor@UseColor\atfi@color@tex + #3\strut + \endgroup + }% \atfi@flags@to@int \atfi@insert@file@annot{#2}% \endgroup @@ -1093,7 +1159,7 @@ and the derived files %<*pdftex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atfipdftex.def}% - [2007/04/11 v2.3 attachfile2 driver for pdfTeX (HO)]% + [2008/07/29 v2.4 attachfile2 driver for pdfTeX (HO)]% % \end{macrocode} % \begin{macrocode} \let\atfi@literal\pdfliteral @@ -1115,6 +1181,8 @@ and the derived files \def\atfi@SETRGBCOLORFILL{rg } \def\atfi@SETGRAYSTROKE{G } \def\atfi@SETGRAYFILL{g } +\def\atfi@SETCMYKCOLORSTROKE{K } +\def\atfi@SETCMYKCOLORFILL{k } \def\atfi@RECTFILL{re f } \def\atfi@RECTSTROKEFILL#1#2#3{#1#2#3re B } \def\atfi@SETMITERLIMIT{M } @@ -1205,7 +1273,7 @@ and the derived files depth \atfi@scale\atfi@appearancedepth {% /Subtype/FileAttachment% \atfi@icon - \atfi@color + \atfi@color@annot \atfi@author \atfi@date \atfi@annotname @@ -1230,7 +1298,7 @@ and the derived files %<*dvips> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{atfipdftex.def}% - [2007/04/11 v2.3 attachfile2 driver for dvips (HO)]% + [2008/07/29 v2.4 attachfile2 driver for dvips (HO)]% % \end{macrocode} % \begin{macrocode} \def\atfi@literal#1{% @@ -1446,6 +1514,8 @@ and the derived files \def\atfi@SETRGBCOLORFILL{setrgbcolor } \def\atfi@SETGRAYSTROKE{setgray } \def\atfi@SETGRAYFILL{setgray } +\def\atfi@SETCMYKCOLORSTROKE{setcmykcolor } +\def\atfi@SETCMYKCOLORFILL{setcmykcolor } \def\atfi@RECTFILL{atfi_rectfill } \def\atfi@RECTSTROKEFILL#1#2#3{% #3% @@ -1701,7 +1771,7 @@ and the derived files [% /Subtype/FileAttachment% \atfi@icon - \atfi@color + \atfi@color@annot \atfi@author \atfi@date \atfi@annotname @@ -1765,8 +1835,8 @@ $^W=1; # turn warning on # my $file = "pdfatfi.pl"; my $program = uc($&) if $file =~ /^\w+/; -my $version = "2.3"; -my $date = "2007/04/11"; +my $version = "2.4"; +my $date = "2008/07/29"; my $author = "Heiko Oberdiek"; my $copyright = "Copyright (c) 2005, 2006 by $author."; # @@ -2191,6 +2261,12 @@ __END__ % \item % Line ends sanitized. % \end{Version} +% \begin{Version}{2008/07/29 v2.4} +% \item +% Improved color support. Option \xoption{color} now understands +% the usual color specifications if package \xpackage{xcolor} is +% loaded. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx b/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx index 2bd99182451..0881c019ecd 100644 --- a/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/hycolor.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +% Copyright (C) 2007, 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de> % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either @@ -17,7 +17,7 @@ % This work consists of the main source file hycolor.dtx % and the derived files % hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv, -% hycolor-test1.tex, hycolor-test2.tex. +% hycolor-test1.tex, hycolor-test2.tex, hycolor-test3.tex. % % Distribution: % CTAN:macros/latex/contrib/oberdiek/hycolor.dtx @@ -54,6 +54,7 @@ % TDS:doc/latex/oberdiek/hycolor.pdf % TDS:doc/latex/oberdiek/test/hycolor-test1.tex % TDS:doc/latex/oberdiek/test/hycolor-test2.tex +% TDS:doc/latex/oberdiek/test/hycolor-test3.tex % TDS:source/latex/oberdiek/hycolor.dtx % %<*ignore> @@ -69,7 +70,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hycolor 2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO)} +\Msg{* Package: hycolor 2008/07/29 v1.2 Code for color options of hyperref/bookmark (HO)} \Msg{************************************************************************} \keepsilent @@ -80,7 +81,7 @@ This is a generated file. -Copyright (C) 2007 by Heiko Oberdiek <oberdiek@uni-freiburg.de> +Copyright (C) 2007, 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de> This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -97,7 +98,7 @@ This Current Maintainer of this work is Heiko Oberdiek. This work consists of the main source file hycolor.dtx and the derived files hycolor.sty, hycolor.pdf, hycolor.ins, hycolor.drv, - hycolor-test1.tex, hycolor-test2.tex. + hycolor-test1.tex, hycolor-test2.tex, hycolor-test3.tex. \endpreamble \let\MetaPrefix\DoubleperCent @@ -110,6 +111,7 @@ and the derived files \usedir{doc/latex/oberdiek/test}% \file{hycolor-test1.tex}{\from{hycolor.dtx}{test,test1}}% \file{hycolor-test2.tex}{\from{hycolor.dtx}{test,test2}}% + \file{hycolor-test3.tex}{\from{hycolor.dtx}{test,test3}}% } \obeyspaces @@ -139,7 +141,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hycolor.drv}% - [2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO)]% + [2008/07/29 v1.2 Code for color options of hyperref/bookmark (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2007/11/11] \usepackage[ruled]{algorithm2e} @@ -183,7 +185,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1043} +% \CheckSum{1389} % % \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 @@ -204,7 +206,7 @@ and the derived files % \GetFileInfo{hycolor.drv} % % \title{The \xpackage{hycolor} package} -% \date{2007/04/11 v1.1} +% \date{2008/07/29 v1.2} % \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}} % % \maketitle @@ -277,8 +279,12 @@ and the derived files % |Hyp.*color| & all & no & no\\ % |Hyp.*bordercolor| & |gray|, |rgb| & yes & no\\ % |Field.*color| & |gray|, |rgb|, |cmyk| & yes & yes\\ +% |AtFi.color| & |gray|, |rgb| & yes & no\\ % \end{tabular} % \end{quote} +% ``RGB color'' means that the color value can be given as +% space separated RGB numbers (real numbers in the range +% from 0 to 1). % Explanation of the color option prefixes: % \begin{quote} % \begin{tabular}{@{}ll@{}} @@ -289,10 +295,10 @@ and the derived files % package options or |\hypersetup|\\ % |Field| & Package \xpackage{hyperref}: % Form field options\\ +% |AtFi| & Package \xpackage{attachfile2}: option \xoption{color}\\ % \end{tabular} % \end{quote} % -% % \StopEventually{ % } % @@ -302,7 +308,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{hycolor}% - [2007/04/11 v1.1 Code for color options of hyperref/bookmark (HO)]% + [2008/07/29 v1.2 Code for color options of hyperref/bookmark (HO)]% % \end{macrocode} % % \subsection{Normalization} @@ -471,7 +477,7 @@ and the derived files % \KwResult{Macro \ArgSty{cmd} contains the calculated % color specification string or has the meaning of \cs{relax} % if the color must not set} -% \caption{Main color option algorithm()} +% \caption{MainColorOptionAlgorithm(key, value, cmd)} % \BlankLine % DefSanitized(\ArgSty{temp}, \ArgSty{value})\; % Call option specific algorithm(\ArgSty{key}, \ArgSty{temp}, \ArgSty{cmd})\; @@ -483,7 +489,8 @@ and the derived files % one color option \xoption{color}. Because option \xoption{rgbcolor} % can easily given as color specification in model rgb: % \begin{quote} -% |rgbcolor=r g b| $\equiv$ |color=[rgb]{r,g,b}| +% |rgbcolor=|\meta{r} \meta{g} \meta{b} $\equiv$ +% |color=[rgb]{|\meta{r}|,|\meta{g}|,|\meta{b}|}| % \end{quote} % Package \xpackage{bookmark} stores the result in macro \cs{BKM@color}. % The empty string is interpreted as \emph{no color}. @@ -493,6 +500,7 @@ and the derived files % \Param{cmd}{macro for result} % \Param{package}{package name for error message} % \Param{option}{option name for error message} +% \caption{BookmarkColor(value, cmd, package, option)} % \BlankLine % \Switch{\Var{value}}{ % \Case{empty}{ @@ -876,6 +884,7 @@ and the derived files % % \begin{macro}{\HyColor@IfRGB} % \begin{macrocode} +\newif\ifHyColor@result \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname pdfmatch\endcsname\relax \expandafter\@firstoftwo @@ -883,7 +892,6 @@ and the derived files \expandafter\@secondoftwo \fi {% - \newif\ifHyColor@result \begingroup \def\x#1{\endgroup \def\HyColor@IfRGB##1{% @@ -948,8 +956,10 @@ and the derived files \expandafter\strip@prefix\pdflastmatch2,% \expandafter\strip@prefix\pdflastmatch3% }% + \HyColor@resulttrue \expandafter\@firstoftwo \else + \HyColor@resultfalse \expandafter\@secondoftwo \fi }% @@ -963,7 +973,7 @@ and the derived files % \Param{value}{value of the option} % \Param{cmd}{macro for result} % \Param{package, option}{package and option for error message} -% \caption{HyperrefBorderColor(value, cmd, output, package, option)} +% \caption{HyperrefBorderColor(value, cmd, package, option)} % \BlankLine % \Switch{\Var{value}}{ % \Case{empty}{ @@ -1045,26 +1055,167 @@ and the derived files % \end{macrocode} % \end{macro} % +% \subsection{Package \xpackage{attachfile2}} +% +% Before PDF-1.7 only RGB values are permitted in annotations. +% Since PDF-1.7 the color entry in annotations understands +% several color models, depending on the size of the color array: +% \begin{itemize} +% \item Zero entries: means transparent, not useful for +% file attachments. AR7/Linux and AR8/Linux show black instead. +% \item One entry: color model `gray'. +% \item Three entries: color model `rgb'. +% \item Four entries: color model `cmyk'. +% \end{itemize} +% An empty color specification is interpreted as ``no color''. +% +% \begin{macro}{\HyColor@DetectPdfVersion} +% \begin{macrocode} +\def\HyColor@DetectPdfVersion{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname Hy@pdfversion\endcsname\relax + \global\chardef\HyColor@PdfVersion=0 % + \else + \global\chardef\HyColor@PdfVersion=\Hy@pdfversion\relax + \fi + \global\let\HyColor@DetectPdfVersion\relax +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HyColor@SpaceToComma} +% \begin{macrocode} +\def\HyColor@SpaceToComma#1 #2\@nil{% + #1% + \ifx\relax#2\relax + \expandafter\@gobble + \else + ,% + \expandafter\@firstofone + \fi + {% + \HyColor@SpaceToComma#2\@nil + }% +}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\HyColor@AttachfileColor} +% \begin{macrocode} +\def\HyColor@AttachfileColor#1#2#3#4#5#6{% + \def#2{#1}% + \ifx#2\@empty + \let#3\@gobble + \let#4\@empty + \else + \HyColor@resultfalse + \HyColor@XZeroOneThreeFour{#1}#3{#5}{#6}% + \ifHyColor@result + \edef#2{% + [rgb]{\expandafter\HyColor@SpaceToComma#3 \@nil}% + }% + \fi + \ifx\HyColor@model\HyColor@model@rgb + \edef#4{/C[#3]}% hash-ok + \edef#3##1{% + #3 % + \noexpand\csname atfi@SETRGBCOLOR##1\noexpand\endcsname + }% + \else + \ifx\HyColor@model\HyColor@model@gray + \HyColor@DetectPdfVersion + \ifnum\HyColor@PdfVersion<7 % + \edef#4{/C[#3 #3 #3]}% hash-ok + \else + \edef#4{/C[#3]}% hash-ok + \fi + \edef#3##1{% + #3 % + \noexpand\csname atfi@SETGRAYCOLOR##1\noexpand\endcsname + }% + \else + \ifx\HyColor@model\HyColor@model@cmyk + \HyColor@DetectPdfVersion + \ifnum\HyColor@PdfVersion<7 % + \HyColor@IfModel{#1}{% + \HyColor@IfXcolor{% + \convertcolorspec\HyColor@model\HyColor@values + \HyColor@model@rgb#4% + \expandafter\HyColor@NormalizeCommaRGB#4\@nil#4% + \edef#4{/C[#4]}% hash-ok + }{% + \let#4\@empty + \HyColor@ErrorModelNoXcolor{#5}{#6}% + }% + }{% + \HyColor@IfXcolor{% + \extractcolorspec{#1}#4% + \expandafter\convertcolorspec#4% + \HyColor@model@rgb#4% + \expandafter\HyColor@NormalizeCommaRGB#4\@nil#4% + \edef#4{/C[#4]}% hash-ok + }{% + \let#4\@empty + \HyColor@ErrorSpecNoXcolor{#5}{#6}% + }% + }% + \else + \edef#4{/C[#3]}% hash-ok + \fi + \edef#3##1{% + #3 % + \noexpand\csname atfi@SETCMYKCOLOR##1\noexpand\endcsname + }% + \else + \ifx\HyColor@model\HyColor@model@empty + \PackageError{#5}{% + Color model `empty' is not permitted for option `#6'% + }\@ehc + \let#2\@empty + \let#3\@gobble + \let#4\@empty + \else + \ifx\HyColor@model\relax % (missing xcolor) + \let#3\@gobble + \let#4\@empty + \else + \PackageError{#5}{% + Internal error: unsupported color model% + }\@ehc + \fi + \fi + \fi + \fi + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} %</package> % \end{macrocode} % -% \section{Test}] +% \section{Test} % % \begin{macrocode} %<*test1> -\ProvidesFile{hycolor-test1.tex}[2007/04/11 test file 1] +\ProvidesFile{hycolor-test1.tex}[2008/07/29 test file 1] %</test1> % \end{macrocode} % % \begin{macrocode} %<*test2> -\ProvidesFile{hycolor-test2.tex}[2007/04/11 test file 2] +\ProvidesFile{hycolor-test2.tex}[2008/07/29 test file 2] \let\pdfmatch\relax %</test2> % \end{macrocode} % % \begin{macrocode} +%<test3>\ProvidesFile{hycolor-test3.tex}[2008/07/29 test file 3] +% \end{macrocode} +% +% \begin{macrocode} %<*test> % \end{macrocode} % \begin{macrocode} @@ -1107,7 +1258,7 @@ and the derived files \Expect*{\@ResultErrorMessage}*{\@ExpectErrorMessage}% } -\usepackage{hycolor} +\usepackage{hycolor}[2008/07/29] %</test> % \end{macrocode} % @@ -1335,6 +1486,151 @@ and the derived files %</test1|test2> % \end{macrocode} % +% \subsection{Test for package \xpackage{attachfile2}} +% +% \begin{macrocode} +%<*test3> +\def\atfi@SETRGBCOLORtest{set-rgb} +\def\atfi@SETGRAYCOLORtest{set-gray} +\def\atfi@SETCMYKCOLORtest{set-cmyk} +\def\Test#1#2#3#4#5{% + \begingroup + \setbox0=\hbox{% + \begingroup + \chardef\HyColor@PdfVersion=6 % + \HyColor@AttachfileColor{#1}\spec\inlinemacro\annot + \TestPackageName\TestOptionName + \edef\inline{\inlinemacro{test}}% + \expandafter\Expect\expandafter{\spec}{#2}% + \expandafter\Expect\expandafter{\inline}{#3}% + \expandafter\Expect\expandafter{\annot}{#4}% + \endgroup + \begingroup + \chardef\HyColor@PdfVersion=7 % + \HyColor@AttachfileColor{#1}\spec\inlinemacro\annot + \TestPackageName\TestOptionName + \edef\inline{\inlinemacro{test}}% + \expandafter\Expect\expandafter{\spec}{#2}% + \expandafter\Expect\expandafter{\inline}{#3}% + \expandafter\Expect\expandafter{\annot}{#5}% + \endgroup + }% + \Expect*{\the\wd0}{0.0pt}% + \endgroup +} +\newif\ifError +\def\TestError[#1]#2#3#4#5#6{% + \begingroup + \global\Errorfalse + \let\OrgPackageError\PackageError + \def\PackageError##1##2##3{% + \edef\TestTemp{##1}% + \ifx\TestTemp\TestPackageName + \Expect*{\ifError too many errors\else ok\fi}{ok}% + \Expect*{#6}*{##2}% + \global\Errortrue + \else + \OrgPackageError{##1}{##2}{##3}% + \fi + }% + \setbox0=\hbox{% + \begingroup + \chardef\HyColor@PdfVersion=#1 % + \HyColor@AttachfileColor{#2}\spec\inlinemacro\annot + \TestPackageName\TestOptionName + \edef\inline{\inlinemacro{test}}% + \expandafter\Expect\expandafter{\spec}{#3}% + \expandafter\Expect\expandafter{\inline}{#4}% + \expandafter\Expect\expandafter{\annot}{#5}% + \endgroup + \ifx\\#6\\% + \else + \Expect*{\ifError ok\else missing error\fi}{ok}% + \fi + }% + \Expect*{\the\wd0}{0.0pt}% + \endgroup +} +\def\NoEmptyModel{% + Color model `empty' is not permitted for option `\TestOptionName'% +} +\def\ModelNoXcolor#1#2{% + Color model `#1' is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `\TestOptionName=[#1]{#2}'% hash-ok +} +\def\SpecNoXColor#1{% + This color specification is not supported\MessageBreak + without package `xcolor' in\MessageBreak + `test-option=#1'% +} +% \end{macrocode} +% +% \begin{macrocode} +\begin{qstest}{AttachfileColor}{AttachfileColor} + \Test{}{}{}{}{}% + \Test{0.1 0.2 0.3}{[rgb]{.1,.2,.3}}{.1 .2 .3 set-rgb}% + {/C[.1 .2 .3]}{/C[.1 .2 .3]}% + \Test{[gray]{0.4}}{[gray]{0.4}}{.4 set-gray}% + {/C[.4 .4 .4]}{/C[.4]}% + \Test{[rgb]{0.3,.2,.1}}{[rgb]{0.3,.2,.1}}{.3 .2 .1 set-rgb}% + {/C[.3 .2 .1]}{/C[.3 .2 .1]}% + \Test{0.0 1.0 1}{[rgb]{0,1,1}}{0 1 1 set-rgb}% + {/C[0 1 1]}{/C[0 1 1]}% + \Test{[gray]1}{[gray]1}{1 set-gray}{/C[1 1 1]}{/C[1]}% + \TestError[6]{[empty]{}}{}{}{}\NoEmptyModel + \TestError[7]{[empty]{}}{}{}{}\NoEmptyModel + \TestError[6]{[cmyk]{.1,.2,.3,.4}}{[cmyk]{.1,.2,.3,.4}}% + {.1 .2 .3 .4 set-cmyk}{}% + {\ModelNoXcolor{cmyk}{.1,.2,.3,.4}}% + \TestError[7]{[cmyk]{.1,.2,.3,.4}}{[cmyk]{.1,.2,.3,.4}}% + {.1 .2 .3 .4 set-cmyk}{/C[.1 .2 .3 .4]}{}% + \TestError[6]{red}{red}{}{}{\SpecNoXColor{red}}% + \TestError[7]{red}{red}{}{}{\SpecNoXColor{red}}% +\end{qstest} +% \end{macrocode} +% +% \begin{macrocode} +\usepackage{xcolor} +\definecolor[named]{MyGreen}{rgb}{0,0.7,0} +\definecolor{mygreen}{named}{MyGreen} +\definecolor{graynine}{gray}{0.9} +\definecolor{GraySix}{Gray}{9} +% \end{macrocode} +% +% \begin{macrocode} +\begin{qstest}{AttachfileColorX}{AttachfileColorX} + \Test{}{}{}{}{}% + \Test{0.1 0.2 0.3}{[rgb]{.1,.2,.3}}{.1 .2 .3 set-rgb}% + {/C[.1 .2 .3]}{/C[.1 .2 .3]}% + \Test{[gray]{0.4}}{[gray]{0.4}}{.4 set-gray}% + {/C[.4 .4 .4]}{/C[.4]}% + \Test{[rgb]{0.3,.2,.1}}{[rgb]{0.3,.2,.1}}{.3 .2 .1 set-rgb}% + {/C[.3 .2 .1]}{/C[.3 .2 .1]}% + \Test{0.0 1.0 1}{[rgb]{0,1,1}}{0 1 1 set-rgb}% + {/C[0 1 1]}{/C[0 1 1]}% + \Test{[gray]1}{[gray]1}{1 set-gray}{/C[1 1 1]}{/C[1]}% + \Test{red}{red}{1 0 0 set-rgb}{/C[1 0 0]}{/C[1 0 0]}% + \Test{black}{black}{0 set-gray}{/C[0 0 0]}{/C[0]}% + \Test{cyan}{cyan}{1 0 0 0 set-cmyk}{/C[0 1 1]}{/C[1 0 0 0]}% + \Test{[named]{black}}{[named]{black}}{0 0 0 set-rgb}% + {/C[0 0 0]}{/C[0 0 0]}% + \Test{[Gray]{9}}{[Gray]{9}}{.6 set-gray}{/C[.6 .6 .6]}{/C[.6]}% + \Test{[HTML]{0080FF}}{[HTML]{0080FF}}{0 .50195 1 set-rgb}% + {/C[0 .50195 1]}{/C[0 .50195 1]}% + \Test{graynine}{graynine}{.9 set-gray}{/C[.9 .9 .9]}{/C[.9]}% + \Test{GraySix}{GraySix}{.6 set-gray}{/C[.6 .6 .6]}{/C[.6]}% + \Test{[wave]{500}}{[wave]{500}}{0 1 .49846 set-rgb}% + {/C[0 1 .49846]}{/C[0 1 .49846]}% + \TestError[6]{[empty]{}}{}{}{}\NoEmptyModel + \TestError[7]{[empty]{}}{}{}{}\NoEmptyModel +\end{qstest} +% \end{macrocode} +% +% \begin{macrocode} +%</test3> +% \end{macrocode} +% % \begin{macrocode} %<*test> \begin{document} @@ -1405,6 +1701,7 @@ and the derived files % hycolor.pdf & doc/latex/oberdiek/hycolor.pdf\\ % test/hycolor-test1.tex & doc/latex/oberdiek/test/hycolor-test1.tex\\ % test/hycolor-test2.tex & doc/latex/oberdiek/test/hycolor-test2.tex\\ +% test/hycolor-test3.tex & doc/latex/oberdiek/test/hycolor-test3.tex\\ % hycolor.dtx & source/latex/oberdiek/hycolor.dtx\\ % \end{tabular}^^A % }^^A @@ -1534,6 +1831,10 @@ and the derived files % \item % Line ends sanitized. % \end{Version} +% \begin{Version}{2008/07/29 v1.2} +% \item +% Support for package \xpackage{attachfile2} added. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins index e6a1d87bb5f..77c9da39c58 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins @@ -1,5 +1,5 @@ % oberdiek.ins -% 2008/07/19 +% 2008/07/31 % % Copyright (C) 1999, 2001, 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex index 1045d7d2de1..9b5f8c557f9 100644 --- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex +++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex @@ -6,7 +6,7 @@ \newcommand*{\Subject}{CTAN:\CTANdir} \newcommand*{\Author}{Heiko Oberdiek} \newcommand*{\Email}{oberdiek@uni-freiburg.de} -\newcommand*{\Date}{2008/07/19} +\newcommand*{\Date}{2008/07/31} % Copyright (C) 2006 by % Heiko Oberdiek <oberdiek@uni-freiburg.de> @@ -168,11 +168,11 @@ [\entrysep] \entry{askinclude}{2007/10/23}{2.0}{Interactive asking of included files}% [\entrysep] -\entry{atbegshi}{2008/07/19}{1.8}{At begin shipout hook}% +\entry{atbegshi}{2008/07/31}{1.9}{At begin shipout hook}% [\entrysep] \entry{atenddvi}{2007/04/17}{1.1}{At end DVI hook}% [\entrysep] -\entry{attachfile2}{2007/04/11}{2.3}{attach files into PDF}% +\entry{attachfile2}{2008/07/29}{2.4}{attach files into PDF}% [\entrysep] \entry{auxhook}{2007/04/06}{1.1}{Hooks for auxiliary files}% [\entrysep] @@ -212,7 +212,7 @@ [\entrysep] \entry{holtxdoc}{2007/12/12}{0.10}{Private additional ltxdoc support}% [\entrysep] -\entry{hycolor}{2007/04/11}{1.1}{Code for color options of hyperref/bookmark}% +\entry{hycolor}{2008/07/29}{1.2}{Code for color options of hyperref/bookmark}% [\entrysep] \entry{hypbmsec}{2007/04/11}{2.4}{Bookmarks in sectioning commands}% [\entrysep] |