Beamer: estilos personalizados para entornos

Beamer: estilos personalizados para entornos

Enproyector, hay algunos estilos (colores) predefinidos comoplano,teorema,definiciónyobservación. Mi primera pregunta es¿Dónde puedo encontrar la lista de estos estilos?y el segundo es¿Cómo puedo crear mi propio estilo?Por ejemplo, quiero aplicarnaranjacolor para comentarios.

Respuesta1

Así es como puedes definir fácilmente nuevos bloques personalizados similares a teoremas; la idea es definir un nuevo estilo con configuraciones personalizadas y luego usar este nuevo estilo para sus estructuras:

\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}

ingrese la descripción de la imagen aquí

Configuraciones relevantes para la definición de estructuras tipo teorema:

En el archivo beamerbasetheorems.styencuentras:

\def\th@example{\th@remark}

y

\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}}

lo que significa que el exampleestilo es el mismo que el estilo de observación; el plainestilo se utiliza para teoremas, corolarios, lemas, problemas, soluciones. El definitionestilo se aplica a las definiciones y el exampleestilo a los ejemplos.

También podrían ser relevantes las líneas

\def\inserttheoremheadfont{\the\thm@headfont}
  \def\inserttheoremblockenv{block}

  \def\th@example{%
    \normalfont % body font
    \def\inserttheoremblockenv{exampleblock}
  }

que muestran básicamente que para el ejemplo exampleblockse usa el estilo, pero para todas las demás estructuras similares a teoremas block.

En beamerbaseauxtemplates.styuno se encuentra:

\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}}

información relacionada