%3F.png)
Estou montando um novo modelo de projetor e não consigo resolver alguns dos últimos problemas. Um exemplo prático mínimo que destaca esses problemas é o seguinte (não parece mínimo, mas sinto que é):
\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}
Agora tenho três perguntas:
As caixas de teoremas incluem alguma margem ao redor do texto, o que eu prefiro. Como posso adaptar as margens para que todas as caixas fiquem perfeitamente consistentes?
Como as caixas de "Pergunta" correspondem a ambientes de teoremas, não posso preencher livremente a parte superior ("título do bloco"), o que gostaria. Claro, isso seria, em certo sentido, equivalente a colar as duas primeiras caixas ou alterar as configurações de cores dentro de uma caixa. Como eu posso fazer isso?
Eu esperaria que isso fosse facilmente corrigido, mas nada do que encontrei até agora funcionou: gostaria que a alteração da fonte se aplicasse a toda a apresentação (ou seja, a todo o texto, exceto títulos). Como eu posso fazer isso?
Responder1
Resposta ao problema básico
Suspeito o que você realmente quer saber: você pode usar blocos de projetor como este
\begin{block}{<block title>}
<block content>
\end{block}
( beamercolorbox
é algo para "nos bastidores" - se você realmente não precisa dele diretamente, use as construções do beamer que cuidarão de toda a configuração - isso é muito mais 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 às subperguntas individuais
As caixas de teoremas incluem alguma margem ao redor do texto, o que eu prefiro. Como posso adaptar as margens para que todas as caixas fiquem perfeitamente consistentes?
simplesmente use block
s. Como block
s têm título obrigatório e suas duas primeiras caixas não tinham título, \setbeamertemplate{block begin}{...}
precisa ser redefinido.
Como as caixas de "Pergunta" correspondem a ambientes de teoremas, não posso preencher livremente a parte superior ("título do bloco"), o que gostaria. Claro, isso seria, em certo sentido, equivalente a colar as duas primeiras caixas ou alterar as configurações de cores dentro de uma caixa. Como eu posso fazer isso?
Novamente a resposta é "use block
s"
Eu esperaria que isso fosse facilmente corrigido, mas nada do que encontrei até agora funcionou: gostaria que a alteração da fonte se aplicasse a toda a apresentação (ou seja, a todo o texto, exceto títulos). Como eu posso fazer isso?
Se você definir \fontspec{Cambria}
no início da sua apresentação todo o texto normal ficará em Cambria, os títulos dos frames, blocos etc. permanecerão Verdana. Para alterá-los, você pode ajustar \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}