Beamer Poster Gemini - 如何左对齐?

Beamer Poster Gemini - 如何左对齐?

我如何才能将这张 Beamer 海报的标题(标题、机构等)左对齐?我只想在右侧添加一个徽标,因此标题左对齐会更好。代码可在 Overleaf 上找到这里,如下所示:

\RequirePackage{tikz}
\RequirePackage{exscale}
\RequirePackage{ragged2e}
\RequirePackage{changepage}
\RequirePackage{calc}

% ====================
% Fonts
% ====================

\usefonttheme{professionalfonts}

\setbeamerfont{headline}{family=\sffamily}
\setbeamerfont{headline title}{size=\Huge,series=\bfseries}
\setbeamerfont{headline author}{size=\Large}
\setbeamerfont{headline institute}{size=\normalsize}
\setbeamerfont{block title}{size=\large,series=\bfseries}
\setbeamerfont{heading}{series=\bfseries}
\setbeamerfont{caption}{size=\small}
\setbeamerfont{footline}{size=\normalsize}

% ====================
% Macros
% ====================

\newcommand{\samelineand}{\qquad}

% ====================
% Elements
% ====================

%% List
%\makeatletter
%\def\@listi{\leftmargin\leftmarginii
%\topsep 1ex % spacing before
%\parsep 0\p@ \@plus\p@
%\itemsep 0.5ex} % spacing between
%\makeatother
%
%% Itemize
%
%\setbeamertemplate{itemize item}{\raise0.5ex \hbox{\vrule width 0.5ex height 0.5ex}}
%\setbeamertemplate{itemize subitem}{\raise0.3ex \hbox{\vrule width 0.5ex height 0.5ex}}
%\setbeamertemplate{itemize subsubitem}{\raise0.2ex \hbox{\vrule width 0.5ex height 0.5ex}}

% Equation
\setlength\belowdisplayshortskip{2ex}

% Caption
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}[period]
\setlength{\abovecaptionskip}{2ex}
\setlength{\belowcaptionskip}{1ex}

% Navigation
\beamertemplatenavigationsymbolsempty

% ====================
% Components
% ====================

