Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

height of frametitle in Beamer, and other question...

3,185 views
Skip to first unread message

Jinsong Zhao

unread,
Apr 17, 2012, 6:44:33 AM4/17/12
to
Hi there,

I use beamer as the main package for slide. I have several problems when
I hope to customize the slide look.

1) how to reduce the height of frametitlebox? Now it seems too height
compared with the whole frame heihgt.

2) how to number the section and subsection in the header? I use Madrid
theme with option ``secheader''. I hope the section or subsection
displayed in the header have numbered.

3) how to change the section counter? For example, I hope the first
section in a specific slide start from 4.

Any suggestions will be really appreciated. Thanks in advance.

Regards,
Jinsong

Jinsong Zhao

unread,
Apr 17, 2012, 10:56:23 AM4/17/12
to
On 2012-04-17 18:44, Jinsong Zhao wrote:
> Hi there,
>
> I use beamer as the main package for slide. I have several problems when
> I hope to customize the slide look.
>
> 1) how to reduce the height of frametitlebox? Now it seems too height
> compared with the whole frame heihgt.

it seems that the following code can control the height of frametitle,
however, i find there is a little gap between headline and frametitle.
Would you like to correct it?

\setbeamertemplate{frametitle}{%
\begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=0ex,left]{frametitle}%
\hspace*{2ex}\insertframetitle%
\end{beamercolorbox}}


>
> 2) how to number the section and subsection in the header? I use Madrid
> theme with option ``secheader''. I hope the section or subsection
> displayed in the header have numbered.

i seems to see a beam of hope, however, i cannot find a way to put the
\insertsectionheadnumber in a correct place. Help me, please...

>
> 3) how to change the section counter? For example, I hope the first
> section in a specific slide start from 4.

i have no idea yet.

Jinsong Zhao

unread,
Apr 18, 2012, 4:11:17 AM4/18/12
to
It's so difficult for me...
wow, I got the answers...

On 2012-04-17 22:56, Jinsong Zhao wrote:
> On 2012-04-17 18:44, Jinsong Zhao wrote:
>> Hi there,
>>
>> I use beamer as the main package for slide. I have several problems when
>> I hope to customize the slide look.
>>
>> 1) how to reduce the height of frametitlebox? Now it seems too height
>> compared with the whole frame heihgt.
>
> it seems that the following code can control the height of frametitle,
> however, i find there is a little gap between headline and frametitle.
> Would you like to correct it?
>
> \setbeamertemplate{frametitle}{%
> \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=0ex,left]{frametitle}%
> \hspace*{2ex}\insertframetitle%
> \end{beamercolorbox}}
>
>

\setbeamertemplate{frametitle}{%
\nointerlineskip%

\begin{beamercolorbox}[wd=\paperwidth,ht=2ex,dp=0.75ex,left]{frametitle}%
\hspace*{2ex}\strut\insertframetitle\strut\par%
\end{beamercolorbox}}


>>
>> 2) how to number the section and subsection in the header? I use Madrid
>> theme with option ``secheader''. I hope the section or subsection
>> displayed in the header have numbered.
>
> i seems to see a beam of hope, however, i cannot find a way to put the
> \insertsectionheadnumber in a correct place. Help me, please...
>

\makeatletter
\setbeamertemplate{headline}
{
\leavevmode%
\hbox{%

\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,right]{section
in head/foot}%
\ifx\insertsectionhead\@empty%
\else%
{\usebeamerfont{section in
head/foot}\the\beamer@tocsectionnumber\ \insertsectionhead\hspace*{2ex}}%
\fi%
\end{beamercolorbox}%

\begin{beamercolorbox}[wd=.5\paperwidth,ht=2.25ex,dp=1ex,left]{subsection in
head/foot}%
\ifx\insertsubsectionhead\@empty%
\else%
{\usebeamerfont{subsection in
head/foot}\hspace*{2ex}\the\beamer@tocsectionnumber.\thesubsection\
\insertsubsectionhead}%
\fi%
\end{beamercolorbox}}%
\vskip0pt%
}
\makeatother


>>
>> 3) how to change the section counter? For example, I hope the first
>> section in a specific slide start from 4.
>
> i have no idea yet.

\makeatletter
\beamer@tocsectionnumber=3
\makeatother
0 new messages