0

When I'm using background package to do some decorating, however found out the outcome wasn't as I expected. Here's what I use:

\documentclass{article}
\usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage{background}
\usepackage{color}
\definecolor{Black}{RGB}{0,0,0}

\begin{document}
\backgroundsetup{pages=some,contents={- \thepage \ -},placement=center,opacity=0.5,scale=2,angle=0,color=Black}

some text
\newpage
some text
\end{document}

When I used overleaf to compile, the first "- 1 -" background is totally opaque. For the second one ("- 2 -"), it's 50% opaque as I set. You can use overleaf to run it if my expression is kind of confusing.

I'm really curious about why these strange things are occurring?

8
  • 4
    %I've defined "Black" previously, not shown here why post an example no one can run? Please post an example of the problem so people can debug it for you. Mar 18, 2023 at 8:42
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Mar 18, 2023 at 9:43
  • Thanks for you guys' suggestions, I now edit the code so that it can run on overleaf now. Mar 18, 2023 at 12:40
  • It works fine with pdflatex and lualatex. Are you maybe using xelatex? Mar 18, 2023 at 12:57
  • yeah, I used the xelatex. So the only solution may be changing the compiler to pdflatex or lualatex? Mar 19, 2023 at 2:06

0

You must log in to answer this question.

Browse other questions tagged .