비머 프레임 제목: 여러 줄로 된 제목의 간격 늘리기

비머 프레임 제목: 여러 줄로 된 제목의 간격 늘리기

나는맞춤형 비머테마가 있는데 여러 줄을 차지하는 긴 프레임 제목에 문제가 있습니다. 이 경우 제목은 위쪽으로 슬라이드되지만 아래쪽 공간을 사용하는 것이 좋습니다. 짧은 제목은 잘 작동합니다 긴 제목은 제목 상단의 공간을 사용합니다.

두 경우 모두 동일한 간격을 유지하고 싶습니다. 내 옵션은 무엇입니까?

  • \frametitle[long]{longFrameTitle}더 큰 간격으로 옵션을 정의할 수 있나요 ?
  • 제목이 n자보다 길면 간격을 자동으로 늘리는 if 문을 작성할 수 있나요?
  • 라는 것을 정의할 수 있나요 \longframetitle?

  • 긴 제목이 있는 각 프레임에 수동으로 간격을 삽입할 수 있나요?

저는 가장 쉬운 해결책을 찾고 있습니다. 몇 프레임에서만 문제가 되기 때문입니다.

지금까지 시도했지만 작동하지 않은 것:

\setbeamertemplate{frametitle}{%
\begin{beamercolorbox}[

    wd=\paperwidth,
    leftskip=1cm,
    rightskip=1cm,
    ht=5ex,dp=1.5ex
]{frame title}%
    \usebeamerfont{frame title}\insertframetitle%
\end{beamercolorbox}%
}

\setbeamertemplate{longframetitle}{%
\begin{beamercolorbox}[
    sep=-7cm,
    wd=\paperwidth,
    leftskip=1cm,
    rightskip=1cm,
    ht=5ex,dp=1.5ex
    ]{frame title}%
    \usebeamerfont{frame title}\insertframetitle%
\end{beamercolorbox}%
}

답변1

작동하는 것처럼 보이는 매우 더러운 솔루션은 다음 매크로를 사용하는 것입니다.

\newcommand{\longframetitle}[2]{\frametitle{\tikz[inner xsep=0pt,baseline]{\node[anchor=base west] (titlePos) {\phantom{short fittitius title}};
\node[anchor=base west,text width=#1 ex] at (titlePos.base west) {#2};
}}}%\longframetitle{lenght of the line of the multiline title in ex}{title}

특정 사례의 경우:

\documentclass[11pt]{beamer}
\usetheme{leipzig}
\begin{document}
\title{short Title}

\newcommand{\longframetitle}[2]{\frametitle{\tikz[inner xsep=0pt,baseline]{\node[anchor=base west] (titlePos) {\phantom{short fittitius title}};
\node[anchor=base west,text width=#1 ex] at (titlePos.base west) {#2};
}}}%\longframetitle{lenght in ex}{title} 

\begin{frame}
    \frametitle{short Title}
\end{frame}

\begin{frame}
\longframetitle{50}{Looooooooooooooooooong Title which\\[-2pt] occupies multiple lines}

\end{frame}

\end{document}

두 줄의 긴 프레임 제목

관련 정보