ben.guillon <ben.guil...@gmail.com> wrote: > Hi Andreas, > > I cannot test it since i've a too old texlive install (pdfpages doesn't > support > xetex backend), but your patch looks fine. Feel free to add it. > > Regards, > BG
Hi BenoƮt, during the release tests for Debian dblatex release 0.3.2-1 I found a regression in my patch version (wrong order of \usepackage{ifthen} and \ifthenelse in docbook.sty, showing up with the pdftex backend and --param=annotation.support=1). Attached is the fixed patch (as included in 0.3.2-1):
Author: "W. Martin Borgert" <deba...@debian.org>, Andreas Hoenen <andr...@hoenen-terstappen.de> Description: Patch for BTS report #629514: In draft mode set draft watermark for XeTeX backend, too. --- a/latex/style/docbook.sty +++ b/latex/style/docbook.sty @@ -77,20 +77,19 @@ % Display ``DRAFT'' as a water mark: +\usepackage{ifthen} \usepackage{ifpdf} -\ifpdf -\usepackage{pdfpages} -\usepackage{color} -\def\showwatermark#1{% - \AddToShipoutPicture{ - \AtTextCenter{% - \makebox(0,0)[c]{\resizebox{\textwidth}{!}{% - \rotatebox{45}{\textsf{\textbf{\color[gray]{0.8}#1}}}}}% - }} +\ifthenelse{\boolean{pdf}\OR\boolean{xetex}}{ + \usepackage{pdfpages} + \usepackage{color} + \def\showwatermark#1{% + \AddToShipoutPicture{ + \AtTextCenter{% + \makebox(0,0)[c]{\resizebox{\textwidth}{!}{% + \rotatebox{45}{\textsf{\textbf{\color[gray]{0.8}#1}}}}}% +}}}}{ + \def\showwatermark#1{} } -\else -\def\showwatermark#1{}% -\fi % ############################################################################## % ### Page Parameters @@ -121,7 +120,6 @@ \usepackage{calc} \usepackage{multirow} \usepackage{subfigure} -\usepackage{ifthen} \usepackage{tabularx} % Before hyperlink to have consistent links to footnotes \usepackage{footmisc} --- a/latex/contrib/db2latex/db2latex.sty +++ b/latex/contrib/db2latex/db2latex.sty @@ -92,19 +92,17 @@ % Display ``DRAFT'' as a water mark: \usepackage{ifpdf} -\ifpdf -\usepackage{pdfpages} -\usepackage{color} -\def\showwatermark#1{% - \AddToShipoutPicture{ - \AtTextCenter{% - \makebox(0,0)[c]{\resizebox{\textwidth}{!}{% - \rotatebox{45}{\textsf{\textbf{\color[gray]{0.8}#1}}}}}% - }} +\ifthenelse{\boolean{pdf}\OR\boolean{xetex}}{ + \usepackage{pdfpages} + \usepackage{color} + \def\showwatermark#1{% + \AddToShipoutPicture{ + \AtTextCenter{% + \makebox(0,0)[c]{\resizebox{\textwidth}{!}{% + \rotatebox{45}{\textsf{\textbf{\color[gray]{0.8}#1}}}}}% +}}}}{ + \def\showwatermark#1{} } -\else -\def\showwatermark#1{}% -\fi % -------------------------- % Title and Bookinfo display
Regards, Andreas -- Andreas Hoenen <andr...@hoenen-terstappen.de> GPG: 1024D/B888D2CE A4A6 E8B5 593A E89B 496B 82F0 728D 8B7E B888 D2CE
pgpwbjt8WsZ9n.pgp
Description: PGP signature