(Beamer)减少可能留给标题的顶部边距

(Beamer)减少可能留给标题的顶部边距

这是我的代码。

\documentclass[11pt,t]{beamer}
\hypersetup{pdfencoding=auto}
%\usefonttheme{professionalfonts}
\usefonttheme[onlymath]{serif}

\usetheme{Berkeley}

\usepackage{xcolor}
\usepackage{amssymb,amsmath,graphicx}
\usepackage{kotex}
\usepackage{multimedia}
\usepackage{setspace}
\usepackage{multicol}
\usepackage{verbatim} %use 
\usepackage{ragged2e}
\addtobeamertemplate{block begin}{}{\justifying}

%% Color Setting %%
\definecolor{Grey}{rgb}{0.6,0.6,0.6}
\definecolor{GSHSred}{RGB}{105,0,0}
\definecolor{GSHSRED}{RGB}{80,0,0}
\definecolor{gshsred}{RGB}{240,210,210}
\setbeamercolor{title}{bg=white,fg=GSHSred}
\setbeamercolor{author}{fg=GSHSred}
\setbeamercolor{institute}{fg=GSHSred}
\setbeamercolor{date}{fg=GSHSred}
\setbeamercolor{logo}{bg=GSHSred}
\setbeamercolor{sidebar}{bg=GSHSred}
\setbeamercolor{frametitle}{bg=white,fg=GSHSred}
\setbeamercolor{section in sidebar}{use=sidebar,bg=white,fg=sidebar.bg}
\setbeamercolor{subsection in sidebar}{parent=section in sidebar}
\setbeamercolor{subsubsection in sidebar}{parent=subsection in sidebar}
\setbeamercolor{item}{fg=GSHSred}
\setbeamercolor{block title}{bg=GSHSRED,fg=white}
\setbeamercolor{block body}{bg=gshsred,fg=black}

%% Frametitle Setting %%
\setbeamerfont{frametitle}{series=\bfseries}
\setbeamertemplate{frametitle}
{ \vspace*{-10mm}
    \leavevmode
    \hspace*{3pt}
    \begin{beamercolorbox}[wd=\paperwidth,ht=1ex,dp=1ex]{frametitle}
        \hspace*{7pt}\underline{\makebox[0.6\paperwidth][l]{
                \Large{\insertframetitle}}}
    \end{beamercolorbox}
}

\makeatletter
\setlength{\beamer@headheight}{0pt}
\makeatother

%% Title Page Setting %%
%\setbeamerfont{title}{series=\bfseries}
\setbeamertemplate{title page}{
    %% Background Logo
    \begin{picture}(0,0)%
    \setlength{\unitlength}{1cm}% default
    \protect\put(0,0){%
        \begin{picture}(6,6)(4,10)%
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        %\includegraphics[width=0.4\paperwidth]{./logo/100_01.png}%
        \includegraphics[width=0.7\paperwidth]{./logo/gshslogo2.jpg}%
        \end{picture}%
    }%
\end{picture}%
\vfill
\vspace*{10mm}
\raggedleft
%% Title
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\vskip 2mm
%% Subtitle
\ifx\insertsubtitle\@empty
\else\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle
\fi

\vskip 3mm
%% Horizontal line
\usebeamercolor[fg]{title}\hrule height 2pt\hfill
\vskip 10mm
%% Author
\usebeamercolor[fg]{author}\usebeamerfont{author}\insertauthor
\vskip 1cm
%% Institute
\usebeamercolor[fg]{institute}\usebeamerfont{institute}\insertinstitute
\vskip 1cm
%% Date
%\usebeamercolor[fg]{date}\usebeamerfont{date}\insertdate
\vfill
}

%% itemize bullet setting %%
\setbeamertemplate{itemize items}[ball]

%% block setting %%
\setbeamertemplate{blocks}[rounded][shadow=true]

