Beamer: estilos personalizados para ambientes

Beamer: estilos personalizados para ambientes

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}

insira a descrição da imagem aqui

Configurações relevantes para definição de estruturas semelhantes a teoremas:

No arquivo beamerbasetheorems.styvocê 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 exampleestilo é igual ao estilo de observação; o plainestilo é usado para teoremas, corolários, lemas, problemas, soluções. O definitionestilo se aplica às definições e o exampleestilo 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 exampleblockestruturas semelhantes a teoremas .block

Em beamerbaseauxtemplates.styum 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}}

informação relacionada