使用 \backgroundsetup 指令傳遞時,「pages=some」選項會被背景包忽略

使用 \backgroundsetup 指令傳遞時,「pages=some」選項會被背景包忽略

我正在嘗試使用background包以在我的文件背景中包含水印樣式。但是,我只想要某些頁面的背景,而不是所有頁面。據說,該包有一個選項:pages=some。但這個選項似乎沒有什麼作用。背景仍然添加到所有頁面。

這是一個 MWE:

\documentclass{article}

\usepackage{background}

\backgroundsetup{
    pages=some,
    scale=1,
    opacity=0.4,
    angle=90,
    nodeanchor=south east,
    position=current page.north east,
    contents=\includegraphics{example-image-a},
}

\begin{document}

test1
\BgThispage

\newpage

test2

\end{document}

答案1

如果pages=some直接作為包選項傳遞,它會起作用:

\documentclass{article}

\usepackage[pages=some]{background}

\backgroundsetup{
    scale=1,
    opacity=0.4,
    angle=90,
    nodeanchor=south east,
    position=current page.north east,
    contents=\includegraphics{example-image-a},
}

\begin{document}

test1
\BgThispage

\newpage

test2

\end{document}

這似乎是一個錯誤。

相關內容