%% Title, Author, Institute, Date %%
\title[]{Substitutions in Multiple Integrals}
\subtitle[]{Calculus II}
\author[]{asdf}
\institute[GSHS]{asdf}
\date[]{\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\logo{\includegraphics[width=15mm]{./logo/100_01.png}}
\logo{\includegraphics[width=8mm]{./logo/gshslogo.png}}

%% Main %%
\begin{document}

\begin{frame}[plain]
    \titlepage
\end{frame}
\setbeamertemplate{sidebar left}[sidebar theme]

\setstretch{1.1} %줄간격



\section{Motivation}
\begin{frame}
    In Calculus I, we have learned ``Integration by Substitution'' as follows:
    \[ \int g(f(x)) f'(x)dx = \int g(u)du \]
    where $u=f(x)$. Note that $du=f'(x)dx$.
    \newline
    Now our goal is to extend this concept to multiple integrals, such as
    \[ \iiint_R F(x,y,z)dxdydz = \iiint_G F(u,v,w) (?) dudvdw \]
    where $x=x(u,v,w), y=y(u,v,w), z=z(u,v,w)$. What should be in ``(?)''?
\end{frame}
\end{document}

上述代码的结果是幻灯片顶部的边距过多,如图所示。我该如何减少边距?我认为边距实际上是用于标题的,但我的所有幻灯片都没有任何标题。

在此处输入图片描述

另一个问题在此处输入图片描述

(另一个问题)

答案1

\documentclass[11pt,t]{beamer} 
\usetheme{Berkeley}

\makeatletter
\setlength{\beamer@headheight}{0pt}
\makeatother

\begin{document}
\begin{frame}
    In Calculus I, we have learned ``Integration by Substitution'' as follows:
    \[ \int g(f(x)) f'(x)dx = \int g(u)du \]
    where $u=f(x)$. Note that $du=f'(x)dx$.
    \newline
    Now our goal is to extend this concept to multiple integrals, such as
    \[ \iiint_R F(x,y,z)\mathop{dx}\mathop{dy}\mathop{dz} = \iiint_G F(u,v,w) (?)\mathop{du}\mathop{dv'}\mathop{dw} \]
    where $x=x(u,v,w), y=y(u,v,w), z=z(u,v,w)$. What should be in ``(?)''?
\end{frame}
\end{document}

如果有徽标,这会变得有点复杂,因为徽标通常是模板的一部分headline

\documentclass[11pt,t]{beamer}

\usetheme{Berkeley}

\makeatletter
\setlength{\beamer@headheight}{0pt}
\makeatother

\logo{\includegraphics[width=8mm]{example-image}}

\makeatletter
    \setbeamertemplate{headline}{}

  \defbeamertemplate*{sidebar \beamer@sidebarside}{mysidebar theme}
  {
    \beamer@tempdim=\beamer@sidebarwidth%
    \advance\beamer@tempdim by -6pt%
    {%
    \begin{beamercolorbox}[wd=\beamer@sidebarwidth, ht=\beamer@sidebarwidth]{logo}
        \begin{minipage}[b][\beamer@sidebarwidth][c]{\beamer@sidebarwidth}  
            \centering%
                \insertlogo%
            \end{minipage}
    \end{beamercolorbox}
    \vskip-.8\beamer@sidebarwidth%
    \usebeamerfont{title in sidebar}%
      \vskip1.5em%
      \hskip3pt%
      \usebeamercolor[fg]{title in sidebar}%
      \insertshorttitle[width=\beamer@tempdim,center,respectlinebreaks]\par%
      \vskip1.25em%
    }%
    {%
      \hskip3pt%
      \usebeamercolor[fg]{author in sidebar}%
      \usebeamerfont{author in sidebar}%
      \insertshortauthor[width=\beamer@tempdim,center,respectlinebreaks]\par%
      \vskip1.25em%
    }%
    \insertverticalnavigation{\beamer@sidebarwidth}%
    \vfill
    \ifx\beamer@sidebarside\beamer@lefttext%
    \else%
      \usebeamercolor{normal text}%
      \llap{\usebeamertemplate***{navigation symbols}\hskip0.1cm}%
      \vskip2pt%
    \fi%
  }%
\makeatother


\begin{document}

\setbeamertemplate{sidebar left}[mysidebar theme]

\section{Motivation}
\begin{frame}
    In Calculus I, we have learned ``Integration by Substitution'' as follows:
    \[ \int g(f(x)) f'(x)dx = \int g(u)du \]
    where $u=f(x)$. Note that $du=f'(x)dx$.
    \newline
    Now our goal is to extend this concept to multiple integrals, such as
    \[ \iiint_R F(x,y,z)\mathop{dx}\mathop{dy}\mathop{dz} = \iiint_G F(u,v,w) (?)\mathop{du}\mathop{dv'}\mathop{dw} \]
    where $x=x(u,v,w), y=y(u,v,w), z=z(u,v,w)$. What should be in ``(?)''?
\end{frame}
\end{document}

在此处输入图片描述

相关内容