6

My school requires a "Confidential" mark on the frontpage. I have something like this in mind, as it doesn't completely ruin the frontpage:

How would I go about doing something like this?

2
  • Hi ! show us what you code so far (give us a MWE) ; You may use tikz package
    – flav
    Commented Dec 2, 2016 at 9:05
  • @flav I literally have no idea where to go. It has to ignore the margin completely and be positioned absolute (I can only relate to CSS) Commented Dec 2, 2016 at 9:07

1 Answer 1

8

Here is how to draw such a strip over a page. You have two parameters \stripskip and \stripwidth to define the position of the strip.
Text will be automatically centered.

NB: the rest of the thesis is up to you (-;

enter image description here

\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}
3
  • Any idea how I can move the ribbon to the lower right corner? Commented Mar 19, 2017 at 9:28
  • 1
    @KristianNordestgaard I would suggest you to study and understand the code (no offense intended, though): It is pretty well structured, and only uses basic tikz concepts. Using it without understanding how it works is never a good idea. Take you time, have a look at a basic tikz introduction (it's interesting in itself) and cherry-pick in the manual missing concepts. Fiddle with the code (e.g. change some numerical values) to see how it works. And don't hesitate to ask again in comments if you don't understand some commands. This is imho the best to do.
    – ebosi
    Commented Mar 19, 2017 at 16:16
  • 2
    @KristianNordestgaard If you want to take a shortcut without knowing the regular way, you have to change (current page.north east), as well as change some + into - (or vice-versa) in the definition of coordinates A, A', B, and B'. You could also add \node [black] (AA) at (A) {$\bullet$};\node [blue] (AA') at (A') {$\bullet$};\node [yellow] (BB) at (B) {$\bullet$};\node [green] (BB') at (B') {$\bullet$}; (below \node [confidential](text)...) to visualize more easily what you're doing. Ganbatte kudasai!
    – ebosi
    Commented Mar 19, 2017 at 16:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .