If don't see clear, in top left corner is picture (university logo) and in top right corner are page numbers.

We have specific header and footer at university. Because i'm new in LaTeX, could someone help me with creating this:


i need this in all pages

  • 3
    I can not download your file. It is better to host an image. – Sigur Apr 6 '13 at 18:56
  • 3
    Welcome to TeX.sx! Please show some attempt you've made in achieving this and specify what you're struggling with. The point of this Q&A site is to solve specific problems, not to have other people do your work. The standard package for headers is fancyhdr. – doncherry Apr 6 '13 at 19:00
  • 1
    As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. – texenthusiast Apr 6 '13 at 19:03
  • Do you need this frame in all the pages of your document? – Gonzalo Medina Apr 6 '13 at 20:12

Here's one possibility using the background package to place the frame in all the pages of the document; the frame was built using two tabular environments; changing the lengths \xsh and \ysh, (resp.), the user can dynamically change the horizontal, vertical (resp.) separation between the text and the frame.

\usepackage[a5paper,centering]{geometry}% a5paper just for the example
\usepackage{lipsum}% just to generate text for the example

% a new column type

% auxiliary lengths

% apply changes here to the width and height of the frame 


% auxiliary commands for the coursename, the course number and the logo

% the main part
% Here we built the frame using two tabular environments:
% one for the header, the other one for the footer
\begin{tikzpicture}[remember picture,overlay]
\draw ([xshift=-\xsh,yshift=\ysh]current page text area.north west) --
  ([xshift=\xsh,yshift=\ysh]current page text area.north east) --
  ([xshift=\xsh,yshift=-\ysh]current page text area.south east) --
  ([xshift=-\xsh,yshift=-\ysh]current page text area.south west) -- cycle;
\node[anchor=north,inner sep=0pt] at ([yshift=\ysh]current page text area.north)
\multirow{2}{*}{\includegraphics[height=15pt,width=\dimexpr.3\framewd-12.46pt\relax,keepaspectratio]{logo}} & \textsc{Course}: & \@cnumber \\
& \multicolumn{1}{c|}{\@coursename} & \thepage/\pageref{LastPage} \\
\node[anchor=south,inner sep=0pt] at ([yshift=-\ysh]current page text area.south)
Id number & Last name and name & Level & Year & E & Sign\\
& & & & & \\


% assign here the course name and course number
\coursename{General Topology}
\cnumber{444 555 111-02}




enter image description here

The line


simply replaces actual images with black rectangles; making thus my example code compilable for everyone. Delete that line in your actual document and make sure to use the right name of your own logo image in the argument of the \includegraphics command.

  • 1
    Once again: Should we answer really bad questions? – doncherry Apr 6 '13 at 23:05
  • 1
    @doncherry In this particular case, the user is both new to the site and to LaTeX, so I thought he might need a little help (specially in this case that might not be trivial for new users). – Gonzalo Medina Apr 6 '13 at 23:11
  • @user28597 You're welcome. Since my answer seems to have solved your problem, please consider accepting it (using the check-mark to the left of the answer); in case of doubt, please see How do you accept an answer?. – Gonzalo Medina Apr 7 '13 at 14:17

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.