diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-22 23:36:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-22 23:36:31 +0000 |
commit | cd62c624e149e4c29e0e7aa29c016ae8b45cf086 (patch) | |
tree | 1279b8e45d65cd3fd93975997a8d3db844722b28 /Master/texmf-dist/source/latex | |
parent | 2be6eaeb8090315538ca23046d0fbc8ffce6acdd (diff) |
oberdiek (22apr11)
git-svn-id: svn://tug.org/texlive/trunk@22162 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex')
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/bookmark.dtx | 184 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/hologo.dtx | 33 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/luacolor.dtx | 177 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/oberdiek.tex | 10 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx | 50 |
6 files changed, 351 insertions, 105 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx index 3679163b57e..e4603494c7e 100644 --- a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: bookmark.dtx -% Version: 2011/04/13 v1.20 +% Version: 2011/04/21 v1.21 % % Copyright (C) 2007-2011 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -84,7 +84,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: bookmark 2011/04/13 v1.20 PDF bookmarks (HO)} +\Msg{* Package: bookmark 2011/04/21 v1.21 PDF bookmarks (HO)} \Msg{************************************************************************} \keepsilent @@ -96,7 +96,7 @@ This is a generated file. Project: bookmark -Version: 2011/04/13 v1.20 +Version: 2011/04/21 v1.21 Copyright (C) 2007-2011 by Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -166,7 +166,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bookmark.drv}% - [2011/04/13 v1.20 PDF bookmarks (HO)]% + [2011/04/21 v1.21 PDF bookmarks (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/02/04] \begin{document} @@ -175,7 +175,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{2225} +% \CheckSum{2323} % % \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 @@ -196,7 +196,7 @@ and the derived files % \GetFileInfo{bookmark.drv} % % \title{The \xpackage{bookmark} package} -% \date{2011/04/13 v1.20} +% \date{2011/04/21 v1.21} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -224,7 +224,8 @@ and the derived files % \item More actions than simple GoTo actions are possible. % \end{itemize} % -% In the same way as \xpackage{hyperref} the bookmarks are generated +% In the same way as \xpackage{hyperref} \cite{hyperref} +% the bookmarks are generated % in the order of the bookmark generating macros (\cs{bookmark}). % A level number is used to define the tree structure of the bookmarks. % The restrictions are less strict: @@ -391,6 +392,30 @@ and the derived files % \end{tabular} % \end{quote} % +% \paragraph{Missing actions.} +% If the action is missing package \xpackage{bookmark} throws +% an error message. Depending on the driver (\xoption{pdftex}, +% \xoption{dvips} and friends) the package detects it quite late +% at the end of the document. Since version 2011/04/21 v1.21 +% the package tries printing the line number and file name +% of the corresponding occurence of \cs{bookmark}. +% However, \hologo{TeX} does provide the line number, but +% unhappily the file name is a secret. The package supports +% some ways to get the file name: +% \begin{itemize} +% \item If \hologo{LuaTeX} (indenpendently from DVI or PDF modus) +% is running, then its |status.filename| is used automatically. +% \item Package \cs{currfile} \cite{currfile} redefines \hologo{LaTeX} +% internals to keep track of the file name. If the package +% is loaded, then its \cs{currfilepath} is detected and used +% automatically by package \xpackage{bookmark}. +% \item The file name can be set manually by option \xoption{scrfile} +% in \cs{bookmarksetup} or \cs{bookmark}. But be careful, +% manual setting disables the previous ways for file name +% detection. And a wrong or missed file name setting might +% get you a wrong source location in the error message. +% \end{itemize} +% % \subsubsection{Level options} % % The order of the bookmark entries are defined by the @@ -631,7 +656,7 @@ and the derived files open, openlevel=2, atend -]{bookmark}[2011/04/13] +]{bookmark}[2011/04/21] \bookmarksetup{color=blue} @@ -734,7 +759,7 @@ and the derived files %<*package> \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{bookmark}% - [2011/04/13 v1.20 PDF bookmarks (HO)]% + [2011/04/21 v1.21 PDF bookmarks (HO)]% % \end{macrocode} % % \subsubsection{Requirements} @@ -813,14 +838,15 @@ and the derived files \RequirePackage{ifpdf}[2009/04/10] \RequirePackage{ifxetex} \RequirePackage{ifvtex}[2008/11/04] +\RequirePackage{ifluatex}[2010/03/01] \RequirePackage{pdftexcmds}[2010/11/04] \RequirePackage{hyperref}[2010/06/18] \RequirePackage{auxhook}[2007/04/06] \RequirePackage{kvsetkeys}[2010/03/01] \RequirePackage{kvoptions}[2009/08/13] \RequirePackage{hycolor}[2008/09/08] -\RequirePackage{bitset} -\RequirePackage{ltxcmds}[2010/04/08] +\RequirePackage{bitset}[2011/01/30] +\RequirePackage{ltxcmds}[2011/04/14] % \end{macrocode} % % \subsubsection{Package options} @@ -846,6 +872,8 @@ and the derived files page,% rawaction,% rellevel,% + srcfile,% + srcline,% startatroot,% uri,% view,% @@ -1561,6 +1589,13 @@ and the derived files % \end{macrocode} % \end{macro} % +% \subsubsection{Options for source file location} +% +% \begin{macrocode} +\DeclareStringOption{srcline} +\DeclareStringOption{srcfile} +% \end{macrocode} +% % \subsubsection{Hook support} % % \begin{macro}{\BKM@hook} @@ -1845,7 +1880,7 @@ and the derived files %<*dvipdfm> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvipdfm.def}% - [2011/04/13 v1.20 bookmark driver for dvipdfm (HO)]% + [2011/04/21 v1.21 bookmark driver for dvipdfm (HO)]% % \end{macrocode} % % \begin{macro}{\BKM@id} @@ -2020,7 +2055,7 @@ and the derived files %<*vtex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-vtex.def}% - [2011/04/13 v1.20 bookmark driver for VTeX (HO)]% + [2011/04/21 v1.21 bookmark driver for VTeX (HO)]% % \end{macrocode} % % \begin{macrocode} @@ -2351,7 +2386,7 @@ and the derived files %<*pdftex> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-pdftex.def}% - [2011/04/13 v1.20 bookmark driver for pdfTeX (HO)]% + [2011/04/21 v1.21 bookmark driver for pdfTeX (HO)]% % \end{macrocode} % % \begin{macro}{\BKM@DO@entry} @@ -2360,6 +2395,10 @@ and the derived files \begingroup \kvsetkeys{BKM@DO}{#1}% \def\BKM@DO@title{#2}% + \ifx\BKM@DO@srcfile\@empty + \else + \BKM@UnescapeHex\BKM@DO@srcfile + \fi \BKM@UnescapeHex\BKM@DO@title \expandafter\expandafter\expandafter\BKM@getx \csname BKM@\BKM@DO@id\endcsname\@empty\@empty @@ -2383,7 +2422,9 @@ and the derived files \ifx\BKM@DO@rawaction\@empty \ifx\BKM@DO@uri\@empty \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{Missing action}\@ehc + \PackageError{bookmark}{% + Missing action\BKM@SourceLocation + }\@ehc \edef\BKM@action{goto page1{/Fit}}% \else \ifx\BKM@DO@view\@empty @@ -2461,11 +2502,38 @@ and the derived files } % \end{macrocode} % \end{macro} -% % \begin{macrocode} %</pdftex> % \end{macrocode} % +% \begin{macrocode} +%<*pdftex|pdfmark> +% \end{macrocode} +% \begin{macro}{\BKM@SourceLocation} +% \begin{macrocode} +\def\BKM@SourceLocation{% + \ifx\BKM@DO@srcfile\@empty + \ifx\BKM@DO@srcline\@empty + \else + .\MessageBreak + Source: line \BKM@DO@srcline + \fi + \else + \ifx\BKM@DO@srcline\@empty + .\MessageBreak + Source: file `\BKM@DO@srcfile'% + \else + .\MessageBreak + Source: file `\BKM@DO@srcfile', line \BKM@DO@srcline + \fi + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macrocode} +%</pdftex|pdfmark> +% \end{macrocode} +% % \subsection{Drivers with pdfmark specials} % % \subsubsection{Driver dvips} @@ -2474,7 +2542,7 @@ and the derived files %<*dvips> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvips.def}% - [2011/04/13 v1.20 bookmark driver for dvips (HO)]% + [2011/04/21 v1.21 bookmark driver for dvips (HO)]% % \end{macrocode} % \begin{macro}{\BKM@PSHeaderFile} % \begin{macrocode} @@ -2493,7 +2561,7 @@ and the derived files %<*dvipsone> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-dvipsone.def}% - [2011/04/13 v1.20 bookmark driver for dvipsone (HO)]% + [2011/04/21 v1.21 bookmark driver for dvipsone (HO)]% % \end{macrocode} % \begin{macro}{\BKM@PSHeaderFile} % \begin{macrocode} @@ -2512,7 +2580,7 @@ and the derived files %<*textures> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{bkm-textures.def}% - [2011/04/13 v1.20 bookmark driver for textures (HO)]% + [2011/04/21 v1.21 bookmark driver for textures (HO)]% % \end{macrocode} % \begin{macro}{\BKM@PSHeaderFile} % \begin{macrocode} @@ -2584,6 +2652,10 @@ and the derived files \def\BKM@DO@entry#1#2{% \begingroup \kvsetkeys{BKM@DO}{#1}% + \ifx\BKM@DO@srcfile\@empty + \else + \BKM@UnescapeHex\BKM@DO@srcfile + \fi \def\BKM@DO@title{#2}% \BKM@UnescapeHex\BKM@DO@title \expandafter\expandafter\expandafter\BKM@getx @@ -2604,7 +2676,9 @@ and the derived files \ifx\BKM@DO@rawaction\@empty \ifx\BKM@DO@uri\@empty \ifx\BKM@DO@page\@empty - \PackageError{bookmark}{Missing action}\@ehc + \PackageError{bookmark}{% + Missing action\BKM@SourceLocation + }\@ehc \edef\BKM@action{% /Action/GoTo% /Page 1% @@ -2741,8 +2815,13 @@ and the derived files \newcommand*{\bookmark}[2][]{% \if@filesw \begingroup + \BKM@InitSourceLocation \def\bookmark@text{#2}% \BKM@setup{#1}% + \ifx\BKM@srcfile\@empty + \else + \BKM@EscapeHex\BKM@srcfile + \fi \edef\BKM@prev{\the\BKM@id}% \global\advance\BKM@id\@ne \BKM@swtrue @@ -2799,6 +2878,8 @@ and the derived files \ifnum\BKM@FLAGS>\z@ ,flags=\BKM@FLAGS \fi + \BKM@auxentry{srcline}% + \BKM@auxentry{srcfile}% }{\BKM@title}% }% \endgroup @@ -2826,6 +2907,46 @@ and the derived files % \end{macrocode} % \end{macro} % +% \begin{macro}{\BKM@InitSourceLocation} +% \begin{macrocode} +\def\BKM@InitSourceLocation{% + \edef\BKM@srcline{\the\inputlineno}% + \BKM@LuaTeX@InitFile + \ifx\BKM@srcfile\@empty + \ltx@IfUndefined{currfilepath}{}{% + \edef\BKM@srcfile{\currfilepath}% + }% + \fi +} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\BKM@LuaTeX@InitFile} +% \begin{macrocode} +\ifluatex + \ifnum\luatexversion>36 % + \def\BKM@LuaTeX@InitFile{% + \begingroup + \ltx@LocToksA={}% + \edef\x{\endgroup + \def\noexpand\BKM@srcfile{% + \the\expandafter\ltx@LocToksA + \directlua{% + if status and status.filename then % + tex.settoks('ltx@LocToksA', status.filename)% + end% + }% + }% + }\x + }% + \else + \let\BKM@LuaTeX@InitFile\relax + \fi +\else + \let\BKM@LuaTeX@InitFile\relax +\fi +% \end{macrocode} +% \end{macro} +% % \subsubsection{Read auxiliary data} % % \begin{macrocode} @@ -2841,6 +2962,8 @@ and the derived files \DeclareStringOption{page} \DeclareStringOption{view} \DeclareStringOption{rawaction} +\DeclareStringOption{srcline} +\DeclareStringOption{srcfile} % \end{macrocode} % % \begin{macrocode} @@ -3125,6 +3248,22 @@ and the derived files %\end{verbatim} % \end{quote} % +% \begin{thebibliography}{9} +% +% \bibitem{hyperref} +% Sebastian Rahtz, Heiko Oberdiek: +% \textit{The \xpackage{hyperref} package}; +% 2011/04/17 v6.82g; +% \CTAN{macros/latex/contrib/hyperref/} +% +% \bibitem{currfile} +% Martin Scharrer: +% \textit{The \xpackage{currfile} package}; +% 2011/01/09 v0.4. +% \CTAN{macros/latex/contrib/currfile/} +% +% \end{thebibliography} +% % \begin{History} % \begin{Version}{2007/02/19 v0.1} % \item @@ -3295,6 +3434,11 @@ and the derived files % \item % Bug fix: \cs{BKM@SetDepth} renamed to \cs{BKM@SetDepthOrLevel}. % \end{Version} +% \begin{Version}{2011/04/21 v1.21} +% \item +% Some support for file name and line number in error messages +% at end of document (pdfTeX and pdfmark based drivers). +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx index 9cf8a428387..93eafb54ca8 100644 --- a/Master/texmf-dist/source/latex/oberdiek/hologo.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/hologo.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: hologo.dtx -% Version: 2011/03/25 v1.4 +% Version: 2011/04/21 v1.5 % % Copyright (C) 2010, 2011 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -60,9 +60,9 @@ % % Installation: % TDS:tex/generic/oberdiek/hologo.sty -% TDS:tex/generic/oberdiek/hologo-test1.tex -% TDS:tex/generic/oberdiek/hologo-test-spacefactor.tex % TDS:doc/latex/oberdiek/hologo.pdf +% TDS:doc/latex/oberdiek/test/hologo-test1.tex +% TDS:doc/latex/oberdiek/test/hologo-test-spacefactor.tex % TDS:source/latex/oberdiek/hologo.dtx % %<*ignore> @@ -80,7 +80,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: hologo 2011/03/25 v1.4 Logo collection (HO)} +\Msg{* Package: hologo 2011/04/21 v1.5 Logo collection (HO)} \Msg{************************************************************************} \keepsilent @@ -92,7 +92,7 @@ This is a generated file. Project: hologo -Version: 2011/03/25 v1.4 +Version: 2011/04/21 v1.5 Copyright (C) 2010, 2011 by Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -127,6 +127,7 @@ and the derived files \file{hologo.drv}{\from{hologo.dtx}{driver}}% \usedir{tex/generic/oberdiek}% \file{hologo.sty}{\from{hologo.dtx}{package}}% + \usedir{doc/latex/oberdiek/test}% \file{hologo-test1.tex}{\from{hologo.dtx}{test1}}% \file{hologo-test-spacefactor.tex}{\from{hologo.dtx}{test-spacefactor}}% } @@ -136,9 +137,9 @@ and the derived files \Msg{************************************************************************} \Msg{*} \Msg{* To finish the installation you have to move the following} -\Msg{* files into a directory searched by TeX:} +\Msg{* file into a directory searched by TeX:} \Msg{*} -\Msg{* hologo.sty, hologo-test1.tex, hologo-test-spacefactor.tex} +\Msg{* hologo.sty} \Msg{*} \Msg{* To produce the documentation run the file `hologo.drv'} \Msg{* through LaTeX.} @@ -155,10 +156,10 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{hologo.drv}% - [2011/03/25 v1.4 Logo collection (HO)]% + [2011/04/21 v1.5 Logo collection (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/02/04] -\usepackage{hologo}[2011/03/25] +\usepackage{hologo}[2011/04/21] \usepackage{longtable} \usepackage{array} \begin{document} @@ -188,7 +189,7 @@ and the derived files % \GetFileInfo{hologo.drv} % % \title{The \xpackage{hologo} package} -% \date{2011/03/25 v1.4} +% \date{2011/04/21 v1.5} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -381,7 +382,7 @@ and the derived files \fi \expandafter\x\csname ver@hologo.sty\endcsname \ProvidesPackage{hologo}% - [2011/03/25 v1.4 Logo collection (HO)]% + [2011/04/21 v1.5 Logo collection (HO)]% % \end{macrocode} % % \begin{macrocode} @@ -1679,7 +1680,7 @@ and the derived files %<*test-spacefactor> \NeedsTeXFormat{LaTeX2e} \documentclass{article} -\usepackage{hologo}[2011/03/25] +\usepackage{hologo}[2011/04/21] \usepackage{kvsetkeys} \usepackage{qstest} \IncludeTests{*} @@ -1793,9 +1794,9 @@ and the derived files % \def\t{^^A % \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}} % hologo.sty & tex/generic/oberdiek/hologo.sty\\ -% hologo-test1.tex & tex/generic/oberdiek/hologo-test1.tex\\ -% hologo-test-spacefactor.tex & tex/generic/oberdiek/hologo-test-spacefactor.tex\\ % hologo.pdf & doc/latex/oberdiek/hologo.pdf\\ +% test/hologo-test1.tex & doc/latex/oberdiek/test/hologo-test1.tex\\ +% test/hologo-test-spacefactor.tex & doc/latex/oberdiek/test/hologo-test-spacefactor.tex\\ % hologo.dtx & source/latex/oberdiek/hologo.dtx\\ % \end{tabular}^^A % }^^A @@ -1949,6 +1950,10 @@ and the derived files % Option \xoption{discretionarybreak} added as refinement for % option \xoption{break}. % \end{Version} +% \begin{Version}{2011/04/21 v1.5} +% \item +% Wrong TDS directory for test files fixed. +% \end{Version} % \end{History} % % \PrintIndex diff --git a/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx b/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx index 29a26b4f517..8ba6eaa1f0d 100644 --- a/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/luacolor.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: luacolor.dtx -% Version: 2011/03/29 v1.4 +% Version: 2011/04/22 v1.5 % % Copyright (C) 2007, 2009-2011 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -84,7 +84,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: luacolor 2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)} +\Msg{* Package: luacolor 2011/04/22 v1.5 Coloring based on LuaTeX's node attributes (HO)} \Msg{************************************************************************} \keepsilent @@ -96,7 +96,7 @@ This is a generated file. Project: luacolor -Version: 2011/03/29 v1.4 +Version: 2011/04/22 v1.5 Copyright (C) 2007, 2009-2011 by Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -178,7 +178,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{luacolor.drv}% - [2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)]% + [2011/04/22 v1.5 Coloring based on LuaTeX's node attributes (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/02/04] \usepackage{paralist} @@ -188,7 +188,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{455} +% \CheckSum{454} % % \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 @@ -209,7 +209,7 @@ and the derived files % \GetFileInfo{luacolor.drv} % % \title{The \xpackage{luacolor} package} -% \date{2011/03/29 v1.4} +% \date{2011/04/22 v1.5} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -267,6 +267,22 @@ and the derived files % Before passing a box to \cs{pdfxform}, call \cs{luacolorProcessBox} % first. % +% \subsection{Limitations} +% +% \begin{description} +% \item[Ligatures with different colored components:] +% Package \xpackage{luacolor} sees the ligature after +% the paragraph building and page breaking, when a +% page is to be shipped out. Therefore it cannot +% break ligatures, because the components might occupy +% different space. Therefore it is the respondibility +% of the ligature forming process to deal with different +% colored glyphs that form a ligature. The user can avoid +% the problem entirely by explicitly breaking the ligature +% at the places where the color changes. +% \item \dots +% \end{description} +% % \StopEventually{ % } % @@ -335,17 +351,17 @@ and the derived files % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luacolor}% - [2011/03/29 v1.4 Coloring based on LuaTeX's node attributes (HO)] + [2011/04/22 v1.5 Coloring based on LuaTeX's node attributes (HO)] % \end{macrocode} % % \subsection{Check for \LuaTeX} % % Without \LuaTeX\ there is no point in using this package. % \begin{macrocode} -\RequirePackage{infwarerr}[2007/09/09]% -\RequirePackage{ifluatex}[2009/04/10]% -\RequirePackage{ifpdf}[2010/01/28]% -\RequirePackage{ltxcmds}[2010/04/26]% +\RequirePackage{infwarerr}[2010/04/08]% +\RequirePackage{ifluatex}[2010/03/01]% +\RequirePackage{ifpdf}[2011/01/30]% +\RequirePackage{ltxcmds}[2011/04/18]% \RequirePackage{color} % \end{macrocode} % \begin{macrocode} @@ -394,7 +410,6 @@ and the derived files \LuaCol@directlua{% require("oberdiek.luacolor\ifnum\luatexversion<65 -pre065\fi")% } -\RequirePackage{ifpdf}[2007/09/09] \ifpdf \else \begingroup @@ -476,7 +491,7 @@ and the derived files % \end{macro} % % \begin{macrocode} -\RequirePackage{atbegshi}[2007/09/09] +\RequirePackage{atbegshi}[2011/01/30] \AtBeginShipout{% \luacolorProcessBox\AtBeginShipoutBox } @@ -637,37 +652,55 @@ end % \subsubsection{Whatsit insertion} % % \begin{macrocode} -function process(box) - local color = "" - local list = tex.getbox(box) - traverse(list, color) -end -% \end{macrocode} -% \begin{macrocode} local LIST = 1 -local COLOR = 2 -local type = { +local LIST_LEADERS = 2 +local COLOR = 3 +local RULE = node.id("rule") +local node_types = { [node.id("hlist")] = LIST, [node.id("vlist")] = LIST, [node.id("rule")] = COLOR, [node.id("glyph")] = COLOR, [node.id("disc")] = COLOR, + [node.id("whatsit")] = { + [3] = COLOR, -- special + [8] = COLOR, -- pdf_literal + [14] = COLOR, -- pdf_refximage + }, + [node.id("glue")] = + function(n) + if n.subtype >= 100 then -- leaders + if n.leader.id == RULE then + return COLOR + else + return LIST_LEADERS + end + end + end, } -local subtype = { - [3] = COLOR, -- special - [8] = COLOR, -- pdf_literal -} +local function get_type(n) + local ret = node_types[n.id] + if type(ret) == 'table' then + ret = ret[n.subtype] + end + if type(ret) == 'function' then + ret = ret(n) + end + return ret +end local mode = 2 -- luatex.pdfliteral.direct local WHATSIT = node.id("whatsit") local SPECIAL = 3 local PDFLITERAL = 8 +local DRY_FALSE = 0 +local DRY_TRUE = 1 % \end{macrocode} % \begin{macrocode} -function traverse(list, color) +local function traverse(list, color, dry) if not list then return color end - if type[list.id] ~= LIST then + if get_type(list) ~= LIST then texio.write_nl("!!! Error: Wrong list type: " .. node.type(list.id)) return color end @@ -676,34 +709,46 @@ function traverse(list, color) %<pre065> local head = list.list for n in node.traverse(head) do %<debug>texio.write_nl(" node: " .. node.type(n.id)) - local type = type[n.id] - if type == LIST then - color = traverse(n, color) - elseif type == COLOR - or (type == WHATSIT - and subtype[n.subtype]) then + local t = get_type(n) + if t == LIST then + color = traverse(n, color, DRY_FALSE) + elseif t == LIST_LEADERS then + local color_after = traverse(n.leader, color, DRY_TRUE) + if color == color_after then + traverse(n.leader, color, DRY_FALSE) + else + traverse(n.leader, '', DRY_FALSE) + end + elseif t == COLOR then local v = node.has_attribute(n, attribute) if v then local newColor = map[v] if newColor ~= color then color = newColor - local newNode - if ifpdf then - newNode = node.new(WHATSIT, PDFLITERAL) - newNode.mode = mode - newNode.data = color - else - newNode = node.new(WHATSIT, SPECIAL) - newNode.data = prefix .. color - end - if head == n then - newNode.next = head - local old_prev = head.prev - head.prev = newNode - head = newNode - head.prev = old_prev - else + if dry == DRY_FALSE then + local newNode + if ifpdf then + newNode = node.new(WHATSIT, PDFLITERAL) + newNode.mode = mode + newNode.data = color + else + newNode = node.new(WHATSIT, SPECIAL) + newNode.data = prefix .. color + end +%<*!pre065> head = node.insert_before(head, n, newNode) +%</!pre065> +%<*pre065> + if head == n then + newNode.next = head + local old_prev = head.prev + head.prev = newNode + head = newNode + head.prev = old_prev + else + head = node.insert_before(head, n, newNode) + end +%</pre065> end end end @@ -716,6 +761,14 @@ end % \end{macrocode} % % \begin{macrocode} +function process(box) + local color = "" + local list = tex.getbox(box) + traverse(list, color, DRY_FALSE) +end +% \end{macrocode} +% +% \begin{macrocode} %</lua> % \end{macrocode} % @@ -845,7 +898,7 @@ end \pdfoutput=0 % \fi \documentclass{minimal} -\usepackage{luacolor}[2011/03/29] +\usepackage{luacolor}[2011/04/22] \csname @@end\endcsname \end %</test2> @@ -857,7 +910,7 @@ end % \end{macrocode} % \begin{macrocode} \documentclass{minimal} -\usepackage{luacolor}[2011/03/29] +\usepackage{luacolor}[2011/04/22] \usepackage{qstest} \IncludeTests{*} \LogTests{log}{*}{*} @@ -1082,6 +1135,26 @@ end % Avoid whatsit insertion if option \xoption{monochrome} is used % (thanks Manuel P\'egouri\'e-Gonnard). % \end{Version} +% \begin{Version}{2011/04/22 v1.5} +% \item +% Bug fix by Manuel P\'egouri\'e-Gonnard: A typo prevented the +% detection of whatsits and applying color changes for +% \cs{pdfliteral} and \cs{special} nodes that might contain +% typesetting material. +% \item +% Bug fix by Manuel P\'egouri\'e-Gonnard: Now colors are also +% applied to leader boxes. +% \item +% Unnecessary color settings are removed for leaders boxes, +% if after the leader box the color has not changed. +% The costs are a little runtime, leader boxes are processed twice. +% \item +% Additional whatsits that are colored: \texttt{pdf\_refximage}. +% \item +% Workaround for bug with \texttt{node.insert\_before} +% removed for the version after \hologo{LuaTeX} 0.65, because +% bug was fixed in 0.27. (Thanks Manuel P\'egouri\'e-Gonnard.) +% \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 ab340164101..120324fe9da 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 -% 2011/04/18 +% 2011/04/22 % % Copyright (C) 1999, 2001, 2006 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex index 2a078573296..89f18af6728 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}{heiko.oberdiek at googlemail.com} -\newcommand*{\Date}{2011/04/18} +\newcommand*{\Date}{2011/04/22} % Copyright (C) 2006-2011 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -188,7 +188,7 @@ [\entrysep] \entry{bmpsize}{2009/09/04}{1.6}{Extract size and resolution data from bitmap files}% [\entrysep] -\entry{bookmark}{2011/04/13}{1.20}{PDF bookmarks}% +\entry{bookmark}{2011/04/21}{1.21}{PDF bookmarks}% [\entrysep] \entry{catchfile}{2011/03/01}{1.6}{Catches the contents of a file}% [\entrysep] @@ -222,7 +222,7 @@ [\entrysep] \entry{hobsub}{2011/04/18}{1.3}{Subsetting bundle oberdiek}% [\entrysep] -\entry{hologo}{2011/03/25}{1.4}{Logo collection}% +\entry{hologo}{2011/04/21}{1.5}{Logo collection}% [\entrysep] \entry{holtxdoc}{2011/02/04}{0.21}{Private additional ltxdoc support}% [\entrysep] @@ -270,7 +270,7 @@ [\entrysep] \entry{ltxcmds}{2011/04/18}{1.20}{\LaTeX{} kernel commands for general use}% [\entrysep] -\entry{luacolor}{2011/03/29}{1.4}{Coloring based on LuaTeX's node attributes}% +\entry{luacolor}{2011/04/22}{1.5}{Coloring based on LuaTeX's node attributes}% [\entrysep] \entry{luatex}{2010/03/09}{0.4}{LuaTeX basic definition package}% [\entrysep] @@ -302,7 +302,7 @@ [\entrysep] \entry{pdfrender}{2010/01/28}{1.2}{Access to some PDF graphics parameters}% [\entrysep] -\entry{pdftexcmds}{2011/04/16}{0.15}{Utilities of pdfTeX for LuaTeX}% +\entry{pdftexcmds}{2011/04/22}{0.16}{Utilities of pdfTeX for LuaTeX}% [\entrysep] \entry{picture}{2009/10/11}{1.3}{Dimens for picture macros}% [\entrysep] diff --git a/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx index 905f819b28b..18aebaabbdb 100644 --- a/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx +++ b/Master/texmf-dist/source/latex/oberdiek/pdftexcmds.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % % File: pdftexcmds.dtx -% Version: 2011/04/16 v0.15 +% Version: 2011/04/22 v0.16 % % Copyright (C) 2007, 2009-2011 by % Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -86,7 +86,7 @@ \input docstrip.tex \Msg{************************************************************************} \Msg{* Installation} -\Msg{* Package: pdftexcmds 2011/04/16 v0.15 Utilities of pdfTeX for LuaTeX (HO)} +\Msg{* Package: pdftexcmds 2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)} \Msg{************************************************************************} \keepsilent @@ -98,7 +98,7 @@ This is a generated file. Project: pdftexcmds -Version: 2011/04/16 v0.15 +Version: 2011/04/22 v0.16 Copyright (C) 2007, 2009-2011 by Heiko Oberdiek <heiko.oberdiek at googlemail.com> @@ -181,7 +181,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{pdftexcmds.drv}% - [2011/04/16 v0.15 Utilities of pdfTeX for LuaTeX (HO)]% + [2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)]% \documentclass{ltxdoc} \usepackage{holtxdoc}[2011/02/04] \usepackage{paralist} @@ -191,7 +191,7 @@ and the derived files %</driver> % \fi % -% \CheckSum{1622} +% \CheckSum{1647} % % \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 @@ -212,7 +212,7 @@ and the derived files % \GetFileInfo{pdftexcmds.drv} % % \title{The \xpackage{pdftexcmds} package} -% \date{2011/04/16 v0.15} +% \date{2011/04/22 v0.16} % \author{Heiko Oberdiek\\\xemail{heiko.oberdiek at googlemail.com}} % % \maketitle @@ -373,10 +373,11 @@ and the derived files % configuration option. In \hologo{LuaTeX} option |--safer| disables % the execution of external commands. % -% In \hologo{LuaTeX} before 0.70.0 \cs{pdf@shellescape} is not +% In \hologo{LuaTeX} before 0.68.0 \cs{pdf@shellescape} is not % available due to a bug in |os.execute()|. The argumentless form % crashes in some circumstances with segmentation fault. -% It is fixed in version 0.70.0, revision 4167 of \hologo{LuaTeX}. +% (It is fixed in version 0.70.0, revision 4167 of \hologo{LuaTeX}. +% and packported to some version of 0.67.0). % % Hints for usage: % \begin{itemize} @@ -540,7 +541,7 @@ and the derived files \fi \expandafter\x\csname ver@pdftexcmds.sty\endcsname \ProvidesPackage{pdftexcmds}% - [2011/04/16 v0.15 Utilities of pdfTeX for LuaTeX (HO)]% + [2011/04/22 v0.16 Utilities of pdfTeX for LuaTeX (HO)]% % \end{macrocode} % % \subsection{Catcodes} @@ -1051,7 +1052,7 @@ and the derived files require("oberdiek.pdftexcmds")% } \begingroup - \def\x{2011/04/16 v0.15}% + \def\x{2011/04/22 v0.16}% \ltx@onelevel@sanitize\x \edef\y{% \pdftexcmds@directlua{% @@ -1291,8 +1292,9 @@ and the derived files % \end{macro} % % \begin{macro}{\pdf@shellescape} +% Caution: Catcode of digit zero might be `ignore'. % \begin{macrocode} -\ifnum\luatexversion<70 % +\ifnum\luatexversion<68 % \else \def\pdf@shellescape{% \directlua0{% @@ -1374,7 +1376,7 @@ and the derived files module("oberdiek.pdftexcmds", package.seeall) local systemexitstatus function getversion() - tex.write("2011/04/16 v0.15") + tex.write("2011/04/22 v0.16") end function strcmp(A, B) if A == B then @@ -1633,7 +1635,7 @@ function shellescape() if os.execute then if status and status.luatex_version - and status.luatex_version >= 70 then + and status.luatex_version >= 68 then tex.write(os.execute()) else local result = os.execute() @@ -1888,6 +1890,21 @@ end \catcode`\@=11 % \input pdftexcmds.sty\relax \def\msg#{\immediate\write16} +\def\MaybeEnd{} +\ifx\luatexversion\UnDeFiNeD +\else + \ifnum\luatexversion<68 % + \ifx\pdf@shellescape\@undefined + \msg{SHELL=U}% + \msg{OK (LuaTeX < 0.68)}% + \else + \msg{SHELL=defined}% + \errmessage{Failed (LuaTeX < 0.68)}% + \fi + \def\MaybeEnd{\csname @@end\endcsname\end}% + \fi +\fi +\MaybeEnd \ifx\pdf@shellescape\@undefined \msg{SHELL=U}% \else @@ -2344,6 +2361,13 @@ end % crashes in some circumstances. Fixed in \hologo{LuaTeX} % beta-0.70.0, revision 4167. % \end{Version} +% \begin{Version}{2011/04/22 v0.16} +% \item +% Previous fix was not working due to a wrong catcode of digit +% zero (due to easily support the old \cs{directlua0}). +% The version border is lowered to 0.68, because some +% beta-0.67.0 seems also to work. +% \end{Version} % \end{History} % % \PrintIndex |