首页右上角的机密标记/丝带

首页右上角的机密标记/丝带

我的学校要求在首页上标注“机密”标记。我想到了这样的做法,因为它不会完全破坏首页:

我该如何做这样的事情?

答案1

以下是如何在页面上绘制这样的条带。您有两个参数\stripskip\stripwidth定义条带的位置。
文本将自动居中。

注意:论文的其余部分由你决定(-;

在此处输入图片描述

\documentclass{scrbook}
    \usepackage{lmodern}
    \usepackage{tikz}
        \usetikzlibrary{calc}

    \newcommand{\stripskip}{5}
    \newcommand{\stripwidth}{3}
\begin{document}
    \begin{tikzpicture}[
        overlay, 
        remember picture,
        legend/.style={|<->|, gray, font = {\ttfamily}},
        confidential/.style={anchor=center, rotate = -45, font={\sffamily\scshape}}
    ]
        \coordinate (A) at ($ (current page.north east) + (-\stripskip,0) $);
        \coordinate (A') at ($(A) + (-\stripwidth,0) $);

        \coordinate (B) at ($ (current page.north east) + (0,-\stripskip) $);
        \coordinate (B') at ($(B) + (0,-\stripwidth) $);

        \fill [red] (A) -- (A') -- (B') -- (B) -- cycle;

        \coordinate (tempA) at ($(A)!.5!(A')$);
        \coordinate (tempB) at ($(B)!.5!(B')$);

        \node [confidential](text) at ($(tempA)!.5!(tempB)$) {Confidential};

        \draw [legend] ($(A) + (0,-.75ex)$) -- ($(A') + (0,-.75ex)$) node [below, midway] {\textbackslash stripwidth};
        \draw [legend] ($(A) + (0,-.75ex)$) -- ($(current page.north east) + (0,-.75ex)$) node [below, midway] {\textbackslash stripskip};
    \end{tikzpicture}

    \centering Lorem ipsum
\end{document}

相关内容