%EC%9D%80%20%EB%AC%B4%EC%97%87%EC%9E%85%EB%8B%88%EA%B9%8C%3F.png)
나는 새로운 비머 템플릿을 만들고 있는데 몇 가지 마지막 문제를 해결할 수 없습니다. 이러한 문제를 강조하는 최소한의 작업 예는 다음과 같습니다(최소해 보이지는 않지만 그렇다고 생각합니다).
\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}
이제 세 가지 질문이 있습니다.
정리 상자에는 내가 선호하는 텍스트 주위에 약간의 여백이 포함되어 있습니다. 모든 상자가 완벽하게 일치하도록 여백을 어떻게 조정할 수 있습니까?
"질문" 상자는 정리 환경에 해당하므로 원하는 상단 부분("블록 제목")을 자유롭게 채울 수 없습니다. 물론 이는 어떤 의미에서는 처음 두 상자를 서로 붙이거나 한 상자 내에서 색상 설정을 변경하는 것과 동일합니다. 어떻게 해야 합니까?
나는 이 문제가 쉽게 해결될 것이라고 기대했지만 지금까지 찾은 어떤 것도 효과가 없었습니다. 글꼴 변경을 전체 프리젠테이션(예: 제목을 제외한 모든 텍스트)에 적용하고 싶습니다. 어떻게 해야 합니까?
답변1
기본 문제에 대한 답
나는 당신이 정말로 알고 싶어하는 것이 무엇인지 의심합니다. 다음과 같이 비머 블록을 사용할 수 있습니다.
\begin{block}{<block title>}
<block content>
\end{block}
( beamercolorbox
"비하인드 스토리"를 위한 것입니다. 실제로 직접적으로 필요하지 않은 경우 모든 구성을 처리하는 비머 구성을 사용하십시오. 훨씬 쉽습니다)
\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}
개별 하위 질문에 답하세요.
정리 상자에는 내가 선호하는 텍스트 주위에 약간의 여백이 포함되어 있습니다. 모든 상자가 완벽하게 일치하도록 여백을 어떻게 조정할 수 있습니까?
간단히 block
s를 사용하세요. 에는 필수 제목이 있고 block
처음 두 상자에는 제목이 없으므로 \setbeamertemplate{block begin}{...}
재정의해야 합니다.
"질문" 상자는 정리 환경에 해당하므로 원하는 상단 부분("블록 제목")을 자유롭게 채울 수 없습니다. 물론 이는 어떤 의미에서는 처음 두 상자를 서로 붙이거나 한 상자 내에서 색상 설정을 변경하는 것과 동일합니다. 어떻게 해야 합니까?
이번에도 대답은 " block
s를 사용하세요" 입니다.
나는 이 문제가 쉽게 해결될 것이라고 기대했지만 지금까지 찾은 어떤 것도 효과가 없었습니다. 글꼴 변경을 전체 프리젠테이션(예: 제목을 제외한 모든 텍스트)에 적용하고 싶습니다. 어떻게 해야 합니까?
\fontspec{Cambria}
프레젠테이션 시작 부분에 설정하면 모든 일반 텍스트는 Cambria로 표시되고 프레임, 블록 등의 제목은 Verdana로 유지됩니다. 이를 변경하려면 조정하면 됩니다 \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}