3

I need some spaces between left and right side in headline and footline.`

     \documentclass[svgnames]{beamer}
  \usetheme{Rochester}
  %\usetheme{CambridgeUS}
\usepackage[british]{babel}

  \title{Title1}
  \author{Author}
  \institute{Institute}
  \date{Date}

  %\usecolortheme[RGB]{227, 11, 92}{structure}
\usecolortheme[RGB={190,49,26}]{structure}

\defbeamertemplate*{footline}{ru theme}{%
  \leavevmode%
  \hbox{%
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=5.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor
    \leftskip=0.5cm
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.25\paperwidth,ht=5.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortdate
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.416667\paperwidth,ht=5.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
   \begin{beamercolorbox}[wd=0.083333\paperwidth,ht=5.25ex,dp=1ex,right]{title in head/foot}%
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
  \end{beamercolorbox}}%
  \vskip0pt%
}


%HEADER LINE

\defbeamertemplate*{headline}{}{%
 % \leavevmode%
  %\vspace*{\fill}
  \hbox{%
  %\vspace{1pt}

  \begin{beamercolorbox}[wd=1\paperwidth,ht=10.25ex,dp=1ex,center,rounded=true,shadow=true,color=red]{author in head/foot}%

   \hspace*{2em}
    \usebeamerfont{author in head/foot}
    \vskip1pt
  \end{beamercolorbox}}%
%\vskip0pt

}
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true,ht=10ex]
\setbeamertemplate{navigation symbols}{} 

\begin{document}


\begin{frame}[plain]
 \titlepage
\end{frame}


  \section[Outline]{}
  \frame{\tableofcontents}

  \section{Header1}
  \subsection{Header2}
  \frame{\frametitle{Topic1}

      HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.
  \vspace{0.25cm}

    These color codes can be used to change the color of the background, text, and tables on a web page.
   }

    \begin{frame}
      testQ
    \end{frame}
  \end{document} 

I need frame like below diagram format, can anyone help me

enter image description here

1
  • I can get the the header and footer 0.5cm in from both sides, and I can get the frame title centered in the header, but I get a second frame title in a location that has nothing to do with the header. Oct 1, 2015 at 4:54

1 Answer 1

4

Here you go. Hopefully I understood the requirements properly.

     \documentclass[svgnames]{beamer}
  \usetheme{Rochester}
  %\usetheme{CambridgeUS}
\usepackage[british]{babel}

  \title{Title1}
  \author{Author}
  \institute{Institute}
  \date{Date}

  %\usecolortheme[RGB]{227, 11, 92}{structure}
\usecolortheme[RGB={190,49,26}]{structure}

\defbeamertemplate*{footline}{ru theme}{%
  \leavevmode%
  \centering
  \hbox{%
  \begin{beamercolorbox}[wd=.2\paperwidth,ht=4.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortauthor
    \leftskip=0.5cm
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.2\paperwidth,ht=4.25ex,dp=1ex,center]{author in head/foot}%
    \usebeamerfont{author in head/foot}\insertshortdate
  \end{beamercolorbox}%
  \begin{beamercolorbox}[wd=.4\paperwidth,ht=4.25ex,dp=1ex,center]{title in head/foot}%
    \usebeamerfont{title in head/foot}\insertshorttitle
  \end{beamercolorbox}%
   \begin{beamercolorbox}[wd=0.08\paperwidth,ht=4.25ex,dp=1ex,right]{title in head/foot}%
    \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}
  \end{beamercolorbox}}%
  \vskip0pt%
}


%HEADER LINE

\makeatletter
\defbeamertemplate*{headline}{}{%
  %
    \leavevmode%
    \hspace*{0.065\paperwidth}
    \hbox{%
    \begin{beamercolorbox}[wd=.86\paperwidth,ht=10.25ex,dp=1ex,center,rounded=true,shadow=true]{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}
    }
}

\defbeamertemplate*{frametitle}{}
  {%
    \nointerlineskip%
    \vskip-\beamer@headheight%
    \vbox to \beamer@headheight{%
      \vfil
      \leftskip=-\beamer@leftmargin%
      \advance\leftskip by 0.07\paperwidth%0.3cm%
      \rightskip=-\beamer@rightmargin%
      \advance\rightskip by0.3cm plus1fil%
      {\usebeamercolor[fg]{frametitle}\usebeamerfont{frametitle}\insertframetitle\par}%
      {\usebeamercolor[fg]{framesubtitle}\usebeamerfont{framesubtitle}\insertframesubtitle\par}%
      \vbox{}%
      \vskip-1em%
      \vfil
    }%
  }
\makeatother
%

\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true,ht=10ex]
\setbeamertemplate{navigation symbols}{}

\begin{document}


\begin{frame}[plain]
 \titlepage
\end{frame}

\begin{frame}{Outline}
  \tableofcontents
\end{frame}

\section{Header1}
\subsection{Header2}

\begin{frame}{Topic1}
  HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.
  \vspace{0.25cm}

    These color codes can be used to change the color of the background, text, and tables on a web page.
\end{frame}

\begin{frame}
  testQ
\end{frame}

\end{document}

enter image description here

1
  • sir when i try to give header line rounded = false it not be show in rectangular box like in my question image
    – KBM
    Oct 19, 2015 at 7:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .