标题设计类似形状

标题设计类似形状

我设计了这个标题,但它不是我理想的图画,谢谢 在此处输入图片描述

\fancypagestyle{mainstyle}{%
\fancyhf{}
\fancyhead[LO,RE]{\myfancynum}

\fancyhead[LE]{%
  \begin{tikzpicture}[overlay,remember picture]
    \node[anchor=west] at ([xshift=12ex,yshift=-14ex]current page.north west) {\textcolor{cyan}{\rl{ نظام جامع آماری شهرداری تهران}}};
  \end{tikzpicture}%
}
\fancyhead[RO]{%
  \begin{tikzpicture}[overlay,remember picture]
%    \node[anchor=east] at ([xshift=-12ex,yshift=-14ex]current page.north east){\textcolor{cyan}{\large\rl{\leftmark}}};
  \end{tikzpicture}%
%\textcolor{cyan}{\leftmark}
}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\linespread{1}
\newcommand{\myfancynum}{%
  \begin{tikzpicture}[remember picture,overlay,yshift=2cm]
      \path (0,0) [use as bounding box]
        node[diamond, draw=white, inner sep=0pt, minimum size=32pt] (pageno) {\thepage} ;
         \node[draw=cyan,star,star points=8,star point ratio=1.25] at (0,0) {\thepage};

%\pic at (0,0) {diamond={name=a}};
%\node at (a.center){\thepage};
%\pic at (0,0) {diamond={name=a}};
%\node at (a.center){\thepage};
    \checkoddpage\ifoddpage
    % 36pt = 32pt + 4pt +4pt; 
    \path (pageno.west) node[fill=cyan, fill opacity=0.4, diamond, inner sep=0pt, minimum size=16pt] {};
   \draw[cyan] (pageno.north) ++(0, +4pt) -- ++(55pt, -55pt) -- ++(2\linewidth,0);

    \draw[cyan] (pageno.east) ++(4pt, 0) -- ++(-60pt, -60pt) -- ++(0, -4cm);


    \else
    \path (pageno.east) node[fill=cyan, fill opacity=0.4, diamond, inner sep=0pt, minimum size=16pt] {};
    \draw[cyan] (pageno.north) ++(0, +4pt) -- ++(-55pt, -55pt) -- ++(-2\linewidth,0);%-40,-40
    \draw[cyan] (pageno.west) ++(-4pt,0) -- ++(60pt, -60pt) -- ++(0, -4cm);

    \fi
    \end{tikzpicture}%
}
\fancyfoot[OL]{%
  \begin{tikzpicture}[overlay,remember picture]
\foreach \x in {1,...,250}
\draw[color=cyan,xshift=2cm,yshift=-0.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=12.4cm,yshift=-0.5cm] {};
  \end{tikzpicture}%
}

\fancyfoot[ER]{%
  \begin{tikzpicture}[overlay,remember picture]
\foreach \x in {1,...,250}
%\draw[color=cyan,xshift=-2cm,yshift=-1.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
%\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=-12.4cm,yshift=-1.5cm] {};%cric fot
%
\draw[color=cyan,xshift=-2cm,yshift=-0.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=-12.4cm,yshift=-0.5cm] {};%cric fot
  \end{tikzpicture}%
}
}
\renewcommand{\headrulewidth}{0pt}
%\fancypagestyle{tocstyle}{%
%\fancyhf{} 
%\fancyhead[C]{%
%\begin{tikzpicture}[overlay,remember picture]
%j
%\end{tikzpicture}
%}
% }

答案1

这只是为了通知您有关包的存在tikzpagenodes,这可能在这里有用。不幸的是,您没有提供完整的文档,因此有太多未知数。特别是关于文档类的信息在这里至关重要,但我觉得无论如何我都无法提供完整的答案,因为我根本不熟悉字体,但你正在使用\rl。请随意使用您问题的更新版本中可能有用的任何内容。

