[Tex/LaTex] How to go around the error “! Package xkeyval Error: `[‘ undefined in families `background’.”

draftxkeyval

I get the error

! Package xkeyval Error: `[' undefined in families `background'.

when processing the file

\documentclass{article}

% \usepackage{xkeyval} 
% \usepackage{pax}
% \usepackage{pdfpages}
% 
% \makeatletter
% \define@key{PAX@Gin}{scale}{}
% \makeatother

\usepackage{background}
\backgroundsetup[contents=preliminary,placement=bottom,color=blue]

\usepackage{lipsum}
\begin{document}
\lipsum[1-10]
\end{document}

using pdflatex. The version is:

pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)

Uncommenting the lines in the file (as per this post) does not solve the problem. Can you see what is wrong and how to solve it?

Best Answer

It should be

\backgroundsetup{contents=preliminary,placement=bottom,color=blue}

Note the delimiters { and } instead of [ and ].

\documentclass{article}

\usepackage{background}
\backgroundsetup{contents=preliminary,placement=bottom,color=blue}

\usepackage{lipsum}
\begin{document}
\lipsum[1-10]
\end{document}

enter image description here