%3F.png)
He estado armando una nueva plantilla de proyector y no puedo resolver algunos últimos problemas. Un ejemplo de trabajo mínimo que resalta estos problemas es el siguiente (no parece mínimo, pero creo que lo es):
\documentclass{beamer}
\makeatletter
\def\th@mystyle{
\normalfont
\setbeamercolor{block title example}{bg=orange,fg=white}
\setbeamercolor{block body example}{bg=orange!20,fg=black}
\def\inserttheoremblockenv{exampleblock}
}
\makeatother
\theoremstyle{mystyle}
\newtheorem{que}{Question}
\usepackage{fontspec}
\setmainfont{Verdana}
\begin{document}
\section{Boxes}
\frame{
\frametitle{Boxes}
\fontspec{Cambria}
\setbeamercolor{postit}{fg=black,bg=orange!20} \begin{beamercolorbox}[rounded=false,shadow=true]{postit} How to inflate these two boxes such that their size... \end{beamercolorbox}
\setbeamercolor{postit}{fg=black,bg=green}
\begin{beamercolorbox}[rounded=false,shadow=true]{postit}...is precisely consistent with that of the third box?\end{beamercolorbox}
~\\
\begin{que}[About this box]
How to get such a box with arbitrary content, i.e. basically without it being a kind of theorem/definition? (Right now, the title is at least ``Question ()'')
\end{que}
~\\
\begin{que}[About the font]
How to apply the font change visible in the first two boxes to the whole presentation or at least the whole frame?
\end{que}
}
\end{document}
Ahora tengo tres preguntas:
Los cuadros de teoremas incluyen algún margen alrededor del texto, que prefiero. ¿Cómo puedo adaptar los márgenes para que todos los cuadros sean perfectamente consistentes?
Dado que los cuadros de "Preguntas" corresponden a entornos de teoremas, no puedo llenar libremente la parte superior ("título del bloque"), que me gustaría. Por supuesto, esto equivaldría en cierto sentido a pegar los dos primeros cuadros o cambiar la configuración de color dentro de un cuadro. ¿Cómo puedo hacer eso?
Esperaría que esto se solucionara fácilmente, pero nada de lo que encontré hasta ahora funcionó: me gustaría que el cambio de fuente se aplicara a toda la presentación (es decir, a todo el texto excepto a los títulos). ¿Cómo puedo hacer eso?
Respuesta1
Respuesta al problema básico.
Sospecho lo que realmente quieres saber: puedes usar bloques de proyección como este
\begin{block}{<block title>}
<block content>
\end{block}
( beamercolorbox
es algo para "detrás de escena" - si realmente no lo necesita directamente, use las construcciones del proyector que se encargarán de toda la configuración - eso es mucho más fácil)
\documentclass{beamer}
\setbeamercolor{block title}{bg=orange,fg=white}
\setbeamercolor{block body}{bg=orange!20,fg=black}
\begin{document}
\begin{frame}
\frametitle{Boxes}
\begin{block}{How to inflate these two boxes such that their size...}
...is precisely consistent with that of the third box?
\end{block}
\end{frame}
\end{document}
Responda las subpreguntas individuales
Los cuadros de teoremas incluyen algún margen alrededor del texto, que prefiero. ¿Cómo puedo adaptar los márgenes para que todos los cuadros sean perfectamente consistentes?
simplemente use block
s. Como block
los correos electrónicos tienen un título obligatorio y los dos primeros cuadros no tenían título, \setbeamertemplate{block begin}{...}
es necesario redefinirlo.
Dado que los cuadros de "Preguntas" corresponden a entornos de teoremas, no puedo llenar libremente la parte superior ("título del bloque"), que me gustaría. Por supuesto, esto equivaldría en cierto sentido a pegar los dos primeros cuadros o cambiar la configuración de color dentro de un cuadro. ¿Cómo puedo hacer eso?
De nuevo la respuesta es "usa block
s"
Esperaría que esto se solucionara fácilmente, pero nada de lo que encontré hasta ahora funcionó: me gustaría que el cambio de fuente se aplicara a toda la presentación (es decir, a todo el texto excepto a los títulos). ¿Cómo puedo hacer eso?
Si configura \fontspec{Cambria}
al comienzo de su presentación, todo el texto normal estará en Cambria, los títulos de marcos, bloques, etc. permanecerán en Verdana. Para cambiarlos, puedes ajustarlos \setbeamerfont{block title}{...}
.
% !TEX TS-program = xelatex
\documentclass{beamer}
\makeatletter
\def\th@mystyle{
\normalfont
\setbeamercolor{block title example}{bg=orange,fg=white}
\setbeamercolor{block body example}{bg=orange!20,fg=black}
\def\inserttheoremblockenv{exampleblock}
}
\makeatother
\theoremstyle{mystyle}
\newtheorem{que}{Question}
\setbeamercolor{block body}{fg=black,bg=orange!20}
\setbeamercolor{block title}{bg=orange,fg=white}
\usepackage{xstring}
\setbeamertemplate{block begin}
{
\par\vskip\medskipamount%
\IfStrEq{\insertblocktitle}{}{}{
\begin{beamercolorbox}[colsep*=.75ex]{block title}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
}
{\parskip0pt\par}%
\ifbeamercolorempty[bg]{block title}
{}
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[colsep*=.75ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\usepackage{fontspec}
\setmainfont{Verdana}
\begin{document}
\fontspec{Cambria}
\section{Boxes}
\begin{frame}
\frametitle{Boxes}
\begin{block}{}
How to inflate these two boxes such that their size...
\end{block}
{
\setbeamercolor{block body}{fg=black,bg=green}
\begin{block}{}
precisely consistent with that of the third box?
\end{block}
}
\begin{block}{About this box}
How to get such a box with arbitrary content, i.e. basically without it being a kind of theorem/definition? (Right now, the title is at least ``Question ()'')
\end{block}
\end{frame}
\end{document}