
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}
Configuraciones relevantes para la definición de estructuras tipo teorema:
En el archivo beamerbasetheorems.sty
encuentras:
\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 example
estilo es el mismo que el estilo de observación; el plain
estilo se utiliza para teoremas, corolarios, lemas, problemas, soluciones. El definition
estilo se aplica a las definiciones y el example
estilo 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 exampleblock
se usa el estilo, pero para todas las demás estructuras similares a teoremas block
.
En beamerbaseauxtemplates.sty
uno 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}}