\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{arrows, shapes, positioning}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\fill[fill=gray!20]([xshift=13mm, yshift=-23mm]current page.north west)rectangle([xshift=-13mm, yshift=-57mm]current page.north east);
\node[fill=blue, draw=none, signal, signal to=east, xshift=-25mm, yshift=9mm, minimum height=3.1cm, minimum width=3.6cm, scale=1]{};
\end{tikzpicture}
\end{document}
目前结果:
预期(?)结果:
答案1
您已经绘制了箭头形状,您只需将文本和横幅放在形状的上方和后方。
\documentclass[12pt]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{tikzpagenodes}
\usetikzlibrary{arrows, shapes, positioning}
\usepackage{lipsum}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\fill[Violet!15] (current page.north west) -- (current page.north east) -- ++(0,-3) -- ++(-\pagewidth,0) -- cycle;
\fill[Violet] (current page.north west) -- ++(0.07\pagewidth,0) -- ++(0.04\pagewidth,-1.5) -- ++(-0.04\pagewidth,-1.5) -- ++(-0.07\pagewidth,0) -- cycle;
\node[color=Violet, font=\bfseries\LARGE\sffamily,anchor=center,xshift=0.5\pagewidth, yshift=-1.5cm] at (current page.north west) {Professional Reference Letter};
\end{tikzpicture}
\lipsum[1-3]
\end{document}
答案2
从 Mane32 的作品中,通过删除未使用的包并使用库来替换\pagewidth
。\paperwidth
我calc
还添加了\heigthheadband
头带的高度。
\documentclass[12pt]{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\newlength{\heigthheadband}
\setlength{\heigthheadband}{3cm}
\tikzset{
title/.style={
color=violet,
font=\bfseries\LARGE\sffamily,
% anchor=center,
xshift=0.5\paperwidth,
yshift=-0.5\heigthheadband,
}
}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\fill[Violet!15] (current page.north west) rectangle ($(current page.north east)+(0,-\heigthheadband)$);
\fill[Violet] (current page.north west) -- ++(0.07\paperwidth,0) -- ++(0.04\paperwidth,-0.5\heigthheadband) -- ++(-0.04\paperwidth,-0.5\heigthheadband) -- ++(-0.07\paperwidth,0) -- cycle;
\node[title] at (current page.north west) {Professional Reference Letter};
\end{tikzpicture}
\lipsum[1-3]
\end{document}