已编辑/修订的问题

已编辑/修订的问题

已编辑/修订的问题

最初提出的问题暗示了几个简单的解决方案,即使用\begin{columns}[T]并包装每个列,并\vbox手动指定高度。这些技巧有所帮助,但并没有解决原始问题。我创建了一个新示例,说明即使采纳了这些建议,布局和对齐问题仍然存在。

下面是一个示例海报。我添加了标题并为方框着色以突出显示一些对齐问题。如您所见,顶行的方框顶部未对齐。此外,3 列部分的标题与 2 列部分的方框重叠。我该如何解决这个问题?

在此处输入图片描述

以下是示例的源代码

\documentclass[]{beamer}
\usepackage[orientation=landscape,size=a0,scale=1.2,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document information
\title{Example Poster}
\author[]{Author list}
\institute[]{Author affiliations}
\date{~}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% beamer has a problem filling vertical space in columns
% have to manually specify column heights 
% AFAICT this must be manually tweaked????
\newlength{\colheightb}
\setlength{\colheightb}{0.747\paperheight}

\begin{document}
\begin{frame}{}
\begin{columns}[T]
\begin{column}{.245\linewidth}
    \vbox to .99\textheight{%
    \begin{block}{\large First column}
        \vspace{24em}
    \end{block}
    \vfill
    \begin{block}{\large First column}
        \vspace{24em}
    \end{block}
    \vfill
    \begin{block}{\large First column}
        \vspace{19em}
    \end{block}
    }
\end{column}%
\begin{column}{.745\linewidth}
    \begin{columns}[T]
        \begin{column}{.5\linewidth}
            \begin{block}{\large First subcolumn}
                \vspace{9em}
            \end{block}
        \end{column}
        \begin{column}{.5\linewidth}
            \begin{block}{\large Second subcolumn}
                \vspace{12em}
            \end{block}
        \end{column}
    \end{columns}
    \begin{columns}[T]
        \begin{column}{.33\linewidth}
        \vbox to \colheightb{%
            \begin{block}{\large Section}
                \vspace{16em}
            \end{block}
            \vfill
            \begin{block}{\large Section}
                \vspace{17em}
            \end{block}
            \vfill
            \begin{block}{\large Section}
                \vspace{23em}
            \end{block}
        }
        \end{column}
        \begin{column}{.33\linewidth}
        \vbox to \colheightb{%
            \begin{block}{\large Section}
                \vspace{18em}
            \end{block}
            \vfill
            \begin{block}{\large Section}
                \vspace{40em}
            \end{block}
        }
        \end{column}
        \begin{column}{.33\linewidth}
        \vbox to \colheightb{%
            \begin{block}{\large Section}
                \vspace{25em}
            \end{block}
            \vfill
            \begin{block}{\large Section}
                \vspace{30em}
            \end{block}
        }
        \end{column}
    \end{columns}
\end{column}
\end{columns}
\end{frame}
\end{document}

我使用的是以下样式,是自定义的。我不太清楚如何制作 beamerposter 样式,所以如果做得不好,我深表歉意。

\usepackage{grffile}
\usepackage{calc}
\usepackage{tcolorbox}  
\usepackage{lmodern}% http://ctan.org/pkg/lm

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer
\mode<presentation>
\setbeamercolor{section in head/foot}{use=structure,bg=structure.fg!25!bg}
\useoutertheme[subsection=false]{miniframes}
\setbeamertemplate{frametitle}[default][center]
\AtBeginDocument{%
  {
    \usebeamercolor{section in head/foot}
  } 
  \pgfdeclareverticalshading{beamer@headfade}{\paperwidth}
  {%
    color(0cm)=(bg);
    color(1.25cm)=(section in head/foot.bg)%
  }
  \setbeamercolor{section in head/foot}{bg=}
}
\beamertemplatedotitem
\mode
<all>

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Colors

% Template from Poster has special colors
\definecolor{PosterYellow}{RGB}{234,230, 99}
\definecolor{PosterBlue}{RGB}{ 29, 23, 96}
\definecolor{PosterAzure}{RGB}{151,147,204}
\definecolor{PosterWhite}{RGB}{200,200,200}

% Configure the colors for the headline
\setbeamercolor{headline}{bg=PosterBlue,fg=PosterYellow}
\setbeamercolor{title in headline}{bg=PosterBlue,fg=PosterYellow}
\setbeamercolor{author in headline}{bg=PosterBlue,fg=PosterWhite}
\setbeamercolor{institute in headline}{bg=PosterBlue,fg=PosterWhite}

\setbeamercolor{block body}{bg=PosterAzure,fg=PosterWhite}
\setbeamercolor{block title}{bg=red!30,fg=black}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Defines the headline -- for posters, we put the title here
% Everything must be positioned manually
% 

% define a new register to hold an intermediate size calculation 
% that we'll use in defining the headline
\newlength{\residual}

\setbeamertemplate{headline}{  
  \leavevmode
  \setlength{\residual}{\paperwidth-8cm}
  \begin{beamercolorbox}[wd=\paperwidth]{headline}
    \vskip1cm
    \begin{columns}[T]
      \begin{column}{2cm}
      \end{column}
      \begin{column}{\residual}
        \raggedright
        \usebeamercolor{title in headline}{
            \color{fg}{\fontsize{80}{81}\selectfont {\inserttitle}}\\[3ex]}
        \usebeamercolor{author in headline}{
            \color{fg}\Large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{
            \color{fg}\large{\insertinstitute}\\[1ex]}  
      \end{column}
      \begin{column}{4cm}
        LOGO HERE
      \end{column}
      \begin{column}{2cm}
      \end{column}
    \end{columns}
    \vskip2ex
  \end{beamercolorbox}

  \begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
    \rule{0pt}{3pt}
  \end{beamercolorbox}
}

% no navigation on a poster
\setbeamertemplate{navigation symbols}{}  
% We need larger titles for the block
\setbeamerfont{block title}{size=\Large}

原始问题

我正在尝试创建一个 beamerposter,但是在使各个块良好对齐方面遇到了困难。这个帖子对于纠正垂直对齐问题非常有帮助,但是当我开始制作海报时,新的问题又出现了。

在此处输入图片描述

注意右边两列的顶部处于不同的级别。我可以通过向它们的列环境添加参数 [t] 来使它们对齐,但这也会添加垂直空间,这是不正确的。

还要注意下部的块如何分布以填满海报。我希望 LaTeX 自动填充垂直填充以均匀分布这些块,以便它们在海报底部对齐。最终结果(为了说明而夸大了间距)应如下所示: 在此处输入图片描述

我为我的无知在这里道歉,我一直在尝试各种选择,并且除了用大量正负空间来捏造事情之外,我真的不知道该怎么做。

这是我的示例代码

\documentclass[]{beamer}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[orientation=landscape,size=a0,scale=1.5,debug]{beamerposter}
\usetheme{Frankfurt}

\begin{document}
\begin{frame}{}
\begin{columns}[t, totalwidth=\textwidth]
\begin{column}{.245\linewidth}
    \begin{block}{\large First column}
        \vspace{24em}
    \end{block}
\end{column}%
\begin{column}{.745\linewidth}
    \begin{columns}[t]
        \begin{column}{.5\linewidth}
            \begin{block}{\large First subcolumn}
                \vspace{11em}
            \end{block}
        \end{column}
        \begin{column}{.5\linewidth}
            \begin{block}{\large Second subcolumn}
                \vspace{12em}
            \end{block}
        \end{column}
    \end{columns}
    \begin{columns}[t]
        \begin{column}{.33\linewidth}
            \begin{block}{\large Section}
                \vspace{6em}
            \end{block}
            \begin{block}{\large Section}
                \vspace{9em}
            \end{block}
            \begin{block}{\large Section}
                \vspace{3em}
            \end{block}
        \end{column}
        \begin{column}{.33\linewidth}
            \begin{block}{\large Section}
                \vspace{8em}
            \end{block}
            \begin{block}{\large Section}
                \vspace{4em}
            \end{block}
        \end{column}
        \begin{column}{.33\linewidth}
            \begin{block}{\large Section}
                \vspace{10em}
            \end{block}
            \begin{block}{\large Section}
                \vspace{10em}
            \end{block}
        \end{column}
    \end{columns}
\end{column}
\end{columns}
\end{frame}
\end{document}

答案1

1. 问题

顶部对齐:可以通过[T]仅在第一次出现时使用来修复

2. 问题

自动计算列高:这有点复杂。下面我假设您知道左上角或右上角的块哪个更长。现在将较长的块复制到右下角\setbox0\begin{document}获取其高度。从 paperheight 中减去此高度和标题的高度即可得出剩余列的高度。

\documentclass[]{beamer}
\usepackage[orientation=landscape,size=a0,scale=1.2,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document information
\title{Example Poster}
\author[]{Author list}
\institute[]{Author affiliations}
\date{~}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% beamer has a problem filling vertical space in columns
% have to manually specify column heights 
% AFAICT this must be manually tweaked????
\newlength{\colheightb}
\newlength{\myheight}

\begin{document}

    \setbox0=\vtop{%
                        \begin{block}{\large Second subcolumn}
                            \vspace{12em}
                        \end{block} 
    }
    \setlength{\myheight}{\ht0}%
    \addtolength{\myheight}{\dp0}%
    \setlength\colheightb{\dimexpr.99\paperheight-\headheight-\myheight\relax}

    \begin{frame}{}
        \begin{columns}[T]
            \begin{column}{.245\linewidth}
                \vbox to .99\textheight{%
                    \begin{block}{\large First column}
                        \vspace{24em}
                    \end{block}
                    \vfill
                    \begin{block}{\large First column}
                        \vspace{24em}
                    \end{block}
                    \vfill
                    \begin{block}{\large First column}
                        \vspace{19em}
                    \end{block}
                }
            \end{column}%
            \begin{column}{.745\linewidth}
                \begin{columns}[t]
                    \begin{column}{.5\linewidth}
                        \begin{block}{\large First subcolumn}
                            \vspace{9em}
                        \end{block}
                    \end{column}
                    \begin{column}{.5\linewidth}
                        \begin{block}{\large Second subcolumn}
                            \vspace{12em}
                        \end{block}             
                    \end{column}
                \end{columns}
                \begin{columns}[t]
                    \begin{column}{.33\linewidth}
                        \vbox to \colheightb{%
                            \begin{block}{\large Section}
                                \vspace{16em}
                            \end{block}
                            \vfill
                            \begin{block}{\large Section}
                                \vspace{7em}
                            \end{block}
                            \vfill
                            \begin{block}{\large Section}
                                \vspace{23em}
                            \end{block}
                        }
                    \end{column}
                    \begin{column}{.33\linewidth}
                        \vbox to \colheightb{%
                            \begin{block}{\large Section}
                                \vspace{8em}
                            \end{block}
                            \vfill
                            \begin{block}{\large Section}
                                \vspace{40em}
                            \end{block}
                        }
                    \end{column}
                    \begin{column}{.33\linewidth}
                        \vbox to \colheightb{%
                            \begin{block}{\large Section}
                                \vspace{25em}
                            \end{block}
                            \vfill
                            \begin{block}{\large Section}
                                \vspace{10em}
                            \end{block}
                        }
                    \end{column}
                \end{columns}
            \end{column}
        \end{columns}
    \end{frame}
\end{document}

在此处输入图片描述

相关内容