I am trying to reproduce a word report template in LaTeX to speed up my report writing. I have some basic LaTeX skill, but I am having trouble producing the blue page border as shown in the picture. I also don't know how to create the header information with the page border and the Title inside the blue box. I assume that the package TikZ can be used to draw the page border, and fancyheader for the header information but how to use the packages together is causing me confusion.

I have attached an image of the basic word document I am trying to reproduce. Note all information shown is to be repeated on every page.

Any help and direction is appreciated.

word template http://static.dyp.im/WPtl9sR7Yk/e040cc378436b6fe4a32f9960fd0112e.PNG

  • When I'm converting this kind of thing from Word, I usually start by converting using wv from sourceforge.net/projects/wvware. (Actually, I used my package manager to install but that's the source.) Since you don't say what system you are using, I don't know if this is relevant to you or not. It does not produce clean code and it does not get everything right but I find it makes a useful place to start (easier than starting from scratch). Does the Word template contain images or is that all created within Word?
    – cfr
    Jan 12, 2014 at 22:57
  • That border could be constructed using a combination of the background and tikzpagenodes package. See tex.stackexchange.com/a/103314/21891 for an example.
    – jub0bs
    Jan 12, 2014 at 23:15

1 Answer 1


This was accomplished using a combination of the everypage package and TikZ.

output top

output bottom

output spread

To build, run

pdflatex -recorder <file>
pdflatex <file>

The first run with -recorder is to generate the files needed for the currfile package (to automate the bottom left). The second run is to sort out TikZ issues and to resolve labels used for the bottom right. (Some odd behavior can be seen after the first run.)

And here is how you can use it:


\address{123 Main St.}
        {City, State}
\phone{(777) 777-7777}
\fax{(777) 777-7777}



The Class File

Since this is a Word template, it is appropriate to create a document class for it:

\ProvidesClass{wordreport}[2014/01/01 A domain-specific, Word-like report template]







  report blue/.style={
  report gray/.style={
  report frame/.style={
    report blue,

  \begin{tikzpicture}[remember picture, overlay]
      \coordinate (top left)     at ($ (current page.north west) + (1cm,  -1cm) $);
      \coordinate (top right)    at ($ (current page.north east) + (-1cm, -1cm) $);
      \coordinate (bottom left)  at ($ (current page.south west) + (1cm,  1cm) $);
      \coordinate (bottom right) at ($ (current page.south east) + (-1cm, 1cm) $);
      \coordinate (frame top left)     at ($ (top left)  - (0, 2.5cm) $);
      \coordinate (frame top right)    at ($ (top right) - (0, 2.5cm) $);
      \coordinate (frame bottom left)  at ($ (bottom left)  + (0, .5cm)$);
      \coordinate (frame bottom right) at ($ (bottom right) + (0, .5cm)$);
      \coordinate (frame title mid left)  at ($ (frame top left)  + (1cm,  0) $);
      \coordinate (frame title mid right) at ($ (frame top right) + (-1cm, 0) $);
      \coordinate (frame title top left)  at ($ (frame title mid left) + (0, 3mm) $);
      \coordinate (frame title top right) at ($ (frame title mid right) + (0, 3mm) $);
      \coordinate (frame title bottom left)  at ($ (frame title mid left) - (0, 10mm) $);
      \coordinate (frame title bottom right) at ($ (frame title mid right) - (0, 10mm) $);
      \node [opacity=0.5] at (top left)  [below right]
      \node [report blue] at ($ (top left) + (0cm, -1.9cm) $) [right]
        \sffamily TEST REPORT%
      \node [report blue] at ($ (top right) + (3mm, -2mm) $) [below left]
          Address Information. &                               \\[.5ex]
          \@addressA           & \@symbol@phone      & \@phone \\  %marvosym
          \@addressB           & \@symbol@fax        & \@fax   \\ %marvosym
          \@addressC           & \@symbol@webaddress & \@webaddress
      \node [opacity=0.5, report blue] at ($ (frame bottom left) - (3mm, 0) $) [below right]
          COMPANY CONFIDENTIAL \\[-1ex]
      \node [opacity=0.5, report blue] at ($ (frame bottom right) + (2mm - 2pt, 0) $) [below left]
        Page \thepage\ of \pageref{LastPage}
      \node [report gray] at ($ (frame top right)!.5!(frame top left) $) [below]
      \node [report gray] at ($ (frame title bottom left) - (3mm, 0) $) [below right]
          Prepared for: & \@prepared@for \\
          PO Reference: & \@po@reference
      \node [report gray] at ($ (frame title bottom right) + (3mm, 0) $) [below left]
          Project Number: & \@project@number \\
          Test Report Number: & \@test@report@number
      \draw[report frame]
        (frame bottom left) --
        (frame bottom right);
      \draw[report frame]
        ($ (frame bottom left) + (0cm, 1mm) $) --
        (frame top left) --
        (frame title mid left);
      \draw[report frame]
        ($ (frame bottom right) + (0cm, 1mm) $) --
        (frame top right) --
        (frame title mid right);
      \draw[report frame]
        (frame title top left) rectangle (frame title bottom right);



As successive edits to this question will CW it, see the gist for any future revisions.

  • I don't think it will be CW if edited. I have an answer with more edits and it is not (quite) CW though one more would do it. (I didn't know anything about CW and didn't know not to make tiny edits.) I think they changed the rules at some point, I read somewhere so stuff didn't go CW quite as easily.
    – cfr
    Jan 23, 2014 at 2:43
  • @cfr I have a bad habit of going back and making many small fixes and changes, bumping the edit count. When the number of edits surpass ten, the answer is automatically made CW by the system. Jan 23, 2014 at 7:11
  • But it only shows 3 edits when I look at the revision history so it doesn't appear to be near 10. (Not that I'm suggesting your post should be edited.)
    – cfr
    Jan 23, 2014 at 14:54

You must log in to answer this question.

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