删除标题框的背景颜色

删除标题框的背景颜色

我如何删除标题框背景颜色以匹配海报背景?

在这段代码中,最后的\headerbox背景是白色,我希望它与海报背景相匹配:

\documentclass[a0paper,portrait]{baposter}

\usepackage{wrapfig}
\usepackage{lmodern}
\usepackage[utf8]{inputenc} %unicode support
\usepackage[T1]{fontenc}

\selectcolormodel{cmyk}
\begin{document}

\definecolor{darkgreen}{cmyk}{0.8,0,0.8,0.45}
\definecolor{lightgreen}{cmyk}{0.8,0,0.8,0.25}

\begin{poster}
{
grid=false,
headerborder=open, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=lightgray, % Background color for the gradient on the right side of the poster
borderColor=darkgreen, % Border color
headerColorOne=green, % Background color for the header in the content boxes (left side)
headerColorTwo=green, % Background color for the header in the content boxes (right side)
headerFontColor=white, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=rounded, %rectangle, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=false, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.11\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headershade=plain,
headerfont=\Large\textsf, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
        }
{}
%
%
{\vspace{0.4em}
\huge{\textsf %Sans Serif
{TITLE}
}}


\headerbox{1. Introduction}{name=introduction,column=0,row=0, span=3}{}

\headerbox{2. Background}{name=model,column=0,below=introduction,span=1}{}

\headerbox{}{name=foottext, headershape = rectangle, column=0, span=3, above=bottom, textborder=none,headerborder=none,boxheaderheight=0pt}{ SOME TEXT\\ WHERE\\ BACKGROUND SHOULD\\ MATCH WITH POSTER.
}

\end{poster}
\end{document}

当我使用时boxColorOne=none,我收到一个错误。

答案1

欢迎来到 TeX.SE。

baposter.cls默认背景在类 ( ) 至shadeLR( )中设置background=shadeLR。此设置采用两种颜色:bgColorOne左侧为 (白色),与bgColorTwo右侧的 (浅灰色) 混合。

要将相同的设置应用于,我们只需要复制在设置中posterbox适用的设置。background=shadeLRposterbox

因此,对于特定的海报盒环境,我们添加:

boxshade=shadelr,boxColorOne=white,boxColorTwo=lightgray

boxheader当我们headershape=rounded在环境中将 设置为键时,会出现残留poster。可以通过添加headershape=rectangle以覆盖环境设置(headershape=rounded)或使用 删除圆角来解决这个问题cornerradius=0em

还要注意的是,这headerbox是一个宏,已被弃用。它的替代品是posterbox环境,我在这里使用了环境。一个关键的区别是posterbox环境可以接受使用verbatim环境的代码。

baposter.cls已经将颜色模型设置为CMYK并且编译pdflatex默认为utf8,因此\selectcolormodel{cmyk}\usepackage[utf8]{inputenc}在这里是多余的。

在此处输入图片描述

\documentclass[a0paper,portrait]{baposter}

\usepackage{wrapfig}
\usepackage{lmodern}
%\usepackage[utf8]{inputenc} %unicode support
\usepackage[T1]{fontenc}

%\selectcolormodel{cmyk}
\begin{document}

\definecolor{darkgreen}{cmyk}{0.8,0,0.8,0.45}
\definecolor{lightgreen}{cmyk}{0.8,0,0.8,0.25}

\begin{poster}
{
grid=false,
headerborder=open, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=lightgray, % Background color for the gradient on the right side of the poster
borderColor=darkgreen, % Border color
headerColorOne=green, % Background color for the header in the content boxes (left side)
headerColorTwo=green, % Background color for the header in the content boxes (right side)
headerFontColor=white, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=rounded, %rectangle, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=false, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.11\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headershade=plain,
headerfont=\Large\textsf, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt % Width of the border lines around content boxes
        }
{}
%
%
{\vspace{0.4em}
\huge{\textsf %Sans Serif
{TITLE}
}}

\headerbox{1. Introduction}{name=introduction,column=0,row=0, span=3}{}

\headerbox{2. Background}{name=model,column=0,below=introduction,span=1}{}

%\headerbox{}{name=foottext, headershape = rectangle, column=0, span=3, above=bottom, 
%textborder=none,headerborder=none,boxheaderheight=0pt}
%{ SOME TEXT\\ WHERE\\ BACKGROUND SHOULD\\ MATCH WITH POSTER.
%}
\begin{posterbox}[name=foottext, column=0, span=3,above=bottom, textborder=none,boxheaderheight=0pt,
                  headerborder=none,boxshade=shadeLR,boxColorOne=white,boxColorTwo=lightgray,cornerradius=0em]
                  {} % empty header=boxheaderheight=0pt, cornerradius=0em OR headershape=rectangle
                  SOME TEXT\\ WHERE\\ BACKGROUND SHOULD\\ MATCH WITH POSTER.
\end{posterbox}

\end{poster}
\end{document}

相关内容