如何使用页面宽度颜色框包装 a0poster 中的标题?

如何使用页面宽度颜色框包装 a0poster 中的标题?

当前序言

我想用彩色横幅包裹文档的顶部,横跨整个页面宽度并延伸到文档的最顶部。这是我的序言和标题部分:

documentclass[a0, landscape]{a0poster}

\usepackage{multicol}           % This is so we can have multiple columns of text side-by-side
\columnsep=100pt                % This is the amount of white space between the columns in the poster
\columnseprule=0pt              % This is the thickness of the black line between the columns in the poster

\usepackage[svgnames,dvipsnames]{xcolor}
\usepackage{color}

\usepackage{verbatim}       
\usepackage{caption}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{float}
\usepackage{graphicx}
\graphicspath{{path}}   % Location of the graphics files
\usepackage{booktabs}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{amsfonts, amsmath, amsthm, amssymb}

\begin{document}

%----------------------------------------------------------------------------------------
%   POSTER HEADER 
%----------------------------------------------------------------------------------------

% The header is divided into three boxes:
% The first is 55% wide and houses the title, subtitle, names and university/organization
% The second is 25% wide and houses contact information
% The third is 19% wide and houses a logo for your university/organization or a photo of you
% The widths of these boxes can be easily edited to accommodate your content as you see fit 

\begin{minipage}[b]{0.55\linewidth}
\veryHuge \color{BrickRed} \textbf{Title of Poster} \color{Black}\\ % Title
\huge \textbf{Authors}\\ % Author(s)
\huge University\\ % University/organization
\end{minipage}
%
\begin{minipage}[b]{0.25\linewidth}
\color{DarkSlateGray}\Large \textbf{Contact Information:}\\
University \\
Address\\\\
Phone: (800)-999-9999\\
Email: [email protected]\\
\end{minipage}
%
\begin{minipage}[b]{0.19\linewidth}
\begin{flushright}
    \includegraphics[width=20cm]{"/Users/hgducharme/Documents/School/Projects/Calculus II Honors/Poster Board/figures/logo"} 
\end{flushright}
\end{minipage}

\vspace{1cm} % A bit of extra whitespace between the header and poster content

%----------------------------------------------------------------------------------------

首次尝试解决:

我尝试使用方法 #2关于同一问题的答案。在其他所有条件相同的情况下,我的代码更改为下面的块,结果是下面的图像。

%%% Packages %%%

\newcommand{\postertitle}[2]  % Poster title
{
\begin{center}
\begin{tikzpicture}
\draw [purple,line width=0.2cm,rounded corners=0.2cm,fill=cyan] (-0.5\textwidth,-4)--
(-0.5\textwidth,4)--(0.5\textwidth,4)--(0.5\textwidth,-4)--cycle;
\draw (0,1)node[anchor=center,rotate=0]{\bfseries \sffamily \fontsize{43}   
{0}\selectfont {}{#1}};
\draw (0,-2)node[anchor=center,rotate=0]{\bfseries \sffamily \fontsize{33}
{0}\selectfont {}{#2}};
\end{tikzpicture}
\end{center}
\vspace{0.015\textheight}
}

\begin{document}

%----------------------------------------------------------------------------------------
%   POSTER HEADER 
%----------------------------------------------------------------------------------------

\postertitle{
\begin{minipage}[b]{0.55\linewidth}
   Title section
\end{minipage}
}


第二次尝试解决

我也尝试用彩色框包装该部分,但是也没有用。

\colorbox{Grey!70}{\parbox{\linewidth - 2\fboxsep}{%
%
\begin{minipage}[b]{0.55\linewidth}
   Title Section
\end{minipage}
}}

在第二张图片中,我喜欢颜色框底部的结束位置。但是,我只想让它扩展页面长度,并让颜色框的顶部延伸到页面顶部。我该如何实现这一点?

提前感谢所有愿意提供帮助的人。

答案1

通过使用 tikzpicture(删除 showframe 以查看您想要的标题):

\documentclass[a0, landscape]{a0poster}

\usepackage[margin={1cm,1cm}]{geometry}

\usepackage{mwe}
\usepackage{multicol}           % This is so we can have multiple columns of text side-by-side
\columnsep=100pt                % This is the amount of white space between the columns in the poster
\columnseprule=0pt              % This is the thickness of the black line between the columns in the poster

\usepackage[svgnames,dvipsnames]{xcolor}

\usepackage{showframe}

\usepackage{color}

\usepackage{verbatim}       
\usepackage{caption}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{float}
\usepackage{graphicx}
\graphicspath{{path}}   % Location of the graphics files
\usepackage{booktabs}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{amsfonts, amsmath, amsthm, amssymb}

\usepackage{tikz}

\begin{document}

%----------------------------------------------------------------------------------------
%   POSTER HEADER 
%----------------------------------------------------------------------------------------

% The header is divided into three boxes:
% The first is 55% wide and houses the title, subtitle, names and university/organization
% The second is 25% wide and houses contact information
% The third is 19% wide and houses a logo for your university/organization or a photo of you
% The widths of these boxes can be easily edited to accommodate your content as you see fit 

\begin{tikzpicture}[remember picture, overlay]
  \node[rectangle, fill=cyan, anchor=north west, xshift=1cm, yshift=-1cm] at (current page.north west)
  {
      \begin{minipage}[b]{0.55\linewidth}
        \veryHuge \color{BrickRed} \textbf{Title of Poster} \color{Black}\\ % Title
        \huge \textbf{Authors}\\ % Author(s)
        \huge University\\ % University/organization
      \end{minipage}
      % 
      \begin{minipage}[b]{0.25\linewidth}
        \color{DarkSlateGray}\Large \textbf{Contact Information:}\\
        University \\
        Address\\\\
        Phone: (800)-999-9999\\
        Email: [email protected]\\
      \end{minipage}
      % 
      \begin{minipage}[b]{0.19\linewidth}
        \begin{flushright}
          % \includegraphics[width=20cm]{"/Users/hgducharme/Documents/School/Projects/Calculus II Honors/Poster Board/figures/logo"} 
          \includegraphics[width=20cm]{example-image}
        \end{flushright}
      \end{minipage}
};
\end{tikzpicture}
\vspace{1cm} % A bit of extra whitespace between the header and poster content



\end{document}

在此处输入图片描述

相关内容