海报布局:背景和方框

海报布局:背景和方框

我必须用乳胶制作一张海报来进行阐述。我对这张海报的布局有一个想法:用软木墙作为背景,用记事本作为盒子的样式,用小别针。我的想法可以实现吗?我添加了一张它看起来应该是什么样子的图片(应该是垂直格式)。谢谢帮助...在此处输入图片描述

答案1

改良版

您可以使用tcolorbox设计记事本;软木板只是背景中的一张图片。在下面的示例中,我使用了类beamer,但您可以将带有合适类/包的框用于海报:

在此处输入图片描述

代码(因为我选择使用equal height group,所以必须运行两次代码才能正确计算高度):

\documentclass[twocolumn]{beamer}
\usepackage[most]{tcolorbox}
\usetikzlibrary{shadows,shapes.geometric}
\usepackage{lipsum}

\definecolor{mybrown}{RGB}{33,34,28}
\definecolor{myyellow}{RGB}{242,226,149}
\definecolor{mygreen}{RGB}{176,232,145}
\definecolor{myblue}{RGB}{61,139,189}
\definecolor{myorange}{RGB}{245,156,74}
\definecolor{mypurple}{RGB}{230,111,148}
\definecolor{myred}{RGB}{215,80,50}

\newtcolorbox{NotePad}[2][]{%
  enhanced,
  frame code=empty,
  boxsep=0.5cm,
  top=0.6cm,
  interior code={
  \fill[#2,drop shadow]
    (interior.south west) {[rounded corners=1.5cm]--
    (interior.south east)} --
    (interior.north east) --
    (interior.north west) --
    cycle;
  \fill[#2!80!black] 
    ([shift={(-0.9cm,0.5ex)}]interior.south east) to[out=30,in=-70]
    ([shift={(-0.55cm,0.7cm)}]interior.south east) to[out=-10,in=220]
    ([shift={(-0.7ex,0.9cm)}]interior.south east) to[out=250,in=30]
    cycle;  
  \fill[mybrown]
    ([yshift=-10pt]interior.north) circle [radius=0.23cm];
  \fill[mybrown!40]
    ([yshift=-10pt]interior.north) circle [radius=0.175cm];
  \node[
    cylinder,
    cylinder uses custom fill, 
    cylinder end fill=mybrown!60,
    cylinder body fill=mybrown,
    rotate=115,
    minimum width=9pt,
    minimum height=16pt
  ] 
  at ([shift={(-0.2pt,-9.8pt)}]interior.north) {};
  },
  #1
}

\setbeamertemplate{background canvas}{%
  \includegraphics[width=\paperwidth,height=\paperheight]{corkboard}%
}

\begin{document}

\begin{frame}
\begin{columns}
\column{.5\textwidth}
\begin{NotePad}[width=\columnwidth,equal height group=A]{myyellow}
Some test text for this block
\end{NotePad}
\column{.5\textwidth}
\begin{NotePad}[width=\columnwidth,equal height group=A]{myblue}
Some test text for this block and some more text so it's a little longer
\end{NotePad}
\end{columns}

\begin{NotePad}[width=\textwidth]{mygreen}
Some test text for this block and some more text so it's a little longer
\end{NotePad}

\end{frame}


\begin{frame}

\begin{NotePad}[width=\textwidth]{myred}
Some test text for this block and some more text so it's a little longer
\end{NotePad}

\begin{columns}
\column{.5\textwidth}
\begin{NotePad}[width=\columnwidth,equal height group=B]{myorange}
Some test text for this block and here we add some more words for the notepad so it spans several lines
\end{NotePad}
\column{.5\textwidth}
\begin{NotePad}[width=\columnwidth,equal height group=B]{mypurple}
Some test text for this block and some more text so it's a little longer
\end{NotePad}
\end{columns}

\end{frame}

\end{document}

一个简单的概念证明:

在此处输入图片描述

软木板只是一个背景图片(我使用了一些我在publicdomainpictures.net)使用 TikZ 可以通过命令轻松生成记事本

\NotePad[<pin angle>]{<color>}{<text>}

代码:

\documentclass[varwidth=100cm,border=30pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shadows,shapes.geometric}
\usepackage{lipsum}

\definecolor{mybrown}{RGB}{33,34,28}
\definecolor{myyellow}{RGB}{242,226,149}
\definecolor{mygreen}{RGB}{176,232,145}
\definecolor{myblue}{RGB}{61,139,189}
\definecolor{myorange}{RGB}{245,156,74}
\definecolor{mypurple}{RGB}{230,111,148}
\definecolor{myred}{RGB}{215,80,50}

\newcommand\NotePad[3][100]{%
\begin{tikzpicture}
\fill[#2,drop shadow]
  (0,0) {[rounded corners=1.5cm]--
  ++(10,0)} --
  ++(0,10) --
  ++(-10,0) --
  cycle;
\fill[#2!80!black] 
  (9,0) to[out=30,in=-70]
  (9.35,0.75) to[out=-30,in=210]
  (10,1) to[out=240,in=30]
  (9,0);  
\fill[mybrown]
  (5,9.5) circle [radius=0.25cm];
\fill[mybrown!40]
  (5,9.5) circle [radius=0.20cm];
\node[
  cylinder,
  fill=mybrown,
  rotate=#1,
  minimum width=10pt,
  minimum height=18pt
  ] 
  at (5,9.52) {};
\node[text width=9cm,minimum height=8cm] at (5,5)
  {#3};
\end{tikzpicture}%
}

\begin{document}

\begin{tikzpicture}[overlay]
\node {\includegraphics[width=75cm]{corkboard}};
\end{tikzpicture}
\NotePad{myyellow}{Some test text}\quad
\NotePad[90]{mygreen}{Some test text}\quad
\NotePad[68]{myblue}{Some test text}\par\bigskip
\NotePad{myorange}{Some test text}\quad
\NotePad[90]{mypurple}{Some test text}\quad
\NotePad[68]{myred}{Some test text}

\end{document}

答案2

这个答案只是对 Gonzalo 的精彩答案的一个小补充。在他的tcolorbox解决方案中,Gonzalo 建议使用beamer及其columns环境来分发NotePad盒子。但是当 Gonzalo 写答案时,tcbposter库(来自tcolorbox)不可用。

以下代码显示了NotePad用 制作的盒子分布tcbposter。原始NotePad定义已从 翻译newtcolorboxtcolorbox-style

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows, shapes}
\usepackage[most]{tcolorbox}

\definecolor{mybrown}{RGB}{33,34,28}
\definecolor{myyellow}{RGB}{242,226,149}
\definecolor{mygreen}{RGB}{176,232,145}
\definecolor{myblue}{RGB}{61,139,189}
\definecolor{myorange}{RGB}{245,156,74}
\definecolor{mypurple}{RGB}{230,111,148}
\definecolor{myred}{RGB}{215,80,50}

\tcbset{
NotePad/.style={%
  enhanced,
  frame code=empty,
  boxsep=0.5cm,
  top=0.6cm,
  interior code={
  \fill[#1,drop shadow]
    (interior.south west) {[rounded corners=1.5cm]--
    (interior.south east)} --
    (interior.north east) --
    (interior.north west) --
    cycle;
  \fill[#1!80!black] 
    ([shift={(-0.9cm,0.5ex)}]interior.south east) to[out=30,in=-70]
    ([shift={(-0.55cm,0.7cm)}]interior.south east) to[out=-10,in=220]
    ([shift={(-0.7ex,0.9cm)}]interior.south east) to[out=250,in=30]
    cycle;  
  \fill[mybrown]
    ([yshift=-10pt]interior.north) circle [radius=0.23cm];
  \fill[mybrown!40]
    ([yshift=-10pt]interior.north) circle [radius=0.175cm];
  \node[
    cylinder,
    cylinder uses custom fill, 
    cylinder end fill=mybrown!60,
    cylinder body fill=mybrown,
    rotate=115,
    minimum width=9pt,
    minimum height=16pt
  ] 
  at ([shift={(-0.2pt,-9.8pt)}]interior.north) {};
  },
}}



\begin{document}
\begin{tcbposter}[%
    poster={columns=3, rows=3},
    coverage={interior style image=cork-board}
    ]
    \posterbox[NotePad=myyellow]{name=A, column=1, span=2}{Some test text for this block}
    \posterbox[NotePad=myblue]{name=B, column=3, rowspan=3}{Some test text for this block}
    \posterbox[NotePad=myorange]{name=C, between=A and bottom, span=2}{Some test text for this block}
    \posterbox[NotePad=mypurple]{column=2, row=2, span=1.5, rowspan=1.5}{Some test text for this block}
    \posterbox[NotePad=mygreen]{at=C.west, xshift=1cm, yshift=-2cm}{Some test text for this block}

\end{tcbposter}

\end{document}

在此处输入图片描述

相关内容