4

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?

  • Hi ! show us what you code so far (give us a MWE) ; You may use tikz package – flav Dec 2 '16 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) – MortenMoulder Dec 2 '16 at 9:07
7

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}
  • Any idea how I can move the ribbon to the lower right corner? – Kristian Nordestgaard Mar 19 '17 at 9:28
  • @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 Mar 19 '17 at 16:16
  • 1
    @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 Mar 19 '17 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.