放置 2 个徽标(左、右)

放置 2 个徽标(左、右)

我想在第一页放置 2 个徽标(左侧和右侧),如果可以的话,也可以在最后一页放置

\documentclass{beamer}
\mode<presentation> {
\usepackage[utf8]{inputenc}
\usepackage{tikz,graphicx} 
\usetheme{PaloAlto}

%\setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line
%\setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line

%\setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line
}

%\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables

%----------------------------------------------------------------------------------------
%   TITLE PAGE
%----------------------------------------------------------------------------------------

\title[Title]{title} % The short title appears at the bottom of every slide, the full title is only on the title page


\institute[UMSS] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space
{
\textit{U} \\
\textit{Fac} \\ % Your institution for the title page
\textit{autor} % Your name
\medskip
%\textit{[email protected]} % Your email address
}
\date{\today} % Date, can be changed to a custom date
\newlength\imageheight
%\settoheight\imageheight{\includegraphics[width=0.11\paperwidth]{vw.png}}
\makeatletter
  \setbeamertemplate{headline}
  {%
    \ifnum\thepage=\insertsectionstartpage
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
       \logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
       \logoright{\includegraphics[width=1.2cm,keepaspectratio]{example-image-b}}

        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
    \else
    \begin{beamercolorbox}[wd=\beamer@sidebarwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}    
    \fi
  }
%\setbeamerfont{section in sidebar}{size=\fontsize{2}{4}\selectfont}
%\setbeamerfont{subsection in sidebar}{size=\fontsize{2}{4}\selectfont}
%\setbeamerfont{subsubsection in sidebar}{size=\fontsize{2}{4}\selectfont}



\makeatother

\begin{document}

\maketitle

\section{Section 1}
\begin{frame}
\frametitle{Section 1}
\end{frame}

\subsection{Subsection 1.1}
\begin{frame}
bla
\end{frame}

\subsection{Subsection 1.2}
\begin{frame}
bla
\end{frame}


\end{document}

但结果如下:

在此处输入图片描述

答案1

在您之前的问题中,您在两个网站上都使用了徽标,但明确将其从标题页中删除。如果您只想在标题页上使用它们,请反过来做:

\documentclass{beamer}
\usetheme{Berkeley}

\def\insertlogoright{\usebeamertemplate*{logoright}}
\def\logoright{\setbeamertemplate{logoright}}

\makeatletter
  \defbeamertemplate*{headline}{mycustom theme}
  {%
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogo}\vss%
        }%
        \hss}%
        \hfill%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogoright}\vss%
        }%
        \hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
  }
\makeatother

\logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
\logoright{\includegraphics[width=1.2cm,keepaspectratio]{example-image-b}}


\title{The Title}
\author{The Author}
\institute{The Institute}

\begin{document}

%{
% \setbeamertemplate{logo}{}
% \setbeamertemplate{logoright}{}
 \begin{frame}
  \maketitle
 \end{frame}
%}

\setbeamertemplate{logo}{}
\setbeamertemplate{logoright}{}

\begin{frame}{this}
 test
\end{frame}

\end{document}

在此处输入图片描述


编辑

如果你想将它与修改后的标题结合起来https://tex.stackexchange.com/a/458358/36296你可以在标题页后添加一个不同的标题:

\documentclass{beamer}
\usetheme{Berkeley}

\def\insertlogoright{\usebeamertemplate*{logoright}}
\def\logoright{\setbeamertemplate{logoright}}

\makeatletter
  \defbeamertemplate*{headline}{mycustom theme}
  {%
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogo}\vss%
        }%
        \hss}%
        \hfill%
        \hbox to \beamer@sidebarwidth{%
        \hss%
        \vbox to \beamer@headheight{%
        \vss\hbox{\color{fg}\insertlogoright}\vss%
        }%
        \hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
  }
\makeatother

\logo{\includegraphics[width=1.2cm,keepaspectratio]{example-image-a}}
\logoright{\includegraphics[width=1.2cm,keepaspectratio]{example-image-b}}


\title{The Title}
\author{The Author}
\institute{The Institute}

\begin{document}

%{
% \setbeamertemplate{logo}{}
% \setbeamertemplate{logoright}{}
 \begin{frame}
  \maketitle
 \end{frame}
%}

\setbeamertemplate{logo}{}
\setbeamertemplate{logoright}{}


\makeatletter
  \setbeamertemplate{headline}
  {%
    \ifnum\thepage=\insertsectionstartpage
    \begin{beamercolorbox}[wd=\paperwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}
    \else
    \begin{beamercolorbox}[wd=\beamer@sidebarwidth]{frametitle}
      \ifx\beamer@sidebarside\beamer@lefttext%
      \else%
        \hfill%
      \fi%
      \ifdim\beamer@sidebarwidth>0pt%  
        \usebeamercolor[bg]{logo}%
        \vrule width\beamer@sidebarwidth height \beamer@headheight%
        \hskip-\beamer@sidebarwidth%
        \hbox to \beamer@sidebarwidth{\hss\vbox to
          \beamer@headheight{\vss\hbox{\color{fg}\insertlogo}\vss}\hss}%
      \else%
        \vrule width0pt height \beamer@headheight%  
      \fi%
    \end{beamercolorbox}    
    \fi
  }
\makeatother

\section{title}

\begin{frame}{this}
 test
\end{frame}

\begin{frame}{this}
 test
\end{frame}

\end{document}

相关内容