关于 titlepage 和 tikz 的一些问题

关于 titlepage 和 tikz 的一些问题

我想创建一个带有titlepage和 的标题tikz。但是我对这两个工具都不太了解,因此我需要您的帮助。

以下是我现在得到的信息,然后我有三个问题:

在此处输入图片描述

1. 我怎样才能将黑色头带向上移动一点?

我想减少黑色头带和顶部之间的间距。就像我使用titlepage其他人的代码一样,我不知道该怎么做。

2. 如何添加不同颜色的头带?

我想在黑色头带上方添加另一个不同颜色的头带。颜色为\definecolor{titlepagecolor}{cmyk}{0,11,23,24}。以下是我想要获得的结果:

在此处输入图片描述

3.如何在右侧添加垂直横幅?

我对“垂直横幅”的理解如下。此横幅将包含一个徽标和徽标下方的一些文本。您可以注意到横幅底部的效果;如果 tikz 能实现类似的效果,那就太好了。

在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage{setspace}
\usepackage{graphicx} 
\usepackage{lmodern}
\usepackage{xspace}
\usepackage{geometry}
\usepackage{hyperref}
\usepackage{tikz}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage[some]{background}

\definecolor{titlepagecolor}{cmyk}{0,0,0,80}
\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1cm}

\backgroundsetup{
scale=1,
angle=0,
opacity=1,
contents={\begin{tikzpicture}[remember picture,overlay]
 \path [fill=titlepagecolor] (-0.5\paperwidth,5) rectangle (0.5\paperwidth,10);  
\end{tikzpicture}}
}
\makeatletter                       
\def\printauthor{%                  
    {\large \@author}}              
\makeatother


\author{Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author}

\begin{document}
\begin{titlepage}
\BgThispage
\newgeometry{left=1cm,right=4cm}
\vspace*{2cm}
\noindent
\textcolor{white}{\bigsf My title\\ in two lines}
\vspace*{2.5cm}\par
\noindent
\begin{minipage}{0.35\linewidth}
    \begin{flushright}
        \printauthor
    \end{flushright}
\end{minipage} \hspace{15pt}
%
\begin{minipage}{0.02\linewidth}
    \rule{1pt}{175pt}
\end{minipage} \hspace{-10pt}
%
\begin{minipage}{0.6\linewidth}
\vspace{5pt}
\newenvironment{test}{\begin{center}}{\end{center}}
    \begin{abstract} 
An abstract is a brief summary of a research article, thesis, review, conference proceeding or any in-depth analysis of a particular subject or discipline, and is often used to help the reader quickly ascertain the paper's purpose. When used, an abstract always appears at the beginning of a manuscript, acting as the point-of-entry for any given scientific paper or patent application. Abstracting and indexing services for various academic disciplines are aimed at compiling a body of literature for that particular subject.
    \end{abstract}

\end{minipage}
\end{titlepage}
\restoregeometry


\end{document}

答案1

您实际上不需要这里的包;有以下选项background就足够了:tikzpictureremember picture, overlay

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{setspace}
\usepackage{graphicx} 
\usepackage{lmodern}
\usepackage{xspace}
\usepackage{geometry}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{hyperref}

\usetikzlibrary{shapes.symbols,shadows}

\definecolor{titlepagecolor}{cmyk}{0,0,0,80}
\definecolor{titlepagecolor2}{RGB}{196,175,153}

\DeclareFixedFont{\bigsf}{T1}{phv}{b}{n}{1cm}

\makeatletter                       
\def\printauthor{%                  
    {{\large \@author}}}              
\makeatother

\author{Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author \\Author}

\begin{document}
\begin{titlepage}


\newgeometry{left=1cm,right=4cm}
\begin{tikzpicture}[overlay,remember picture]
% the black stripe with the title
\node[
  fill=titlepagecolor,
  anchor=north west,
  text width=\paperwidth,
  text height=2cm,
  text depth=2cm,
  inner xsep=1cm,
  font=\color{white}\bigsf 
  ] 
 at ([yshift=-2.5cm]current page.north west) (blackrect) {My title \\ in two lines};
% the khaki stripe
\path[fill=titlepagecolor2] 
  (blackrect.north west) rectangle ++(\paperwidth,2cm);
% the banner
\node[
  signal,
  signal from=north,
  signal pointer angle=150,
  fill=white,
  drop shadow={shadow xshift=0pt},
  rotate=-90,
  text width=6cm,
  text height=5cm,
  anchor=north west
  ] (banner) at ([xshift=-3cm,yshift=1cm]blackrect.north east) {};
% the image in the banner
\node[anchor=north] at ([yshift=-1cm]banner.west)
  {\includegraphics[height=2cm]{example-image-a}};
% the text in the banner
\node[
  anchor=south,
  text width=3cm,
  align=center,
  font=\itshape] 
  at ([yshift=2cm]banner.east) {Some text that goes in the banner};
% images on footer
\node[anchor=north east,inner sep=0pt]
  at ([yshift=3cm,xshift=-1cm]current page.south) 
  {\includegraphics[width=5cm,height=1cm]{example-image-b}};
\node[anchor=north west,inner sep=0pt]
  at ([yshift=3cm,xshift=1cm]current page.south) 
  {\includegraphics[width=5cm,height=1cm]{example-image-c}};
\end{tikzpicture}

\vspace*{4.5cm}

\noindent
\begin{minipage}{0.35\linewidth}
    \begin{flushright}
        \printauthor
    \end{flushright}
\end{minipage} \hspace{15pt}
%
\begin{minipage}{0.02\linewidth}
    \rule{1pt}{175pt}
\end{minipage} \hspace{-10pt}
%
\begin{minipage}{0.6\linewidth}
\vspace{5pt}
\newenvironment{test}{\begin{center}}{\end{center}}
    \begin{abstract} 
An abstract is a brief summary of a research article, thesis, review, conference proceeding or any in-depth analysis of a particular subject or discipline, and is often used to help the reader quickly ascertain the paper's purpose. When used, an abstract always appears at the beginning of a manuscript, acting as the point-of-entry for any given scientific paper or patent application. Abstracting and indexing services for various academic disciplines are aimed at compiling a body of literature for that particular subject.
 \end{abstract}
\end{minipage}

\end{titlepage}
\restoregeometry

\end{document}

在此处输入图片描述

回答您的问题:

  1. 我使用了\nodes; 这样,您可以轻松地使用节点锚点放置一些元素。控制节点yshift中使用的 for 值blackrect,您可以随意垂直移动元素。

  2. 黑色水平条纹只是一个填充了一些颜色的矩形节点;要添加另一条条纹,请使用另一个节点并借助锚点将其放置在所需的位置blackrect

  3. 横幅只是一个带有阴影的signal形状(来自库)。shapes.symbols

  4. 底部的图像也可以包含在\nodes 里面。

相关内容