\documentclass{book}
\usepackage{fancyhdr}
\usepackage{ifoddpage}
\usepackage{lipsum}
\usepackage{tikzpagenodes}
\usetikzlibrary{shapes.geometric}
\fancypagestyle{mainstyle}{%
\fancyhf{}
\fancyhead[LO,RE]{\myfancynum}

\fancyhead[LE]{%
  \begin{tikzpicture}[overlay,remember picture]
%     \node[anchor=west] at ([xshift=12ex,yshift=-14ex]current page.north west) 
%   {\textcolor{cyan}{\rl{ AAAAAAAAAAAA AAAAAAAAAAAA AAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAA}}};
  \end{tikzpicture}%
}
\fancyhead[RO]{%
  \begin{tikzpicture}[overlay,remember picture]
%    \node[anchor=east] at ([xshift=-12ex,yshift=-14ex]current page.north east){\textcolor{cyan}{\large\rl{\leftmark}}};
  \end{tikzpicture}%
%\textcolor{cyan}{\leftmark}
}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{fancy}
\linespread{1}
\newcommand{\myfancynum}{%
\begin{tikzpicture}[remember picture,overlay]
 \checkoddpage\ifoddpage
    % 36pt = 32pt + 4pt +4pt; %<- interesting math
    \path (current page text area.north west) -- 
     (current page.north west) node[midway,draw=cyan,star,star points=8,star
     point ratio=1.25] (pageno) {\thepage};

    \path (pageno.west) node[fill=cyan, fill opacity=0.4, diamond, inner sep=0pt, minimum size=16pt] {};
    \draw[cyan] (pageno.north) ++(0, +4pt) -- ++(55pt, -55pt) coordinate(aux)
     -- (current page.east|-aux);
    \draw[cyan] (pageno.east) ++(4pt, 0) -- ++(-60pt, -60pt) -- ++(0, -4cm);
\else
    \path (current page text area.north east) -- 
    (current page.north east) node[midway,draw=cyan,star,star points=8,star
    point ratio=1.25] (pageno) {\thepage};
    \path (pageno.east) node[fill=cyan, fill opacity=0.4, diamond, inner sep=0pt, minimum size=16pt] {};
    \draw[cyan] (pageno.north) ++(0, +4pt) -- ++(-55pt, -55pt) coordinate(aux)
     -- (current page.west|-aux);    
    \draw[cyan] (pageno.west) ++(-4pt,0) -- ++(60pt, -60pt) -- ++(0, -4cm);

    \fi
\end{tikzpicture}%
}
\fancyfoot[OL]{%
  \begin{tikzpicture}[overlay,remember picture]
\foreach \x in {1,...,250}
\draw[color=cyan,xshift=2cm,yshift=-0.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=12.4cm,yshift=-0.5cm] {};
  \end{tikzpicture}%
}

\fancyfoot[ER]{%
  \begin{tikzpicture}[overlay,remember picture]
\foreach \x in {1,...,250}
%\draw[color=cyan,xshift=-2cm,yshift=-1.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
%\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=-12.4cm,yshift=-1.5cm] {};%cric fot
%
\draw[color=cyan,xshift=-2cm,yshift=-0.5cm] node  {\color{cyan}\rule{\paperwidth}{.1pt}};
\node[fill=cyan, fill opacity=1, diamond, inner sep=0pt, minimum size=16pt,xshift=-12.4cm,yshift=-0.5cm] {};%cric fot
  \end{tikzpicture}%
}
}
\renewcommand{\headrulewidth}{0pt}
%\fancypagestyle{tocstyle}{%
%\fancyhf{} 
%\fancyhead[C]{%
%\begin{tikzpicture}[overlay,remember picture]
%j
%\end{tikzpicture}
%}
% }

\pagestyle{mainstyle}
\begin{document}
\chapter{Pft}
\lipsum[1-10]
\end{document}

在此处输入图片描述

相关内容