Latex Beamer:增加截面导航栏中各部分之间的间距

问题描述 投票:0回答:1

我想修改我的Latex Beamer模板。因此,我想增加部分导航栏中显示部分之间的空间。目前,它们是缩进的,但这些部分是靠近的方式。

我使用以下代码生成标题:

setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}                 
        \end{beamercolorbox}%
    }
}

如何修改显示部分之间的间距?

latex beamer
1个回答
0
投票

导航后插入的tipple fill plus1filll使其向左冲洗。如果您将其删除,这些部分将自动分布在可用的纸张宽度内:

\documentclass{beamer}

\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{}
        \end{beamercolorbox}%
    }
}

\begin{document}

\section{title}
\begin{frame}
content...
\end{frame}

\section{title}
\begin{frame}
content...
\end{frame}

\end{document}

如果你想保持这些部分向左冲洗,只需在之间添加一些额外的空间:

\documentclass{beamer}

\setbeamertemplate{headline}{%
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=3ex,dp=1.125ex]{palette tertiary}%
        \insertsectionnavigationhorizontal{\paperwidth}{}{\hskip0pt plus1filll}
        \end{beamercolorbox}%
    }
}

\setbeamertemplate{section in head/foot}{\insertsectionhead\hspace{0.5cm}}

\begin{document}

\section{title}
\begin{frame}
content...
\end{frame}

\section{title}
\begin{frame}
content...
\end{frame}

\end{document}
© www.soinside.com 2019 - 2024. All rights reserved.