我正在制作一个演示文稿,需要在 底部放置两个徽标beamer
。我设法让它与
\logo{%
\makebox[1\paperwidth]{%
\includegraphics[height=1cm,keepaspectratio]{ntnu.pdf}%
%\hspace{390pt}
\hfill%
\includegraphics[height=1cm,keepaspectratio]{rose.pdf}%
}%
}
或者
\logo{%
\makebox[1\paperwidth]{% <--- THIS ONE IS IMPORTANT TOO
\makebox[0pt][l]{\includegraphics[height=1cm]{example-image}}%
%\hspace{440pt}
\hfill%
\makebox[0pt][r]{\includegraphics[height=1cm]{example-image}}%
}%
}
但遗憾的是,它们并没有完全对齐。右侧徽标不像左侧徽标那样靠近边缘(见下图中的红色区域)。
\hfill
用于展示举例说明问题,但实际上我想使用,例如,\hspace{}
这样它们就不会完全处于边缘。
\documentclass[aspectratio=169]{beamer}
\usetheme[compress]{Singapore}
\usepackage{graphicx}
\graphicspath{ {figures/} }
\usefonttheme{serif}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\setbeamertemplate{caption}[numbered]
\setbeamersize{text margin left=14mm,text margin right=14mm}
\setbeamertemplate{navigation symbols}{}
\title{ON GENERAL RELATIVITY}
\author{John Doe\inst{1}}
\institute[Eidgenössische Technische Hochschule Zürich (ETH)]
{
\inst{1}%
{PhD Candidate at the Department of Physics\\
Eidgenössische Technische Hochschule Zürich (ETH)}}
\date{\today}
\subject{General relativity}
\newcommand{\nologo}{\setbeamertemplate{logo}{}}
% \logo{%
% \makebox[1\paperwidth]{%
% \includegraphics[height=1cm,keepaspectratio]{example-image}%
% %\hspace{390pt}
% \hfill%
% \includegraphics[height=1cm,keepaspectratio]{example-image}%
% }%
% }
\logo{%
\makebox[1\paperwidth]{%
\makebox[0pt][l]{\includegraphics[height=1cm]{example-image}}%
\hspace{440pt}
\hfill%
\makebox[0pt][r]{\includegraphics[height=1cm]{example-image}}%
}%
}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section*{OUTLINE}
\begin{frame}{OUTLINE}
\tableofcontents
\end{frame}
\section{INTRODUCTION}
\begin{frame}{INTRODUCTION}
INSERT INTRODUCTION.
\end{frame}
\section{THEORY}
\begin{frame}{THEORY}
INSERT THEORY.
\end{frame}
\section{METHOD(S)}
\begin{frame}{METHOD(S)}
INSERT METHOD(S).
\end{frame}
\section{RESULTS}
\begin{frame}{RESULTS}
INSERT RESULTS.
\end{frame}
\section{DISCUSSION}
\begin{frame}{DISCUSSION)}
INSERT DISCUSSION.
\end{frame}
\section{CONCLUSION}
\begin{frame}{CONCLUSION}
INSERT CONCLUSION.
\end{frame}
\section*{BIBLIOGRAPHY}
\nologo{
\begin{frame}{BIBLIOGRAPHY}
INSERT BIBLIOGRAPHY
\end{frame}
\section*{ACKNOWLEDGEMENTS}
\begin{frame}{ACKNOWLEDGEMENTS}
\centering{
\includegraphics[height=3cm,keepaspectratio]{example-image}%
\hspace{30pt}
\includegraphics[height=3cm,keepaspectratio]{example-image}%
}
\end{frame}
}
\end{document}
- 我如何才能使两个标志完美对齐(与两侧的边缘保持恒定的分离)?
- 补充:如何从顶部的导航窗格中删除某些部分?在此示例中,我想删除
OUTLINE
、BIBLIOGRAPHY
和ACKNOWLEDGEMENTS
。
答案1
sidebar right
我想知道这个边距是在哪里定义的,最后我在外部主题的定义中找到了它default
,即在文件中beamerouterthemedefault.sty
:
\defbeamertemplate*{sidebar right}{default}
{
\vfill%
\llap{\insertlogo\hskip0.1cm}%
\vskip2pt%
\llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
\vskip2pt%
}
您可以看到此边距设置为 0.1cm(约 2.8pt)。有了这些知识,现在就可以相当轻松地得出两个徽标的精确对齐方式:
\documentclass[aspectratio=169]{beamer}
\usetheme[compress]{Singapore}
\usepackage{graphicx}
\graphicspath{ {figures/} }
\usefonttheme{serif}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\setbeamertemplate{caption}[numbered]
\setbeamersize{text margin left=14mm,text margin right=14mm}
\setbeamertemplate{navigation symbols}{}
\title{ON GENERAL RELATIVITY}
\author{John Doe\inst{1}}
\institute[Eidgenössische Technische Hochschule Zürich (ETH)]{
\inst{1}%
{PhD Candidate at the Department of Physics\\
Eidgenössische Technische Hochschule Zürich (ETH)}}
\date{\today}
\subject{Frequency dependent wave velocities in sediments and sedimentary rocks}
\newcommand{\nologo}{\setbeamertemplate{logo}{}}
\logo{%
\makebox[\paperwidth]{%
\includegraphics[height=1cm]{example-image}%
\hfill%
\includegraphics[height=1cm]{example-image}%
}\hskip-.1cm%
}
\show\hss
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}