Giter Site home page Giter Site logo

callegar / latex-draftwatermark Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 6.0 176 KB

The "draftwatermark" package extends LaTeX providing a means to add a textual, light gray watermark on every page or on the first page of a document. Typical usage may consist in writing words such as "DRAFT" or "CONFIDENTIAL" across document pages. The package may remind in some sense "draftcopy" by Dr. Juergen Vollmer, but its implementation is much lighter (as the reduced code footprint shows) and does not rely on postscript specials, making the package fully compatible with pdfLaTeX. The package depends on package "everypage" by the same author.

Shell 4.48% TeX 95.52%

latex-draftwatermark's People

Contributors

a5ni avatar callegar avatar fschliephacke avatar sergiocallegari avatar thymaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

latex-draftwatermark's Issues

Watermark text turns black when luacolor package is used (in TeX Live 2021)

If one uses the luacolor package (instead of or in addition to xcolor), the watermark text generated by the draftwatermark package turns black. And using \SetWatermarkColor or \SetWatermarkLightness has no effect; the text is still black.

Here’s an reproducible example. It used to work fine in TeX Live 2020 (the watermark was shown in grey), but doesn’t in TeX Live 2021 (the watermark is shown in black). It must be compiled using lualatex.

\documentclass{article}

\usepackage{xcolor}
\usepackage{luacolor}
\usepackage{draftwatermark}

%\SetWatermarkColor{red}
%\SetWatermarkLightness{.7}

\begin{document}

Test

\end{document}

Watermark is incorrectly placed on the foreground of included PDFs

When including external PDFs using the includepdf directive of the pdfpages package, the watermarks placed by draftwatermark are incorrectly on the foreground, rather than on the background.

This is a fairly general case for PhD theses. For example,

  • the title page of some PhD theses are designed outside of the latex document itself and are included as PDFs.
  • Copyright agreement between a publisher and the author is required as appendix material to show permissions. These too are typically PDF documents.

It is not acceptable to be watermarking on the foreground of these PDFs as readability is severely affected.

[feature request] Provide a command to turn off watermarking

Please see refer the question here for the background information.

In a thesis, or other similar documents, it is not an unusual requirement to need a watermark only in the main-matter ie no watermark must be placed in the first few pages bearing the frontmatter.

Therefore, a pair of commands \DisableWaterMark and ReEnableWaterMark (or other suitable names) on the lines of the solution by Ulrike Fischer could be provided in future versions to handle this case.

Example 6.1 in documentation does not work

Hello again!

I reproduced the 6.1 example in the docs:

\documentclass{article}
\usepackage[named]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[firstpageonly,color={[gray]{0.5}},text=DRAFT\\COPY]{draftwatermark}
\usepackage{mathptmx}
\usepackage{lipsum}
\title{Sample document for the draftwatermark package}
\author{}
\begin{document}
\maketitle
\section{One}
\lipsum[1-3]
\section{Two}
\lipsum[4-6]
\end{document}

and it never finishes compiling with my version of latex:
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Debian)

If I replace the text= option by the SetWatermarkText function then it works:

\documentclass{article}
\usepackage[named]{xcolor}
\usepackage[T1]{fontenc}
\usepackage[firstpageonly,color={[gray]{0.5}}]{draftwatermark}
\SetWatermarkText{DRAFT\\COPY}
\usepackage{mathptmx}
\usepackage{lipsum}
\title{Sample document for the draftwatermark package}
\author{}
\begin{document}
\maketitle
\section{One}
\lipsum[1-3]
\section{Two}
\lipsum[4-6]
\end{document

I propose to change the example to use the SetWatermarkTet function. I read section 3.3 but I interpreted that break commands were valid but other "more fancy" commands required using the DraftwatermarkOptions. Not sue if it's worth editing the section to make it more explicit that even break commands may not work.

Thanks for this useful package!

color key errors

\documentclass[11pt]{article}
\usepackage{draftwatermark}
\DraftwatermarkOptions{color={[rgb]{1, 0, 1}}}
\SetWatermarkText{foo}

\begin{document}
Hello, world!
\end{document}

errors with

! Argument of \c@lor@@rgb has an extra }.

The problem is that draftwatermark calls \color[\draftwatermark@colormodel]{\draftwatermark@colorspec}, but this doesn't work with the color package as \color doesn't expand the mandatory argument. With the xcolor package it would work.

text appears tiny

The text appears small (nothing like draftcopy, where it covers the whole page).
Changing the font size parameter doesn't have any effect.

The following warning is output:

