文档第 3 部分的封面

文档第 3 部分的封面

此封面是根据以下解决方案构建的:封面或文档第 2 部分我现在试图在封面上放置一个迷你页面和一个带有模糊阴影的徽标,如下所示:

在此处输入图片描述

以下是目前编写的代码:

\documentclass[11pt,letterpaper]{article}
\usepackage{libertine}
\usepackage{tikz}
\usetikzlibrary{backgrounds, calc, shadows, shadows.blur}

\usepackage{graphicx}

\pgfmathdeclarerandomlist{MyRandomColors}{%
    {red}%
    {red!25}%
    {magenta}%
    {magenta!25}%
    {olive}%
    {olive!25}%
    {brown}%
    {brown!10}%
    {violet}%
    {violet!25}%
    {gray}%
    {purple}%
    {yellow}%
    {orange}%
    {orange!25}%
    {cyan}%
    {green}%
}%

\definecolor{titlecolor1}{rgb}{.9,0.40,0.7}

\newcommand*{\GridSize}{20}

%#2-Gridsizex
%#3-Gridsizey
\newcommand*{\ColorCells}[2]{%
    \foreach \y in {1,...,#1} {
        \foreach \x in {1,...,#2} {
            \pgfmathrandomitem{\RandomColor}{MyRandomColors}
            \draw [draw=olive!45,fill=\RandomColor, fill opacity=0.2, ultra thick]
                ([shift={(\x-1,\y-1)}]current page.south west) rectangle ++(1cm,1cm);
        }%
    }%
}%

\listfiles
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
    \begin{scope}[scale=0.8,ultra thick,olive!45]
        \ColorCells{35}{27}
        \coordinate (input);
    \end{scope}

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{70}{70}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(.25,1)$)
{Depression Problems and Active Modeling};

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{20}{20}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(-5.5,21)$)
{(Spring 2016)};

\node[above right,
node font=\fontsize{40}{90}\selectfont\bfseries\sffamily,
text=titlecolor1!20!black] at ($(current page.south west)+(1,1)$)
{Jimmy Jones Jeremy};

%\tikzoverlay at (-4.37cm,3cm) {
%\begin{tikzpicture} \node [blur shadow]{
%        \includegraphics[scale=.15]{Logo}
%    };



\end{tikzpicture}

\begin{minipage}[l]{10cm}
Contributor: Dixie Wang\\
Date: February 15th, 2016\\
Filed: February 15th, 2016
\end{minipage}

\end{document}

我需要帮助让封面看起来像附图一样吗?谢谢。

答案1

常规node(具有所有定位选项)可用于logo,例如:

\node[blur shadow, anchor=north west] at 
     ($(current page.north west)+(1,-1)$) 
     {\includegraphics[width=5cm, height=4cm]{example-image}};

将会完成这项工作。

类似的解决方案也适用于minipage。实际上,您不需要 minipage 来定义多行,只需使用和node等选项即可。会自动换行,因此在您的情况下不需要这样做,因为您使用 来换行。text widthaligntext width\\

\node[blur shadow, text width=11cm, align=left, draw, anchor=south east,     
      fill=white] at ($(current page.south east)+(-6,5)$){ 
          Contributor: Dixie Wang\\
          Date: February 15th, 2016\\
          Filed: February 15th, 2016}; 

完整代码:

\documentclass[11pt,letterpaper]{article}
\usepackage{libertine}
\usepackage{tikz}
\usetikzlibrary{backgrounds, calc, shadows, shadows.blur}

\usepackage{graphicx}

\pgfmathdeclarerandomlist{MyRandomColors}{%
    {red}%
    {red!25}%
    {magenta}%
    {magenta!25}%
    {olive}%
    {olive!25}%
    {brown}%
    {brown!10}%
    {violet}%
    {violet!25}%
    {gray}%
    {purple}%
    {yellow}%
    {orange}%
    {orange!25}%
    {cyan}%
    {green}%
}%

\definecolor{titlecolor1}{rgb}{.9,0.40,0.7}

\newcommand*{\GridSize}{20}

%#2-Gridsizex
%#3-Gridsizey
\newcommand*{\ColorCells}[2]{%
    \foreach \y in {1,...,#1} {
        \foreach \x in {1,...,#2} {
            \pgfmathrandomitem{\RandomColor}{MyRandomColors}
            \draw [draw=olive!45,fill=\RandomColor, fill opacity=0.2, ultra thick]
                ([shift={(\x-1,\y-1)}]current page.south west) rectangle ++(1cm,1cm);
        }%
    }%
}%

\listfiles
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]

\begin{scope}[scale=0.8,ultra thick,olive!45]
    \ColorCells{35}{27}
\end{scope}

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{70}{70}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(.25,1)$)
{Depression Problems and Active Modeling};

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{20}{20}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(-5.5,21)$)
{(Spring 2016)};

\node[above right,
node font=\fontsize{40}{90}\selectfont\bfseries\sffamily,
text=titlecolor1!20!black] at ($(current page.south west)+(1,1)$)
{Jimmy Jones Jeremy};

\node[blur shadow, anchor=north west] at ($(current page.north west)+(1,-1)$) {\includegraphics[width=5cm, height=4cm]{example-image}};

