
그래서 저는 beamer
. 저는 몇 가지 다른 블록 유형 환경을 사용자 정의할 수 있기를 원하지만 이에 대한 최선의 방법을 잘 모르겠습니다. 또한, 서로 다른 패키지와 테마 간에 충돌이 발생할 수 있다는 사실 때문에 혼란스럽습니다. 지금까지 나는 두 가지 접근 방식을 탐색해 왔습니다. (1) 내부의 block
s, alert block
s 및 example block
s를 변경하고 beamer
(2) \newenvironment
.
나는 둘 중 하나에 성공하지 못했고 둘 다에 대해 몇 가지 질문이 있습니다. 두 경우 모두 내가 사용하는 기본 코드는 다음과 같습니다.
\documentclass[final]{beamer}
\usepackage[scale=0.90]{beamerposter} %scale is for fontsize?
\usepackage[absolute,overlay]{textpos}
\usepackage{color}
\usepackage{tikz}
\usepackage{amsmath,amssymb,latexsym}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{1 cm}
\usetheme{confposter}
\title{Title}
\author{Some People}
\institute{Department of Blah}
\begin{document}
\begin{textblock}{0.3}(.01,10)
\begin{exampleblock}{An exampleblock environment}
Some text.
\end{exampleblock}
\begin{block}{A block environment}
Some text.
\end{block}
\begin{alertblock}{An alertblock environment}
Some text.
\end{alertblock}
\end{textblock}
\end{document}
먼저 접근 방식 (1)을 사용하여 세 가지 유형의 블록을 독립적으로 변경하고 정의하여 원하는 대로 세 가지 고유한 텍스트 상자 유형을 얻을 수 있도록 하고 싶습니다. 매뉴얼을 보면 사용할 수는 있지만 수정이 불가능 하고 차단되는 것으로 beamer
나와 있습니다 . 또한 명령의 다양한 옵션에 대한 자세한 설명을 찾을 수 없습니다 . 나는 와 같은 미리 만들어진 색상 테마를 가지고 놀았으며 기본적으로 그들이 하는 일을 나 자신이 하고 싶습니다. 라텍스 문서 내의 유사한 변경 사항에 개인적으로 영향을 미칠 수 있는 방법이 있습니까? 또한 블록의 템플릿에 영향/충돌이 발생합니까? 꺼내면 제목이나 작가 등이 상단에 정리되지 않아서 그냥 사용하고 있어요.\setbeamertemplate{block}
alert
example
\setbeamertemplate
whale
orchid
\usetheme{confposter}
내가 가지고 놀고 있던 다른 접근 방식 (2)은 \newenvironment
다음을 기반으로 시도한 것 입니다.LaTeX 비머에서 새로운 블록 환경 정의. 예를 들어
\newenvironment<>{test1}[1][]{
\setbeamercolor{block body example}{fg=black,bg=blue}
\setbeamercolor{block title example}{fg=white,bg=red!75!black}
\setbeamertemplate{blocks}[rounded][shadow=false]
\begin{example}[]}{\end{example}
}
그런 다음 호출
\begin{test1}[blah title]
stuff
\end{test1}
그러나 .NET의 옵션을 실제로 자세히 설명하는 추가 문서를 찾을 수 없습니다 \newenvironment
. 예를 들어 제목 등의 예를 말하지 않을 수 없었습니다. \newenvironment
관련 옵션에 대한 일부 문서의 방향을 알려줄 수 있습니까?
전반적으로 이러한 접근 방식 중 하나가 좋다고 생각하시나요? 내 목표와 관련된 다른 것이나 자세한 문서를 제안해 주실 수 있나요?
답변1
다음을 사용하여 각 종류의 블록에 대한 전경 및 배경의 색상 속성을 독립적으로 변경할 수 있습니다.
%For example blocks \setbeamercolor{block title example}{fg=red,bg=orange} \setbeamercolor{block body example}{fg=cyan,bg=yellow} %For alert blocks \setbeamercolor{block title alerted}{fg=olive,bg=pink} \setbeamercolor{block body alerted}{fg=blue,bg=magenta} %For blocks \setbeamercolor{block title}{fg=white,bg=blue} \setbeamercolor{block body}{fg=white,bg=green!40!black}
원하는 경우 동일한 이름의 글꼴 템플릿을 사용하여 글꼴 속성을 제어할 수도 있습니다.
예제 코드:
\documentclass[final]{beamer} \usepackage[scale=0.90]{beamerposter} %scale is for fontsize? \usepackage[absolute,overlay]{textpos} \usepackage{color} \usepackage{tikz} \usepackage{amsmath,amssymb,latexsym} \setlength{\TPHorizModule}{\paperwidth} \setlength{\TPVertModule}{1 cm} %For example blocks \setbeamercolor{block title example}{fg=red,bg=orange} \setbeamercolor{block body example}{fg=cyan,bg=yellow} %For alert blocks \setbeamercolor{block title alerted}{fg=olive,bg=pink} \setbeamercolor{block body alerted}{fg=blue,bg=magenta} %For blocks \setbeamercolor{block title}{fg=white,bg=blue} \setbeamercolor{block body}{fg=white,bg=green!40!black} %\usetheme{confposter} \title{Title} \author{Some People} \institute{Department of Blah} \begin{document} \begin{textblock}{0.3}(.01,10) \begin{exampleblock}{An exampleblock environment} Some text. \end{exampleblock} \begin{block}{A block environment} Some text. \end{block} \begin{alertblock}{An alertblock environment} Some text. \end{alertblock} \end{textblock} \end{document}
나는 당신이 를 살펴 보는 것이 좋습니다
tcolorbox
beamer
새로운 유형의 블록을 정의하기 위해 스킨 과 함께 패키지화합니다 . 여기에 작은 예가 있습니다:\documentclass[final,dvipsnames]{beamer} \usepackage[scale=0.90]{beamerposter} %scale is for fontsize? \usepackage[absolute,overlay]{textpos} \usepackage{color} \usepackage{tikz} \usetikzlibrary{shadings} \usepackage{amsmath,amssymb,latexsym} \usepackage[many]{tcolorbox} %\usetheme{confposter} \newtcolorbox{myblock}[1][]{ beamer, width=\textwidth+7pt, enlarge left by=-3pt, colframe=block body.bg, bottom=0pt, top=-2pt, left=0pt, right=0pt, toptitle=-1pt, bottomtitle=-1pt, fonttitle=\normalfont, adjusted title=#1, interior titled code={ \shade[left color=Maroon!80,right color=Dandelion,middle color=Salmon] (title.south west) -- (title.south east) {[rounded corners] -- (title.north east) -- (title.north west)} -- (title.south west); } } \title{Title} \author{Some People} \institute{Department of Blah} \begin{document} \begin{frame} \begin{columns} \column{0.3\textwidth} \begin{block}{A standard block} This box ia a box provided by the \texttt{beamer} class. \end{block} \begin{myblock}[An example with \texttt{tcolorbox}] This box looks like a box provided by the \texttt{beamer} class. \end{myblock} \end{columns} \end{frame} \end{document}
결과: