I'm trying to use the xwatermark package. I have a document like this:






Building this with tectonic fails:

$ tectonic demo.tex
note: this is a BETA release; ask questions and report bugs at https://tectonic.newton.cx/
Running TeX ...
error: something bad happened inside TeX; its output follows:

LaTeX2e <2018-04-01> patch level 4
Babel <3.20> and hyphenation patterns for 84 language(s) loaded.
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo)) (xwatermark.sty (catoptions.sty (pdftexcmds.sty (infwarerr.sty)
(ifluatex.sty) (ltxcmds.sty) (ifpdf.sty))) (fix-cm.sty (ts1enc.def))
(picture.sty) (graphicx.sty (keyval.sty) (graphics.sty (trig.sty) (graphics.cfg
) (xetex.def))) (atbegshi.sty) (fancyhdr.sty) (atveryend.sty) (ltxkeys.sty)
(framed.sty)) (hyperref.sty (hobsub-hyperref.sty (hobsub-generic.sty))
(ifxetex.sty) (auxhook.sty) (kvoptions.sty) (pd1enc.def) (hyperref.cfg)
(url.sty)) (hxetex.def (puenc.def) (stringenc.sty) (rerunfilecheck.sty))
No file demo.aux.
(nameref.sty (gettitlestring.sty))

Package hyperref Warning: Rerun to get /PageLabels entry.

! Undefined control sequence.
<argument> ...e \@tempdima \@parboxrestore \color
                                                  {\wmk@textcolor }\cptdimde...
l.10 \end{document}

No pages of output.
Transcript written on demo.log.

error: the TeX engine had an unrecoverable error
caused by: halted on potentially-recoverable error as specified

How do I use xwatermark (with tectonic)?

  • 3
    Welcome to TeX.SX! Try \usepackage{xcolor} – Phelype Oleinik Jan 24 at 13:50
  • Thanks. That did it. Want to make it an answer so I can accept? Also would be nice how I would figure out it's "xcolor" I need from the given error or from the xwatermark docs. – Jean-Paul Calderone Jan 24 at 13:54
  • There are only two (that I know of) packages that define \color: color and xcolor (this is a widely used command and two widely used packages, so it was easy to spot; lesser known commands are trickier to find out). And as I said in the answer, this looks like a bug: if xwatermark requires xcolor to work, then it should \RequirePackage{xcolor}... – Phelype Oleinik Jan 24 at 14:06

\color is defined by LaTeX's base color support package, so loading it will get rid of that error. However this package provides only basic colour support, and xwatermark seems to need the extended features from the xcolor package (so adding \usepackage{xcolor} is a safe bet).

Though this looks a lot like a bug in xwatermark: if the package requires xcolor then it should explicit load xcolor instead of trusting the user to do it...

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.