我想在 Beamer 的标题页中使用一些徽标。徽标图像大小不同,很难正确对齐。以下是代码:
\documentclass[11pt]{beamer}
\usetheme{Madrid}
\usecolortheme{seahorse}
\usefonttheme{serif}
\title[Short title]{Really really really really Long title\\takes around two lines}
\author{Author Name}
\institute[]{Institute name goes here}
\date{\today}
\titlegraphic{\includegraphics[height=1.5cm]{small_logo_1}\hspace*{1cm}\includegraphics[height=1.5cm]{small_logo_2}\hspace*{1cm}\includegraphics[height=1.5cm]{big_logo_1}}
\begin{document}
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
\end{document}
以下是生成的幻灯片:
我希望以这样的方式对齐这些徽标,使得中间的徽标位于页面的中心,并且另外两个徽标与中间徽标保持相同的距离。
答案1
您可以通过左右图像的宽度计算所需的调整。例如,
\documentclass[11pt]{beamer}
\usetheme{Madrid}
\usecolortheme{seahorse}
\usefonttheme{serif}
\title[Short title]{Really really really really Long title\\takes around two lines}
\author{Author Name}
\institute[]{Institute name goes here}
\date{\today}
\usepackage{calc}
\newlength\logoawidth
\newlength\logobwidth
\newlength\logoadjwidth
\settowidth\logoawidth{\includegraphics[height=1.5cm]{example-image-a}}
\settowidth\logobwidth{\includegraphics[height=1.5cm]{example-image-a4}}
\setlength\logoadjwidth{.5\logobwidth-.5\logoawidth}
\titlegraphic{%
\hspace*{\logoadjwidth}%
\includegraphics[height=1.5cm]{example-image-a}\hspace*{1cm}\includegraphics[height=1.5cm]{example-image-b}\hspace*{1cm}\includegraphics[height=1.5cm]{example-image-a4}%
}
\begin{document}
\begin{frame}[noframenumbering]
\titlepage
\end{frame}
\end{document}
这会将中间图像向左移动,因为左侧图像比右侧图像宽。 在您的例子中,它会将其向右移动,因为右侧图像比左侧图像宽。 (显然,我必须更改图像,因为我没有您的文件。)