\node[blur shadow, text width=10cm, align=left, draw, anchor=south east, fill=white] at ($(current page.south east)+(-6,5)$){ 
Contributor: Dixie Wang\\
Date: February 15th, 2016\\
Filed: February 15th, 2016};

\end{tikzpicture}

\end{document}

在此处输入图片描述

更新:彩色“小页面”

虽然没有明确要求,但我尝试模仿所谓的方形、彩色和阴影方面minipage。我发现的最佳解决方案是向\ColorCells命令添加更多参数,并使用一个空的但有阴影的节点,稍后将覆盖彩色单元格和文本。

在此处输入图片描述 \Colorcells现在有五个参数,左下角的坐标、水平和垂直尺寸(平方数)、颜色列表和fill opacity

%#1-Origin: bottom left corner
%#2-Gridsizex
%#3-Gridsizey
%#4-ColorList
%#5-Opacity
\newcommand*{\ColorCells}[5]{%
    \foreach \y in {1,...,#3} {
        \foreach \x in {1,...,#2} {
            \pgfmathrandomitem{\RandomColor}{#4}
            \draw [draw=olive!45,fill=\RandomColor, fill opacity=#5, ultra thick]
                ([shift={(\x-1,\y-1)}]#1) rectangle ++(1cm,1cm);
        }%
    }%
}%

minipage现在使用命令绘制整页背景和颜色:

\begin{scope}[scale=0.8,ultra thick,olive!45]
    \ColorCells{current page.south west}{27}{35}{MyRandomColors}{0.2}
    \node[blur shadow, fit={($(current page.south west)+(9.2,5.2)$) 
         ($(current page.south west)+(20.2,9.2)$)}, inner sep=0pt] (fitaux) {};
    \coordinate (aux) at ($(current page.south west)+(9.2,5.2)$);
    \ColorCells{aux}{11}{4}{MyRandomColorsTwo}{1}
    \node[align=left, node font=\LARGE, text=white] at (fitaux.center) { 
          Contributor: Dixie Wang\\
          Date: February 15th, 2016\\
          Filed: February 15th, 2016}; 
\end{scope}

首先ColorCells绘制页面背景。接下来绘制一个空节点,为使用第二个命令绘制的彩色部分添加阴影ColorCells,最后使用常规节点添加文本。此小页面已从背景网格中错位,以增加叠加效果。

第二版完整代码:

\documentclass[11pt,letterpaper]{article}
\usepackage{libertine}
\usepackage{tikz}
\usetikzlibrary{calc, shadows, shadows.blur, fit}

\usepackage{graphicx}

\pgfmathdeclarerandomlist{MyRandomColors}{%
    {red}%
    {red!25}%
    {magenta}%
    {magenta!25}%
    {olive}%
    {olive!25}%
    {brown}%
    {brown!10}%
    {violet}%
    {violet!25}%
    {gray}%
    {purple}%
    {yellow}%
    {orange}%
    {orange!25}%
    {cyan}%
    {green}%
}%

\pgfmathdeclarerandomlist{MyRandomColorsTwo}{%
    {red!70!black}%
    {magenta!70!black}%
    {olive!70!black}%
    {brown!70!black}%
    {violet!70!black}%
}%

\definecolor{titlecolor1}{rgb}{.9,0.40,0.7}

\newcommand*{\GridSize}{20}

%#1-Origin
%#2-Gridsizex
%#3-Gridsizey
%#4-ColorList
%#5-Opacity
\newcommand*{\ColorCells}[5]{%
    \foreach \y in {1,...,#3} {
        \foreach \x in {1,...,#2} {
            \pgfmathrandomitem{\RandomColor}{#4}
            \draw [draw=olive!45,fill=\RandomColor, fill opacity=#5, ultra thick]
                ([shift={(\x-1,\y-1)}]#1) rectangle ++(1cm,1cm);
        }%
    }%
}%

\listfiles
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay
]

\begin{scope}[scale=0.8,ultra thick,olive!45]
    \ColorCells{current page.south west}{27}{35}{MyRandomColors}{0.2}
    \node[blur shadow, fit={($(current page.south west)+(9.2,5.2)$) ($(current page.south west)+(20.2,9.2)$)}, inner sep=0pt] (fitaux) {};
    \coordinate (aux) at ($(current page.south west)+(9.2,5.2)$);
    \ColorCells{aux}{11}{4}{MyRandomColorsTwo}{1}
    \node[align=left, node font=\LARGE, text=white] at (fitaux.center) { 
          Contributor: Dixie Wang\\
          Date: February 15th, 2016\\
          Filed: February 15th, 2016}; 
\end{scope}

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{70}{70}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(.25,1)$)
{Depression Problems and Active Modeling};

\node[rotate=90, above right,text width=26cm,
node font=\fontsize{20}{20}\selectfont\bfseries\sffamily,
text=titlecolor1] at ($(current page.south east)+(-5.5,21)$)
{(Spring 2016)};

\node[above right,
node font=\fontsize{40}{90}\selectfont\bfseries\sffamily,
text=titlecolor1!20!black] at ($(current page.south west)+(1,1)$)
{Jimmy Jones Jeremy};

\node[blur shadow, anchor=north west] at ($(current page.north west)+(1,-1)$) {\includegraphics[width=5cm, height=4cm]{example-image}};
\end{tikzpicture}

\end{document}

相关内容