2

I'm experienced with Latex but more or less plain Latex without much graphical content. Anyway, I'm trying to create a template for invoices and other official documents. Therefore I want a simple design that follows a corporate identity.

Question: But I have no idea how to add those blue lines both to the title page and to the default page style (odd and even). I had a look at the TikZ package but I have no idea how to apply & place it on a page or inside a page header.

Any help is appreciated.

This would be a design of a title page including the company details on the right and a logo on the upper right.

title page

This is a design of a default even/odd page having a header including the blue line and the document title.

default page

2

Construct the frame with tikzpicture using the options remember picture,overlay. In the picture you can refer to the corners of the page using (current page.north west) etc.

Then use the command \AddEverypageHook provided by the package everypage to add the frame to, well, every page.

enter image description here

\documentclass{article}
\usepackage{everypage}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand\myframe
  {\begin{tikzpicture}[remember picture, overlay]
    \draw[rounded corners=20pt,blue]
      ($(current page.north west) + (1in,-1in)$)
      rectangle
      ($(current page.south east) + (-1in,1in)$);
    \draw[red,thick]
      ($(current page.north west) + (1in+\oddsidemargin,-(1in+\topmargin+\headheight+\headsep)$)
      -- +(\textwidth,0);
   \end{tikzpicture}
  }
\AddEverypageHook{\myframe}
\usepackage{blindtext}
\begin{document}
\Blindtext
\Blindtext
\Blindtext
\end{document}
  • Many thanks. So you would do a similar frame for the title page and add that one only once without using the AddEverypageHook? – Matthias Jan 25 '17 at 7:22
  • @Matthias Yes, add \myframe to \begin{titlepage}...\end{titlepage}, or before the final \clearpage of the title page. I understood your question as asking how to add the frame everywhere. – gernot Jan 25 '17 at 8:06
  • Question was towards title page and default pages :) but your solution is great. Thanks – Matthias Jan 25 '17 at 8:43
  • @Matthias Probably a different understanding of what "default page style (odd and even)" means. Great, if your problem is solved ... – gernot Jan 25 '17 at 8:49
  • one more question: do you know how to refer to the text-left-start. I mean how to make the line start where the text starts? You using the page.north etc but without the boundaries. – Matthias Jan 25 '17 at 19:05

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.