需要环境方面的帮助

需要环境方面的帮助

我在我的代码中为投影仪写了这个:

\documentclass[11pt]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usetheme{Dresden}
\definecolor{studentblue}{RGB}{37,34,140}
\BeforeBeginEnvironment{definition}{
    \setbeamercolor{block title}{fg=white,bg=studentblue}
    \setbeamercolor{block body}{fg=black, bg=studentblue!20!white}
}

\AfterEndEnvironment{definition}{
    \setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}
    \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}
}
\begin{document}
\begin{frame}
\begin{definition}
test
\end{definition}
\end{frame}
\end{document}

获得一个具有这些颜色并以“定义”作为块标题的块。我想更改标题中的单词,我认为更改花括号之间 \BeforeBeginEnvironment 和 \AfterEndEnvironment 之后的单词就足够了,但事实并非如此。我该怎么办?谢谢

答案1

不确定为什么,但似乎需要明确加载意大利语才能translator工作。

\documentclass[11pt]{beamer}
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}

\usetheme{Dresden}

\uselanguage{Italian}
\languagealias{italian}{Italian}

\definecolor{studentblue}{RGB}{37,34,140}

\BeforeBeginEnvironment{definition}{%
    \setbeamercolor{block title}{fg=white,bg=studentblue}%
    \setbeamercolor{block body}{fg=black, bg=studentblue!20!white}%
}
\AfterEndEnvironment{definition}{%
    \setbeamercolor{block title}{use=structure,fg=white,bg=structure.fg!75!black}%
    \setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!10!bg}%
}
\begin{document}
\begin{frame}
\begin{definition}
test
\end{definition}
\end{frame}
\end{document}

在此处输入图片描述

相关内容