
Emprojetor, existem alguns estilos predefinidos (cor) comosimples,teorema,definiçãoeobservação. Minha primeira pergunta éonde posso encontrar a lista desses estilos?e o segundo écomo posso criar meu próprio estilo?Por exemplo, quero me inscreverlaranjacor para comentários.
Responder1
Veja como você pode definir facilmente novos blocos personalizados semelhantes a teoremas; a ideia é definir um novo estilo com configurações personalizadas e depois usar esse novo estilo para suas estruturas:
\documentclass{beamer}
\usetheme{Warsaw}
\makeatletter
\def\th@mystyle{%
\normalfont % body font
\setbeamercolor{block title example}{bg=orange,fg=white}
\setbeamercolor{block body example}{bg=orange!20,fg=black}
\def\inserttheoremblockenv{exampleblock}
}
\makeatother
\theoremstyle{mystyle}
\newtheorem*{remark}{Remark}
\begin{document}
\begin{frame}
\begin{theorem}[An important theorem]
Some text
\end{theorem}
\begin{remark}[Some important remark]
Some text
\end{remark}
\end{frame}
\end{document}
Configurações relevantes para definição de estruturas semelhantes a teoremas:
No arquivo beamerbasetheorems.sty
você encontra:
\def\th@example{\th@remark}
e
\ifbeamer@countsect
\newtheorem{theorem}{\translate{Theorem}}[section]
\else
\newtheorem{theorem}{\translate{Theorem}}
\fi
\newtheorem{corollary}[theorem]{\translate{Corollary}}
\newtheorem{fact}[theorem]{\translate{Fact}}
\newtheorem{lemma}[theorem]{\translate{Lemma}}
\newtheorem{problem}[theorem]{\translate{Problem}}
\newtheorem{solution}[theorem]{\translate{Solution}}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{\translate{Definition}}
\newtheorem{definitions}[theorem]{\translate{Definitions}}
\theoremstyle{example}
\newtheorem{example}[theorem]{\translate{Example}}
\newtheorem{examples}[theorem]{\translate{Examples}}
o que significa que o example
estilo é igual ao estilo de observação; o plain
estilo é usado para teoremas, corolários, lemas, problemas, soluções. O definition
estilo se aplica às definições e o example
estilo aos exemplos.
Também relevantes podem ser as linhas
\def\inserttheoremheadfont{\the\thm@headfont}
\def\inserttheoremblockenv{block}
\def\th@example{%
\normalfont % body font
\def\inserttheoremblockenv{exampleblock}
}
que mostram basicamente que para o exemplo estilo é usado, mas para todos os outros teoremas são usadas exampleblock
estruturas semelhantes a teoremas .block
Em beamerbaseauxtemplates.sty
um deles encontra-se:
\defbeamertemplate{theorem begin}{ams style}
{%
\begin{\inserttheoremblockenv}
{%
\inserttheoremheadfont
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
\inserttheorempunctuation
}%
}
\defbeamertemplate{theorem end}{ams style}
{\end{\inserttheoremblockenv}}
\defbeamertemplate{theorem begin}{numbered}
{%
\begin{\inserttheoremblockenv}
{%
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
}%
}
\defbeamertemplate{theorem end}{numbered}
{\end{\inserttheoremblockenv}}
\defbeamertemplate{theorem begin}{normal font}
{
\normalfont
\begin{\inserttheoremblockenv}
{%
\inserttheoremname
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
}%
}
\defbeamertemplate{theorem end}{normal font}
{\end{\inserttheoremblockenv}}