eso-pic 与 wallpaper 包冲突

eso-pic 与 wallpaper 包冲突

以下代码给出了一个冲突的选项消息。有人知道是否有办法修复它吗?

\documentclass[10pt,landscape]{article}
%\input{this-preamble}
\usepackage{wallpaper}
\usepackage{xcolor}
\usepackage{textpos}
\usepackage{adjustbox}
\usepackage[grid, gridcolor=red!20, subgridcolor=green!20]{eso-pic}
\usepackage[left=0.5in,right=1.5in,top=1in,bottom=0.5in]{geometry}

\begin{document}
\pagestyle{empty}
\begin{textblock}{4}(5,-0.5){\Huge{General Overview of some very important stuff}}\end{textblock}
\end{document}

答案1

收到错误信息后

! LaTeX Error: Option clash for package eso-pic.

并在输出控制台中输入“h”(获取帮助),您会得到问题的解释和可能的解决方案:

The package eso-pic has already been loaded with options:
  []
There has now been an attempt to load it with options
  [grid, gridcolor=red!20, subgridcolor=green!20]
Adding the global options:
  ,grid, gridcolor=red!20, subgridcolor=green!20
to your \documentclass declaration may fix this.

按照建议操作,可以避免冲突:

\documentclass[10pt,landscape,grid, gridcolor=red!20, subgridcolor=green!20]{article}
%\input{this-preamble}
\usepackage{wallpaper}
\usepackage{xcolor}
\usepackage{textpos}
\usepackage{adjustbox}
\usepackage{eso-pic}
\usepackage[left=0.5in,right=1.5in,top=1in,bottom=0.5in]{geometry}

\begin{document}
\pagestyle{empty}
\begin{textblock}{4}(5,-0.5){\Huge{General Overview of some very important stuff}}\end{textblock}
\end{document}

问题是wallpaper内部加载eso-pic 没有选项,因此eso-pic在之后加载wallpaper选项会产生冲突;另一种解决方案是使用eso-pic选项加载 wallpaper

\documentclass[10pt,landscape]{article}
%\input{this-preamble}
\usepackage[grid, gridcolor=red!20, subgridcolor=green!20]{eso-pic}
\usepackage{wallpaper}
\usepackage{xcolor}
\usepackage{textpos}
\usepackage{adjustbox}
\usepackage[left=0.5in,right=1.5in,top=1in,bottom=0.5in]{geometry}

\begin{document}
\pagestyle{empty}
\begin{textblock}{4}(5,-0.5){\Huge{General Overview of some very important stuff}}\end{textblock}
\end{document}

相关内容