以下是使用法兰克福主题的 MWE:
\documentclass{beamer}
\usetheme{Frankfurt}
\setbeamertemplate{navigation symbols}{}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{sansmathaccent}
\pdfmapfile{+sansmathaccent.map}
\graphicspath{ {external/} }
\newcommand{\ExternalLink}{%
\tikz[x=1.2ex, y=1.2ex, baseline=-0.05ex]{%
\begin{scope}[x=1ex, y=1ex]
\clip (-0.1,-0.1)
--++ (-0, 1.2)
--++ (0.6, 0)
--++ (0, -0.6)
--++ (0.6, 0)
--++ (0, -1);
\path[draw,
line width = 0.5,
rounded corners=0.5]
(0,0) rectangle (1,1);
\end{scope}
\path[draw, line width = 0.5] (0.5, 0.5)
-- (1, 1);
\path[draw, line width = 0.5] (0.6, 1)
-- (1, 1) -- (1, 0.6);
}
}
\hypersetup{
colorlinks = true,
allcolors=red
}
\def\blue#1{\text{\color{blue}{#1}}}
\def\red#1{\text{\color{red}{#1}}}
\def\gray#1{\color{gray!50}{#1}\color{black}}
\begin{document}
\section[Using Indifference Curves]{}
\begin{frame}{Deriving a Demand Curve: Step 5 of 5}
\begin{columns}[T]
\begin{column}{0.55\linewidth}
\textbf{STEPS:}
\begin{enumerate}
\item \gray{Let the price of $x$ be $p_0$. Plot an indifference curve and budget line. Mark the equilibrium at $x_0$.}
\item \gray{Drag it down to the diagram below and plot $(x_0,p_0)$.}
\item \gray{Say the price of $x$ falls to $p_1$. Pivot the budget line. Shift the indifference curve outwards and mark the new equilibrium at $x_1$.}
\item \gray{Repeat step (2) and plot $(x_1,p_1)$.}
\item Join the two points. Voila!
\end{enumerate}
\end{column}
\begin{column}{0.45\linewidth}
\begin{center} \begin{tikzpicture}[scale=0.7]
\footnotesize
\draw[->] (0,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,0) -- (0,4) node[above] {$y$};
\draw (0,0) plot [domain=0.4:3.8] (\x,1.4/\x);
\draw [red] (0,0) plot [domain=0.7:3.8] (\x,2.8/\x);
\draw (0,0) plot [domain=0:2] (\x,-\x*1.4 + 2.8);
\draw [red] (0,0) plot [domain=0:4] (\x,-\x*0.7 + 2.8);
\draw[red,fill] (2.1,1.35) circle [ radius =0.05];
\draw[fill] (1,1.45) circle [ radius =0.05];
\draw [dashed,red] (2.1,-4.5) node[below]{$x_1$} -- (2.1,1.35);
\draw [dashed] (1,-4.5)node[below]{$x_0$} -- (1,1.45);
%second set of axes
\draw[->] (0,-4.5) -- (4.2,-4.5) node[right] {$x$};
\draw[->] (0,-4.5) -- (0,-0.8) node[above] {$p_x$};
\draw[red,fill] (2.1,-3.5) circle [ radius =0.05];
\draw[fill] (1,-2) circle [ radius =0.05];
\draw[red,dashed] (2.1,-3.5) -- (0,-3.5) node[left]{$p_1$};
\draw[dashed] (1,-2) -- (0,-2) node[left]{$p_0$};
\draw[thick] (0.5,-1.3) -- (2.6,-4.2) node[right] {D$_x$};
\draw[->] (-0.3,-2.3) -- (-0.3,-3.2);
\draw[<-] (1.8,-4.7) -- (1.3,-4.7);
\end{tikzpicture}
\end{center}
\end{column}
\end{columns}
\end{frame}
% NewFrame
\end{document}
这是输出的图片:
我想修改两件事:
(1)在顶部的导航面板中,将文本“使用无差异曲线”更改为绿色,而不是红色。
(2)将框架标题行的背景颜色从蓝色(带白色文本)更改为黑色(带白色文本)。
我怎样才能实现这些?
答案1
标题部分的颜色可以通过 来控制\setbeamercolor{section in head/foot}{fg=green}
,但是这仅在您不通过设置禁用 beamers 颜色机制时才有效colorlinks = true
。
框架标题背景可以用 来设置\setbeamercolor{frametitle}{bg=black}
。
补充说明:
你不需要
hyperref
用 beamer加载请检查是否确实需要
\usepackage{sansmathaccent} \pdfmapfile{+sansmathaccent.map}
。无论如何,它的许多定义都会被忽略。
\documentclass{beamer}
\usetheme{Frankfurt}
\setbeamertemplate{navigation symbols}{}
\setbeamercolor{section in head/foot}{fg=green}
\setbeamercolor{frametitle}{bg=black}
\begin{document}
\section{Using Indifference Curves}
\begin{frame}{Deriving a Demand Curve: Step 5 of 5}
text
\end{frame}
\end{document}