|| (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
|| LaTeX Font Warning: Font shape `OT1/cmr/m/n' in size <569.05511> not available
|| LaTeX Font Warning: Size substitutions with differences

This is using texlive on linux, with pdf output.

some formatting lost (not sure it is draftwatermark fault)

I have a large document (documentcalss{book}) with a conditional watermark, such as:

\ifdefined\WATERMARK
 \usepackage{draftwatermark}
 \SetWatermarkHorCenter{0.5\paperwidth}
 \SetWatermarkVerCenter{0.5\paperheight}
 \SetWatermarkText{BOZZA - NON DIVULGABILE}
 \SetWatermarkAngle{60}
 \SetWatermarkColor{red!40}
 \SetWatermarkFontSize{0.08\paperwidth}
%\SetWatermarkFontSize{0.06\paperwidth}
%\SetWatermarkLightness{.99}
\fi

I noticed that when I activate draftwatermark (i.e., defining WATERMARK) some formatting (e.g. textit) is lost.

Is this an expected behaviour?
(I did not find mentions in the man page)

Thank you

Error in documentation

Tabel 1 says the default value for "Horizontal center of watermark text" is .5pagewidth. This is a typo, but the length is correct in the code. pagewidth and pageheight are not a latex lengths, throw errors, and should be changed to paperwidth and paperheight respectively in the text of the documentation.

Watermark on selected pages

Please give me a specific example of putting watermark on selected pages. The method to do so was not much clear in the documentation.

New line (\\) not possible in text

Hi there, as described on https://tex.stackexchange.com/questions/550317/how-can-i-make-a-line-break-in-text-of-draftwatermark I tried to use the new line character in the text of draftwatermark whcih should be possible according to the manual:
grafik

However a simple MWE like

\documentclass{scrbook}

\usepackage[utf8]{inputenc}

\usepackage[anchor=cb,vpos=220mm,color=black,angle=0]{draftwatermark}
\DraftwatermarkOptions{text={© by me\\ and someone else}}
\title{Test document}
\author{\textcopyright Me}

\begin{document}
\maketitle
\end{document}

shows, that a newline (\) is ignored:

grafik

Is this a bug or am I doing something wrong?

Draftwatermark - conflicting with unitlength?

Reported by Dr.-Ing. Torsten Finke

Draftwatermark seems to rely on a \unitlength of 1pt. Trying the following
document one finds the watermark disappering at the lower right corner:


\documentclass{article}

\usepackage{draftwatermark}

\setlength{\unitlength}{1.8pt}

\begin{document}
Hello World.
\end{document}


Whoever has pictures, may have drown them with his/her preferred \unitlength (e.g. 1mm) and might be in bad luck now.

As a possible suggestion, set \unitlength inside the macro \sc@watermark:

...
\newcommand\sc@watermark{%
\setlength{@tempdimb}{.5\paperwidth}%
\setlength{@tempdimc}{-.5\paperheight}%
\setlength{\unitlength}{1pt}% <<<----------------
\put(\strip@pt@tempdimb,\strip@pt@tempdimc){%
...

This seems to work.

Draftwatermark should get rid of everypage dependency

Everypage is now in a legacy state. Its functionality has been incorporated into LaTeX.
Current version of everypage complains out loud.
Draftwatermark should be updated to eliminate the dependency even if with the current version of everypage it runs just fine and will continue to do so (so that the warnings can be safely ignored).

ignoring pages

There is any possibility to ignore selected pages?

Like: \SetWatermarkIgnore[1-3,5,8-15]
(would ignore the pages 1-3, 5 and 8-15).

Thanks!

new line not working in the text option in []

This did not work for me:

\usepackage[firstpageonly, text=PRELIMINARY\\VERSION]{draftwatermark}

This works:

\usepackage[firstpageonly]{draftwatermark}
\SetWatermarkText{PRELIMINARY\\VERSION}

According to the documentation the first one should work, right? I installed the package from the current github sources.

In TeX Live 2020 version of package, commas in \SetWatermarkText{} create an error

Until (and including) TeX Live 2019 version of the package, the following command used to work:

\SetWatermarkText{Mock{-}up, do not distribute}

but it no longer does.

However, the following:

\SetWatermarkText{Mock{-}up{,} do not distribute}

works.

Is this an intended behavior, that commas must now be escaped in curly braces?
Thanks

Enhancement: draftwatermark should support colored watermarks

Reported by Claudio Beccari on 11/5/08

Proposal is to rely on xcolor rather than on color package and to let one write

\SetWatermarkColor[rgb]{1,0.4,0.4}

or even better something like

\SetWatermarkColor[rgb]{red!60}

to select the watermark color.

A floating object distorts background watermark

Thanks a lot for this package.

I realised with the latest update that a floating object like a figure on a page distorts (changes font type, size, etc.) the text of the watermark on that page. I've tried it on multiple cases and it remains the same. I wonder if this is something you are aware of too.

Watermark Overlay Issue with `draftwatermark` Package

I am experiencing an issue with the draftwatermark package where the watermark does not overlay images in the PDF document. The watermark is placed below the images, which is not the desired outcome in some cases. I have seen a relevant answer on the TeX Stack Exchange that suggests using the xwatermark package instead. But the xwatermark package stopped working in the recent LaTeX version.

Thank you for your time and consideration. I look forward to hearing back from you soon.

automaticly react on "draft" option of the documentclass

I often use this \documentclass[draft]{scrarticle}.

DraftWatermark should reacton on it automticly. e.g. There could be an option like that

\usepackage[auto]{draftwatermark}

In that case the watermark should only be drawn if the documentclass uses draft as option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.