% Heading
\newcommand\heading[1]
{%
  \par\bigskip
  {\usebeamerfont{heading}\usebeamercolor[fg]{heading}#1}\par\smallskip
}

% logo
\newlength{\logoleftwidth}
\setlength{\logoleftwidth}{0cm}
\newlength{\logorightwidth}
\setlength{\logorightwidth}{0cm}
\newlength{\maxlogowidth}  % space on both sides set to maxlogowidth to keep title centered
\setlength{\maxlogowidth}{0cm}

\newcommand{\logoright}[1]{
  \newcommand{\insertlogoright}{#1}
  \settowidth{\logorightwidth}{\insertlogoright}
  \addtolength{\logorightwidth}{10ex}
  \setlength{\maxlogowidth}{\maxof{\logoleftwidth}{\logorightwidth}}
}
\newcommand{\logoleft}[1]{
  \newcommand{\insertlogoleft}{#1}
  \settowidth{\logoleftwidth}{\insertlogoleft}
  \addtolength{\logoleftwidth}{10ex}
  \setlength{\maxlogowidth}{\maxof{\logoleftwidth}{\logorightwidth}}
}

% Headline
\setbeamertemplate{headline}
{
  \begin{beamercolorbox}{headline}
    \begin{columns}
      \begin{column}{\maxlogowidth}
        \vskip5ex
        \ifdefined\insertlogoleft
        \vspace*{\fill}
        \hspace{10ex}
        \raggedright
        \insertlogoleft
        \vspace*{\fill}
        \else\fi
      \end{column}
      \begin{column}{\dimexpr\paperwidth-\maxlogowidth-\maxlogowidth}
        \usebeamerfont{headline}
        \vskip3ex
        \centering
        {\usebeamerfont{headline title}\usebeamercolor[fg]{headline title}\inserttitle\\[0.5ex]}
        {\usebeamerfont{headline author}\usebeamercolor[fg]{headline author}\insertauthor\\[1ex]}
        {\usebeamerfont{headline institute}\usebeamercolor[fg]{headline institute}\insertinstitute\\[1ex]}
      \end{column}
      \begin{column}{\maxlogowidth}
        \vskip5ex
        \ifdefined\insertlogoright
        \vspace*{\fill}
        \raggedleft
        \insertlogoright
        \hspace{10ex}
        \vspace*{\fill}
        \else\fi
      \end{column}
    \end{columns}
    \vspace{5ex}
    \ifbeamercolorempty[bg]{headline rule}{}{
      \begin{beamercolorbox}[wd=\paperwidth,colsep=0.5ex]{headline rule}\end{beamercolorbox}
    }
  \end{beamercolorbox}
}

% Block
\setbeamertemplate{block begin}{
    \vskip.75ex
    \begin{beamercolorbox}[rounded=true,leftskip=1em,colsep*=.75ex,center]{block title}%
        \usebeamerfont{block title}\insertblocktitle
    \end{beamercolorbox}%
    {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
    \usebeamerfont{block body}%
    \begin{beamercolorbox}[rounded=true,colsep*=.75ex,sep=.75ex,vmode]{block body}%
        \setbeamercolor{itemize item}{fg=block title.fg}
        \setbeamercolor{item projected}{fg=white, bg=block title.fg}
        \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
    }
    \setbeamertemplate{block end}{
    \end{beamercolorbox}\vskip1ex
}

%
% Alert Block
\setbeamertemplate{block alerted begin}{
    \vskip.75ex
    \begin{beamercolorbox}[rounded=true,leftskip=1em,colsep*=.75ex,center]{block alerted title}%
        \usebeamerfont{block title}\insertblocktitle
    \end{beamercolorbox}%
    {\ifbeamercolorempty[bg]{block alerted body}{}{\nointerlineskip\vskip-0.5pt}}%
    \usebeamerfont{block body}%
    \begin{beamercolorbox}[rounded=true,colsep*=.75ex,sep=.75ex,vmode]{block alerted body}%
        \setbeamercolor{itemize item}{fg=block alerted title.fg}
        \setbeamercolor{item projected}{fg=white, bg=block alerted title.fg}
        \ifbeamercolorempty[bg]{block alerted body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
    }
    \setbeamertemplate{block alerted end}{
    \end{beamercolorbox}\vskip1ex
}

% Example Block
\setbeamertemplate{block example begin}{
    \vskip.75ex
    \begin{beamercolorbox}[rounded=true,leftskip=1em,colsep*=.75ex,center]{block example title}%
        \usebeamerfont{block title}\insertblocktitle
    \end{beamercolorbox}%
    {\ifbeamercolorempty[bg]{block example body}{}{\nointerlineskip\vskip-0.5pt}}%
    \usebeamerfont{block body}%
    \begin{beamercolorbox}[rounded=true,colsep*=.75ex,sep=.75ex,vmode]{block example body}%
        \setbeamercolor{itemize item}{fg=block example title.fg}
        \setbeamercolor{item projected}{fg=white, bg=block example title.fg}
        \ifbeamercolorempty[bg]{block example body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
    }
    \setbeamertemplate{block example end}{
    \end{beamercolorbox}\vskip1ex
}

% Footer
\newcommand{\footercontent}[1]{\newcommand{\insertfootercontent}{#1}}

\setbeamertemplate{footline}{
  \ifdefined\insertfootercontent
  \begin{beamercolorbox}[vmode]{headline}
    \ifbeamercolorempty[bg]{headline rule}{}{
      \begin{beamercolorbox}[wd=\paperwidth,colsep=0.25ex]{headline rule}\end{beamercolorbox}
    }
    \vspace{1.5ex}
    \hspace{\sepwidth}
    \usebeamerfont{footline}
    \centering
    \insertfootercontent
    \hspace{\sepwidth}
    \vspace{1.5ex}
  \end{beamercolorbox}
  \else\fi
}

在此处输入图片描述

答案1

\centering您可以从标题定义中删除以获得左对齐标题:

\documentclass[final]{beamer}
%% Possible paper sizes: a0, a0b, a1, a2, a3, a4.
%% Possible orientations: portrait, landscape
%% Font sizes can be changed using the scale option.
\usepackage[size=a0,orientation=portrait,scale=1.1]{beamerposter}

\usetheme{gemini}
\usecolortheme{seagull}
\useinnertheme{rectangles}

% ====================
% Packages
% ====================

%\usepackage[utf8]{inputenc}
%\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tikz}
\usepackage{pgfplots}

% ====================
% Lengths
% ====================

% If you have N columns, choose \sepwidth and \colwidth such that
% (N+1)*\sepwidth + N*\colwidth = \paperwidth
\newlength{\sepwidth}
\newlength{\colwidth}
\setlength{\sepwidth}{0.03\paperwidth}
\setlength{\colwidth}{0.45\paperwidth}

\newcommand{\separatorcolumn}{\begin{column}{\sepwidth}\end{column}}

% ====================
% Logo (optional)
% ====================

% LaTeX logo taken from https://commons.wikimedia.org/wiki/File:LaTeX_logo.svg
% use this to include logos on the left and/or right side of the header:
\logoright{\includegraphics[height=5cm]{logos/1200px-LaTeX_logo.svg.png}}
\logoleft{\includegraphics[height=5cm]{logos/1200px-LaTeX_logo.svg.png}}

% ====================
% Footer (optional)
% ====================

\footercontent{
    ABC Conference 2025, Tokyo, Japan \hfill
    \insertdate \hfill
    \href{mailto:[email protected]}{\texttt{[email protected]}}
}
% (can be left out to remove footer)

% ====================
% My own customization
% - BibLaTeX
% - Boxes with tcolorbox
% - User-defined commands
% ====================
\input{custom-defs.tex}

%% Reference Sources
\addbibresource{refs.bib}
\renewcommand{\pgfuseimage}[1]{\includegraphics[scale=2.0]{#1}}

\title{A Beamer Poster Template with Logos based on Gemini Theme}

\author{Alyssa P. Hacker \inst{1} \and Ben Bitdiddle \inst{2} \and Lem E. Tweakit \inst{2}}

\institute[shortinst]{\inst{1} Some Institute \samelineand \inst{2} Another Institute}

\date{January 01, 2025}

\makeatletter
\setbeamertemplate{headline}
{
  \begin{beamercolorbox}{headline}
    \begin{columns}
      \begin{column}{\maxlogowidth}
        \vskip5ex
        \ifdefined\insertlogoleft
        \vspace*{\fill}
        \hspace{10ex}
        \raggedright
        \insertlogoleft
        \vspace*{\fill}
        \else\fi
      \end{column}
      \begin{column}{\dimexpr\paperwidth-\maxlogowidth-\maxlogowidth}
        \usebeamerfont{headline}
        \vskip3ex
%        \centering
        {\usebeamerfont{headline title}\usebeamercolor[fg]{headline title}\inserttitle\\[0.5ex]}
        {\usebeamerfont{headline author}\usebeamercolor[fg]{headline author}\insertauthor\\[1ex]}
        {\usebeamerfont{headline institute}\usebeamercolor[fg]{headline institute}\insertinstitute\\[1ex]}
      \end{column}
      \begin{column}{\maxlogowidth}
        \vskip5ex
        \ifdefined\insertlogoright
        \vspace*{\fill}
        \raggedleft
        \insertlogoright
        \hspace{10ex}
        \vspace*{\fill}
        \else\fi
      \end{column}
    \end{columns}
    \vspace{5ex}
    \ifbeamercolorempty[bg]{headline rule}{}{
      \begin{beamercolorbox}[wd=\paperwidth,colsep=0.5ex]{headline rule}\end{beamercolorbox}
    }
  \end{beamercolorbox}
}
\makeatother

\begin{document}
    
\begin{frame}[t]

\end{frame}
\end{document}

在此处输入图片描述

相关内容