我来这里寻求帮助,因为我已经尝试了各种方法来纠正附图中的错误。处理长标题时,第二行会出现不必要的缩进。我想让第二行与第一行对齐。我使用的是哥廷根主题。
之前我对 Goettingen 主题的布局做了一些更改。虽然范围很广,但这是更准确地报告我的问题的最佳方式。我怀疑这个问题的修复可能与
\setbeamertemplate{frametitle}{\hspace{-0.4cm}\insertframetitle}
我的代码如下:
\documentclass[xcolor={dvipsnames}]{beamer}
\usetheme[left,width=1.5cm]{Goettingen}
\usepackage[brazil]{babel}
\usepackage{lmodern}
\hypersetup{pdfpagemode=FullScreen}% Use a file in the directory solutions instead.
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\Large,series=\bfseries}
\setbeamerfont*{caption}{size=\scriptsize}
\setbeamertemplate{itemize items}[circle]
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{navigation symbols}{}
%\setbeamertemplate{frametitle}[default][left]
\usepackage{booktabs,siunitx}
\sisetup{%
output-decimal-marker={,},
}
\usepackage{tikz}
\usetikzlibrary{arrows}
\tikzstyle{block}=[draw opacity=0.7,line width=1.4cm]
% Vertical displacement frame title
\addtobeamertemplate{frametitle}{\vspace*{-0.3cm}}{\vspace*{0.0cm}}
% Horizontal displacement frame title
\setbeamertemplate{frametitle}{\hspace{-0.4cm}\insertframetitle}
% Color scheme for outer elements: use background colors
\usecolortheme{default} % beaver - whale - default
% Layout scheme for inner elements: rounded elements
\useinnertheme[shadow=false]{rounded}
% Color scheme for inner elements: use foreground colors
\usecolortheme{orchid} % orchid
% Itemize items: default (triangle), circle, square, ball
\setbeamertemplate{itemize items}[circle]
% Enumerate items: default, circle, square, ball
\setbeamertemplate{enumerate items}[circle]
% Enumerate sections/subsections in table contents: default, circle, square, ball
\setbeamertemplate{sections/subsections in toc}[circle]
% Outline: default, sections numbered, subsections numbered, circle, square, ball, ball unnumbered
\setbeamertemplate{sections/subsections in toc}[circle]
% General blocks:
\setbeamertemplate{blocks}[rounded]
% Title page:
%\setbeamertemplate{title page}[default][colsep=-4bp,rounde=true]
% Part page:
\setbeamertemplate{part page}[default][colsep=-4bp,rounded=true]
% Navigation symbols:
\setbeamertemplate{navigation symbols}{}
%font size sections/subsections in table contents
\setbeamerfont{section number projected}{size=\normalsize}
% Default color font for sections/subsections
\definecolor{structure}{rgb}{51,51,178}
\date{}
%======================START DOCUMENT=======================
\begin{document}
\begin{frame}{Anomalias, Filtragem e Significância Estatística}
\end{frame}
\end{document}
答案1
您可以在中插入框架标题parbox
。
对于这个主题,侧边栏的宽度为 2 厘米,因此
\setbeamertemplate{frametitle}{\hspace{-0.4cm}\parbox{\dimexpr\linewidth-2cm}{\insertframetitle}}
将达到预期结果
更新后续问题之后
要将标题向下移动,请添加\vspace{<lenght>}
\setbeamertemplate{frametitle}{\vspace*{1cm}\hspace{-0.4cm}\parbox{\dimexpr\linewidth-2cm}{\insertframetitle}}
或者 使用
\addtobeamertemplate{frametitle}{\vspace*{1cm}}{\vspace*{0.0cm}}
要更改基线跳过,需要修改框架标题的字体
\setbeamerfont{frametitle}{size*={14}{14}}
在哪里使用它size*={<font size>}{<baseline skip>}
。
通常,基线跳过是字体大小的 1.2 倍。